-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 code for injecting proc/self/maps shellcode into an ELF #1051
Conversation
20e259b
to
37ae54d
Compare
I need to add a check to see if there's enough room in |
pwnlib/elf/maps.py
Outdated
|
||
shellcode = { | ||
'i386': | ||
'680101010181342460717201686c662f6d68632f7365682f70726f89e331c931d26a0558cd806a015b89c131d268ffffff7f5e31c0b0bbcd80' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge magical constant without a comment. Really? ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shhh, just trust me 😉
bdab844
to
baca232
Compare
baca232
to
29828c3
Compare
The doctests in |
2a32645
to
b53e58a
Compare
return {} | ||
|
||
# Swap in the original ELF name | ||
data = data.replace(path, elf.path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant self.path
data = data.replace(path, elf.path) | |
data = data.replace(path, self.path) |
"""Dictionary of {name: address} for every mapping in this ELF's address space.""" | ||
if self._maps is None: | ||
self._populate_libraries() | ||
return self._maps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be cached, since it can change at runtime.
Closes #925