sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.33k stars 840 forks source link

Support injection at Application.onCreate for Android #509

Closed WanghongLin closed 2 years ago

WanghongLin commented 2 years ago

On Android platform, I found some apps have signature verification mechanism which will cause the app crash or exit at its very early stage if the app resigned by objection.

Currently the frida-gadget injected point is onCreate of first Activity for Android, is it right?

I am wondering if the frida-gadget injected point can be moved to Application.onCreate, then I can take further steps from frida script to prevent app crash or exit.

The ideal solution is the injected point Application.onCreate or Activity.onCreate can be specified from an option when invoke patchapk command.

leonjza commented 2 years ago

Currently the frida-gadget injected point is onCreate of first Activity for Android, is it right?

It patches the launchable activity.

You can tell he patcher to use a different class with the --target-class flag.