Timeline for How do I go about overriding a function internally defined in a binary on Linux?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 21, 2019 at 21:00 | comment | added | Walaryne | I had tagged the question x86_64, should have said it explicitly in the question though, sorry. Thanks for the example. | |
Jan 21, 2019 at 18:38 | history | edited | wisk | CC BY-SA 4.0 |
Adding an example for x86-64
|
Jan 21, 2019 at 16:18 | comment | added | wisk |
__attribute__((constructor)) is supported by clang. And I'll try to write a quick example.
|
|
Jan 20, 2019 at 19:34 | vote | accept | Walaryne | ||
Jan 17, 2019 at 17:45 | comment | added | Walaryne | Also, if it's not too much trouble, do you think you could write up some example code? Just a simple theoretical function in a binary, and what the shared library code could look like. Even some ASM representation somewhere, if that's possible. I mostly need clarification on how to use the "mprotect() then encode jmp" portion. | |
Jan 17, 2019 at 17:03 | comment | added | Walaryne | Thanks, I really love this answer. It's a really creative way to go about doing this. One thing though, isn't attribute a GCC specific macro? It's not a deal breaker, as I'm pretty sure Clang can handle those macros, but if it can't, is there another way to achieve the same effect? | |
Jan 17, 2019 at 15:26 | history | answered | wisk | CC BY-SA 4.0 |