如何用llvm-obfuscator混淆代码
答案:2 悬赏:0 手机版
解决时间 2021-01-23 06:03
- 提问者网友:niaiwoma
- 2021-01-22 12:12
如何用llvm-obfuscator混淆代码
最佳答案
- 五星知识达人网友:罪歌
- 2021-01-22 12:20
1. 混淆方法一: InstructionsSubstitution
[html] view plain copy
-mllvm -sub: activate instructions substitution
-mllvm -funcSUB="func1,func2,func3": if instructions substitution is activated, apply it only on functions func1, func2 and func3
-mllvm -perSUB=20: if instructions substitution is activated, apply it with a probability of 20% on each function
2. 混淆方法二: BogusControlFlow
[html] view plain copy
-mllvm -bcf: activates the bogus control flow pass
-mllvm -funcBCF="func1,func2,func3": if the pass is activated, applies it only on functions func1, func2, func3
-mllvm -perBCF=20: if the pass is activated, applies it on all functions with a probability of 20%. Default: 100
-mllvm -boguscf-loop=3: if the pass is activated, applies it 3 times on a function. Default: 1
-mllvm -boguscf-prob=40: if the pass is activated, a basic bloc will be obfuscated with a probability of 40%. Default: 30
3. 混淆方法三: ControlFlow Flattening
[html] view plain copy
-mllvm -fla: activates control flow flattening
-mllvm -funcFLA="func1,func2,func3": if control flow flattening is activated, apply it only on functions func1, func2 and func3
-mllvm -perFLA=20: if control flow flattening is activated, apply it with a probability of 20% on each function
4. 如何用开源 source code 编译出混淆器O-LLVM ?
[cpp] view plain copy
$ git clone -b llvm-3.5 https://github.com/obfuscator-llvm/obfuscator.git
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE:String=Release ../obfuscator/
$ make -j5
编译后的结果只有bin 和 lib 是有用的,其余的都可以删除:
[html] view plain copy
-mllvm -sub: activate instructions substitution
-mllvm -funcSUB="func1,func2,func3": if instructions substitution is activated, apply it only on functions func1, func2 and func3
-mllvm -perSUB=20: if instructions substitution is activated, apply it with a probability of 20% on each function
2. 混淆方法二: BogusControlFlow
[html] view plain copy
-mllvm -bcf: activates the bogus control flow pass
-mllvm -funcBCF="func1,func2,func3": if the pass is activated, applies it only on functions func1, func2, func3
-mllvm -perBCF=20: if the pass is activated, applies it on all functions with a probability of 20%. Default: 100
-mllvm -boguscf-loop=3: if the pass is activated, applies it 3 times on a function. Default: 1
-mllvm -boguscf-prob=40: if the pass is activated, a basic bloc will be obfuscated with a probability of 40%. Default: 30
3. 混淆方法三: ControlFlow Flattening
[html] view plain copy
-mllvm -fla: activates control flow flattening
-mllvm -funcFLA="func1,func2,func3": if control flow flattening is activated, apply it only on functions func1, func2 and func3
-mllvm -perFLA=20: if control flow flattening is activated, apply it with a probability of 20% on each function
4. 如何用开源 source code 编译出混淆器O-LLVM ?
[cpp] view plain copy
$ git clone -b llvm-3.5 https://github.com/obfuscator-llvm/obfuscator.git
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE:String=Release ../obfuscator/
$ make -j5
编译后的结果只有bin 和 lib 是有用的,其余的都可以删除:
全部回答
- 1楼网友:第四晚心情
- 2021-01-22 12:33
同问。。。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