0

I'm trying to hook a function that is called by another function in a native shared library which is called by the android application.
My call stack goes like the following:

  • function z() in LibB
  • function y() in LibA
  • Android App loading LibA

How do I go about this in frida?

I could successfully hook to direct functions of the android application but this nesting is preventing me from successfully hooking anything let alone locate the proper library/function name.

hegzploit
  • 26
  • 1
  • 3
  • By shared library you mean `.so` file? So you are trying o hook `z()` in `LibB`? Is this function exported or not by LibB? – Robert Feb 27 '23 at 08:18

1 Answers1

0

if you're using frida and the function you want to hook is not exported then the only way to hook it is using the function offset (function address relative to the module) to get the offset in ghidra take the first address the function starts at remove the image base (first address in the module) and for hooking code refer to the answer here

ahmed mani
  • 182
  • 1
  • 10