source base on https://github.com/banach-space/llvm-tutor .
flofli is an opensource project which aims to protect your software easily. flofli is the abbreviation for free llvm obuscator for llvm ir. It will let your software hard to analyse. But obuscation may let your software slow.
- I will dissect other famous llvm obuscator to let the obfuscator model compile easylily.
- The project can compile all obfuscator independently. Other obfuscator need compile all llvm and clang source code.
llvm 11 cmake make
mkdir build
cd build
cmake ../{Project Name}
make
clang-11 -c -emit-llvm test.c -o test.bc
opt-11 -load ./libSplitBlocks.so --split_num=3 --splitbbl < test.bc -o test_split.bc
opt-11 --view-cfg ./test_split.bc
Note: Flattening need cfg which have two or more blocks.
clang-11 -c -emit-llvm test.c -o test.bc
opt-11 -load ./libFlattening.so --flattening < test.bc -o test_split.bc
opt-11 --view-cfg ./test_split.bc
Note: bogus control flow need cfg which have two or more blocks.
clang-11 -c -emit-llvm test.c -o test.bc
opt-11 -load ./libBogusControlFlow.so --boguscf --bcf_prob=100 ./test_split.ll -o ./test_bogus.bc
opt-11 --view-cfg ./test_bogus.bc