WCU / Cybersecurity
~/CSC 472/Class 02/KP 22
Class 02 · KP 22 / 23

Putting It Together: Lab 1

  • Lab 1 gives you a small vulnerable binary with a stack buffer and a hidden "win" function.
  • Your workflow uses everything from today:
  • checksec the binary (expect NX on, no canary, no PIE).
  • In GDB/pwndbg, find the offset from your buffer to the saved return address (use cyclic).
  • info functions / elf.symbols to get the win address.
  • Build b'A'*offset + p64(win_addr) with pwntools.
  • Send it, watch ret jump to win, get the flag.
Key Takeaway

You now understand the target (saved RIP), the mechanism (call/ret), the encoding (little-endian p64), and the tools (GDB, checksec, pwntools).