Pwn
Baby Hippo
Description

Solution
Find the vuln
Binary uses
gets()to read the password intochunkA + 0x14, adjacentchunkBcontains a 4-byte magic. Overflow fromchunkA→ overwrite magic inchunkB.
Compute offset to magic
Craft payload to set magic = 0x1337beef (little-endian)
Flag

Rope or Hope
Description

Solution
Find the vuln
vuln()reads user input into a small stack buffer (stack read of 0x100 into a 0x40 buffer) → stack buffer overflow. Binary is non-PIE, no stack canary, NX enabled → classic ROP is possible.
Compute offset to saved return
Useful gadgets and symbols (from the binary)
Craft payload
Flag

Signal Interceptor
Description

Solution
Find the vuln
The binary exposes a menu option that calls
send_signal(signal_num)which ultimately doesraise(signal_num). A signal handler forSIGALRM(signal 14) setsalarm_triggeredand causes the program to open and print/home/ctf/flag
Key idea
Trigger the SIGALRM handler by causing the program to raise signal
14via the menu option.
What to send
Craft payload
Flag
Flag: GCTF25{s1941ARm_34f8250fdea5_5i6naL_aLARm}
The Gatekeeper's Weakness
Description

Solution
Find the vuln
The binary calls
gets()into a 72-byte stack buffer insidegatekeeper().Saved EBP + return address lie right after the buffer, so we can overwrite the return address.
A hidden
win()function exists at0x08049296, which prints the flag.
Compute offset to jump to win()
Craft payload
Flag

The Shopkeeper's Math Error
Description

Solution
Find the vuln
The program computes
total = qty * priceusing 32-bit signed arithmetic. An overflow on the 32-bit multiply wraps modulo2^32and is then interpreted as a signed value. The code treats certain negative totals specially and prints the legendary/flag output.
Compute the magic
qtyto force a target signed total
Craft payload
Flag

Last updated