-
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
Library fix #1911
Library fix #1911
Conversation
… ELF This is a (partial) fix for Gallopsled#1871. Executing the ELF with this environment flag causes it to instead print the loaded object files. This is the approach used by `ldd`. However, it has the disadvantage of not returning *all* the mappings of procfs (i.e. heap, stack, the binary itself).
The 'more correct' solution would be to upgrade the shellcode, like in the discussion in #1871. Otherwise, it looks well. |
Another issue with Edit: Looks like musl |
What about checking for the kernel version, as well as GNU ldd being present? |
Not really, I think the proper fix is to emit correct shellcode that cats /proc/self/maps, but does it portably, and then it will just work without next workarounds. The only bad news is that every architecture needs a separate shellcode. |
They can be added one after the other though when people need them? E.g. I'd be fine drafting some shellcode for x86, but don't want to commit to writing something for all supported architectures. |
Yes, @peace-maker is correct. A different shellcraft.amd64.linux.cat implementation is enough for now. FYI the common amd64 (i386 too) shellcraft convention is to have a socket in ebp by default, and the opened fd in eax. |
Obsoleted by #1995 |
This is a (partial) fix for #1871. Executing the ELF with this environment flag causes it to instead print the loaded object files. This is the approach used by
ldd
. However, it has the disadvantage of not returning all the mappings of procfs (i.e. heap, stack, the binary itself).