freehuntx / frida-mono-api Goto Github PK
View Code? Open in Web Editor NEWAll the mono c exports, ready to be used in frida!
License: MIT License
All the mono c exports, ready to be used in frida!
License: MIT License
Hi,
Can I use it from Frida console? I install it with npm but can't seem to use it from the Frida console.
Thanks for sharing this code.
Maybe this is something completely stupid, but I'm unable to call a function asking for an int.
I can call every function with an object, string, etc but not this.
With an int, it ends with "invalid argument'
I managed to understand my problem as javascript pass int by value, and not by reference.
Indeed, in the c mono documentation that I read, every int is passed by reference (&i)
If there is a trick, please be kind to add a remark on this github.
Maybe add an helper like you did with strings.
Environment: macOS 14.0
CPU: Apple M2
Model: MacBook Air
Frida Version: 16.1.4
I'm executing the command frida AGame -l myscript.js
, but every time the JavaScript script runs MonoApi.mono_compile_method(method)
, the script gets stuck. After more than a minute, it prints:
Failed to load script: timeout was reached
Is there a solution?
Hello
Thanks for this nice piece of work!
However it seems like most newer apps doesn't work if using the newest release from npm/yarn.
I.e. the added libmonosgen-2.0.so
in mono-module.js
is missing from the uploaded module in npm.
Hey,
When trying to use the API you provide I notice that exception is being thrown.
After small debugging, I figure out that mono_assembly_foreach cannot be found by Module.findExportByName - it returns null.
do you know that reason?
I tried this for an iOS Xamarin app but no luck.
mono_assembly_load_from_full
loads Assembly-CSharp.dll
I want to get the dynamic address of SomeMethod
static address :
$ rabin2 -zzz Assembly-CSharp.dll | grep SomeMethod
3306 0x0004080a 0x0044240a 12 13 (.text) ascii SomeMethod
In an iOS app, build with xamarin ios, the mono api exports are not available. They are present (found by comparing the assembly code with another ios app) but they are not exported so frida is not able to find them. Is there a way to be able to attach to the mono runtime from frida without this ? Do you know ay way to decompile and/or patch arm aotdata files ?
Please let me now if there is a better place for this type of interaction. Thks.
Hi @freehuntx,
I created a program using frida-inject that spawns a certain Xamarin application and then injects a frida-mono-api based script. Everything works correctly if I use the frida-mono-api
based script on a target application that is already running.
However, if the application is not yet running, I start it using Frida's await device.spawn(identifier)
, but the frida-mono-api
based script throws an error.
Error: access violation accessing 0x60
at node_modules/frida-mono-api/src/mono-api.js:804
at o (node_modules/browser-pack/_prelude.js:1)
at /script2.js:54
at o (node_modules/browser-pack/_prelude.js:1)
at scripts/intercept_pincode.js:1
at o (node_modules/browser-pack/_prelude.js:1)
at r (node_modules/browser-pack/_prelude.js:1)
at /script2.js:1069
I found out that when I start the application using Frida's device.spawn
function the MonoApi.mono_get_root_domain()
returns 0x0
. I think this is due to the fact that the Xamarin application is not fully initialised yet, but I can't find out how to fix it.
Have you experienced this problem before?
Hi Team,
Can you please provide some sought of documentation to use this API, would be much helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.