7Block Labs
Blockchain Security

ByAUJay

Summary: A practical, decision‑maker’s guide to blockchain penetration testing: how to model threats across smart contracts, rollups, bridges, and account abstraction; which tools actually surface critical issues in 2025; and what deliverables to demand from your vendor so fixes ship fast and measurably reduce risk.

Blockchain Penetration Testing 101: Threat Models, Tools, and Deliverables

If you’re evaluating blockchain solutions—or already shipping them—your real question isn’t “Do we need a pen test?” It’s “What exactly should a 2025‑grade pen test cover so we don’t miss the next nine‑figure incident?” Below is a concrete playbook we use at 7Block Labs to scope, test, and ship fixes across on‑chain code, rollups, bridges, and account‑abstraction stacks.

This is not generic security advice. It’s the current state of play, with specific threat models, tools that work in practice, and the deliverables you should insist on.


1) Scope by threat model, not by repository

Modern blockchain apps span multiple trust boundaries. Scoping only “the Solidity repo” misses high‑risk components like rollup escape hatches, bridge message validators, and account‑abstraction paymasters. Start by mapping assets and trust assumptions per stack.

1.1 EVM smart contracts (Solidity/Vyper)

  • Primary risks: upgradeable proxy misconfigs (UUPS/transparent), storage collisions (ERC‑1967), reentrancy and cross‑function state corruption, auth gaps in modifiers, price‑oracle manipulation, invariant violations under adversarial order flow, signature and permit misuse. (eips.ethereum.org)
  • Standards to benchmark against:
    • OWASP Smart Contract Security Verification Standard (SCSVS) refactored in 2024–2025 with profiles and companion testing guide. (scs.owasp.org)
    • EEA EthTrust Security Levels v3 (Mar 2025) for audit depth and consistency; expect mapping in your report. (entethalliance.org)
  • Note: The historic SWC Registry is no longer maintained; teams should align checks to EthTrust and OWASP SCSVS instead. (github.com)

1.2 Rollups and L2s

  • Threats vary with architecture: fraud/validity proofs, DA layer assumptions, upgrade keys, censorship resistance, forced‑withdraw paths, bridge contracts, and client diversity. Use L2BEAT’s Stages framework (0–2) to calibrate decentralization and trust minimization in scope and severity. (l2beat.com)
  • Quantstamp’s L2 Security Framework is a good checklist for client risks, compatibility gaps vs EVM, escape hatches, and data availability assumptions. (github.com)

1.3 Bridges and cross‑chain protocols

  • Highest blast radius; combine on‑chain verification with off‑chain relayer/committee controls. Include replay, reorg, and nonce/commitment lifecycle tests.
  • Real‑world example: an ibc‑go timeout‑path reentrancy enabled infinite mint and escrow draining via CosmWasm IBC hooks; patched after private disclosure (no funds lost). Your tests must validate commitment deletion and callback ordering. (asymmetric.re)
  • Research shows architectural design flaws—rather than only code bugs—dominate bridge exploits; test architecture choices (light client vs multisig vs optimistic) as well as code. (arxiv.org)

1.4 Oracles and interoperability networks

  • Treat oracles as critical third‑party infrastructure. For Chainlink CCIP, evaluate dual‑layer defense‑in‑depth (OCR + independent Risk Management Network), isolation of node sets, and operator diversity; verify attestation paths on‑chain. Also factor in vendor security attestations (e.g., ISO 27001 / SOC 2 for CCIP and Data Feeds). (blog.chain.link)

1.5 Account abstraction (AA)

  • In 2025, both ERC‑4337 (EntryPoint onchain) and EIP‑7702 (“smart EOAs”) coexist; threat models must include bundlers, paymasters, and mempool behavior. Ethereum.org reports >26M smart wallets and 170M UserOperations—use production telemetry to drive realistic test volumes and DoS checks; align to EntryPoint version in use. (ethereum.org)

1.6 Non‑EVM stacks

  • Solana: prioritize Anchor account‑constraint validation, PDA seed canonicalization/bump handling, authority checks, CPI boundaries, and rent/alloc patterns. (solana.com)
  • Move (Aptos/Sui): leverage the Move Prover to specify and verify safety properties (resource invariants, access control) alongside dynamic testing. (aptos.dev)

