LL

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.zip

Installs 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.
272 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

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

You give it
Source code or LLVM IR
You get back
Obfuscated binary or transformed IR

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

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

  1. Preserve Semantics: Ensure transformations don't break program correctness
  2. Randomization: Use seeded random number generators for reproducible builds
  3. Layered Approach: Combine multiple obfuscation techniques
  4. Performance Balance: Consider runtime overhead vs protection level
  5. 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

LLVM-based build environmentTarget source code

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.

SkillInstallsUpdatedSafetyDifficulty
llvm-obfuscation (this skill)66moNo flagsAdvanced
reverse-engineering-tools734moNo flagsAdvanced
game-hacking-techniques422moNo flagsAdvanced
ghidra167moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

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.

73204

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.

42128

game-engine-resources

gmh5225

Guide for game engine development resources including engine source code, plugins, and development guides. Use this skill when researching game engines (Unreal, Unity, Godot, custom engines), engine architecture, or game development frameworks.

1485

mobile-security

gmh5225

Guide for mobile game security on Android and iOS platforms. Use this skill when working with Android/iOS reverse engineering, mobile game hacking, APK analysis, root/jailbreak detection bypass, or mobile anti-cheat systems.

1469

anti-cheat-systems

gmh5225

Guide for understanding anti-cheat systems and bypass techniques. Use this skill when researching game protection systems (EAC, BattlEye, Vanguard), anti-cheat architecture, detection methods, or bypass strategies.

813

graphics-api-hooking

gmh5225

Guide for graphics API hooking and rendering techniques for DirectX, OpenGL, and Vulkan. Use this skill when working with graphics hooks, overlay rendering, shader manipulation, or game rendering pipeline analysis.

725

Search skills

Search the agent skills registry