当前位置: 首页 > news >正文

Frida辅助分析OLLVM虚假控制流程(下)

OLLVM虚假控制流程简介

地址:https://github.com/obfuscator-llvm/obfuscator/wiki/Bogus-Control-Flow

此方法通过在当前基本块之前添加基本块来修改函数调用图。这个新的基本块包含一个不透明谓词,然后条件跳转到原始基本块。

原始基本块也被克隆并填充随机选择的垃圾指令

 可用的编译器选项

       -mllvm -bcf:激活伪造的控制流通道
  • -mllvm -bcf_loop=3:如果激活了通行证,则将其应用于某个功能 3 次。默认值:1
  • -mllvm -bcf_prob=40:如果激活通行证,基本块将被混淆,概率为 40%。默认值:30

有跳转

                

有2个全局变量   x和y

3到7分看视频

这一批函数我们hook看看

  sub_12B44sub_12BF8sub_1391Csub_1391Csub_18AB0sub_12CF4sub_12CF4

写应该hook脚本     2个地方出现我们的输出结果,出现地址0x18cec

地址0x18cec

把这几个函数也hook一下

 sub_15FAC((unsigned __int64 *)&v13, v8, v9);sub_15FAC((unsigned __int64 *)&v13, a1, a2);sub_16214(&v13, a3);sub_16900

第一次完整的出现输出是在这个0x16214,第一个参数是加密过程,第二个参数是结果

unsigned __int64 *__fastcall sub_16214(unsigned __int64 *a1, __int64 a2)

看第2个的引用。

在sub_1531C里面找到了下面的函数


function hex_dump(p) {try {return hexdump(p) + "\r\n";} catch (error) {return ptr(p) + "\r\n";}
}    function hook_nttive_addr(addr,idb_addr){var base_hell_jni=Module.findBaseAddress("libhello-jni.so");
Interceptor.attach(addr,{onEnter:function(args){this.arg0=args[0];this.arg1=args[1];this.arg2=args[2];this.arg3=args[3];this.lr=this.context.lr;},onLeave:function(retval){console.log("ptr"+ptr(addr)+"idb_addr:"+ptr(idb_addr)+"LR:"+ptr(this.lr).sub(base_hell_jni)+"\r\n","this.arg0:\r\n",hex_dump(this.arg0),"this.arg1:\r\n",hex_dump(this.arg1),"this.arg2:\r\n",hex_dump(this.arg2),"this.arg3:\r\n",hex_dump(this.arg3),"retval:\r\n",    hex_dump(retval));}
})
}
function  hook_Native(){var hook_hellojni=Module.findBaseAddress("libhello-jni.so");//var  addr_0xF620= hook_hellojni.add(0xF620);hook_nttive_addr(hook_hellojni.add(0x12B44),0x12B44);
hook_nttive_addr(hook_hellojni.add(0x12BF8),0x12BF8);
hook_nttive_addr(hook_hellojni.add(0x1391C),0x1391C);
hook_nttive_addr(hook_hellojni.add(0x18AB0),0x18AB0);
hook_nttive_addr(hook_hellojni.add(0x12CF4),0x12CF4);
hook_nttive_addr(hook_hellojni.add(0x15FAC),0x15FAC);
hook_nttive_addr(hook_hellojni.add(0x16214),0x16214);
hook_nttive_addr(hook_hellojni.add(0x16900),0x16900);
}
function mian(){hook_Native();
} 
setImmediate(mian)

http://www.dtcms.com/a/465019.html

相关文章:

  • MySQL(二) - 数据表管理
  • 商丘网站建设大全网站改版 大量旧页面
  • 简单网站编写
  • 用AI写的【实时文件搜索引擎】python源码【找资源】
  • 无为建设局网站深圳东门解封了吗
  • 【Linux】入门指南:基础指令详解Part Two
  • 如何下载 Git 仓库中的所有分支到本地并实现Python自动化操作
  • 掌握前后端数据交互的3种核心方式
  • 网络、主机安全扫描工具
  • 论文笔记 -《MUON IS SCALABLE FOR LLM TRAINING》
  • soular入门到实战(6) - soular+kanass+sward+postin实现sso单点登录
  • 建设农垦网站赣州网站制作
  • vue3 el-date-picker 日期选择器校验规则-选择日期范围不能超过七天
  • 【论文阅读】Debating with More Persuasive LLMs Leads to More Truthful Answers
  • Windows系统中部署GeoServer全流程
  • 成都专做婚介网站的公司温州做外贸网站
  • OpenWrt开发第13篇:OpenWrt上读取带USB接口的GPS设备信息
  • 公司如何建设网站首页品牌建设网站公司排名
  • MySQL的查询操作语法要点
  • 打工人日报#20251010
  • ARMv8系统的安全性(二):TrustZone架构如何重塑移动设备安全生态
  • Vivado 时序约束的完整作战地图(二)
  • 使用主流开发语言的项目如何一键生成SBOM文件?
  • Java常见业务场景之大量数据存储优化:从 Mysql 到 Redis Bitmap ,实现高效存储用户签到记录
  • 朝阳企业网站建设方案费用东莞公司注册
  • 光影魔术手_4.7.2.1192|win中文|图像修改编辑器|安装教程
  • c++ bug 记录(merge函数调用时错误地传入了vector对象而非迭代器。)
  • 珠海网站专业制作wordpress 折线图
  • css、dom 性能优化方向
  • 【大前端】Android Deep Link 技术详解与实践指南