Skip to content

Migrate to manual ELF map model #1

@pqlx

Description

@pqlx

As of now we use LD_PRELOAD in order to inject our library. This method is very limited. We can't attach to running processes and only target dynamically linked binaries.

An alternative might be to simply call the ld.so dlopen method, but this also has caveats:

  • Only dynamically linked binaries have ld.so mapped
  • the dlopen method is often not exported, and we can't always locate it

The best method would be to simple use ptrace and /proc/<pid>/mem to manually map the library .so into the address space. We'd basically write our own ptrace-backed dlopen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions