Skip to content

Identifier Mangling/Renaming Pass for LLVM, randomize function names, global variables and structure names.

License

Notifications You must be signed in to change notification settings

Ily455/IM-LLVM-Pass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Identifier Mangling Pass

An LLVM pass designed to obfuscate the names of identifiers in LLVM Intermediate Representation (IR) code

Features

  • Function Name Mangling: Renames function identifiers with randomly generated strings to replace original names.
  • Global Variable Name Mangling: Renames global variable identifiers with randomly generated strings.
  • Struct Name Mangling: Renames struct type identifiers with randomly generated strings.

Installation

  1. Clone this repository
    git clone https://github.com/Ily455/IM-LLVM-Pass.git
  2. Compile the Pass
     mkdir build
     cd build
     cmake ..
     make

Usage

  1. Compile your C/C++ code to LLVM IR using Clang

    clang -S -emit-llvm input.c -o input.ll
  2. Run the Identifier Mangling Pass on the LLVM IR code using the opt tool.

    opt -load-pass-plugin /path/to/ManglePass.so -passes=manglepass < input.ll > -o output.ll

    This produces bitcode.

     opt -S -load-pass-plugin /path/to/ManglePass.so -passes=manglepass < input.ll > -o output.ll

    This produces readable IR.

  3. The output LLVM IR code (output.ll) will have the function names, global variable names, and struct type names mangled with randomly generated strings.

Example & Diff

See example

License

The Identifier Mangling Pass is licensed under the MIT License.

About

Identifier Mangling/Renaming Pass for LLVM, randomize function names, global variables and structure names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published