Newshot

Show HN: Blue-harness – audit and harden binaries against AI-assisted reversing

Original text(via HN AI)

🛡️ blue-harness

Make your own app expensive to reverse — measure it, harden it, prove it.

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.

A build-time anti-reverse-engineering hardening & audit harness for native binaries and mobile apps you own.

blue-harness demo: a plain build audits at 84/100 (wide open); the guarded build is hardened in one command, re-audits at 40/100 (partially hardened), and still runs
blue-harness demo: a plain build audits at 84/100 (wide open); the guarded build is hardened in one command, re-audits at 40/100 (partially hardened), and still runs

Recorded with docs/assets/demo.tape. Real output, nothing staged.

Quickstart


        git clone https://github.com/seifheakal/blue-harness && cd blue-harness
make demo      # audit a sample build, show its hardening plan, then PROVE every defense fires
make verify    # run every check and print one posture summary
      

Point it at your own binary:


        make report BIN=path/to/your/binary   # exposure audit + the ordered hardening plan
make harden BIN=path/to/your/binary   # apply every post-build hardening (honest about the rest)
      

No external dependencies: a C toolchain, make, and Python 3.

🔴 Help wanted — test blue-harness against a bigger model

Our before/after below is one run (N=1) by a small, 4-bit-quantised 7B model on a laptop (RTX 3070, 8 GB VRAM / 16 GB RAM) — a floor, not a ceiling. If you have the hardware, point a larger local or a frontier model at the same two builds and send the scored result back as a PR. A stronger attacker is the only way to test the layers our small run never reached. It is now one command — make slice-k-run MODEL=<your-model> builds the sealed pair, drives the agent, and prints the honest before/after (and we fixed the tool-call friction that blocked commodity local models). Five-minute guide: docs/HOW-WE-TESTED.md.

What it is

Reverse 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.

blue-harness is a defensive toolkit aimed at that threat. It runs against your own build and does three things, audit-first:

  • Audit — scan a build and score how exposed it is (symbols, strings, entropy, hardening flags, which self-defense guards are present).
  • Harden — apply tested countermeasures to raise the attacker's cost.
  • Prove — verify each countermeasure actually fires, so your protection isn't theater.

The measured result (one run — see the red box)

buildcracked (hash-verified)tokenswallsteps
unprotectedYES1,2561.6 s3
hardenedno16,785195 s13

The same agent cracked the unprotected build in under two seconds; against the hardened build it burned 13× the tokens and ~120× the wall-clock and still failed. String encryption, anti-debug, and analysis-surface exhaustion were all seen firing. Honestly: the honeytoken layer never fired — the agent was stopped earlier, so that layer went untested (exactly what a bigger model would exercise). Method and caveats: docs/HOW-WE-TESTED.md · full write-up.

What it hardens

Nine countermeasures, each proven to fire by a test and each carrying an honest strength tier and a named bypass — nothing here claims to be unbreakable.

CountermeasureBluntsTierNamed bypass
Anti-debug / anti-ptracelive debugging & tracing (GDB, Frida attach)MeaningfulFrida hooks the check; spawn-paused bypass loads first
String encryption (decode-on-demand)reading secrets straight from the bytesSpeed-bump→Meaningfulembedded key → recover at rest; lift from memory
Dev→release identity transform (strip / rename / decoy)names & symbols an agent reasons fromSpeed-bump→Meaningfulbehavioural cross-check ignores names
Anti-Frida detectorFrida injection (maps / threads / port)Meaningfulstealth mode, renamed gadget, non-default port
Code-integrity + server attestationpatching a hot functionMeaningful→ Strong (server-tied)sustained live hook; client key is extractable
Core-dump suppressioncrash-core memory readsSpeed-bumpre-enable cores on their host; read live memory
Analysis-surface exhaustionthe "ingest everything" agent's budgetTrivial→Speed-bumpfilter to real sections + referenced symbols
Honeytokens / canariespoisons string-mined "findings" + attributes a leakSpeed-bump / Meaningful (detection)xref-validate drops decoys; rename the tell-tale section
Mach-O local-symbol stripinternal names in a macOS/iOS binarySpeed-bump→Meaningfulexported names remain; runtime-identical proven on macOS only
Mach-O decoy non-mapped segment ( vmsize=0 LC + trailer)the "ingest everything" agent on a Mach-OTrivial→Speed-bumpa loader-faithful tool drops vmsize==0 LCs + the trailer
Mach-O honeytokens / canariespoisons string-mined "findings" + attributes a leakSpeed-bump / Meaningful (detection)xref-validate drops decoys; rename the tell-tale marker

