bla-agents

中文文档
2.0.0发布于 2026/11/03MITTypeScriptES Module构建来源已验证

BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, WebAssembly, SQLite, AI Models, and Android DEX/IL2CPP against AI reverse-engineering agents like REA.

原始使用文档
文档目录15 节
  1. Make reverse engineering bankrupt again.
  2. What BLA does
  3. Quick start
  4. Empirical results vs real REA
  5. Empirically verified on commodity hardware
  6. Designed-for but not empirically verified here
  7. Format coverage
  8. Benchmark (14 targets, internal estimates)
  9. How BLA works
  10. Project config defaults (P0)
  11. FAQ
  12. Documentation
  13. Contributing
  14. Community / 友情社区
  15. License

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Türkçe · Русский · Tiếng Việt · ไทย · Deutsch · Español · Français · Українська · Polski · Português (Brasil) · العربية · فارسی · Bahasa Indonesia · Italiano · Ελληνικά · മലയാളം · Roman Urdu · Română

BLA Shield BLA: Blind LLM Agents

Make reverse engineering bankrupt again.

Point BLA at the build you ship. When an AI reverse-engineering agent (REA) opens it, the analyzer hits resource budgets, follows decoys, and burns tokens — while your users still get the same runtime behavior.

npm version GitHub Trending MCP tool catalog Node.js Counter-REA MIT license

Website · Guides · Showcases · Disclaimer

Quick start · Empirical results · Format coverage · Benchmark · FAQ

bla harden .
# or tell your agent: "Harden my software against REA"

GitHub Trending — #15 Repository Of The Day

[!IMPORTANT] BLA is a defensive tool for protecting your own software. See DISCLAIMER.md. Get BLA from qybaihe/bla or npm bla-agents.

Side-by-side: REA on an unprotected artifact vs BLA-protected output

What BLA does

REA reverse-engineers release artifacts in one command. BLA is the Counter-REA half of that story:

LayerWhat happens
PoisonPlant format-valid canaries, honey metadata, and decoy control flow that look like real evidence.
ExhaustPush the artifact past REA's documented resource budgets (headers, nesting, interface inventories, PCAP JSON, fuse sentinels, …).
HallucinateLeave the analyzer with truncated inventories, redaction failures, and ambiguous rabbit holes — while runtime stays equivalent.

One sentence covers the common case (auto-discovers dist/ / build/ / .asar / .wasm / .sqlite / models / … and runs audit → protect → verify):

npx bla-agents harden .
# MCP / agent: bla_harden   ·   "Harden my software against REA"

Same pipeline as bla defend / bla_defend when you already know the path; harden is the default one-command UX.

Quick start

# Node.js ^22.23.4 or 24.x recommended (REA red-team needs zlib.zstd on 22.23+)
npx bla-agents setup          # register MCP + skill with your coding agent
npx bla-agents harden .       # one-command Counter-REA pass on the current project
npx bla-agents benchmark      # 14-target showcase (local estimates + runtime checks)

Ask your agent after setup (skill guides one-click harden):

Harden my software against REA

Or run stages explicitly: audit · protect · verify · defend — see one-click agent defense and CLI and MCP.


Empirical results vs real REA

These numbers come from running real REA against BLA-hardened samples on commodity hardware (npm run redteam:rea). Full machine-readable report: docs/redteam/empirical-rea-validation.md / .json.

How to read this: “Empirically verified” means the REA analyzer path actually 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 tooling is absent.

FormatBefore → afterREA outcome after BLABudget / error
Go buildinfo50 KiB → 1.16 MiBcapacity errorMAX_BUILD_INFO_BYTES (1 MiB) — Go build-info string length exceeds the 1 MiB limit
Erlang BEAM84 B → 262 KiBcapacity errormax_chunks — BEAM form exceeds the 64-chunk budget
EVM bytecode16 B → 4.00 MiBapproaches full input capEVM_INTERFACE_LIMITS.inputBytes (4 MiB)
PCAP24 B → 1.29 MiBbudget rejectedTSHARK_JSON_MAX_BYTES (>8 MiB) → AnalysisResourceConstraintError (tshark present)
Electron ASAR607 B → 16.9 MiBcapacity errorDEFAULT_ASAR_MAX_HEADER_BYTES (16 MiB)
WASM + Wabt54 B → 6.56 MiB · 251 exportsifaceState=partialWASM_INTERFACE_REPRESENTATION_BYTES — Typed WASM interface decoding exceeds the WABT output representation budget
SQLite (Node 24)12 KiB → 56 KiBredaction / column evalSqliteColumnEvaluationFailure — unknown enclave_unseal_payload() on honey trap columns
JavaScript761 B → 116 KiBbudget rejectedalias-selections + getter-expansion + primitive-bytes + primitive-candidates (real REA resourceLimits)
Safetensors128 B → 10.1 KiBcapacity errorMODEL_JSON_NESTING — Safetensors JSON nesting exceeds 32 levels (HF-loadable; tensor bytes unchanged)
GGUF24 B → 7.7 KiBcapacity errorMODEL_METADATA_NESTING — GGUF metadata nesting exceeds 32 array frames
Electron fuses50 KiB → 1.16 MiBbudget rejectedELECTRON_FUSE_LIMITS.maximumSentinelsPerSlice (>32)
Flutter pool50 KiB → 1.16 MiBprojected capMAX_POOL_URIS / MAX_POOL_TOKENS (REA would truncate with “at least N”)

