Adding code to an existing ELF file
dropbear.sh
Adding code to an existing ELF file
1–10 of 10 posts
Re: Adding code to an existing ELF file
#2Re: Adding code to an existing ELF file
#3Re: Adding code to an existing ELF file
#4Re: Adding code to an existing ELF file
#5Re: Adding code to an existing ELF file
#6It works on rooted devices, debuggable apps, and can also be added to an existing APK with minimal effort (just patch a single Java class and add a native library - there are scripts to do it for you).
Re: Adding code to an existing ELF file
#7Re: Adding code to an existing ELF file
#8I've had great success using Frida ( https://frida.re/ ) to do stuff like this recently. Frida injects a V8 runtime into the target process, enabling you to use JavaScript to dynamically patch/inspect/modify code and data, with all of the JavaScript running inside the target process so there's minimal impact on performance. They provide a nice Python API for remotely controlling the process. It works on rooted device…
It's one of those tools that is clearly made by someone who completely gets how it's going to be used. Every time you want it to do something "new", it turns out there's already a short paragraph in the docs that you skimmed over explaining either how to do it or pointing you at an "extension" that can.
Re: Adding code to an existing ELF file
#9Re: Adding code to an existing ELF file
#10That's cool :) I think it would be a lot easier to inject the payload at runtime though - the only problem I had when doing this was I got the wrong instruction set initially (thumb vs non-thumb).