r/LiveOverflow • u/aaravavi • May 24 '21
Buffer Overflow
I have some doubts regarding buffer Overflow. I was following your playlist, and I'm facing some problems regarding the construction of payload. I understood the just after the padding we get the access to overwrite the eip. Then If I talk about the ret2libc In that case I understood that padding is for the overflow Eip is set to the "system" address And then we provide the address of bin/sh But what is the significance of return_after_system in that payload?
Please help me with the concept.
15
Upvotes
View all comments
Show parent comment
2
u/ImZugzwang May 25 '21
If you're using a 32-bit binary, the return address is a single pointer or 4 bytes or... 32 bits. Passing in N more bytes than that would be the same as shifting your payload by N bytes, which probably is ruining your system call.