Binary Exploitation & Reversing
Reading, debugging and exploiting compiled programs: from x86-64 assembly and system protections to stack and heap memory corruption, and the techniques to analyze binaries without source code.
START HERE
CARDS (14 cards)
pwn-reversing/
- Introduction to Binary Exploitation
Introduction to binary exploitation: memory corruption in C/C++, protections (NX, ASLR, canary, PIE) and the working environment.
- x86-64 Assembly
x86-64 assembly for exploitation and reversing: registers, instructions, the stack, calling conventions and how to read disassembly.
- Stack Buffer Overflow
Stack buffer overflow: how overflowing a stack buffer overwrites the return address, from the classic case to ret2libc and ROP.
- Format String
Format string vulnerabilities in C: how printf with user input lets you read and write memory, and how they are exploited.
- Return-Oriented Programming (ROP)
When the stack isn't executable (NX/DEP enabled), you can't put shellcode and jump to it.
- Heap Exploitation
glibc heap exploitation: how malloc and free manage memory, use-after-free, double free and attacks on tcache bins.
- Shellcode
Shellcode: what it is, how to write it in assembly, how to avoid null bytes and how to generate and test it to spawn a shell.
- Introduction to Reversing
Reverse engineering (reversing) is the art of understanding how a program works without its source code, starting only from the compiled binary.
- Debugging with GDB
Debugging with GDB and extensions like pwndbg or GEF: breakpoints, stepping, and inspecting memory and registers.
- GOT/PLT Overwrite
GOT and PLT: how shared library functions are resolved and how overwriting the GOT hijacks execution. Mitigation with RELRO.
- Integer Overflow and Integer Bugs
Integer overflows and integer bugs in C: wraparound, truncation and signedness confusion, and how they lead to memory corruption.
- Static Analysis
Static binary analysis: disassemble and decompile with Ghidra, IDA or radare2, and read strings, imports and structure without running it.
- Dynamic Analysis
Dynamic binary analysis: run in a controlled environment and watch files, network and system calls with strace, ltrace and more.
- Anti-debugging and Anti-analysis
Anti-debugging and anti-analysis techniques in malware and software protections: how they detect the analyst and how to bypass them.