Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pw4k/ironbrew-2/llms.txt
Use this file to discover all available pages before exploring further.
IronBrew 2
IronBrew 2 is a powerful VM-based obfuscator for Lua 5.1 that provides enterprise-grade protection for your Lua scripts through advanced bytecode manipulation, control flow obfuscation, and a custom virtual machine runtime. Unlike simple obfuscators that only rename variables, IronBrew 2 transforms your Lua bytecode into a completely custom instruction set executed by a generated VM, making reverse engineering significantly more difficult.Quick Links
Quick Start
Obfuscate your first Lua script in under 5 minutes
Installation
Set up IronBrew 2 on your system
CLI Reference
Complete command-line interface documentation
Key Features
VM-Based Obfuscation
IronBrew 2 doesn’t just obfuscate your code - it completely transforms it. Your Lua bytecode is converted into custom VM instructions that are executed by a generated virtual machine embedded in the output.Control Flow Obfuscation
With control flow obfuscation enabled, IronBrew 2 transforms the execution path of your code through several techniques:- Bouncing: Redirects execution through intermediate jumps
- Test Flipping: Inverts conditional logic
- Number Mutation: Transforms arithmetic operations
- Inlining: Embeds function calls directly
String Encryption
Strings in your code can be encrypted to prevent static analysis:Super Operators
Super operators combine multiple VM instructions into single complex operations, further obscuring the execution logic:Bytecode Manipulation
The obfuscator performs several bytecode-level transformations:- Custom instruction encoding
- Constant table shuffling
- Register allocation obfuscation
- Stack manipulation techniques
Mutation System
The mutation system transforms arithmetic and comparison operations into more complex equivalents:Use Cases
Game Script Protection
Protect game logic, anti-cheat systems, and proprietary algorithms in Lua-based game engines (Roblox, Garry’s Mod, etc.).Proprietary Algorithm Protection
Obfuscate business logic and algorithms implemented in Lua to prevent unauthorized copying or reverse engineering.Anti-Tampering
Make it significantly harder for users to modify or bypass license checks, authentication systems, or other security measures.Intellectual Property Protection
Protect your Lua codebase when distributing to clients or end-users who shouldn’t have access to the source code.How It Works
IronBrew 2 follows a multi-stage obfuscation pipeline:Validation
Your input Lua file is validated by compiling it with
luac to ensure it’s syntactically correct.Control Flow Obfuscation
If enabled, control flow is transformed using various techniques (bouncing, test flipping, mutations, etc.).
Architecture
IronBrew 2 is built with C# (.NET Core 3.1) and consists of several core components:- Bytecode Library: Deserializes Lua bytecode and provides an IR for manipulation
- Obfuscator Engine: Transforms bytecode using various obfuscation techniques
- VM Generator: Creates custom VM code tailored to your obfuscated bytecode
- Control Flow Engine: Implements control flow obfuscation techniques
- Encryption System: Handles string and constant encryption
IronBrew 2 targets Lua 5.1 bytecode specifically. Make sure your Lua code is compatible with Lua 5.1.
Performance Considerations
VM-based obfuscation inherently adds runtime overhead since your code is interpreted by a custom VM rather than executed natively. Consider:- Execution Speed: Obfuscated code will run slower than native Lua
- Memory Usage: The VM adds additional memory overhead
- File Size: Obfuscated output is larger due to the embedded VM
Next Steps
Install IronBrew 2
Get IronBrew 2 set up on your system
Quick Start Guide
Obfuscate your first script