Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Frida script to get the password of a sqlcipher database
/*
* get_sqlcipher_password.js
* Copyright (c) 2019 Elliot Alderson <fs0c131y@protonmail.com>
*
* Frida.re JS functions to get SQLCipher database passwords.
*
* Example usage:
* # frida -U -f in.gov.uidai.mAadhaarPlus -l get_sqlcipher_password.js --no-pause
*
*/
'use strict;'
function getSQLCipherPassword() {
var SQLiteOpenHelper = Java.use('net.sqlcipher.database.SQLiteOpenHelper');
SQLiteOpenHelper.getWritableDatabase.overload('java.lang.String').implementation = function (password) {
console.log("[+] password = " + password);
return this.getWritableDatabase.overload('java.lang.String').apply(this, arguments);
}
}
Java.perform(function () {
getSQLCipherPassword();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment