Skip to content

armgit / bla

Public Imported from GitHub
0

🛡️ BLA (Blind LLM Agents) — Adversarial defense shield that protects binaries, Electron apps, JS bundles, Python, and WebAssembly against AI reverse-engineering agents like REA. Poison -> Exhaust -> Hallucinate.

docs(formats): document Apple PropertyListDecodeBudget and .NET ManagedDecodeBudget traps

qybaihe1797e17f1070
diff --git a/docs/apple-and-dotnet-defense.md b/docs/apple-and-dotnet-defense.md
new file mode 100644
index 0000000..6cf26a3
--- /dev/null
+++ b/docs/apple-and-dotnet-defense.md
@@ -0,0 +1,18 @@
+# Apple PropertyList & .NET Managed Assembly Defense
+
+## 1. Apple `.plist` Internal Subset Budget Trap (`src/shields/formats/apple-plist.ts`)
+
+In `morluto/rea/src/artifacts/apple/PropertyListDecodeBudget.ts:80`:
+```ts
+if (token.doctype) {
+ if (token.internalSubset)
+ throw fail("expansion", `XML plist internal entity expansion exceeds ${budget}`);
+}
+```
+REA rejects any XML `.plist` whose `<!DOCTYPE plist ...>` tag contains a `[` bracket (`internalSubset = true`), even when the internal subset `[]` is completely empty and defines zero XML entities!
+
+`protectAppleXmlPlist` injects `<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" []>`, which is 100% valid XML 1.0 for Apple's `PropertyListSerialization` while causing REA's `preflightPropertyListDecode` to immediately abort.
+
+## 2. .NET Managed Metadata Representation Amplification (`src/shields/formats/dotnet-managed.ts`)
+
+In `morluto/rea/src/dotnet/ManagedDecodeBudget.ts`, every metadata table row reserves `256` bytes and every UTF-8 string reserves `encodedBytes * 6 + 2` bytes against a 64 MiB ceiling, while `managed-pinvoke-import` entries trigger mandatory native ABI reconstruction obligations.