-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
190cd16
commit c237c2c
Showing
8 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
2 changes: 1 addition & 1 deletion
2
examples/dynamic_strace.js → examples/android/dynamic_strace.js
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var Interruptor = require('./android-arm64-strace.min.js').target.LinuxArm64(); | ||
|
||
// Java.deoptimizeEverything(); | ||
|
||
Java.perform(()=>{ | ||
Interruptor.newAgentTracer({ | ||
exclude: { | ||
syscalls: ["clock_gettime"] | ||
} | ||
}).start(); | ||
}); | ||
|
||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var Interruptor = require('./android-arm64-strace.min.js').target.LinuxArm64(); | ||
|
||
|
||
Interruptor.newAgentTracer({ | ||
exclude: { | ||
syscalls: ["clock_gettime"] | ||
}, | ||
coverage: { | ||
enabled: true, | ||
fname: "/data/data/<YOUR_APP>/test.drcov", | ||
stops: { | ||
count: 2000 // stop after 2000 basic blocks captured | ||
} | ||
} | ||
}).startOnLoad(/<YOUR_LIB>/g); | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var Interruptor = require('./android-arm64-strace.min.js').target.LinuxArm64(); | ||
|
||
Interruptor | ||
.newAgentTracer({ | ||
exclude: { | ||
syscalls: ["clock_gettime"] | ||
} | ||
}) | ||
.startOnLoad(/<MY_LIB>/g); | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var Interruptor = require('./android-arm64-strace.min.js').target.LinuxArm64(); | ||
|
||
Interruptor.newAgentTracer({ | ||
exclude: { | ||
syscalls: ["clock_gettime"] | ||
}, | ||
svc: { | ||
read: { | ||
onLeave: function(ctx){ | ||
let res = Memory.scanSync(ctx.x1, ctx.x2.toInt32(), Interruptor.utils().toScanPattern('frida')); | ||
if(res.length > 0){ | ||
res.map( m => m.address.writeByteArray([0x41,0x41,0x41,0x41,0x41])); | ||
console.log("remove 'frida' pattern from resulting buffer"); | ||
} | ||
} | ||
} | ||
} | ||
}).startOnLoad(/<YOUR_LIB>/g); | ||
|
This file contains 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