The injector merely mimics the common strategy for injecting DLL in Windows applications.
- Attach to the injected process.
- Save current state (registers and such).
- Write a
.sopath to a R/W memory area. - Place
dlopen()arguments on the corresponding registers. - Locate and call
dlopen()from withinlibc. - Revert the
.sopath's memory. - Revert to the previous process state.
All of this would be done using ptrace().