Skip to content

Conversation

Caesurus
Copy link

@Caesurus Caesurus commented Apr 7, 2018

I tested this with the PIE binary that I've been working with and with a standard binary like ls

@lunixbochs
Copy link
Owner

0x19+size seems wrong, maybe it should still be hello, then do %#x-rip?

@lunixbochs
Copy link
Owner

lunixbochs commented Apr 8, 2018

memcpy PIE is done here with the magic _PKST_ label: https://github.com/lunixbochs/patchkit/blob/master/core/arch.py#L73

@Caesurus
Copy link
Author

Caesurus commented Apr 10, 2018

That's exactly what I was looking for. Updated as you suggested, looks much better.
Tested with PIE and standard ls binary

It is a shame that the hello variable isn't used though, it's nice to see that inject returns that address and how to use it. Maybe it's good to have this as a separate example, hello64_pie.py?

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