Format String Exploitation Question 03-01-2014, 09:51 PM
#1
So, I came across a challenge, that was FSE.
It was already compiled, and I couldn't see the source code(Opened with Gedit, nothing in there) but it did work.
So I saw the solution and was just confused
so, I got the return address
[volplus@root]~#./cocks %x
<insert return address here>
[volplus@root]~# $'AAAAAAAAAAAAAAAAAAAAAAAAA\x\x\x\x\x\x\x <--- the return address backwards
so zxcv
became
cvzx
My questions are:
1) Why the 25 As? To fill the buffer or something? How do we know 25 was enough
2) Why the return address backwards? What does that accomplish instead of going forwards?
It was already compiled, and I couldn't see the source code(Opened with Gedit, nothing in there) but it did work.
So I saw the solution and was just confused
so, I got the return address
[volplus@root]~#./cocks %x
<insert return address here>
[volplus@root]~# $'AAAAAAAAAAAAAAAAAAAAAAAAA\x\x\x\x\x\x\x <--- the return address backwards
so zxcv
became
cvzx
My questions are:
1) Why the 25 As? To fill the buffer or something? How do we know 25 was enough
2) Why the return address backwards? What does that accomplish instead of going forwards?
Unleash the lead from my pistol into my head bumpin' crystal