LLVM15 Obfuscator CLI is an interactive command-line tool for applying various obfuscation techniques to C source code. It uses the LLVM framework and plugins from the llvm-obfuscator project.
- String Obfuscation (
strobfs
) - Substitution (
substitution
) - Opaque Predicate Obfuscation (
op
) - Merge Functions (
mergef
) - Jump Into Loop Obfuscation (
jmp
) - Control Flow Flattening (
cff
) - Constant Obfuscation (
cobfs
) - Call Obfuscation (
callobfs
) - Branch Function Obfuscation (
branchf
) - Bogus Flow Obfuscation (
floop
) - Block Extract (
bext
)
To build the Docker image for the Obfuscator CLI, run the following commands:
git clone https://github.com/bu19akov/llvm15_obfuscator_cli.git
cd llvm15_obfuscator_cli
docker build -t obfuscator-cli .
To run the Docker container and use the Obfuscator CLI, use one of the following commands:
If the tool is not installed locally:
docker run -it --rm -v {absolute_path_of_local_folder_with_c_files}:/usr/src/c_codes obfuscator-cli
If the tool is installed locally:
docker run -it --rm -v {path_to_llvm-obfuscator}:/usr/src/app/llvm-obfuscator -v {absolute_path_of_local_folder_with_c_files}:/usr/src/c_codes obfuscator-cli
Replace {absolute_path_of_local_folder_with_c_files}
with the path to the directory containing your C source files. Replace {path_to_llvm-obfuscator}
with the path to your local llvm-obfuscator directory.
When you start the Obfuscator CLI, you'll see a prompt where you can enter commands. Type help
or ?
to list available commands.
install
: Install the necessary tool and dependencies for the obfuscator.obfuscate <obfuscation_types> <input_file.c>
: Obfuscate a file using a sequence of obfuscations.quit
: Exit the obfuscator CLI.
To install the necessary tool and dependencies, run the following command in the CLI:
(obfuscator) install
To obfuscate a file using a sequence of obfuscations, use the obfuscate
command. For example, to apply string obfuscation, substitution, and opaque predicate obfuscation to hello.c
:
(obfuscator) obfuscate strobfs substitution op hello.c
The tool will perform the specified obfuscations in sequence and generate the final obfuscated output file.
To exit the CLI, use the quit
command:
(obfuscator) quit
This project is licensed under the MIT License. See the LICENSE file for details.
This tool leverages the llvm-obfuscator from llvm-obfuscator.