-
Notifications
You must be signed in to change notification settings - Fork 258
Expand file tree
/
Copy pathraptor_frida_android_bypass.js
More file actions
43 lines (34 loc) · 1.16 KB
/
Copy pathraptor_frida_android_bypass.js
File metadata and controls
43 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* raptor_frida_android_*.js - Frida snippets for Android
* Copyright (c) 2017 Marco Ivaldi <raptor@0xdeadbeef.info>
*
* Frida.re JS script snippets for Android instrumentation.
* See https://www.frida.re/ and https://codeshare.frida.re/
* for further information on this powerful tool.
*
* "We want to help others achieve interop through reverse
* engineering" -- @oleavr
*
* Many thanks to Maurizio Agazzini <inode@wayreth.eu.org>
* and Federico Dotta <federico.dotta@mediaservice.net>.
*
* Example usage:
* # frida -U -f com.xxx.yyy -l raptor_frida_android.js --no-pause
*/
setTimeout(function() { // avoid java.lang.ClassNotFoundException
Java.perform(function() {
// Root detection bypass example
var hook = Java.use("com.target.utils.RootCheck");
console.log("info: hooking target class");
hook.isRooted.overload().implementation = function() {
console.log("info: entered target method");
// obtain old retval
var retval = this.isRooted.overload().call(this);
console.log("old ret value: " + retval);
// set new retval
var retnew = false;
console.log("new ret value: " + retnew);
return retnew;
}
});
}, 0);