2) What “good” looks like: concrete tests that find real issues

Below are high‑signal test patterns we expect in every 2025 blockchain pen test. If they’re not in the plan, push your vendor.

2.1 Upgradeable proxies: storage and authority

  • Validate ERC‑1967 slots are set and immutable via correct access control; attempt to clobber implementation/admin slots via delegatecall paths and crafted storage collisions. Verify UUPS
    _authorizeUpgrade
    logic and simulate compromised admin key paths. (eips.ethereum.org)
  • Deliverable you should see: a Foundry test that:
    • Forks mainnet/L2 at a relevant block,
    • Asserts slot integrity with read proofs,
    • Attempts unauthorized upgrades with PoC transactions,
    • Produces byte‑level diffs pre/post attempt.

2.2 Invariants over business logic

  • Use Foundry invariant testing to encode protocol truths (e.g., sum of balances == totalSupply, AMM conservation, collateralization bounds) and let randomized sequences break them. Complement with Echidna property fuzzing and Manticore for targeted symbolic paths. (learnblockchain.cn)
  • Expect an “invariants catalog” tied to economic assumptions and a CI job that runs invariants at depth (e.g., runs=2,000, depth=256) with seeds committed.

2.3 L2 forced withdrawals and censorship

  • Actively force a withdrawal under sequencer downtime; measure liveness across challenge windows; validate that escape hatch works with only the documented assumptions (no privileged relayer). Tie severity to L2BEAT Stage and your own RTO/RPO. (l2beat.com)

2.4 Bridges: replay, lifecycle, and reentrancy across callbacks

  • For IBC‑style or message‑based bridges, simulate timeout/ack paths with hooks; assert commitments are deleted before untrusted callbacks; probe reentrancy via submessages and recursive timeouts. The ibc‑go case study is your checklist: commitment reuse must be impossible. (asymmetric.re)
  • For oracle‑secured interoperability (e.g., CCIP), verify RMN “blessing/curse” gating on commits and independence from the committing DON; attempt inconsistent root injection and signature threshold bypass. (research.llamarisk.com)

2.5 AA stacks: bundler/paymaster and 7702 authorization

  • Fuzz UserOperations for validation gas griefing, signature malleability, replay across chains, and paymaster denial. Test fallbacks when a bundler is down or mempool fragments. For EIP‑7702, attempt misuse of set‑code authorizations and persistence beyond intended scope. Use production‑scale volumes to detect per‑IP, per‑factory, and per‑sender rate‑limit gaps. (ethereum.org)

2.6 Solana and Move specifics

  • Solana: enforce Anchor constraints (has_one, seeds, owner) and PDA bump canonicalization; try CPI privilege escalations and realloc races; assert authorities are explicit and revocable. (solana.com)
  • Move: write specs for resource conservation and access invariants; run Move Prover with failing counterexamples turned into fuzz cases. (aptos.dev)

3) Tools that actually surface issues in 2025

Your vendor’s toolchain should mix static, dynamic, and formal methods—with automation where it helps and manual review where nuance matters.

  • Static analysis: Slither for fast structural findings; 2025 added Slither‑MCP to augment LLM‑assisted reviews—useful for triaging and refactoring guidance. (trailofbits.com)
  • Property fuzzing: Echidna for Solidity invariants; hybrid fuzzing can reach deep corner cases; Foundry’s built‑in invariant engine for developer‑friendly workflows. (blog.trailofbits.com)
  • Symbolic execution: Manticore for path‑specific exploit proofs and input generation. (github.com)
  • Formal verification:
    • Certora Prover is now free/open‑source—budget for writing meaningful rules on your highest‑risk contracts. (certora.com)
    • Move Prover for Aptos/Sui packages; include Prover.toml and traces in artifacts. (legacy.aptos.dev)
  • Upgrades and proxies: OpenZeppelin Upgrades plugins for UUPS/transparent/beacon validation in CI. (docs.openzeppelin.com)
  • Verification and supply chain:
    • Sourcify APIv2 and repo for reproducible source verification; require “Exact Match” (bytecode + metadata) and attach ABIs from metadata in your SBOM. (docs.sourcify.dev)
    • SLSA provenance checks for CI artifacts that ship with validators, relayers, and bundlers. (github.com)
  • Monitoring/operations:
    • OpenZeppelin Defender is being sunset (new sign‑ups disabled June 30, 2025; shutdown July 1, 2026). Plan migration to open‑source Relayer/Monitor and self‑hosted alerting in 2025–2026 roadmaps. (blog.openzeppelin.com)

4) Prioritize with the right severity models

  • Use CVSS v4.0 for consistent, modern scoring (explicit “subsequent system” impacts, supplemental metrics like Automatable and Value Density matter for DeFi). Map each finding to a CVSS‑BTE vector and your business impact. (first.org)
  • For bounty readiness, align to Immunefi’s current severity model; be aware legacy pages are being phased out—reference their active guidance when designing disclosures. (immunefisupport.zendesk.com)

Why this rigor? Because the macro risk is up: 2024 saw ~$2.2B stolen across 303 hacks, and H1 2025 had already eclipsed that pace driven by a small number of very large service breaches. Your pen test should explicitly test private‑key compromise blast radius and centralized dependency failures. (chainalysis.com)


5) Deliverables to demand (and why they matter)

A blockchain pen test that only ships a PDF has failed you. Insist on artifacts that drop directly into engineering and SRE workflows.

5.1 Executive summary for decision‑makers

  • One‑page risk picture tied to business operations: which trust assumptions are brittle, quantified exposure (TVL/users/partners affected), and time‑to‑mitigate with owner/team named.
  • L2 readiness: current Stage (0–2) and blockers to the next stage, if you run your own rollup or depend on one. (l2beat.com)

5.2 Threat model and asset inventory

  • Diagram trust boundaries, authority keys, upgrade flows, off‑chain dependencies, DA layers, and cross‑chain links.
  • Explicit assumption table (e.g., “RMN must bless commits” for CCIP‑based bridges; “challenge window ≥ X” for optimistic rollups). (research.llamarisk.com)

5.3 Reproducible exploit proofs

  • Foundry test suite with:
    • Mainnet/L2 forks, seeded fuzz/invariant tests, failing assertions linked to issue IDs.
    • Proxy slot reads and unauthorized upgrade PoCs for each upgradeable contract. (eips.ethereum.org)
  • Echidna campaigns with properties and seeds; Manticore workspaces for symbolic PoCs. (blog.trailofbits.com)
  • For bridges: scripts to replay/timeout/ack flows and show no reentrancy or commitment reuse; and for CCIP‑like systems, proof that inconsistent roots cannot be blessed. (blog.asymmetric.re)

5.4 Standards mapping and compliance checks

  • Tables mapping findings to OWASP SCSVS controls and EEA EthTrust v3 requirements; include coverage percentage to show what remains untested or out of scope. (scs.owasp.org)

5.5 Signed remediation PRs and retest

  • Reviewer‑signed PRs with test diffs that make invariants pass.
  • A dated retest letter confirming fixes on the deployed addresses; attach Sourcify verification links for upgraded implementations. (docs.sourcify.dev)

5.6 Operations runbooks and guardrails

  • Kill‑switch playbooks: exact multi‑sig actions (pause, rate‑limit, disable features) and who’s on‑call.
  • Monitoring rules (self‑hosted): event filters for privilege changes, emergency functions, abnormal mint/burn, L2 bridge state changes, and CCIP RMN discrepancies—implemented via open‑source Monitor/Relayer stacks given Defender’s sunset timeline. (blog.openzeppelin.com)

5.7 Bounty and disclosure readiness

  • Severity mapping and triage templates aligned to Immunefi’s active guidance; suggested max payout bands by impact class and public scope statement. (immunefisupport.zendesk.com)

6) Practical examples you can borrow today

Example A — ERC‑1967/UUPS hardening checklist

  • Assert implementation and admin slots match spec; verify no external call reaches
    _authorizeUpgrade
    except through your guarded path; fuzz initializer/upgrade paths to prevent re‑init; add Foundry test that replays a known proxy‑clobber pattern and proves it fails. (eips.ethereum.org)

Example B — Rollup escape hatch verification

  • On a forked environment, halt sequencer and simulate forced withdrawals; verify proof generation, challenge window, and L1 finalization succeed without privileged relayers. If the L2 is Stage 0/1, flag keyholder concentration and time‑to‑pause as high‑severity operational risks (CVSS supplemental “Provider Urgency” and “Recovery”). (l2beat.com)

Example C — IBC timeout reentrancy regression test

  • Build a test env mirroring the April 2024 class: trigger timeout callbacks, attempt recursive MsgTimeout via hooks/submessages, and assert commitment deletion occurs pre‑callback. Fail the test if escrow balances increase or IBC denoms mint without matching burns. Keep this as a standing regression in CI. (asymmetric.re)

Example D — Account abstraction abuse cases

  • Generate UserOps that:
    • Exploit paymaster validation gas asymmetry,
    • Replay across chains with identical calldata and different chainIds,
    • Abuse 7702 delegation windows to persist code unexpectedly.
  • Run at production‑like volume to surface mempool and bundler throttling weaknesses; confirm EntryPoint version assumptions in tests. (ethereum.org)

Example E — Oracle/CCIP vendor due diligence

  • Request SOC 2/ISO 27001 evidence for the services you depend on (e.g., Chainlink CCIP + Data Feeds) and verify RMN independence controls; include attestations and on‑chain verification steps in your appendix. (blog.chain.link)

7) Emerging best practices for 2025 roadmaps

  • Treat “monitoring and response” as code. Plan your migration from Defender to open‑source Monitor/Relayer stacks in Q1–Q3 2026; bake alerts and automated pausings into CI/CD with code reviews, not dashboards. (blog.openzeppelin.com)
  • Move formal methods left. Use Certora Prover for your highest‑risk modules and Move Prover for Aptos/Sui packages as part of feature PRs, not just pre‑launch. (certora.com)
  • Verify everything you deploy. Require Sourcify “Exact Match” for all contracts and embed ABIs/metadata in your SBOM; CI should fail if verification isn’t reproducible. (docs.sourcify.dev)
  • Calibrate risk to real‑world loss patterns. Chainalysis data shows the pendulum swinging with a few mega‑breaches; include private‑key compromise tabletop exercises and infra hardening in scope—even if your on‑chain code is perfect. (chainalysis.com)

8) How to buy a great blockchain pen test (a short checklist)

  • Scope: includes contracts, rollup bridges/escape hatches, oracles/interoperability, AA stack, and ops runbooks.
  • Method: combines Slither/Echidna/Foundry/Manticore with formal tools (Certora/Move Prover) and architectural reviews (L2BEAT/Quantstamp frameworks). (trailofbits.com)
  • Deliverables: reproducible tests/PoCs, standards mapping (OWASP SCSVS, EthTrust v3), CVSS v4 vectors, remediation PRs, retest letter, monitoring rules, and bounty program templates. (scs.owasp.org)
  • Dates that matter: confirm your vendor knows EIP‑7702 went live with Pectra (May 7, 2025) and that Defender is sunsetting by July 1, 2026—both affect your architecture and ops plans. (ethereum.org)

Final word

Pen testing blockchain systems in 2025 is about validating assumptions at every boundary—code, consensus, cross‑chain, and operations—and shipping fixes that stand up to production traffic and adversaries. With the models, tools, and deliverables above, you’ll avoid checkbox audits and get to measurable risk reduction before the next incident hits.

Like what you're reading? Let's build together.

Get a free 30‑minute consultation with our engineering team.

Related Posts

7BlockLabs

Full-stack blockchain product studio: DeFi, dApps, audits, integrations.

7Block Labs is a trading name of JAYANTH TECHNOLOGIES LIMITED.

Registered in England and Wales (Company No. 16589283).

Registered Office address: Office 13536, 182-184 High Street North, East Ham, London, E6 2JA.

© 2025 7BlockLabs. All rights reserved.