Closed Ayrx closed 4 years ago
Hi,
Thanks for your message. Yes I do want to do something like that, I have been thinking about the best way to expose it as an API. Any thoughts on how you would want to use it as an NPM package would be appreciated :).
Thanks
My (current) use case is pretty simple. I want to log calls to specific JNI methods in a format that other scripts can consume.
I think the ability to write a NativeCallback
and tell your library to attach it to a specific JNI method on a specific library would be a good start and provides the most flexibility.
You probably would not need expose the logic where you look up method identifiers at runtime as I can statically provide the method signature of the callback.
Thanks. I'll take a look this week and put a prototype together. I'll message you back when I've done that to see what you think of it.
Hi,
I have put together an initial prototype. I decided that it would be better to split the project up and have created a jnitrace-engine which exposes the hooking logic: https://github.com/chame1eon/jnitrace-engine
I am going to modify this project to use that library when I get the chance but for right now it still have the hooking logic hard coded.
I still need to add some more documentation and clean up the jnitrace-engine library but it should work fine. Let me know if you have any thoughts/feedback. I went with the approach of trying to make it as "Frida" like as possible, so it should seem familiar to writing a Frida intercept.
Thanks.
Closed this now.
Are there any plans to expose the core hooking logic of this library as a NPM library that other Frida scripts can consume?
I'd love to reuse the code you have already written and a library would probably be more maintainable than copy-pasting functions. :)