Suppose I have a C# method with the following signature

public virtual void DoSomething(int index, int value, List<int> results)

I've had success so far using Frida to hook into the method call like so

Interceptor.attach(Module.findBaseAddress("library.so").add(0x123456), {
   onEnter(args) {
      log(args[2]) // here I'd like to print the values of the list

Logging out the pointer to the argument itself gives me a value like 0x1. If the pointer was a for a primitive I'd have used something like args[2].readUtf8String() to read the value but I'm not sure how to approach a List<int> or really any complex object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.