Secrypta Crypto security lab
RU / EN
Release Project: wallet-harness·open-source · MIT 20 November 2026·3 min read

wallet-harness: an executable benchmark for the wallet-drain threat class

Abstract

Wallet drains are dominated by a few well-understood authorization patterns, yet there is no shared, executable way to ask a concrete wallet or detector which of them it actually resists. wallet-harness is that yardstick: a labeled corpus of real drain vectors as offline, reproducible Foundry test cases, each with a vulnerable side, a genuinely-safe side, and a minimized real-incident replay whose facts are verified down to on-chain transactions. Verdicts come from the real outcome (did the funds move), not from pattern matching. It is builder infrastructure for the wallet-drain threat class, with a hands-on CTF layer on top.

Why it exists

Wallet losses come from a small set of well-understood authorization patterns: standing approvals, off-chain signature phishing, address-history poisoning, account delegation. Individually they are known. What was missing is a shared, executable way to ask a concrete wallet or dApp flow: which of these drains do you actually resist? wallet-harness provides that yardstick - one reproducible reference.

What is inside

  • 13 vectors, each at 3 independent levels: a toy pair, a minimized real incident (provenance verified down to on-chain transactions and addresses), and a genuinely-safe implementation.
  • 155 executable reproductions: each label is confirmed by running its reproduction (a corpus self-check, not a detector score).
  • 27 CTF challenges with a two-sided gate: the vulnerable seed must fail, the fix must pass.
  • Everything runs offline in Docker, with no mainnet fork or live RPC - you only need Docker and git.

Strength and what sets it apart

  • Verdict from the real outcome, not from words. "Resists vector X" is a test result (the funds did not move), not pattern matching.
  • Both sides: vulnerable and safe. The safe side exists on purpose, so false alarms are measured too, not only bug-finding.
  • Ground truth and a metric. A labeled corpus; precision and recall are scored against it. The bar: 0 false positives and 0 false negatives.
  • Offline and reproducible. Incidents are minimized and run locally, not as mainnet-fork replays.
  • A hands-on learning layer (CTF). "Patch the drain" on top of the corpus teaches the defenses on real mechanics.
What it is and is not

This is builder infrastructure for the wallet-drain threat class, not an end-user product. The metrics are honest on the current corpus and will grow as more vectors are added.