-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot understand the ret_address in classic overflow module #5
Comments
Hey, where does your ret address point to?
|
I admit I'm a bit confused because in the tutorial the example before the final exploit with shellcode says: |
The stack address relies on different things like environment variables, kernel, etc. You can test it by add another environment variable and you will see that your buffer address is different. Therefore, choosing an stack-address is not the best case.
However, since the binary is very small you should compile it statically as described in the rop section of this tutorial. |
I understood the different choice of ret_address and I was able to replicate the tutorial example. |
Yes, I meant that, otherwise the binary is too small. Another possibility is to use a library that is used by the application, e.g. libc.so. But this is a little bit more work, therefore, I recommend compiling it statically. |
Hi,
I've just started the course and I'm really grateful to have found such a step by step resource.
In the the classic buffer overflow section, I'm not sure I understand why you put:
ret_address = 0xffffd5f0 + 28 + 4
in both examples.
I calculated the correct ret_address for my machine and it works fine but I had to remove
"+ 28 + 4" : the 28 bytes junk is added later and the 4 bytes is the ret address itself
Thank you
The text was updated successfully, but these errors were encountered: