Initiating Linux Binary Exploitation: A Beginner's Expedition into Code Manipulation

Linux binary exploitation from the start: assembly, stack overflows, format strings, shellcode and the mitigations that get in the way.

Chapters
11 chapters
Total reading time
2 h of reading
Written
2023
Start with chapter 1

Chapters, in order

  1. 1 Embarking on the Exploration: Fundamentals of Binary Exploitation on Linux Introduction Embarking on a journey to unravel the intricacies of binary exploitation techniques, I'm excited to share my experiences in this series. While it's admittedly one of the trickier topics to tackle, especially for beginners, I've decided to take the plunge in 2023! 😅 My guide of choic... 12 min
  2. 2 Dancing with Functions: Unraveling the Assembler Function Convention in x32 Explore x32 function calling, the dance of frame pointers, and the ballet of call instructions. Each segment crafts an eloquent narrative in the intricate performance on the stack. Witness the artistry of assembly language unfold. 5 min
  3. 3 Decoding the Compiler: A Deep Dive into the Phases of C Code Compilation The C compilation process encompasses preprocessing, compiling to assembly, assembly to machine code, linking object files, and managing libraries. Symbols are key for functions and variables. Each phase contributes to creating efficient software for C programmers 11 min
  4. 4 Exploring ELF Binary Dynamics: Relocations and Sections in Depth Explore ELF binaries in Linux: Understand disassembly, sections like .text, .init, and dynamic linking with PLT, GOT. Uncover memory management, variables in .bss, .data, .rodata, and delve into lazy binding for efficient, secure code execution 15 min
  5. 5 Exploring Buffer Overflow Exploits: A Practical Guide with Dynamic Analysis We explore vulnerable code, disabling defenses and utilizing radare2 for dynamic analysis. Focusing on 'strcpy' and 'Smash the Stack' attack, we manipulate a buffer to alter 'modified'. The article covers buffer overflow, debugging, and the significance of testing various payloads 12 min
  6. 6 Shellcode Mastery: Crafting, Optimizing, and Debugging Assembler Code "Explore shellcode development: Learn assembler programming for creating efficient, compact shellcodes, avoid null character issues, and use diagnostic tools like radare2 and strace for effective troubleshooting 15 min
  7. 7 Exploiting Buffer Overflow: Crafting Interactive Shell Exploits with Shellcode This chapter combines shellcode knowledge and buffer overflow exploitation to gain shell access through a vulnerable program. It includes using pwndbg for detailed analysis and advanced pwntools for crafting effective exploits, bridging theory and practice. 12 min
  8. 8 Advanced Exploits: Overcoming Restrictions with GOT and PLT Expanding Exploit Techniques: This chapter delves into complex exploit scenarios, utilizing GOT and PLT knowledge to bypass advanced code restrictions, enhancing our toolkit with dynamic function resolution strategies. 16 min
  9. 9 Mastering Format String Exploits: A Comprehensive Guide Explore the intricacies of format string vulnerabilities in C programming. Learn their risks, exploit development with radare2, and crafting Python exploits. Gain crucial insights into secure coding practices. 14 min
  10. 10 Mastering Binary Exploitation: Unleashing the Power of Format String and Buffer Overflow In this chapter, we explore binary exploitation, focusing on buffer overflow and format string vulnerabilities. Using radare2, we pinpoint key memory addresses and adjust character counts in our exploit, overcoming challenges like unexpected compiler behavior. 13 min
  11. 11 ROP Magic: Exploiting Linux Binaries with ret2libc Discover the art of ROP in binary exploitation. From buffer overflows to crafting a "/bin/sh" execution using libc gadgets, this article provides insights into bypassing security measures and mastering exploit development with practical examples. 13 min