Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Load script to Objection on startup

I tried to use objection (Frida tool) and I want to load a JavaScript script in startup

I run it objection -g com.myapp explore but when I got prompt (to use import function` the application already running, that too late

So for know I use

frida  -U  -l myScript.js -f com.myapp
exit
frida-ps -Uai
objection -g PID explore 

Is there any way to use only objection to load script on startup ?

like image 589
python3.789 Avatar asked Aug 07 '26 04:08

python3.789


1 Answers

You can use the -S flag to do so:

objection -g PID explore -S myScript.js

Alternatively you can also build objection from source (release is about 3 years behind source):
https://github.com/sensepost/objection/wiki/Development-Environment-Installation

The commands are somewhat different though, such as using start instead of explore. However this setup it will allow you to use the -s flag to spawn the process when working with frida-server.

Using it as follows you can execute commands before running resume to continue the application execution:

objection -s -n "com.myapp" start
evaluate test.js
resume

Note: use evaluate in new version as import will throw an exception.

like image 183
Megladon Avatar answered Aug 08 '26 18:08

Megladon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!