ObfusC entails creating a LLVM Compiler Plugin (written in C++) with the main purpose of providing a seamless and easy to use C/C++ obfuscation for the user.
The user is given the option to specify what functionality to obfuscate through the use of code attributes.
ObfusC integrates directly into LLVM by working at the Intermediate Representation (IR) level of the compiler, which is used to translate high-level languages such as C and C++, to target architectures such as x86 and ARM and AArch64.
This involves the use of a combination of standard arithmetic operations, such as addition and subtraction, with logical operations, such as AND, NOT, and OR.
This alters a function’s control flow by inserting conditional jumps that point either into the original basic code block or to a fake basic code block.
This simply replaces standard binary operators with functionally equivalent but more complicated sequences of instructions.
This involves the transformation of a program's control flow, the sequence of instructions that determines how a program executes, into a more complex and less transparent form. This is accomplished through techniques such as loop unrolling.
Latest Release: Here
Add the following to your compile arguments:
-fplugin=./libObfusC.so -fpass-plugin=./libObfusC.so
- CMake 3.13.4+
- Ninja
- LLVM
- LLVM Dev Headers
git clone --recursive https://github.com/Slattz/ObfusC
cd ObfusC
Next:
mkdir build && cd build
cmake ../ -GNinja -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-15 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-15