Challenge
A forking server with stack canaries, PIE, and full RELRO. Goal: read the flag file.
Approach
- Canary brute-force: The process
fork()s on each connection, preserving the canary across forks. Brute-force the 8-byte canary one byte at a time (256 attempts per byte = 2048 total). - Libc leak: With the canary known, overflow to control
rip; callputs(puts@got)to leak a libc address. - ORW ROP: With libc base known, build a ROP chain to
open("flag.txt")→read(fd, buf, n)→write(1, buf, n).
| |