Rust+JS
andreafioraldi opened this issue · 3 comments
Hi guys,
any idea about how can I expose things written with frida-rust to JS using them alongside the frida-js API?
Linking the gumjs devkit and exposing the bindings should be enough or not?
The most ideal case would be having Frida CModule support Rust as a target, and then expose the symbols through there while still getting the Rust API.
As a workaround I believe you can insert multiple agents with Frida so you could load the Rust module and then call its symbols through another script which looks for the exposed symbols in the Rust library and call them through NativeFunction.
This would also be good as an example crate in this repo
Maybe this will help. https://github.com/AFLplusplus/AFLplusplus/tree/dev/frida_mode/src/js
This is how I integrated JS support in AFL++ Frida. By loading for an additional script into the JS runtime, you can add JS bindings to the global namespace too.
See here for how it can be used.
https://github.com/AFLplusplus/AFLplusplus/blob/dev/frida_mode/Scripting.md
Closing this issue as I believe it's been answered.