freehuntx / frida-mono-api

All the mono c exports, ready to be used in frida!
MIT License
68 stars 21 forks source link

feat: Added Support for Managed Method Hooking #6

Closed alxbl closed 4 years ago

alxbl commented 4 years ago

First off, I wanted to say this is a really cool project! It's been very helpful to get started doing Xamarin research with Frida on Android! Thanks for sharing!

This pull request adds several export signatures to the raw API, but most importantly, it adds initial support for hooking managed methods. This is exposed in the form of a MonoApiHelper.Intercept function with the following signature: Intercept(klass: ClassMetadata*, methodName: string, callbacks: {onEnter, onLeave}).

The onEnter and onLeave callbacks work identically to the Frida Interceptor API.

I'm open for any feedback, and I hope this will be useful.

Cheers, Alex

freehuntx commented 4 years ago

Hey sorry i answer so late. Tbh im not that active on Github. I will take a look!