functionlocate_init() { let r = null Interceptor.attach(Module.findExportByName(null, "__system_property_get"), { onEnter: function (args) { var name = args[0]; if (name !== undefined && name != null) { name = ptr(name).readCString(); console.log(name) if (name.indexOf("ro.build.version.sdk") >= 0) { console.log(Process.findModuleByName("libmsaoaidsec.so").base) } } } } ); }
Interceptor.attach(Module.findExportByName(null, "android_dlopen_ext"), { onEnter: function (args) { var pathptr = args[0]; if (pathptr !== undefined && pathptr != null) { var path = ptr(pathptr).readCString(); if(path.search("libmsaoaidsec.so") != -1){ this.hook = true locate_init() } } } } );
functionlocate_init() { let r = null Interceptor.attach(Module.findExportByName(null, "__system_property_get"), { onEnter: function (args) { var name = args[0]; if (name !== undefined && name != null) { name = ptr(name).readCString(); //console.log(name) if (name.indexOf("ro.build.version.sdk") >= 0) { var r = Process.findModuleByName("libmsaoaidsec.so") nop_64(r.base.add("0x1c544")) nop_64(r.base.add("0x1b8d4")) nop_64(r.base.add("0x26e5c")) } } } } ); }
Interceptor.attach(Module.findExportByName(null, "android_dlopen_ext"), { onEnter: function (args) { var pathptr = args[0]; if (pathptr !== undefined && pathptr != null) { var path = ptr(pathptr).readCString(); if(path.search("libmsaoaidsec.so") != -1){ this.hook = true locate_init() } } } } );
functionnop_64(addr) { Memory.protect(addr, 4 , 'rwx'); var w = newArm64Writer(addr); w.putRet(); w.flush(); w.dispose(); }