Last active
September 10, 2023 04:43
-
-
Save sudhackar/e01d4fda40e6652e732b79cea2693013 to your computer and use it in GitHub Desktop.
Frida hook Java functions in Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java.perform(function () { | |
var act1 = Java.use("CryptoUtilities"); | |
act1.getKey.implementation = function (arg1) { | |
var ret = this.getKey("v2"); | |
return ret; | |
}; | |
var db1 = Java.use("android.database.sqlite.SQLiteDatabase"); | |
db1.rawQuery.overload('java.lang.String', '[Ljava.lang.String;').implementation = function (arg1, arg2){ | |
console.log(arg1,arg1.replace("v1","v2")); | |
var ret = this.rawQuery(arg1.replace("v1","v2"),arg2); | |
console.log(ret); | |
return ret; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment