Code Monkey home page Code Monkey logo

obfuscator-llvm's Introduction

Obfuscator-LLVM

Obfuscator-LLVM is a project initiated in June 2010 by the information security group of the University of Applied Sciences and Arts Western Switzerland of Yverdon-les-Bains (HEIG-VD). The aim of this project is to provide increased software security through code obfuscation and tamper-proofing. As the obfuscator currently mostly works at the Intermediate Representation (IR) level, the tool is compatible with all programming languages (Ada, C, C++, D, Delphi, Fortran, Haskell, Julia, Objective-C, Rust and Swift) and target platforms (x86, x86-64, PowerPC, PowerPC-64, ARM, RISC-V, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, SystemZ, and XCore) currently supported by LLVM version 13. The initially published source code and research paper can be found here. This fork makes the obfuscator available as an extension to most available LLVM installations. It doesn't require any changes to existing LLVM installations, unlike the project published by the authors of Obfuscator-LLVM.

Features

Here is a list of the different features that are currently available:

Building

To build this project it's required to have Clang 3.3+, LLVM 3.3+ and CMake 3.4+ installed. On Ubuntu 18.04+ you can use sudo apt install clang-7 llvm-7-dev cmake to install the required softwre. To compile the obfuscator simply run ./build.sh or execute the following commands in this directory:

mkdir -p build
cd build
cmake ../
cmake --build .

To build for old PassManager add CMake flag -DLLVM_ENABLE_NEW_PASS_MANAGER=OFF.

Usage

Adding the obfuscator to existing projects which use an LLVM compiler is very easy. For the Make (or rather Makefile) buildsystem simply adjust the small example below to fit your needs:

OBFUSCATOR_FLAGS=-Xclang -load -Xclang /path/to/ObfuscatorLLVM.so

# ... your targets

tool: tool.c utils.c helper.c clangtool.so
    $(CC) $(CXXFLAGS) $(OBFUSCATOR_FLAGS) -O0 -o test test.c

You can also integrate the obfuscator to your existing CMake projects for any project that uses LLVM:

target_compile_options(<name> PRIVATE -Xclang -load -Xclang /path/to/ObfuscatorLLVM.so)

Testing

The Himeno benchmark is used to test the effectiveness of the obfuscation techniques. To execute the obfuscator test run ./test.sh. This will generate LLVM IR from ./test/test.c, apply obfuscations on it and run the obfuscated program. The obfuscated LLVM IR can be found in ./test/test_obfuscated.ll and the non-obfuscated LLVM IR in ./test/test.ll.

obfuscator-llvm's People

Contributors

maxxor avatar sr-tream avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.