关于apk的so层hook的问题
问题描述:一个简单的样本,java层调用了so中的导出函数解密数据库,但是在hook的时候不知道哪里出了问题,任何一个函数的参数都无法打印,求师傅指教自我分析:
问题配图 :java层的调用声明
这边想hook这个sqlite3_key函数,打印参数,偏移为0x44834
尝试过模拟器和真机,都无法打印。。
附上自己的frida脚本
function main() {
Java.perform(function(){
var nativePointer=Module.findBaseAddress("libnative-lib.so")
console.log("base addr is ",nativePointer)
Interceptor.attach(nativePointer.add(0x44834),
{
onEnter:function(args){
console.log('123');
console.log(args[0].toInt32());
console.log(args[1].toInt32());
console.log(args[2].toInt32());
// console.log(args.toString);
},
onLeave:function(retval){
console.log("retval"+retval);
}
}
)
})
}
setImmediate(main)
病毒查杀截图或链接:
下载链接:
感谢分享
页:
[1]