← BACK TO CHALLENGES
LINUX

PASSCODE

GOT Overwrite
250
POINTS
DESCRIPTION
The program has two scanf calls that use a pointer incorrectly - they write to whatever address the uninitialized local variable holds. Combined with a printf format string leak, you can overflow name[] to plant an address where passcode1 lives on the stack, then write the address of the login-success block into fflush@GOT. When fflush() is called, execution jumps to your target instead.
HOW TO CONNECT
SSH into the challenge server: Host: pwnable.kr Port: 2222 User: passcode Pass: guest Command: ssh [email protected] -p2222 Analysis steps: cat passcode.c readelf -r passcode gdb ./passcode python3 exploit.py
ssh [email protected] -p2222
SUBMIT FLAG
Login or register to submit flags and earn points.
Flags are found on the challenge server after successful exploitation.