O-llvm是基于llvm进行编写的一个开源项目(https://github.com/obfuscator-llvm/obfuscator),它的作用是对前端语言生成的中间代码进行混淆,目前在市场上,一些加固厂商(比如360加固宝、梆梆加固)会使用改进的O-llvm对它们so文件中的一些关键函数采用O-llvm混淆,增加逆向的难度。因此,掌握O-llvm的实现过程,是很有必要...
opt-load LLVMObfuscator.so-hlw-S 文件名.ll-o 文件名_opt.ll clnag 文件名_opt.ll-o 文件名 clnag 文件名_opt.ll-o 文件名 优化器属于llvm-core的子项目 优化器属于llvm-core的子项目 opt-load ./LLVMObfuscator.so-hlw-S hello.ll-o hello_opt.ll opt-load ./LLVMObfuscator.so-hlw-S hello.l...
本次源码分析的版本为Obfuscator-llvm-3.6.1,目前O-llvm包含有三个pass,分别是BogusControlFlow、Flattening 和 Instruction Substitution。它们是O-llvm实现混淆功能的核心,具体实现位于llvm-3.6.1/lib/Transforms/Obfuscation/目录下。下面就对这三个pass进行详细的分析。 2. Pass1:BogusControlFlow BogusControlFlow的...
本次源码分析的版本为Obfuscator-llvm-3.6.1,目前O-llvm包含有三个pass,分别是BogusControlFlow、Flattening 和 Instruction Substitution。它们是O-llvm实现混淆功能的核心,具体实现位于llvm-3.6.1/lib/Transforms/Obfuscation/目录下。下面就对这三个pass进行详细的分析。 2. Pass1:BogusControlFlow BogusControlFlow的...
1、添加LLVM obfuscator 这里用的是heroims(https://heroims.github.io/)的patch,具体项目地址在这里(https://github.com/heroims/obfuscator/tree/patches)。 由于LLVM14有两种pass方式,一种legacy pass一种new pass,LLVM官方正在逐渐用new pass淘汰legacy pass,所以这里使用new pass作为补丁。
本次源码分析的版本为Obfuscator-llvm-3.6.1,目前O-llvm包含有三个pass,分别是BogusControlFlow、Flattening 和 Instruction Substitution。它们是O-llvm实现混淆功能的核心,具体实现位于llvm-3.6.1/lib/Transforms/Obfuscation/目录下。下面就对这三个pass进行详细的分析。 2. Pass1:BogusControlFlow BogusControlFlow的...
git clone -b release/14.x https://github.com/sr-tream/obfuscator cd obfuscator git submodule update --init llvm-project cd llvm-project git apply ../obfuscator.patch 2. Build clang utils without any libs cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_ENABLE...
1、添加LLVM obfuscator 这里用的是heroims(https://heroims.github.io/)的patch,具体项目地址在这里(https://github.com/heroims/obfuscator/tree/patches)。 由于LLVM14有两种pass方式,一种legacy pass一种new pass,LLVM官方正在逐渐用new pass淘汰legacy pass,所以这里使用n...
ollvm,base on llvm-clang 5.0.2, 6.0.1 , 7.0.1,8.0,9.0,9.0.1,10.x,11.x,12.x,13.x,14.x,swift-llvm-clang 5.0,swift-llvm-clang 5.5 llvmclangollvm UpdatedNov 27, 2023 bluesadi/Pluto Star842 Code Issues Pull requests Obfuscator based on LLVM 14.0.6 ...
可以在github/heroims/obfuscator仓库的分支中找到对应的移植源码, 13x和14x版本也可以在github/yangyiyu08/ollvm-project仓库的对应分支中获取。14x版本还可以直接在 Releases 中下载作者编译好的文件,跳过编译的步骤。但这个文件在我的环境下会有NDK编译错误的情况,我自己编译出来的文件运行正常。