Retrieved article excerpt
Open article · Retrieved 2026-11-12T11:21:56.128329+00:00
**English** · [简体中文](https://github.com/qybaihe/bla/blob/main/docs/readme/README_zh.md) · [繁體中文](https://github.com/qybaihe/bla/blob/main/docs/readme/README_zh-TW.md) · [日本語](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ja.md) · [한국어](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ko.md) · [Türkçe](https://github.com/qybaihe/bla/blob/main/docs/readme/README_tr.md) · [Русский](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ru.md) · [Tiếng Việt](https://github.com/qybaihe/bla/blob/main/docs/readme/README_vi.md) · [ไทย](https://github.com/qybaihe/bla/blob/main/docs/readme/README_th.md) · [Deutsch](https://github.com/qybaihe/bla/blob/main/docs/readme/README_de.md) · [Español](https://github.com/qybaihe/bla/blob/main/docs/readme/README_es.md) · [Français](https://github.com/qybaihe/bla/blob/main/docs/readme/README_fr.md) · [Українська](https://github.com/qybaihe/bla/blob/main/docs/readme/README_uk.md) · [Polski](https://github.com/qybaihe/bla/blob/main/docs/readme/README_pl.md) · [Português (Brasil)](https://github.com/qybaihe/bla/blob/main/docs/readme/README_pt-BR.md) · [العربية](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ar.md) · [فارسی](https://github.com/qybaihe/bla/blob/main/docs/readme/README_fa.md) · [Bahasa Indonesia](https://github.com/qybaihe/bla/blob/main/docs/readme/README_id.md) · [Italiano](https://github.com/qybaihe/bla/blob/main/docs/readme/README_it.md) · [Ελληνικά](https://github.com/qybaihe/bla/blob/main/docs/readme/README_el.md) · [മലയാളം](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ml.md) · [Roman Urdu](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ur-Latn.md) · [Română](https://github.com/qybaihe/bla/blob/main/docs/readme/README_ro.md)
[BLA Shield](https://github.com/qybaihe/bla/blob/main/docs/assets/logo.png)
# BLA: Blind LLM Agents
### **Poison → Exhaust → Hallucinate. Make Reverse Engineering Bankrupt Again.**
**The open-source Counter-REA Blue Defense MCP & CLI that protects software releases against AI reverse-engineering agents (`morluto/rea`, autonomous decompilers, and LLM recon pipelines) — verified across 14 showcase benchmark targets.**
[npm version](https://www.npmjs.com/package/bla-agents)
[GitHub Trending](https://trendshift.io/repositories/323569)
[MCP Server](https://github.com/qybaihe/bla/blob/main/docs/cli-and-mcp.md)
[Formats](https://github.com/qybaihe/bla#format-coverage)
[Counter-REA](https://github.com/qybaihe/bla#empirical-results-vs-real-rea)
[MIT License](https://github.com/qybaihe/bla/blob/main/LICENSE)
[GitHub Trending — #15 Repository Of The Day](https://trendshift.io/repositories/323569)
**[🌐 Official Website](https://bla.tools/) · [📖 Defense Guides](https://bla.tools/guides/) · [📊 Live Benchmarks](https://bla.tools/showcase/) · [🎯 CrackMe Arena](https://bla.tools/crackme/) · [🏢 Enterprise](https://bla.tools/enterprise/) · [⚖️ Disclaimer](https://github.com/qybaihe/bla/blob/main/DISCLAIMER.md)**
[Quick Start](https://github.com/qybaihe/bla#-30-second-quick-start) · [How It Works](https://github.com/qybaihe/bla#-how-bla-works-agent-driven-closed-loop) · [Empirical Results](https://github.com/qybaihe/bla#empirical-results-vs-real-rea) · [Format Coverage](https://github.com/qybaihe/bla#format-coverage) · [14-Target Benchmark](https://github.com/qybaihe/bla#benchmark-14-targets-internal-estimates) · [CrackMe Arena](https://github.com/qybaihe/bla#-red-vs-blue-crackme-arena) · [FAQ](https://github.com/qybaihe/bla#faq)
---
Important
**Defensive Use Only:** BLA is engineered strictly for software authors and security teams protecting **their own** intellectual property and release artifacts. See [DISCLAIMER.md](https://github.com/qybaihe/bla/blob/main/DISCLAIMER.md).
Always install from official sources: [qybaihe/bla](https://github.com/qybaihe/bla) or [`npm i bla-agents`](https://www.npmjs.com/package/bla-agents).
[Side-by-side: REA on an unprotected artifact vs BLA-protected output](https://github.com/qybaihe/bla/blob/main/docs/assets/bla-vs-rea-showcase.svg)
| | | |
| --- | --- | --- |
| 🔴 Without BLA AI reverse-engineering agents (`REA` + coding agents) unpack `.asar` archives, recover SourceMaps, trace IPC bridges, inspect `.wasm` / `.sqlite` / `.safetensors`, and clone core business logic in **seconds for ~$0.20**. | 🛡️ With BLA (`bla harden .`) Every analyzer pass hits deterministic resource ceilings (`primitive-candidates > 256`, `ASAR > 16 MiB`, `WASM > Wabt cap`, `SQLite virtual trap`), follows realistic shadow state machines, and projects **300×–2,800× modeled token amplification** (`token-estimator.ts`). | ⚡ Runtime-Equivalent by Design Exhaustion graphs and decoy payloads sit behind $O(1)$ number-theoretic opaque predicates ($7x^2 - 1 \neq y^2 \pmod 7$) or inert format sections. **14/14 bundled benchmark targets** pass input/output equivalence tests (`bla verify` checks Counter-REA structural gates; run your project's test suite for custom artifacts). |
---
## ⚡ 30-Second Quick Start
### 1. One-Command CLI Hardening
Point BLA at any project or release directory. It auto-discovers build outputs (`dist/`, `build/`, `.asar`, `.wasm`, `.sqlite`, `.safetensors`, native binaries, Python/C/Rust/Go) and runs **audit → protect → verify**:
```
# Node.js ^22.23.4 or >=24.0.0 recommended
npx bla-agents harden .
```
### 2. Agent-Driven Closed-Loop Defense (MCP + Skill)
Register BLA once with your coding agent (**Claude Code, Cursor, Codex, Windsurf, Gemini CLI, GitHub Copilot CLI, VS Code, OpenCode, Antigravity**):
```
npx bla-agents setup
```
Then simply prompt your coding agent:
```
Harden my software against REA
```
Your host agent automatically orchestrates BLA's MCP tools (`bla_weave_plan` → source-level logic weaving & string encryption → `bla_verify_weave` → `bla_harden` → `bla_verify`) to harden both your source architecture and compiled artifacts.
### 3. Build Bundler Plugin (Vite / Rollup / Webpack / esbuild)
Protect JS chunks, strip/replace SourceMaps with VLQ v3 honey maps, and shield `.wasm` assets automatically at bundle time:
```
import { defineConfig } from "vite";
import { blaVitePlugin } from "bla-agents/bundler";
export default defineConfig({
plugins: [blaVitePlugin({ intensity: "bankrupt", enableHoneySourceMaps: true })],
});
```
---
## 🧠 How BLA Works: Agent-Driven Closed Loop
Traditional obfuscators only rename variables (`_0x1a2b`), which modern LLMs effortlessly summarize, or wrap binaries in heavy VM packers that break cross-platform builds and degrade performance.
**BLA 3.x combines format-native deterministic shields with host-agent surgical source weaving:**
```
flowchart LR
subgraph S1["1 · Recon & Plan"]
A["bla_audit / bla_lint"] --> B["bla_weave_plan"]
end
subgraph S2["2 · Agent Source Surgery"]
B --> C["bla_encrypt_strings\n(AST Span XOR + Keystream)"]
C --> D["bla_bind_scope\n(Multi-Site State Entanglement)"]
D --> E["bla_verify_weave"]
end
subgraph S3["3 · Artifact Shielding"]
E --> F["bla_harden / bla_defend\n(19+ Format Shields + Self-Seal)"]
end
subgraph S4["4 · Counter-REA Gate"]
F --> G["bla_verify\n(Structural Counter-REA Checks Only)"]
end
```
Loading
| Defense Pillar | Mechanism | Effect on AI Reverse-Engineering Agents |
| --- | --- | --- |
| **1. Poison (Deception)** | Plants format-valid canaries, SGX/TPM2/Secure Enclave delegation manifests, VLQ v3 honey SourceMaps, and plausible shadow state machines. | Forces LLM agents to split context across conflicting hypotheses and chase synthetic rabbit holes. |
| **2. Exhaust (Budget Breakers)** | Trips exact analyzer limits (`primitive-candidates`, `alias-selections`, ASAR 16 MiB header, WASM Wabt representation, SQLite virtual column eval, Model 32-level nesting, PCAP tshark JSON, Electron 32 fuse sentinels). | Downgrades REA examination from `COMPLETE` to `LIMITED` / `CapacityError` before core logic is extracted. |
| **3. Entangle (Anti-Strip & Self-Seal)** | Binds sibling artifacts (JS ↔ WASM ↔ Native sidecars) via runtime SHA-256 digests (`--self-seal`, `--sidecar-entangle`) and multi-site caller scope folding (`bla_bind_scope`). | Prevents red-team agents from stripping decoys, nop-patching single-point checks, or calling exported functions as offline oracles. |
| **4. Runtime Truman Show** | Hardens Electron V1 Fuses (`RunAsNode=0`, `Inspect=0`) and detects CDP / Node Inspector / Frida / WebDriver attachment (`runtime-shield.ts`). | Serves believable synthetic telemetry during live debugging while keeping normal user execution untouched. |
---
## 🔬 Empirical Results vs. Real REA
These numbers come from running **real `morluto/rea`** against BLA-hardened samples on commodity hardware (`npm run redteam:rea`). Full machine-readable report: [`docs/redteam/empirical-rea-validation.md`](https://github.com/qybaihe/bla/blob/main/docs/redteam/empirical-rea-validation.md) / [`.json`](https://github.com/qybaihe/bla/blob/main/docs/redteam/empirical-rea-validation.json).
> **How to read this:** “Empirically verified” means the live REA analyzer path returned the listed budget / capacity / redaction failure in this environment. It is **not** a claim about Ghidra/Frida/LLDB/Rizin/JADX sessions we did not run here.
### Empirically Verified on Commodity Hardware
Recorded under **Node v24.22.1** with optional **Wabt 1.0.42** + **tshark 4.4** when noted. Soft-skips keep Node 22 / CI green when external native tools are absent.
| Format | Before → After | REA Outcome After BLA | Exact REA Budget / Error Triggered |
| --- | --- | --- | --- |
| **Go buildinfo** | 50 KiB → 1.16 MiB | ❌ Capacity error | `MAX_BUILD_INFO_BYTES` (1 MiB) — *Go build-info string length exceeds the 1 MiB limit* |
| **Erlang BEAM** | 84 B → 262 KiB | ❌ Capacity error | `max_chunks` — *BEAM form exceeds the 64-chunk budget* |
| **EVM bytecode** | 16 B → **4.00 MiB** | ⚠️ Approaches full cap | `EVM_INTERFACE_LIMITS.inputBytes` (4 MiB) |
| **PCAP** | 24 B → 1.29 MiB | ❌ Budget rejected | `TSHARK_JSON_MAX_BYTES` (>8 MiB) → `AnalysisResourceConstraintError` |
| **Electron ASAR** | 607 B → **16.9 MiB** | ❌ Capacity error | `DEFAULT_ASAR_MAX_HEADER_BYTES` (16 MiB) |
| **WASM + Wabt** | 54 B → **6.56 MiB** · 251 exports | ⚠️ `ifaceState=partial` | `WASM_INTERFACE_REPRESENTATION_BYTES` — *Typed WASM interface decoding exceeds WABT budget* |
| **SQLite** (Node 24) | 12 KiB → 56 KiB | ❌ Redaction / eval trap | `SqliteColumnEvaluationFailure` — unknown `enclave_unseal_payload()` on virtual trap columns |
| **JavaScript** | 761 B → 116 KiB | ❌ Budget rejected | `alias-selections` + `getter-expansion` + `primitive-bytes` + `primitive-candidates` |
| **Safetensors** | 128 B → 10.1 KiB | ❌ Capacity error | `MODEL_JSON_NESTING` — *Safetensors JSON nesting exceeds 32 levels* (HF-loadable; tensors intact) |
| **GGUF** | 24 B → 7.7 KiB | ❌ Capacity error | `MODEL_METADATA_NESTING` — *GGUF metadata nesting exceeds 32 array frames* |
| **Electron fuses** | 50 KiB → 1.16 MiB | ❌ Budget rejected | `ELECTRON_FUSE_LIMITS.maximumSentinelsPerSlice` (>32) |
| **Flutter pool** | 50 KiB → 1.16 MiB | ⚠️ Projected cap | `MAX_POOL_URIS` / `MAX_POOL_TOKENS` (REA truncates with “at least N”) |
Reproduce locally:
```
export REA_WABT_BIN_DIRECTORY=$HOME/opt/wabt-1.0.42/bin # optional
npm run build && npm run redteam:rea
```
**Designed-for paths not empirically run on this machine (click to expand)**
These shields exist in-tree and are covered by unit tests / catalog drift checks, but the matching REA path requires external native debuggers/decompilers not installed on the CI runner:
| Area | Why Unverified Here |
| --- | --- |
| Ghidra / native decompilation depth | Requires a local Ghidra install + REA bridge |
| Frida / LLDB / GDB / Rizin live sessions | Requires those debuggers + device/process attach |
| JADX / full Android APK pipeline | APK resigning unsupported; standalone DEX shield is in-tree |
| **Firmware** containe