-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add new ROP
feature: relative stack offset
#2583
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
base: dev
Are you sure you want to change the base?
Conversation
Nice, can you please add a test to the ROP class itself or the module at the top which verifies this works as expected? You can look at the other tests which use |
I added the |
I am also thinking about this question. If I want to set an address precisely to the front or back of a gadget or data during ROP writing, due to the encapsulation of some ROP layouts, how should I do this? Since the length of the data after the gadget is uncertain, it seems difficult to achieve this requirement. |
The document is complete and can be reviewed. |
Add new
ROP
feature: relative stack offsetSometimes, the ROP needs to be set using the relative offset position on the stack.
This is a temporary solution.
But sometimes errors occur.
Because of the existence of
AppendedArgument
, arguments will be placed at the end of the stack.len(rop.chain())
will not be the correct offset from base to the current slot.Therefore, I added a class
StackRelative
and added the processing logic forStackRelative
in theROP.build
functionAt this point we can use this to solve the above example.