前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >反反frida调试

反反frida调试

作者头像
小小咸鱼YwY
发布2021-05-17 15:55:05
2K0
发布2021-05-17 15:55:05
举报
文章被收录于专栏:python-爬虫python-爬虫

1,理论链接

https://www.anquanke.com/post/id/85996

2.firda_js代码

代码语言:javascript
复制
setImmediate(function() {
    Java.perform(function() {
        console.log("[*] Hooking calls to System.exit");
        exitClass = Java.use("java.lang.System");
        exitClass.exit.implementation = function() {
            console.log("[*] System.exit called");
        }
 
        var strncmp = undefined;
        imports = Module.enumerateImportsSync("libfoo.so");
 
        for(i = 0; i < imports.length; i++) {
            if(imports[i].name == "strncmp") {
                strncmp = imports[i].address;
                break;
            }
 
        }
 
        //Get base address of library
        var libfoo = Module.findBaseAddress("libfoo.so");
 
        //Calculate address of variable
        var initialized = libfoo.add(ptr("0x400C"));
 
        //Write 1 to the variable
        Memory.writeInt(initialized,1);
 
        Interceptor.attach(strncmp, {
            onEnter: function (args) {
               if(args[2].toInt32() == 23 && Memory.readUtf8String(args[0],23) == "01234567890123456789012") {
                    console.log("[*] Secret string at " + args[1] + ": " + Memory.readUtf8String(args[1],23));
                }
             },
        });
        console.log("[*] Intercepting strncmp");
    });
});
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021-05-12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1,理论链接
  • 2.firda_js代码
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档