Search knowoholic.com musings of a knowledge worker Menu Menu Search Search for: Close search Close Menu Home About Privacy Policy Email Categories Security Buffer Overflow Prelude: exploit.education Phoenix 0-4 – Intel 64-Bit Post author By Kristian Rother Post date June 11, 2022 I’ll outline my progress in binary exploitation on Linux. As a target I’m using the Phoenix exercises from exploit.education which can be found at http://exploit.education/phoenix/ . However, I don’t use the provided virtual machi
The first type of binary exploits that are covered in the exercises are stack based buffer overflows. The canonical tutorial for buffer overflows titled “Smashing the Stack for Fun and Profit” can be found in Phrack 49×14 [1]. The basic idea is to put more data into a buffer than expected and thus have this data flow into areas of memory where it is not supposed to be. Modern day Linux has various protection mechanisms that protect against buffer overflows (like canaries, address space layout randomization
gcc -fno-stack-protector -no-pie -z execstack -o phoenix_stack0 phoenix_stack0.c Disassembly The disassembly of the main() function of Phoenix 0 ( disass main ) in gdb shows how the stack is created. Note that I prefer Intel syntax which can be enabled within gdb with set disassembly-flavor intel . We set three breakpoints one at the beginning of main() ( b *main ) and one before ( b *0x0000000000401163 ) and one after ( b *0x0000000000401168 ) the call to gets().