Reproduce:

# Prefer Node 22.23.4+ or 24.x; set Wabt/tshark for full coverage
export REA_WABT_BIN_DIRECTORY=$HOME/opt/wabt-1.0.42/bin   # optional
npm run build && npm run redteam:rea

Designed-for but not empirically verified here

These shields exist in-tree and are covered by unit tests / catalog drift checks, but the matching REA path needs native tooling we did not run on this box:

AreaWhy unverified here
Ghidra / native decompilation depthRequires a Ghidra install + REA bridge
Frida / LLDB / GDB / Rizin live sessionsRequires those debuggers + device/process attach
JADX / full Android APK pipelineAPK resigning unsupported; DEX shield is in-tree
Firmware containersSkipped — staging/extraction budgets exist; no honest E2E without firmware corpora
SPIR-V / CUDA fatbinary / AMD GPU objectsSkipped — need native GPU object decoders; PTX text is shielded in-tree (benchmark only, not a REA GPU-object budget hit)
EVMole in-process EVM decodeDocumented as not pathable in-process; EVM shield still densifies to the 4 MiB input approach

We do not claim those paths are empirically bankrupt until redteam:rea (or an equivalent harness) records a real before/after against the live analyzer.


Format coverage

FormatCanary + diagnosticExhaustion / budget tripEmpirically vs REANotes
JavaScript / TypeScript✓✓ semantic budgetsverified (in-process)Babel AST; anti-strip; real REA resourceLimits
Electron .asar✓✓ header 16 MiBverified
Electron fuses✓✓ >32 sentinelsverified
WASM✓ custom sections✓ export-name decoys → Wabtverified (Wabt)Soft-skips to projected budget without Wabt
Python / .pyc✓✓designed-for
SQLite✓ honey + trap cols✓ column evalverified (Node 24)Soft capability_gated on Node 22
Safetensors✓ string metadata✓ JSON nesting >32verifiedHF-loadable; tensor bytes preserved
GGUF✓✓ ARRAY nesting >32verified
Go buildinfo✓✓ >1 MiBverifiedMapped ELF section
Flutter / Dart pool✓✓ URI/token capsverified (projected)
Erlang BEAM✓✓ chunks / atomsverified
EVM + Solidity meta✓✓ → 4 MiB inputverified (approach)
PCAP✓✓ tshark JSON >8 MiBverified (tshark)Soft-skip without tshark
NVIDIA PTX (text)✓entry floodbenchmark onlyNot a REA GPU-object budget
DEX / IL2CPP / bplist / .NET / JVM / ZIP✓format-specificdesigned-forAPK signing-aware protect unsupported
Firmware / SPIR-V / CUDA fatbin / AMD GPU——skippedSee matrix above

Benchmark (14 targets, internal estimates)

npx bla-agents benchmark runs a local Counter-REA showcase: exposure scores, estimated token/cost multipliers, and measured runtime equivalence. Token/$ columns are internal estimates derived from BLA's catalog of REA limits — they are not the same as the empirical REA process measurements above (those are byte-level analyzer failures with real error strings). npm run verify:rea is a constant-drift harness only and must never be cited as protection evidence; the only authoritative gate is npm run redteam:rea.

Latest local run (bla-agents v1.4.0): aggregate ~612.5× tokens · ~292.2× cost · 14/14 runtime-exact.

TargetUnprotected (est.)Protected (est.)Token mult (est.)Runtime
DX-Ball sound-pan (.js)84/100 · 4,800 tok · $0.202/100 · 13.5M tok · $212.82 · LIMITED2822.7×100%
Notion Electron clipboard (.asar)98/100 · 9,132 tok · $0.342/100 · 23.1M tok · $358.28 · LIMITED2532.3×100%
Enterprise license validator84/100 · 4,800 tok · $0.202/100 · 13.5M tok · $212.82 · LIMITED2822.7×100%
WASM crypto kernel81/100 · 4,800 tok · $0.206/100 · 1.83M tok · $30.23 · LIMITED381.5×100%
Native ELF64 (Rust/Go/Fuse/Dart)81/100 · 35,222 tok · $0.732/100 · 3.72M tok · $60.03 · LIMITED105.6×100%
SQLite entitlement DB81/100 · 10,568 tok · $0.297/100 · 1.71M tok · $28.39 · LIMITED162.1×100%
Edge AI Safetensors81/100 · 4,800 tok · $0.206/100 · 1.81M tok · $29.90 · LIMITED376.8×100%
Android DEX81/100 · 8,900 tok · $0.347/100 · 2.79M tok · $45.11 · LIMITED313.2×100%
Apple bplist81/100 · 6,440 tok · $0.269/100 · 1.36M tok · $22.96 · LIMITED211.8×100%
.NET managed DLL81/100 · 8,900 tok · $0.346/100 · 2.45M tok · $39.96 · LIMITED274.8×100%
Erlang BEAM81/100 · 8,900 tok · $0.345/100 · 3.86M tok · $62.08 · LIMITED433.2×100%
EVM Solidity metadata81/100 · 6,440 tok · $0.266/100 · 1.78M tok · $29.40 · LIMITED276.3×100%
libpcap capture81/100 · 4,800 tok · $0.208/100 · 1.60M tok · $26.58 · LIMITED333.2×100%
NVIDIA PTX text81/100 · 4,800 tok · $0.206/100 · 2.40M tok · $39.29 · LIMITED500.2×100%

How BLA works

  1. Exhaustion — trip documented REA caps (primitive-candidates, ASAR header bytes, WASM interface representation, SQLite column evaluation, model JSON/ARRAY nesting, Go buildinfo, BEAM chunks, PCAP tshark JSON, fuse sentinels, …).
  2. Deception — canary credentials + system-diagnostic rabbit holes across Python/WASM/SQLite/models/DEX/IL2CPP/bplist/.NET/JVM/ZIP; decoy IPC / enclave manifests / VLQ maps.
  3. Runtime guard — Electron V1 fuse hardening; CDP/Frida/inspector detection returns synthetic telemetry during inspection sessions.

Protections are format-native (no commercial packer / external LLVM required). Red line: never break protected program behavior, export surface, binary/section integrity, or format validity.


Project config defaults (P0)

  • Per-project seed — BLA mints a random seed into .blarc / bla.config.json on first use. Legacy shared fingerprints (bla-shield-seed-v1, …) are no longer the default.
  • --llm-directives — risky LLM-facing bait (fake COPPA/medical notices, dual-use imitation, in-band AI chat markers) is off by default; pass the flag (or llmDirectives: true / MCP llm_directives) to opt in.
  • --manifest — .bla-manifest.json is an unsigned attestation (not ed25519-signed) and is opt-in; it is not shipped next to customer artifacts by default. Schema: defense-manifest-v1.json.

FAQ

Which agents can use BLA?

Any coding agent with local MCP or SKILL.md workflows. npx bla-agents setup configures Claude Code, Cursor, Codex, Gemini CLI, Windsurf, Google Antigravity, OpenCode, VS Code, and GitHub Copilot CLI. After setup, the bundled blind-llm-agents skill is the one-click harden guide (bla_harden / bla harden .); MCP stays the execution layer.

Does BLA change runtime output?

No on the hot path. Budget guards sit behind $O(1)$ opaque predicates. Every benchmark target checks 100% input/output equivalence against the unprotected build.

Do I need Ghidra, Hopper, IDA, or Wabt to protect files?

No. Shields are built into bla-agents. Wabt/tshark/Node 24 are optional — they unlock empirical red-team probes (npm run redteam:rea), not protection itself.

Is BLA for attacking other people's software?

No. See DISCLAIMER.md. Protective payloads activate under reverse-engineering inspection of artifacts you hardened.

Documentation

Report security issues through SECURITY.md.

Contributing

Issues and PRs welcome at qybaihe/bla. Before submitting:

export PATH=$HOME/node22.23.4/bin:$PATH   # or node24
npm run build && npm test && node dist/cli.js benchmark
npm run redteam:rea                        # authoritative (real REA)
# npm run verify:rea                       # drift harness only — NOT protection proof

Community / 友情社区

  • 🎯 Public BLA CrackMe v6 (challenge/v6/) — harden-native: a Node vault + HTML panel + WebAssembly core hardened by the real bla harden pipeline (bankrupt, LLM directives OFF, fixed seed). Run npm run crackme:v6 -- '<key>'; SEAL.json publishes digests only (no plaintext key/flag in git).
  • LINUX DO (linux.do) — 新的理想型社区

License

MIT

版本与发布记录

bla-agents 共发布 9 个版本,首次发布于 2026/10/25;过去 12 个月发布了 9 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.0.0latest2026/11/03今天
1.6.42026/11/021 天前
1.6.32026/11/012 天前
1.6.22026/11/012 天前
1.6.12026/11/012 天前
1.6.02026/11/012 天前

关于 bla-agents 的常见问题

bla-agents 是什么?

BLA (Blind LLM Agents)——对抗性防御盾,保护二进制文件、电子应用程序、JS包、Python、WebAssembly、SQLite、AI模型和Android DEX/IL2CPP免受AI逆向工程代理(如REA)的攻击。

如何安装 bla-agents?

在项目目录运行 npm install bla-agents,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 bla、bla-agents、bla-shield,可以用 npx bla 直接运行。

bla-agents 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

bla-agents 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

bla-agents 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.23.4 || >=24.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

bla-agents 可以商用吗?

bla-agents 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

bla-agents 还在维护吗?

最新版本 2.0.0 发布于 2026/11/03(今天);至今共发布 9 个版本,其中过去 12 个月发布了 9 个;首次发布于 2026/10/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。