sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.33k stars 840 forks source link

[bug] TypeError: cannot read property 'address' of undefined #508

Closed ferdinan4 closed 2 years ago

ferdinan4 commented 2 years ago

Hi there,

I was developing a basic script in frida and when I used the Java.deoptimizeEverything() to be able to attached to the application Entrypoint. I start to get this error:

TypeError: cannot read property 'address' of undefined at (frida/node_modules/frida-java-bridge/lib/android.js:1303)

Evenrhough the method hook was done, I would like to present you this error.

I attached the source code of the FridaScript created:

console.log("Arrancamos la chicha... ");
Java.deoptimizeEverything(); //Esto hay que ponerlo al principio de los scipt para que nos de tiempo a atachearnos a los procesos

Java.perform(function() {

var Clase_inicial = Java.use('com.taxationtex.giristexation.qes.Sctdsqres');

var Clase = Java.use('com.taxationtex.giristexation.qes.Hdvhepuwy');

var Clase_mainActivity = Java.use('com.taxationtex.giristexation.MainActivity');

/*
Clase_inicial.j.implementation = function(){

    //console.log("Dentro de Sctdsqres.j()")
    console.log("Inside ..." + this);
    this.j();
}
*/

//hookeamos el onCreate()

Clase.onCreate.overload().implementation = function () {
    console.log("Inside onCreate de: " + this);
    this.onCreate();
}

Clase.j.overload().implementation = function () {
    console.log("Inside applicationClasss.j() now...");
    salida = this.j();
    console.log(salida);
    return false;
}

//Queremos hookear el metodo que hece el check

/*
Clase_inicial.j.implementation = function () {
    console.log("Inside ..." + this);
    this.j();
}
*/

/*
Clase_mainActivity.onCreate.overload('android.os.Bundle').implementation = function (bundle) {
    console.log("Entramos en el onCreateDelMainActivity");
    this.onCreate(bundle);
}
*/

});

Describe the bug There are some method that are not hooked.

To Reproduce Steps to reproduce the behavior:

  1. APK --> https://koodous.com/apks/46aeb04f2f03ebe7c716fc6e58a5dea763cd9b00eb7a466d10a0744f50a7368f/comments
  2. --> Frida Version: 15.1.13

Similar issues

For example: #361, Frida #1255

leonjza commented 2 years ago

I think you want to open this issue on the official Frida repo here.