ctfs / write-ups-2014

Wiki-like CTF write-ups repository, maintained by the community. 2014
1.83k stars 649 forks source link

Solve the number APK challenge using Frida. #388

Open cTFk1ller opened 1 year ago

cTFk1ller commented 1 year ago
Java.perform(function() {

    const Verify = Java.use("io.asis.ctf2014.numdriod.Verify");

    console.log("\n[*] Starting PIN Brute-force, please wait.");
    Java.choose("io.asis.ctf2014.numdriod.MainActivity", {
        onMatch: function(instance) {
            for (var index = 0; index < 9999999; index++) {
                var result = Verify.isOk(instance, ""+index);
                if (result) {
                    console.log("[+] A valid password is: " + index);
                    return;
                }
            }
        },
        onComplete: function() {
            console.log("[-] Complete searching for the instance")
        }
    })

})