Description
Useless minibin
nc 10.second.ninja 9090
Exploit
This is an extremely short program.
0x8048080 6A 03 push 3 |
At 0x0804909F
, it will invoke sys_read
with following parameters.
eax | ebx (unsigned int fd) | ecx (char __user *buf) | edx (size_t count) |
---|---|---|---|
0x03 |
0x00 |
0x804808B |
0xFFFFFFFF |
This would let us enter arbitrary length of input to 0x0804808B
. After the system call, the program will continue to execute the instruction at 0x08040A1
. Since 0x0804808B - 0x08040A1 = 22
, the program will execute from the 23rd byte of the user input. This is where we should put our shellcode.
1 | from pwnlib.tubes.remote import remote |
Flag:
CTF{5he11c0d3_1s_Soo0o0ooOo_51mp13}