Description
Mommy! what is a file descriptor in Linux?
ssh [email protected] -p2222 (pw:guest)
Exploit
1 | #include <stdio.h> |
The target program will read 32 bytes from file descriptor argv[1] - 0x1234
, and if the content equals to LETMEWIN\n
, it will output the flag. To solve this problem, we can pass 4660 (0x1234) as the first argument. Then this program will read from the standard input, which we can assign its value to LETMEWIN\n
to get the flag.
$ echo "LETMEWIN" | ./fd 4660 |
Flag:
mommy! I think I know what a file descriptor is!!