Skip to content

Conversation

@STKFLT
Copy link

@STKFLT STKFLT commented Feb 27, 2021

targets of instructions like 'bl' were wrong because the proper image base was not being taken into account when disassembling. This applies the same solution used to calculate the address of each gadget in gadget.py:209 by adding the image base to the start address when disassembling.

This is presumably caused by:

# rop.py:371
# 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 

I just don't know enough to understand what the fix would look like so this is more of a workaround of a workaround

@STKFLT STKFLT marked this pull request as draft February 27, 2021 20:29
@sashs
Copy link
Owner

sashs commented Apr 25, 2021

targets of instructions like 'bl' were wrong

I am not sure if I understand what do you mean. Do you think the target is shown wrong in the gadget?

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

Successfully merging this pull request may close these issues.

2 participants