3 ms·
You can include it, but - either you use chroot, proot or similar to make /lib path contain your executable’s loader - or you hardcode different loader path i
by mdavid626 9mo ago
You can include it, but
- either you use chroot, proot or similar to make /lib path contain your executable’s loader
- or you hardcode different loader path into your executable
Both are difficult for an end user.
- toast0 9mo agoThis isn't that hard (that's not to say this is easy, it is tricky). Your executable should be a statically linked stub loader with an awful lot of data, the stub loader dynamically links your real executable (and libraries, including libc) from the data and runs it.
- fc417fc802 9mo agoTo add to this, in case of any remaining confusion. You can implement your own execve in userspace. [0] But the kernel's execve is a piece of machinery that invokes the loader so obviously it follows that you're free to make any changes you'd like to the overall process. Bonus points if you add compression or encryption and manage to trip a virus scanner or three. [1] [0] https://grugq.github.io/docs/ul_exec.txt https://grugq.github.io/docs/ul_exec.txt [1] https://blackhat.com/presentations/bh-usa-07/Yason/Whitepaper/bh-usa-07-yason-WP.pdf#page=17 https://blackhat.com/presentations/bh-usa-07/Yason/Whitepape...