Skip to content

Instantly share code, notes, and snippets.

@Serhatcck
Created August 6, 2022 13:15
Show Gist options
  • Save Serhatcck/813990a1aad7754119974a5e5410c934 to your computer and use it in GitHub Desktop.
Save Serhatcck/813990a1aad7754119974a5e5410c934 to your computer and use it in GitHub Desktop.
Analyzing Android Encryption Processes with Frida
Java.perform(function(){
var cipher = Java.use("javax.crypto.Cipher")
cipher.init.overload('int', 'java.security.Key', 'java.security.spec.AlgorithmParameterSpec').implementation = function(opmode,key,algorithmParameter){
var base64 = Java.use('java.util.Base64');
console.log("Key "+base64.getEncoder().encodeToString(key.getEncoded()));
console.log("Opmode String: "+ this.getOpmodeString(opmode));
console.log("Algorithm: "+this.getAlgorithm())
this.init.overload('int', 'java.security.Key', 'java.security.spec.AlgorithmParameterSpec').call(this,opmode,key,algorithmParameter)
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment