Skip to content
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

Offset calculation is incorrect #153

Open
Z6543 opened this issue Jan 11, 2022 · 0 comments
Open

Offset calculation is incorrect #153

Z6543 opened this issue Jan 11, 2022 · 0 comments

Comments

@Z6543
Copy link

Z6543 commented Jan 11, 2022

Hi!

There are three appearances of these comments in rop.py
# TODO: Another solution should be used here. This is a hack for compatibility reasons. to resolve the gadget address calculation of segments of elf files have a different base address if calculated segment.virtualAddress - segment.offset

rop.py

The offset calculation is incorrect for PE files if imagebase is provided as a parameter.
For me in the case of PE files
offset = section.offset
resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant