如何用llvm-obfuscator混淆代码
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何用llvm-obfuscator混淆代码相关的知识,希望对你有一定的参考价值。
参考技术A混淆方法一: 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 是有用的,其余的都可以删除:
本回答被提问者采纳 参考技术B 同问。。。如何用pyarmor和虚拟环境打包python代码?
【中文标题】如何用pyarmor和虚拟环境打包python代码?【英文标题】:how to pack python code with pyarmor and virtual environment? 【发布时间】:2021-12-18 02:03:27 【问题描述】:我有一个由多个文件组成的 python 项目我尝试用 pyarmor 打包它并且它工作正常但是当我尝试用虚拟环境打包它时我遇到了很多错误所以如果有人知道该怎么做请帮助。
我在 venv even pyarmor 中添加了所需的包,然后我激活它,当 pyarmor 完成混淆时 它告诉我“运行命令失败”。
【问题讨论】:
【参考方案1】:我会弄清楚怎么做吗?问题是我已经安装了 Anaconda,所以我通过 cmd 中的 conda 创建了虚拟环境。
我按照指示@https://youtu.be/mIB7IZFCE_k
【讨论】:
以上是关于如何用llvm-obfuscator混淆代码的主要内容,如果未能解决你的问题,请参考以下文章