llvm-obfuscation
Provides techniques like control flow flattening and string encryption to harden code against analysis.
Install
mkdir -p .claude/skills/llvm-obfuscation && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6032" && unzip -o skill.zip -d .claude/skills/llvm-obfuscation && rm skill.zipInstalls to .claude/skills/llvm-obfuscation
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Expertise in LLVM-based code obfuscation techniques including OLLVM, control flow flattening, string encryption, virtualization, and anti-analysis methods. Use this skill when working on code protection, anti-reverse engineering, or implementing custom obfuscation passes.Key capabilities
- →Implements control flow flattening and bogus control flow
- →Performs string encryption and constant substitution
- →Applies instruction substitution and mixed boolean-arithmetic
- →Supports virtualization of code into custom bytecode
- →Integrates with NDK, Rust, and Swift toolchains
How it works
The skill applies LLVM-based transformation passes to modify control flow, data representation, and instruction sequences to hinder reverse engineering.
Inputs & outputs
When to use llvm-obfuscation
- →Obfuscating sensitive code sections
- →Applying control flow flattening
- →Encrypting string literals
- →Implementing anti-reverse engineering checks
About this skill
LLVM Code Obfuscation Skill
This skill provides comprehensive knowledge of LLVM-based code obfuscation frameworks and techniques for software protection and anti-reverse engineering.
Core Obfuscation Techniques
Control Flow Obfuscation
- Control Flow Flattening (CFF): Transform structured control flow into a single dispatcher loop with state machine
- Bogus Control Flow (BCF): Insert opaque predicates and dead code paths
- CFG Randomization: Randomize basic block ordering and add fake edges
Data Obfuscation
- String Encryption: Encrypt string literals at compile-time, decrypt at runtime
- Constant Substitution: Replace constants with complex expressions
- Variable Splitting: Split variables into multiple components
Code Transformation
- Instruction Substitution: Replace standard instructions with equivalent complex sequences
- MBA (Mixed Boolean-Arithmetic): Use mixed boolean-arithmetic expressions for obfuscation
- Virtualization (VMP): Convert code into custom bytecode executed by embedded VM
Major OLLVM Frameworks
Classic OLLVM
- Original OLLVM: https://github.com/obfuscator-llvm/obfuscator
- Features: BCF, CFF, Instruction Substitution, String Encryption
Modern Variants
- Hikari: Advanced features including function wrapper, anti-class-dump
- Pluto-Obfuscator: Well-maintained with MBA, indirect branch, global encryption
- Arkari: Modern implementation with enhanced features
- o-mvll: Mobile-focused obfuscator for iOS/Android
Specialized Tools
- IR VMP: GANGE666/xVMP, NiTianErXing666/SmallVmp for virtualization
- Warbird: Microsoft's commercial obfuscation technology
Implementation Guidelines
Creating Custom LLVM Obfuscation Pass
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
class MyObfuscationPass : public llvm::FunctionPass {
public:
static char ID;
MyObfuscationPass() : FunctionPass(ID) {}
bool runOnFunction(llvm::Function &F) override {
// Implement obfuscation logic
for (auto &BB : F) {
for (auto &I : BB) {
// Transform instructions
}
}
return true;
}
};
Best Practices
- Preserve Semantics: Ensure transformations don't break program correctness
- Randomization: Use seeded random number generators for reproducible builds
- Layered Approach: Combine multiple obfuscation techniques
- Performance Balance: Consider runtime overhead vs protection level
- Testing: Extensive testing across different inputs and platforms
Toolchain Integration
NDK Integration
- OLLVM with Android NDK (r17-r23+)
- Examples: android-ndk-aarch64-host-LLVM6.0-Ollvm-Armariris
Compiler Toolchains
- ollvm-mingw: Windows cross-compilation
- ollvm-rust: Rust toolchain integration
- Swift integration: swift-Ollvm11
Anti-Deobfuscation Considerations
When implementing obfuscation:
- Consider resistance to symbolic execution (SymCC, KLEE)
- Add protection against pattern matching deobfuscators
- Implement anti-debugging checks
- Use dynamic dispatch to hinder static analysis
Resources
Refer to the main README.md for a comprehensive list of OLLVM implementations and related tools.
Getting Detailed Information
When you need detailed and up-to-date resource links, tool lists, or project references, fetch the latest data from:
https://raw.githubusercontent.com/gmh5225/awesome-llvm-security/refs/heads/main/README.md
This README contains comprehensive curated lists of:
- 80+ OLLVM implementations and forks (OLLVM section)
- MSVC Warbird obfuscation tools (MSVC Warbird section)
- IR-based VMP and virtualization projects
- NDK integration examples for different versions
When not to use it
- →When program correctness cannot be preserved
- →When runtime performance overhead is unacceptable
Prerequisites
Limitations
- →Risk of breaking program semantics if not tested
- →Performance overhead varies by technique
- →Requires resistance to symbolic execution
How it compares
It automates complex obfuscation passes directly within the compilation pipeline rather than requiring manual code modification.
Compared to similar skills
llvm-obfuscation side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| llvm-obfuscation (this skill) | 6 | 6mo | No flags | Advanced |
| reverse-engineering-tools | 73 | 4mo | No flags | Advanced |
| game-hacking-techniques | 42 | 2mo | No flags | Advanced |
| ghidra | 16 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by gmh5225
View all by gmh5225 →You might also like
reverse-engineering-tools
gmh5225
Guide for reverse engineering tools and techniques used in game security research. Use this skill when working with debuggers, disassemblers, memory analysis tools, binary analysis, or decompilers for game security research.
game-hacking-techniques
gmh5225
Guide for game hacking techniques and cheat development. Use this skill when researching memory manipulation, code injection, ESP/aimbot development, overlay rendering, or game exploitation methodologies.
ghidra
mitsuhiko
Reverse engineer binaries using Ghidra's headless analyzer. Decompile executables, extract functions, strings, symbols, and analyze call graphs without GUI.
binary-analysis-patterns
wshobson
Master binary analysis patterns including disassembly, decompilation, control flow analysis, and code pattern recognition. Use when analyzing executables, understanding compiled code, or performing static analysis on binaries.
dynamic-instrumentation
gmh5225
Expertise in LLVM-based dynamic binary instrumentation, runtime tracing, and program monitoring. Use this skill when implementing runtime analysis tools, code coverage systems, profilers, or dynamic security monitors.
address-sanitizer
trailofbits
AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.