A Claude skill reads the posture and tells you the next highest-value hardening — with its tier and bypass, every time.

What's done, what isn't, what's next

Working today

  • Read-only exposure audit + score for all three native formats — Linux ELF, Windows PE, macOS/iOS Mach-O — auto-detected by magic byte.
  • The countermeasures above on Linux ELF (build-time + post-build), a Windows PE harden path (COFF/debug strip + decoy non-mapped overlay + honeytokens), and a macOS/iOS Mach-O harden path (local-symbol strip + decoy non-mapped segment + honeytokens). All three formats auto-detected, all three with a post-build harden path.
  • One-command harden, the driving Claude skill, and a CI gate that re-proves every defense fires on each push (362 checks green).
  • An empirical harness (digest-sealed CrackMe + honest scorer), one measured before/after run, and a one-command re-run (make slice-k-run) with a robust tool-call shim so a commodity local model can actually drive it.

Not done yet

  • Build-time hardening across PE & Mach-O — both post-build paths ship (PE: COFF/ debug strip + decoy overlay + honeytokens; Mach-O: local-symbol strip + decoy non-mapped segment + honeytokens); relink flags and string-encryption codegen still need a rebuild, and runtime checks need a Windows / Mac host to verify.
  • Mobile app reach — Android native libraries via JNI, iOS app internals.
  • More measurement — the before/after is a single run from a small local model (the red box at the top).

Next, in order

  • More measurement against bigger / reliably tool-calling attackers — the community ask at the top.
  • String-encryption codegen for PE / Mach-O (it ships for ELF today).
  • Runtime verification on a Windows / Mac host — lift the post-build harden proofs from structural to runtime-identical.
  • Mobile (Android / iOS) reach.

Deliberately out of scope: a web/bundle track (Electron / JS / Wasm / .NET). It would only be added later as a separate, clearly-labelled track — never silently, never at the cost of the "prove it" guarantee.

How blue-harness compares

blue-harness isn't the only tool defending against AI-assisted RE — a good sign the threat is real. The difference is depth on native binaries and proof instead of assertion. (Peer descriptions below are from their own READMEs; we ran none of them.)

blue-harnessBLA (~2.3k★)antirea (~36★)AREA (~3★)
Focusnative binaries + mobile (ELF / PE / Mach-O)breadth: JS / Electron / Wasm / .NET bundlesagent instruction-file barriersobfuscation toolbox
Native-binary defensesproven to fire by testsREADME: Ghidra / Frida / LLDB "not run"—"designed-for", no measured results
Evidence of protectionmechanism tests + a measured before/afterinternal estimates + a drift-checkself-limited ("no guarantee")"deterrence, not proof"
Honestytier + named bypass on every defensestatus labels; estimate multipliersstates its own limits"a determined human gets through"

blue-harness has already absorbed the peers' best native-applicable ideas (surface exhaustion, honeytoken poisoning) as its own, mechanism-proven countermeasures. See the competitive scan.

What it isn't

  • ❌ Not a magic "uncrackable" wrapper. Anti-RE raises cost; a determined, skilled attacker on hardware they control still wins. The harness says so.
  • ❌ Not a secrets vault. If a secret truly can't afford to leak, the first honest recommendation is to move it server-side — the only Strong tier.
  • ❌ Not an offensive tool. Blue team only — it audits and hardens software the operator owns or is authorized to protect. See docs/threat-model.md.

Repo map

  • harness/audit/ — the scored exposure scanners (read-only)
  • harness/harden/ — the countermeasures (+ tiers & bypasses)
  • harness/verify/ — the tests that prove each one fires
  • skill/ — the Claude skill that drives it all
  • docs/HOW-WE-TESTED.md — the two testing layers + how to re-run the measurement (bigger models welcome)
  • docs/ — threat model and the RE-technique catalog
  • CLAUDE.md — project constitution, scope & workflow

Status

Active. All three native formats audited with magic-byte dispatch and each with a post-build harden path; mechanism-proven countermeasures across ELF/PE/Mach-O; a one-command harden; a CI gate with 362/362 checks green (make verify on every push and pull request — the badge above is that gate); and a digest-sealed CrackMe with an honest empirical scorer, now driven by a one-command re-run (make slice-k-run). Roadmap in docs/STATE.md.

License

blue-harness is open source under the GNU AGPL-3.0 and is free for everyone, including businesses, as long as you comply with the AGPL. To use it in a closed-source product or a proprietary service without AGPL's copyleft obligations, a paid commercial license is available; see COMMERCIAL-LICENSE.md. Evaluation and testing are free for everyone.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