Binary Exploitation Basics
Binary exploitation — “pwn” in CTF slang — is the art of turning a memory-safety bug into control over a program’s execution. It builds directly on understanding buffer overflows and takes them to their conclusion: not just crashing a program, but steering it to run code of your choosing. It is one of the deepest, most technical skills in security, and deeply rewarding for those who pursue it.
What does it involve?#
Binary exploitation requires reasoning about programs at the level of memory and machine instructions:
- Memory layout — the stack, heap, and how a program’s memory is organized.
- Low-level execution — how the CPU runs code, and how control flow can be hijacked.
- The bug — a memory-safety flaw (buffer overflow, use-after-free) to abuse.
- The mitigations — and how to bypass them.
It shares its foundation with reverse engineering: both demand comfort with how compiled code actually runs.
Do mitigations make it obsolete?#
Far from it — they change the game rather than ending it. Modern defenses raise the bar significantly:
| Mitigation | Effect on exploitation |
|---|---|
| ASLR | Randomizes addresses; must be leaked or bypassed |
| DEP / NX | Data isn’t executable; forces code reuse (ROP) |
| Stack canaries | Detect overflows; must be avoided or leaked |
Much of modern pwn is precisely the craft of bypassing these. And since memory-unsafe C and C++ remain everywhere, the skill stays essential for vulnerability research.
Binary exploitation is memory-safety failure taken to its conclusion. More at the Careers & Practice hub.
Frequently asked questions#
What is binary exploitation?
Binary exploitation (often called "pwn" in CTFs) is the art of taking a memory-safety bug in a compiled program — like a buffer overflow — and turning it into control over the program’s execution, typically to run code of your choosing. It requires understanding memory layout, how programs run at a low level, and the mitigations that make exploitation harder.
Is binary exploitation still relevant with modern mitigations?
Yes. Modern mitigations like ASLR, DEP/NX, and stack canaries make exploitation much harder, but they do not eliminate it — much of the skill now is in bypassing them. Memory-unsafe code (C and C++) remains widespread, and understanding exploitation is essential for vulnerability research and low-level security.