frida는 현재 불러온 모든 클래스를 반복합니다.

1787 단어
# -*- coding: UTF-8 -*-
import frida, sys

jsCode = """

Java.perform(function(){

    var imports = Module.enumerateImportsSync("libsoul-netsdk.so");
    for(var i = 0; i < imports.length; i++) {
        if(imports[i].name == 'strncat'){
            send(imports[i].name + ": " + imports[i].170525
            );
            break;
        }
    }

    var exports = Module.enumerateExportsSync("libsoul-netsdk.so");
    for(var i = 0; i < exports.length; i++) {
        if(exports[i].name.indexOf('add') != -1){
            send(exports[i].name + ": " + exports[i].address);
            break;
        }
    }
    for(var i = 0; i < imports.length; i++) {
            send(imports[i].name + ": " + imports[i].address);
        }
        var exports = Module.enumerateExportsSync("libsoul-netsdk.so");
        for(var i = 0; i < exports.length; i++) {
                send(exports[i].name + ": " + exports[i].address);
    }

});

"""

enumerateLoadedClasses_jsCode ="""

Java.perform(function(){
    Java.enumerateLoadedClasses({
        onMatch: function(className) {
            send(className);},
        onComplete:function(){
            send("done");
        }
    });
});
"""
def message(message, data):
    if message["type"] == 'send':
        print(u"[*] {0}".format(message['payload']))
    else:
        print(message)

process = frida.get_remote_device().attach("cn.soulapp.android")
script= process.create_script(enumerateLoadedClasses_jsCode)
script.on("message", message)
script.load()
sys.stdin.read()

다음으로 전송:https://blog.51cto.com/haidragon/2398126

좋은 웹페이지 즐겨찾기