Pwn

Baby Hippo

Description

Solution

  1. Find the vuln

  • Binary uses gets() to read the password into chunkA + 0x14, adjacent chunkB contains a 4-byte magic. Overflow from chunkA → overwrite magic in chunkB.

  1. Compute offset to magic

  1. Craft payload to set magic = 0x1337beef (little-endian)

Flag

Rope or Hope

Description

Solution

  1. 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.

  1. Compute offset to saved return

  1. Useful gadgets and symbols (from the binary)

  1. Craft payload

Flag

Signal Interceptor

Description

Solution

  1. Find the vuln

  • The binary exposes a menu option that calls send_signal(signal_num) which ultimately does raise(signal_num). A signal handler for SIGALRM (signal 14) sets alarm_triggered and causes the program to open and print /home/ctf/flag

  1. Key idea

  • Trigger the SIGALRM handler by causing the program to raise signal 14 via the menu option.

  1. What to send

  1. Craft payload

Flag

Flag: GCTF25{s1941ARm_34f8250fdea5_5i6naL_aLARm}

The Gatekeeper's Weakness

Description

Solution

  1. Find the vuln

  • The binary calls gets() into a 72-byte stack buffer inside gatekeeper().

  • Saved EBP + return address lie right after the buffer, so we can overwrite the return address.

  • A hidden win() function exists at 0x08049296, which prints the flag.

  1. Compute offset to jump to win()

  1. Craft payload

Flag

The Shopkeeper's Math Error

Description

Solution

  1. Find the vuln

  • The program computes total = qty * price using 32-bit signed arithmetic. An overflow on the 32-bit multiply wraps modulo 2^32 and is then interpreted as a signed value. The code treats certain negative totals specially and prints the legendary/flag output.

  1. Compute the magic qty to force a target signed total

  1. Craft payload

Flag

Last updated