本帖最后由 jetvster 于 2023-12-27 08:55 编辑
各位大佬好,初学练手,通过frIDA 进行hook,结果卡在了第一步~
虚拟机:网易的mumu12最新版
frida:16.1.9
是一个直播app,程序启动后执行hook2.js出错:[Asm] 纯文本查看 复制代码 PS C:\Users\> frida -U "蜜 桃" -l .\hook2.js
____
/ _ | Frida 16.1.9 - A world-class dynamic instrumentation toolkit
| (_| |
> _ | Commands:
/_/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://frida.re/docs/home/
. . . .
. . . . Connected to DCO AL00 (id=127.0.0.1:16384)
Error: access violation accessing 0x341
at <anonymous> (frida/runtime/core.js:151)
at <anonymous> (/_java.js)
[DCO AL00::蜜 桃 ]-> Connection terminated
//hook2.js 的代码如下:
[JavaScript] 纯文本查看 复制代码 Java.perform(function(){
Java.choose('com.sevengms.myframe.ui.activity.room.RoomMainActivity', {
onMatch: function (instance) {
send("instance:"+instance)
},
onComplete: function () {
}
})
});
另外一个hook1.js执行正常:
[Asm] 纯文本查看 复制代码 PS C:\Users\> frida -U "蜜 桃" -l .\hook.js
____
/ _ | Frida 16.1.9 - A world-class dynamic instrumentation toolkit
| (_| |
> _ | Commands:
/_/ |_| help -> Displays the help system
. . . . object? -> Display information about 'object'
. . . . exit/quit -> Exit
. . . .
. . . . More info at https://frida.re/docs/home/
. . . .
. . . . Connected to DCO AL00 (id=127.0.0.1:16384)
message: {'type': 'send', 'payload': 'enumerating classes...'} data: None
message: {'type': 'send', 'payload': 'name:com.sevengms.myframe.ui.activity.room.RoomMainActivity_ViewBinding'} data: None
message: {'type': 'send', 'payload': 'name:com.sevengms.myframe.ui.activity.room.RoomMainActivity'} data: None
[DCO AL00::蜜 桃 ]-> exit
//hook1.js 代码如下:
[JavaScript] 纯文本查看 复制代码 Java.perform(function(){
send("enumerating classes...");
Java.enumerateLoadedClasses({
onMatch: function(className){
if (className.indexOf("RoomMainActivity") != -1) {
send("name:" + className)
}
},
onComplete: function(){
}
});
});
请教一下大佬们,可能是什么问题呢?
|