{"slug": "show-hn-blue-harness-audit-and-harden-binaries-against-ai-assisted-reversing", "title": "Show HN: Blue-harness – audit and harden binaries against AI-assisted reversing", "summary": "A developer released blue-harness, an open-source build-time hardening and audit toolkit for native binaries and mobile apps, which in a single N=1 test run by a 4-bit-quantised 7B model on an RTX 3070 laptop let an AI agent crack an unprotected build in 1.6 seconds and 1,256 tokens but fail against the hardened build after 16,785 tokens and 195 seconds — roughly 13× the tokens and 120× the wall-clock. The toolkit audits a build's exposure, applies nine countermeasures such as anti-debug, string encryption and a dev-to-release identity transform, and verifies each defense actually fires; author seifheakal notes the honeytoken layer never fired because the agent was stopped earlier, and asks users with larger models to submit scored results as pull requests.", "body_md": "*Make your own app expensive to reverse — measure it, harden it, prove it.*\n\n**Anyone can now reverse-engineer a shipped app by typing one sentence to an AI agent; blue-harness makes that expensive, measures how expensive, and proves each defense actually fires.**\n\n  A build-time **anti-reverse-engineering hardening & audit harness**\n  for **native binaries and mobile apps** you own.\n\n<sub>Recorded with [docs/assets/demo.tape](https://github.com/seifheakal/blue-harness/blob/main/docs/assets/demo.tape). Real output, nothing staged.</sub>\n\n```\ngit clone https://github.com/seifheakal/blue-harness && cd blue-harness\nmake demo      # audit a sample build, show its hardening plan, then PROVE every defense fires\nmake verify    # run every check and print one posture summary\n```\n\nPoint it at your **own** binary:\n\n```\nmake report BIN=path/to/your/binary   # exposure audit + the ordered hardening plan\nmake harden BIN=path/to/your/binary   # apply every post-build hardening (honest about the rest)\n```\n\nNo external dependencies: a C toolchain, `make`, and Python 3.\n\nCaution\n\nOur before/after below is **one run (N=1)** by a small, 4-bit-quantised **7B**\nmodel on a laptop (RTX 3070, 8 GB VRAM / 16 GB RAM) — a **floor, not a ceiling**.\nIf you have the hardware, point a **larger local or a frontier model** at the same\ntwo builds and **send the scored result back as a PR**. A stronger attacker is the\nonly way to test the layers our small run never reached. It is now **one command** —\n`make slice-k-run MODEL=<your-model>` builds the sealed pair, drives the agent, and\nprints the honest before/after (and we fixed the tool-call friction that blocked\ncommodity local models). Five-minute guide:\n[**docs/HOW-WE-TESTED.md**](https://github.com/seifheakal/blue-harness/blob/main/docs/HOW-WE-TESTED.md).\n\nReverse engineering used to take real skill. Now anyone can point an AI agent at a binary, type one sentence, and get back readable code or a working patch — and commodity cracking of shipped software exploded with it.\n\nblue-harness is a **defensive** toolkit aimed at that threat. It runs against **your own\nbuild** and does three things, audit-first:\n\n- **Audit** — scan a build and score how exposed it is (symbols, strings, entropy,\nhardening flags, which self-defense guards are present).\n- **Harden** — apply tested countermeasures to raise the attacker's cost.\n- **Prove** — verify each countermeasure actually*fires* , so your protection isn't\ntheater.\n\n| build | cracked (hash-verified) | tokens | wall | steps | \n|---|---|---|---|---|\n| unprotected | **YES** | 1,256 | 1.6 s | 3 | \n| hardened | **no** | 16,785 | 195 s | 13 | \n\nThe same agent cracked the unprotected build in under two seconds; against the\nhardened build it burned **13× the tokens and ~120× the wall-clock and still\nfailed**. String encryption, anti-debug, and analysis-surface exhaustion were all\nseen firing. Honestly: the **honeytoken layer never fired** — the agent was stopped\nearlier, so that layer went untested (exactly what a bigger model would exercise).\nMethod and caveats: [docs/HOW-WE-TESTED.md](https://github.com/seifheakal/blue-harness/blob/main/docs/HOW-WE-TESTED.md) ·\n[full write-up](https://github.com/seifheakal/blue-harness/blob/main/research/findings/2026-11-11-slice-k-empirical-run.md).\n\nNine countermeasures, each **proven to fire by a test** and each carrying an honest\nstrength tier and a **named bypass** — nothing here claims to be unbreakable.\n\n| Countermeasure | Blunts | Tier | Named bypass | \n|---|---|---|---|\n| Anti-debug / anti-ptrace | live debugging & tracing (GDB, Frida attach) | Meaningful | Frida hooks the check; spawn-paused bypass loads first | \n| String encryption (decode-on-demand) | reading secrets straight from the bytes | Speed-bump→Meaningful | embedded key → recover at rest; lift from memory | \n| Dev→release identity transform (strip / rename / decoy) | names & symbols an agent reasons from | Speed-bump→Meaningful | behavioural cross-check ignores names | \n| Anti-Frida detector | Frida injection (maps / threads / port) | Meaningful | stealth mode, renamed gadget, non-default port | \n| Code-integrity + server attestation | patching a hot function | Meaningful→ **Strong** (server-tied) | sustained live hook; client key is extractable | \n| Core-dump suppression | crash-core memory reads | Speed-bump | re-enable cores on their host; read live memory | \n| Analysis-surface exhaustion | the \"ingest everything\" agent's budget | Trivial→Speed-bump | filter to real sections + referenced symbols | \n| Honeytokens / canaries | poisons string-mined \"findings\" + attributes a leak | Speed-bump / Meaningful (detection) | xref-validate drops decoys; rename the tell-tale section | \n| Mach-O local-symbol strip | internal names in a macOS/iOS binary | Speed-bump→Meaningful | exported names remain; runtime-identical proven on macOS only | \n| Mach-O decoy non-mapped segment ( `vmsize=0` LC + trailer) | the \"ingest everything\" agent on a Mach-O | Trivial→Speed-bump | a loader-faithful tool drops `vmsize==0` LCs + the trailer | \n| Mach-O honeytokens / canaries | poisons string-mined \"findings\" + attributes a leak | Speed-bump / Meaningful (detection) | xref-validate drops decoys; rename the tell-tale marker | \n\nA [Claude skill](https://github.com/seifheakal/blue-harness/blob/main/skill) reads the posture and tells you the next highest-value\nhardening — with its tier and bypass, every time.\n\n**Working today**\n\n- Read-only exposure audit + score for **all three native formats** — Linux ELF,\nWindows PE, macOS/iOS Mach-O — auto-detected by magic byte.\n- The **countermeasures above** on Linux ELF (build-time + post-build), a\nWindows**PE** harden path (COFF/debug strip + decoy non-mapped overlay +\nhoneytokens), and a**macOS/iOS Mach-O** harden path (local-symbol strip +\ndecoy non-mapped segment + honeytokens). All three formats auto-detected, all\nthree with a post-build harden path.\n- One-command `harden` , the driving Claude skill, and a**CI gate that re-proves\nevery defense fires on each push** (362 checks green).\n- An empirical harness (digest-sealed CrackMe + honest scorer), **one measured\nbefore/after run** , and a**one-command re-run** (`make slice-k-run` ) with a\nrobust tool-call shim so a commodity local model can actually drive it.\n\n**Not done yet**\n\n- **Build-time hardening across PE & Mach-O** — both post-build paths ship (PE: COFF/\ndebug strip + decoy overlay + honeytokens; Mach-O: local-symbol strip + decoy\nnon-mapped segment + honeytokens); relink flags and string-encryption**codegen** still need a rebuild, and runtime checks need a Windows / Mac host to verify.\n- **Mobile app reach** — Android native libraries via JNI, iOS app internals.\n- **More measurement** — the before/after is a single run from a small local model\n(the red box at the top).\n\n**Next, in order**\n\n1. More measurement against **bigger / reliably tool-calling attackers** — the\ncommunity ask at the top.\n2. **String-encryption codegen for PE / Mach-O** (it ships for ELF today).\n3. **Runtime verification on a Windows / Mac host** — lift the post-build harden\nproofs from structural to runtime-identical.\n4. **Mobile** (Android / iOS) reach.\n\n*Deliberately out of scope:* a web/bundle track (Electron / JS / Wasm / .NET). It\nwould only be added later as a separate, clearly-labelled track — never silently,\nnever at the cost of the \"prove it\" guarantee.\n\nblue-harness isn't the only tool defending against AI-assisted RE — a good sign the\nthreat is real. The difference is **depth on native binaries and proof instead of\nassertion**. (Peer descriptions below are from their own READMEs; we ran none of\nthem.)\n\n|  | **blue-harness** | BLA (~2.3k★) | antirea (~36★) | AREA (~3★) | \n|---|---|---|---|---|\n| **Focus** | native binaries + mobile (ELF / PE / Mach-O) | breadth: JS / Electron / Wasm / .NET bundles | agent instruction-file barriers | obfuscation toolbox | \n| **Native-binary defenses** | **proven to fire by tests** | README: Ghidra / Frida / LLDB \"not run\" | — | \"designed-for\", no measured results | \n| **Evidence of protection** | mechanism tests **+ a measured before/after** | internal estimates + a drift-check | self-limited (\"no guarantee\") | \"deterrence, not proof\" | \n| **Honesty** | tier + **named bypass on every defense** | status labels; estimate multipliers | states its own limits | \"a determined human gets through\" | \n\nblue-harness has already absorbed the peers' best native-applicable ideas (surface\nexhaustion, honeytoken poisoning) as its own, mechanism-proven countermeasures. See\n[the competitive scan](https://github.com/seifheakal/blue-harness/blob/main/research/findings/2026-11-05-competitive-landscape.md).\n\n- ❌ **Not** a magic \"uncrackable\" wrapper. Anti-RE raises cost; a determined,\nskilled attacker on hardware they control still wins. The harness says so.\n- ❌ **Not** a secrets vault. If a secret truly can't afford to leak, the first\nhonest recommendation is to**move it server-side** — the only*Strong* tier.\n- ❌ **Not** an offensive tool. Blue team only — it audits and hardens software the\noperator owns or is authorized to protect. See[docs/threat-model.md](https://github.com/seifheakal/blue-harness/blob/main/docs/threat-model.md) .\n\n- [`harness/audit/`](https://github.com/seifheakal/blue-harness/blob/main/harness/audit) — the scored exposure scanners (read-only)\n- [`harness/harden/`](https://github.com/seifheakal/blue-harness/blob/main/harness/harden) — the countermeasures (+ tiers & bypasses)\n- [`harness/verify/`](https://github.com/seifheakal/blue-harness/blob/main/harness/verify) — the tests that prove each one fires\n- [`skill/`](https://github.com/seifheakal/blue-harness/blob/main/skill) — the Claude skill that drives it all\n- [`docs/HOW-WE-TESTED.md`](https://github.com/seifheakal/blue-harness/blob/main/docs/HOW-WE-TESTED.md) — the two testing layers + how to re-run the measurement (bigger models welcome)\n- [`docs/`](https://github.com/seifheakal/blue-harness/blob/main/docs) — threat model and the RE-technique catalog\n- [`CLAUDE.md`](https://github.com/seifheakal/blue-harness/blob/main/CLAUDE.md) — project constitution, scope & workflow\n\n**Active.** All three native formats audited with magic-byte dispatch and each with\na post-build harden path; mechanism-proven countermeasures across ELF/PE/Mach-O; a\none-command `harden`; a CI gate with **362/362 checks green**\n([`make verify`](https://github.com/seifheakal/blue-harness/blob/main/.github/workflows/verify.yml) on every push and pull\nrequest — the badge above is that gate); and a digest-sealed CrackMe with an honest\nempirical scorer, now driven by a **one-command re-run** (`make slice-k-run`).\nRoadmap in [docs/STATE.md](https://github.com/seifheakal/blue-harness/blob/main/docs/STATE.md).\n\nblue-harness is open source under the [GNU AGPL-3.0](https://github.com/seifheakal/blue-harness/blob/main/LICENSE) and is free for\neveryone, including businesses, as long as you comply with the AGPL. To use it\nin a closed-source product or a proprietary service without AGPL's copyleft\nobligations, a paid commercial license is available; see\n[COMMERCIAL-LICENSE.md](https://github.com/seifheakal/blue-harness/blob/main/COMMERCIAL-LICENSE.md). Evaluation and testing are free\nfor everyone.", "url": "https://wpnews.pro/news/show-hn-blue-harness-audit-and-harden-binaries-against-ai-assisted-reversing", "canonical_source": "https://github.com/seifheakal/blue-harness", "published_at": "2026-11-16 07:17:12+00:00", "updated_at": "2026-11-16 07:54:01.839594+00:00", "lang": "en", "topics": ["ai-safety", "ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["blue-harness", "seifheakal", "GitHub", "Frida", "GDB", "RTX 3070"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/show-hn-blue-harness-audit-and-harden-binaries-against-ai-assisted-reversing", "markdown": "https://wpnews.pro/news/show-hn-blue-harness-audit-and-harden-binaries-against-ai-assisted-reversing.md", "text": "https://wpnews.pro/news/show-hn-blue-harness-audit-and-harden-binaries-against-ai-assisted-reversing.txt", "jsonld": "https://wpnews.pro/news/show-hn-blue-harness-audit-and-harden-binaries-against-ai-assisted-reversing.jsonld"}}