-
Notifications
You must be signed in to change notification settings - Fork 75
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
Unable to locate _dl_open symbol #8
Comments
Which distro are you running? |
I'm using ubuntu 20 |
I'm also having this issue on Ubuntu 20. Searching through commits on binutils From some googling around and playing with the binary itself I started to dig into Edit: |
If the symbol is no longer exported, then I have a vague idea for a workaround - which is, to locate the function via heuristics. I'll need to see if any of the exported functions reference it, and if so, disassemble them to extract its offset. |
I got the same issue on Ubuntu 21. Tim |
Note to self: investigate See also: apitrace/apitrace#756 (might need that heuristic approach after all) |
Upon further investigation, these changes were made because libdl is now directly part of libc - so I suppose we can just use dlopen directly, on newer libcs? |
@DavidBuchanan314, we just moved a tool that started out as a fork of I've listed the variations I found in my testing here: https://github.com/BishopFox/asminject/blob/main/docs/examples-shared_library_injection.md |
You only need to change 86 lines of code to ‘’if re.match(r"./libc-..so", ld_path):‘’ and change 94 lines of code to "dl_open_offset = lookup_elf_symbol(ld_path, "__libc_dlopen_mode")" and chane 33 lines to "symtab = elf.get_section_by_name(".dynsym")", then it'll be succeed. |
Have you tried that on several Linux distributions? As I mentioned in my reply, there seems to be at least three different models that different Linux distributions use. So I would expect your approach to work on Debian and its derivatives (although maybe not newer versions of Ubuntu), but not on OpenSUSE or Arch, for example. |
Hi David,
I'm testing this code and getting this error.
Can you help me?
The text was updated successfully, but these errors were encountered: