Gravitational plate of three masses and a slashed discABC0Static engraved plate. Three-dimensional view is unavailable or reduced motion is requested.

← back to fieldarticle

articleDec 22, 2022

Damn Vulnerable DeFi — Compromised (oracle trust & leaked reporter keys)

High-level look at DVDeFi Challenge #7 Compromised: an exchange priced by a small set of trusted oracle reporters, and what happens when reporter key material leaks off-chain.

Damn Vulnerable DeFi Challenge #7 — Compromised

Educational wargame by @tinchoabbate. Contracts live under the public compromised challenge tree. Solve scripts and PoC omitted.

Theme

An on-chain exchange sells overpriced “DVNFT” collectibles. Price comes from a trustful oracle fed by a small fixed set of reporter addresses. The challenge narrative includes strange hex blobs from a related web response that encode material tied to those reporters.

Root-cause concept

  • Centralized / low-cardinality oracle trust: a handful of EOAs can push prices that the exchange treats as truth
  • Off-chain secret leakage: if reporter private keys appear in HTTP responses, logs, or other non-chain channels, oracle integrity collapses
  • Once a majority (or enough) reporters are controlled, posted prices can be moved arbitrarily, and exchange buy/sell flows that trust that price become unsafe

Impact (abstract)

In the lab, a player starting with a tiny ETH balance is expected to drain the exchange’s ETH by abusing corrupted oracle prices. In production terms: leaked oracle-signer keys can enable unfair pricing and loss of exchange funds.

Mitigations / lessons

  • Never place oracle signer keys in web responses, client bundles, or world-readable logs
  • Prefer decentralized or medianized price feeds with dispute windows; avoid tiny fixed reporter sets without rotation and monitoring
  • Bound how far a single price update can move; circuit-breakers on exchange inventory
  • Separate “can post price” from “can withdraw exchange ETH”

Solve steps and PoC omitted.

related

  1. Aug 2, 2022/articleDamn Vulnerable DeFi Challenge 7 — Compromised (high-level)
  2. Dec 25, 2022/articleDamn Vulnerable DeFi — Free Rider (msg.value reuse in NFT marketplace)
  3. Aug 10, 2022/articleDamn Vulnerable DeFi — Puppet v2 (high-level)

graphfeed