Home

Awesome

Akira

Another llvm based obfuscator based on goron.

Current Supported Features:

Improvements Over Goron:

Compilation Instructions:

mkdir build_ninja
cd build_ninja
cmake -DCMAKE_CXX_FLAGS="/utf-8" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb" -G "Ninja" ../llvm
ninja

Usage:

Similar to OLLVM-obfuscator, enable specific obfuscations through compilation options. For example, to enable indirect jump obfuscation:

path_to_the/build/bin/clang -mllvm -irobf -mllvm --irobf-indbr test.c

For projects using autotools:

CC=path_to_the/build/bin/clang or CXX=path_to_the/build/bin/clang
CFLAGS+="-mllvm -irobf -mllvm --irobf-indbr" or CXXFLAGS+="-mllvm -irobf -mllvm --irobf-indbr" (or any other obfuscation-related flags)
./configure
make

Compiliation error:

utf-8 is for compiliation on Windows, if compiling the project on Linux, use the following cmake instead:

cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb" -G "Ninja" ../llvm

If compiling the project on Linux with gcc and encountered erros like so:

/home/kali/akira/llvm/lib/Transforms/Obfuscation/CryptoUtils.cpp:679:26: error: variable ‘std::ifstream devrandom’ has initializer but incomplete type
  679 |   std::ifstream devrandom("/dev/urandom");
      |                          ^
/home/kali/akira/llvm/lib/Transforms/Obfuscation/CryptoUtils.cpp: In member function ‘int llvm::CryptoUtils::sha256_process(sha256_state*, const unsigned char*, long unsigned int)’:
/home/kali/akira/llvm/lib/Transforms/Obfuscation/CryptoUtils.cpp:939:38: warning: cast from type ‘const unsigned char*’ to type ‘unsigned char*’ casts away qualifiers [-Wcast-qual]
  939 |       if ((err = sha256_compress(md, (unsigned char *)in)) != 0) {
      |                                      ^~~~~~~~~~~~~~~~~~~
[977/6616] Building CXX object lib/Transforms/CFGuard/CMakeFiles/LLVMCFGuard.dir/CFGuard.cpp.o
ninja: build stopped: subcommand failed.

add #include <fstream> // Add this line if it's missing to:

/akira/llvm/lib/Transforms/Obfuscation/CryptoUtils.cpp

Reference: