간단한 스크립트
[checkTrustedRecursive] SSL Pinning 우회
Java.perform(function() { var array_list = Java.use("java.util.ArrayList"); var ApiClient = Java.use('com.android.org.conscrypt.TrustManagerImpl'); ApiClient.checkTrustedRecursive.implementation = function(a1, a2, a3, a4, a5, a6) { var k = array_list.$new(); return k; } }, 0); |
[remove] 복호하 데이터 삭제 방지
var removePtr = Module.findExportByName("libc.so", "remove"); var remove = new NativeFunction(removePtr, 'int', ['pointer']); Interceptor.replace(removePtr, new NativeCallback(function (v) { var path = Memory.readCString(v); if(path.indexOf("decrypt.data") != -1) { console.log(path); return 1; } else { return remove(v); } }, 'int', ['pointer'])); |
var find_target_function = false; Interceptor.attach(Module.findExportByName("libc.so", "dlsym"), { onEnter: function(args) { console.log(Memory.readUtf8String(args[1])); }, }); |