Saturday, December 13, 2014

Protostar - Stack #0


This level introduces the concept that memory can be accessed outside of its allocated region, how the stack variables are laid out, and that modifying outside of the allocated memory can modify program execution. (link)

Source Code:


As the very first level in the Protostar series, this challenge covers the basics of buffer overflows.

To break it, we just need to feed the gets call more than the 64 bytes allocated in buffer and it should overflow into the adjacent modified variable.

Running python -c "print 'x'*65" | ./stack0 gives us the following output:

you have changed the 'modified' variable

We're done!

No comments:

Post a Comment