CTF Writeup: Exploiting Buffer Overflows and Stack Alignment in BronocCTF Pwn Challenge
A medium-difficulty binary exploitation challenge from BronocCTF required players to bypass four sequential "gates" in a C binary compiled without stack canaries, NX, or PIE protections. Each gate function used the unsafe gets() call, enabling classic buffer overflow attacks with fixed, predictable memory addresses. Precise stack offsets were determined via objdump disassembly rather than source code, since C does not guarantee variable layout order in memory. An initial ret2win attempt successfully triggered the win() function but crashed due to stack misalignment, as glibc's system() requires 16-byte stack alignment for SSE instructions. The final exploit accounted for this alignment issue to successfully execute the flag-printing command.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in