Skip to content

Instantly share code, notes, and snippets.

@avicoder
Created April 27, 2018 07:17
Show Gist options
  • Save avicoder/d83330c32cee08868e0c685be9b9ba5a to your computer and use it in GitHub Desktop.
Save avicoder/d83330c32cee08868e0c685be9b9ba5a to your computer and use it in GitHub Desktop.
ReverzeMe solution in frida
setImmediate(function() {
Java.perform(function() {
//Saving retval
retval = Java.use("java.lang.Boolean").$new("False");
chalJNI = Java.use("com.example.reverzeme.ChallengeJNI");
chalJNI.checkIfDeviceIsEmulator.implementation = function(v) {
console.log("\n[*] Changing return value to false");
//Print Secret
console.log("[*] Secret - " + this.stringFromJNI());
console.log("[*] Flag - " + this.stringOtherHalfKey("s1r"));
//return false for emul check.
return retval;
}
})
})
//frida -U -l reverzeMe1.js com.example.reverzeme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment