Files
bla/docs/readme/README_zh-TW.md
qybaihe 8b123eff2c feat(shield): masked strings, CommonJS named exports, REA re-validation
Follow-up on this branch: the three items the pull request listed as not
done, and what re-measuring turned up.

Strings (maximum / bankrupt)
- Pieces are XOR-masked, spelled in the letters a-p and decoded by a small
  self-contained function at each use. REA does not evaluate the opaque
  conditions, it lists every combination of pieces: with the clear pieces of
  3.4.3 it returned an IPC channel at its default budgets and a URL and a
  SHA-256 digest once semantic_precision was raised 4x. Masked, none of the
  three is in its result at 1x / 4x / 64x.
- A secret is split wherever it is written: up to 4,096 characters, object
  keys, regular expressions, class field values. The wrong piece beside each
  right one has its shape.

CommonJS named exports
- `import { x } from "./lib.cjs"` failed to link after hardening, at every
  intensity and in 3.4.3 as well: re-export getters were woven, __exportStar
  was renamed, export names were encoded. The shapes Node's scanner reads are
  now left as written (the name, the one-line getter, the helper's name,
  Babel's export-star loop, UMD factories included); a rewritten value of a
  module.exports literal is printed in parentheses.
- On 1,008 hardened files from 26 npm packages cjs-module-lexer read 132
  differently and 140 names were gone; it now reads all of them as it reads
  the originals.

REA
- Harness and drift checker follow REA 05be423, which moved its analyzers
  and made most limits per-call defaults. A probe that cannot call REA is a
  harness error (status unverified, exit 2) instead of a budget hit, and
  bla_redteam_report returns unverified for it. New row javascript_strings
  fails the run if a known value comes back.
- README states per row whether the caller can raise the limit: a size-based
  plant stops REA as it runs by default and costs one retry otherwise.

Also
- bla_lint lists a finding once when a build-output file and the source it
  was made from share it (sameFindingInSource).
- bla_verify_weave lists POSIX paths on Windows (the failing CI leg).
- Localized READMEs: Node badge, benchmark target count, stray characters.

Co-Authored-By: Claude Mythos 5.2 <thomas@users.noreply.github.com>
2026-11-18 01:57:33 +08:00

12 KiB
Raw Permalink Blame History

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: Blind LLM Agents

一個覆蓋二進位檔、桌面與前端應用、資料庫、AI 模型及執行期行為的反 AI 逆向工程 MCP 與 CLI 護盾。

打造你的核心功能。從二進位底層致盲一切企圖複製它的 AI 代理。

npm version MCP tool catalog Node.js requirements Counter-REA Verified MIT license

快速開始 · BLA 運作原理 · 你可以保護哪些目標 · 實戰案例與基準測試 · 常見問題 (FAQ) · 文件

npx bla-agents setup · npx bla-agents defend ./dist --manifest

Important

Get BLA from qybaihe/bla or the bla-agents npm package.


Before BLA vs After npx bla-agents protect

擔心別人用 REA 或 AI 程式設計代理指向你發布的軟體,幾十秒內扒光並複製你的核心邏輯?直接讓你的 Agent 用 BLA(Poison → Exhaust → Hallucinate)為建置產物加上對抗護盾。它無需改寫原始碼即可掃描暴露面、植入架構級飛地迷霧與演算法算力沼澤(Tarpits),並驗證自動化逆向徹底失效。

BLA 將你的程式設計代理連接到原生二進位檔、JavaScript 與 Electron 應用、WebAssembly 模組、Python 位元組碼、SQLite 資料庫、AI 模型權重與行動端套件的保護工具。所有保護均在本地運行,100% 保持原有執行期行為不變。

快速開始

設定你的 Agent

npx bla-agents setup

直接向你的 Agent 提問

  • 1. Audit (Pre-flight REA Audit):
    Audit my ./dist directory against REA, show me every exposed module and IPC channel, and estimate how much it would cost Claude to reconstruct it.
    
  • 2. Protect (Poison + Exhaust + Hallucinate):
    Protect ./dist/app.asar with BLA at bankrupt intensity, inject enclave chaff and algorithmic tarpits, and output to ./dist/app.shielded.asar.
    
  • 3. Verify (Verify Defense & Token Burn):
    Verify ./dist/app.shielded.asar against the original ./dist/app.asar and confirm that REA's examination degrades to limited status.
    

使用終端機命令

# 1. Audit exposure
npx -y bla-agents@latest audit /absolute/path/to/app --json

# 2. Protect artifact
npx -y bla-agents@latest protect /absolute/path/to/app -o /absolute/path/to/app.shielded --intensity bankrupt

# 3. Verify Counter-REA resistance
npx -y bla-agents@latest verify /absolute/path/to/app.shielded /absolute/path/to/app

# 4. Run 14-target Counter-REA benchmark
npx -y bla-agents@latest benchmark

# 5. Emit compile-time C/C++, Rust, or Go defense headers
npx -y bla-agents@latest emit-headers --lang c -o ./include/bla_shield.h

# Install globally
npm install --global bla-agents
bla --help

在打包工具中使用

import { defineConfig } from "vite";
import { blaVitePlugin } from "bla-agents/bundler";

export default defineConfig({
  plugins: [blaVitePlugin({ intensity: "bankrupt", enableHoneySourceMaps: true })],
});

更新 BLA

bla update
npx bla-agents@latest setup

BLA 運作原理

  1. Poison (Architectural Chaff & Honey Assets): Embeds hardware enclave delegation manifests (SGX / TPM2 / Secure Enclave), VLQ v3 Honey Source Maps (enclave://tee-runtime/), honey WASM "name" sections, and honey SQLite tables.
  2. Exhaust (Semantic Budget Breakers & Algorithmic Tarpits): Trips REA's internal analyzer limits (primitive-candidates > 256, alias-selections > 512, getter-expansion > 512, primitive-bytes > 1 MiB, maximum_rustc_hashes > 64, maximumSentinelsPerSlice > 32) and weaves 14–36 Fake XRef state machines.
  3. Hallucinate (Anti-CDP Runtime Deception & Fuse Hardening): Hardens Electron V1 fuse wires (RunAsNode=0, EnableNodeCliInspectArguments=0) and serves synthetic enclave telemetry to CDP/Inspector/Frida probes.

你可以保護哪些目標

Target What BLA injects & how REA fails Command / prompt & requirements
JavaScript / TypeScript Trips primitive-candidates > 256, alias-selections > 512, getter-expansion > 512 + 36 tarpits bla protect app.js · Built-in Babel AST engine
Electron .asar apps De-literalizes IPC channels (channel: null), adds duplicate decoy IPC handlers & shadow module bla protect app.asar · Built-in Chromium Pickle .asar unpacker & SHA-256 repacker
Electron binary fuses Hardens real V1 fuses (RunAsNode=0, Inspect=0) + injects 34 > 32 decoy fuse sentinels bla protect ElectronApp · Trips ElectronFuseResourceFailure (maximumSentinelsPerSlice = 32)
Native / Rust / Go Injects 68 > 64 /rustc/<40-hex>/ paths, decoy .dep-v0 crate graph & Go dep\t lines bla protect daemon.elf · Built-in ELF64, Mach-O, and PE/COFF shield
Flutter / Dart AOT Injects 66 > 64 Dart snapshot headers (0xf5f5dcdc) + 6 > 4 LLVM toolchain lines bla protect libapp.so · Trips SnapshotHashScanner (capped: true)
WASM artifacts Strips debug sections; injects honey "name" section (tee_hardware_enclave_stub) + custom chaff bla protect core.wasm · Built-in LEB128 binary parser; 100% WebAssembly.validate
Python & .pyc Injects Python tarpit state machines into .py & TYPE_ASCII marshal chaff into .pyc pools bla protect module.pyc · Built-in CPython 3.7–3.14 .pyc marshal shield
SQLite databases Injects 3 enclave honey tables with GENERATED ALWAYS AS (bla_enclave_unseal(...)) VIRTUAL traps bla protect data.sqlite --sqlite-eval-trap · Trips SqliteColumnEvaluationFailure on REA preview
Model artifacts Injects 35 > 32 nested JSON/ARRAY headers into .safetensors and .gguf model headers bla protect weights.safetensors · Trips ModelFormatFailure (json-nesting / metadata-nesting > 32)
Android DEX & IL2CPP Injects Lcom/enclave/sgx/... decoy classes into classes.dex (valid SHA-1/Adler32) & Il2Cpp bla protect classes.dex or global-metadata.dat · Pollutes JADX/JEB & IL2CPP recovery

實戰案例與基準測試

Showcase Target Before BLA (REA Alone) After npx bla-agents protect Token Burn Runtime Check
1. DX-Ball Sound-Pan Calculation (.js) 84/100 · 4,800 tok · $0.20 (COMPLETE) 2/100 · 10,182,068 tok · $160.64 (LIMITED) 2,121.3x ✅ 100% Exact
2. Notion Electron Clipboard Bridge (.asar) 98/100 · 9,132 tok · $0.34 (COMPLETE) 2/100 · 23,125,000 tok · $358.28 (LIMITED) 2,532.3x ✅ 100% Exact
3. Enterprise Offline License Validator (.ts) 84/100 · 4,800 tok · $0.20 (COMPLETE) 2/100 · 10,182,169 tok · $160.64 (LIMITED) 2,121.3x ✅ 100% Exact
4. WebAssembly Crypto Kernel (.wasm) 81/100 · 4,800 tok · $0.20 (COMPLETE) 6/100 · 1,807,067 tok · $29.88 (LIMITED) 376.5x ✅ 100% Exact
5. Native ELF64 Binary (Rust / Go / Fuse / Dart) 81/100 · 9,278 tok · $0.35 (COMPLETE) 2/100 · 3,698,135 tok · $59.72 (LIMITED) 398.6x ✅ 100% Exact
6. Local SQLite Entitlement Database (.sqlite) 81/100 · 10,568 tok · $0.29 (COMPLETE) 7/100 · 1,711,235 tok · $28.36 (LIMITED) 161.9x ✅ 100% Exact
7. Proprietary Edge AI Weights (.safetensors) 81/100 · 4,800 tok · $0.20 (COMPLETE) 6/100 · 1,807,073 tok · $29.88 (LIMITED) 376.5x ✅ 100% Exact
8. Android Dalvik Bytecode (classes.dex) 81/100 · 8,900 tok · $0.34 (COMPLETE) 7/100 · 2,786,285 tok · $45.09 (LIMITED) 313.1x ✅ 100% Exact

常見問題 (FAQ)

Which agents can use BLA?

Any agent that supports local MCP servers or SKILL.md workflows (Claude Code, Cursor, Codex, Gemini CLI, Windsurf, Google Antigravity, OpenCode, VS Code, and GitHub Copilot CLI). Run npx bla-agents setup.

Does BLA slow down my app or change its runtime output?

No. All semantic budget breakers and tarpits are guarded by O(1) number-theoretic opaque predicates (7x^2 - 1 \neq y^2 \pmod 7) and preserve 100% input/output equivalence.

Do I need Hopper, Ghidra, IDA, or WABT installed?

No. All 26 format shields are built directly into bla-agents with zero external dependencies.

Does BLA upload my source code or binaries anywhere?

Never. All operations run 100% locally on your machine.

文件

Star 成長

Star History 繪製 qybaihe/bla 的 GitHub Star 成長曲線。圖片由對方快取約一天,不是逐秒計數。點圖片可打開完整歷史。

qybaihe/bla 倉庫的 GitHub Star 成長曲線