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

Add jmp_esp/jmp_rsp attribute to ROP #1584

Merged
merged 8 commits into from Jun 17, 2020

Conversation

saullocarvalho
Copy link
Contributor

@saullocarvalho saullocarvalho commented Jun 14, 2020

Fixes #1528

I've used setattr to set a different attribute name based on the architecture context.
Is there any better way to do this?

I've thought about using jmp_sp instead of jmp_esp/jmp_rsp, but I've decided to solve as the issue title suggests.

@saullocarvalho
Copy link
Contributor Author

saullocarvalho commented Jun 15, 2020

After reading more the ROP source code, I figured out a way of implement ROP.jmp_esp / ROP.jmp_rsp using the __getattr___ method.

pwnlib/rop/rop.py Outdated Show resolved Hide resolved
pwnlib/rop/rop.py Outdated Show resolved Hide resolved
@heapcrash heapcrash added this to the Someday milestone Jun 16, 2020
@saullocarvalho saullocarvalho changed the title Set ROP.jmp_esp / ROP.jmp_rsp while loading gadgets Add jmp_esp/jmp_rsp attribute to ROP Jun 17, 2020
@zachriggle
Copy link
Member

Deleted my last comment, apparently I forgot how the code looked in the first place.

@zachriggle zachriggle merged commit 4134e60 into Gallopsled:dev Jun 17, 2020
@zachriggle zachriggle modified the milestones: Someday, 4.3.0 Jun 17, 2020
@saullocarvalho saullocarvalho deleted the fix_1528 branch June 24, 2020 09:46
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.

ROP: Should have a ROP.jmp_esp / ROP.jmp_rsp gadget
3 participants