ByAUJay
Blockchain Penetration Testing Services and Blockchain Pentesting Services: What’s Included in a Web3 Pentest?
Summary: This in-depth guide shows decision‑makers exactly what a modern Web3 pentest covers—end to end—from smart contracts and cross‑chain messaging to account abstraction, governance, and node/RPC hardening. It also lists concrete test cases, tools, and deliverables you should demand from a vendor in 2026.
Why Web3 pentesting in 2026 is different (and non‑optional)
- The attack surface has expanded beyond single-chain DeFi to include restaking/AVS, account abstraction (smart wallets), and cross‑chain protocols. Losses remain material: Chainalysis-referenced data showed crypto hacks at roughly $2.2B in 2024, with state‑sponsored groups active; 2025 saw a single exchange incident around $1.5B, underscoring operational and key‑management risks. (reuters.com)
- Bridges and generalized messaging continue to be high‑value targets; several of the largest historical incidents remain cross‑chain related (e.g., Wormhole’s 120k wETH exploit). Robust pentesting must specifically evaluate trust models, admin powers, and signer/MPC operations. (techcrunch.com)
Below, we detail the scope, techniques, and concrete deliverables you should expect from a top‑tier blockchain penetration testing engagement today.
Scope: what’s actually included in a Web3 pentest
A serious Web3 pentest goes beyond “run a scanner and write a PDF.” It should cover the full stack and the unique economic/game‑theoretic risks of decentralized systems.
1) Architecture and threat modeling (chain‑specific and protocol‑aware)
- Model trust assumptions and invariants for:
- Smart contracts (EVM, and optionally non‑EVM like Solana programs).
- Cross‑chain components (bridges/messaging, oracles).
- Governance and upgradability surfaces.
- Node/RPC, indexers, relayers, sequencers, and key management.
- Map findings to established taxonomies and verification standards:
- OWASP Smart Contract Top 10 (2025 refresh). (scs.owasp.org)
- SWC Registry (Smart Contract Weakness Classification) for precise issue IDs. (github.com)
- OWASP SCSVS checklists to structure requirements and test coverage. (scs.owasp.org)
- Pentest methodology references like NIST SP 800‑115 for test planning and evidence handling. (csrc.nist.gov)
What this looks like in practice
- Build and review a dataflow diagram: user wallets → frontend → smart accounts/EntryPoint → core protocol → external dependencies (feeds, cross‑chain relays).
- Identify single points of failure (e.g., a single multisig controlling both pause and upgrade).
- Enumerate economic attacks: oracle manipulation, sandwich/MEV griefing, insolvency vectors, cross‑domain replay, governance capture.
2) Smart contract assessment (EVM)
A complete EVM review combines static, dynamic, and formal methods:
- Static analysis at scale
- Run Slither detectors and custom scripts (e.g., upgradeability checks, role misconfigurations). (github.com)
- Property‑based fuzzing and invariant testing
- Use Foundry’s coverage‑guided invariant tests and corpus persistence for stateful bugs; complement with Echidna for property falsification and differential fuzzing. (foundry-book.zksync.io)
- Symbolic execution where appropriate
- Use Mythril/Manticore selectively for path exploration on critical code paths (e.g., authorization gates, fee accounting). (github.com)
- Formal verification (critical invariants)
- Prove “can’t mint from thin air,” “collateralization never drops below threshold without liquidation,” or “upgrade must be timelocked” using Certora Prover (or equivalent). (certora.com)
Concrete example: minimal invariant suite
// Foundry invariant sketch contract Invariants is Test { CoreProtocol core; function setUp() public { core = new CoreProtocol(); // deploy harnesses/mocks... } // No unbacked minting: protocol liabilities <= assets + fees function invariant_LiabilitiesConserved() public { assertLe(core.totalLiabilities(), core.totalAssets() + core.accruedFees()); } // Access control: only role can upgrade/pause function invariant_OnlyGovernanceCanUpgrade() public { assertTrue(core.upgradeRoleIsRespected()); } }
What “done” looks like
- Findings mapped to SWC IDs and SCSVS controls, with PoC transactions/repros and gas‑bounded failing test vectors (minimized with Foundry’s shrinking/coverage).
3) Account Abstraction and smart wallets (ERC‑4337, EIP‑7702)
- Bundler/mempool rules: Validate that UserOperations pass off‑chain simulation, adhere to canonical mempool constraints, and cannot grief bundlers via stateful validation or gas traps. Tests should reflect the ERC‑4337 docs and EIP‑7562 validation scope rules (throttling/banning logic, max sizes, etc.). (docs.erc4337.io)
- Authorization and EOA “code delegation” with EIP‑7702: Review how delegations are created, persisted, and revoked; ensure delegations can’t be replayed cross‑chain and that authorization tuples are enforced correctly. (eips.ethereum.org)
- Paymasters/aggregators: Verify sponsor logic, rate limits, refund paths, and reentrancy‑safe accounting during postOp.
- Test cases to demand:
- Cross‑nonce and multisession replay attempts on UserOps.
- Paymaster griefing: “valid in sim, fail in bundle” scenarios.
- EIP‑7702 authorization lifecycle: set, rotate, revoke; domain separation by chainId.
4) Upgradability, governance, and timelocks
- Proxy pattern safety: Confirm storage layout hygiene, upgrade authorization, and initializer protection for UUPS/Transparent/Beacon proxies; verify operator instructions for safe upgrades. (docs.openzeppelin.com)
- Timelock correctness: Ensure minDelay can only change through the timelock’s own process; roles follow best practices (Governor as sole proposer; open executor if desired; admin self‑renounced). (docs.openzeppelin.com)
A practical governance checklist
- Every privileged function is:
- Behind AccessControl/Ownable and, where appropriate, behind TimelockController.
- Covered by on‑chain guards (delay, 2‑step ownership transfer, quorum thresholds).
- Monitored via event‑driven alerts for proposal queue/execution and role changes.
5) Oracle defenses and market manipulation resistance
- Price oracles: Validate Chainlink feed integration (freshness, non‑zero checks, heartbeat/deviation, proxy addresses, sequencer‑grace on L2) and safe fallback behavior. (blog.chain.link)
- DEX‑based oracles: If using Uniswap v3 TWAP, evaluate manipulation cost under PoS consecutive‑block control; blend wider windows and winsorized/medianized variants if risk suggests. (blog.uniswap.org)
Example: safe consumption guardrails
function getSafePrice() external view returns (int256 price) { (, int256 answer, , uint256 updatedAt, ) = feed.latestRoundData(); require(answer > 0, "ZERO_PRICE"); require(block.timestamp - updatedAt <= maxAge, "STALE_FEED"); return answer; }
6) Bridges and cross‑chain messaging
- Trust model and failure modes: Is it a light‑client model or external oracle/relayer? How many signers/validators? How are upgrades/pauses governed?
- Rate limiting and circuit breakers: Confirm caps on transfer volumes and enforced halts on anomalies.
- CCIP specifics: Verify Risk Management Network “blessings/curse” signals are correctly enforced on‑chain and that rate limits are configured per token/route; review phased deployments for RMN presence. (docs.chain.link)
- Proof verification: For IBC‑style protocols, examine Merkle proof soundness and ICS‑23 compatibility. (github.com)
Why this matters
- Several high‑impact exploits stem from signer/key compromise or proof verification edge cases; bridges must be tested as socio‑technical systems, not just solidity libraries. (techcrunch.com)
7) Node/RPC, relayers, sequencers, and infra
- Ethereum client exposure:
- Geth: Don’t expose JSON‑RPC publicly; if you must, gate with firewall/WAF, rate limits, mTLS, and strict namespaces; prefer IPC or authenticated Engine API (JWT) between EL/CL. Validate http.addr/vhosts/ports and Clef isolation. (geth.ethereum.org)
- OpenEthereum/other clients: Audit JSON‑RPC modules, ensure sensitive namespaces aren’t served, and keep versions patched. (openethereum.github.io)
- Cloud/K8s hardening:
- Private subnets for validators; security groups for RPC; IAM‑scoped instance roles; minimal images; read‑only root FS where possible; perf isolation to avoid OOM/DoS.
- Observability checks: Alert on mempool anomalies, peers drop, disk I/O saturation, and lag vs. head.
8) Frontend, wallet flows, and supply chain
- Wallet approval UX: Test phishing‑style approvals (unbounded allowances), unsafe signature requests (permit‑like abuse), and malicious deep links.
- Package supply chain: Pin critical dependencies and scan for typosquats/backdoored releases. The 2024 compromise of @solana/web3.js versions briefly exfiltrated keys from apps that handled private keys directly—supply‑chain testing is mandatory. (reversinglabs.com)
Techniques and tools you should insist on
- Static/detector: Slither with custom detectors for upgradeability, proxies, and role drift. (github.com)
- Fuzz/invariants: Foundry invariant campaigns with coverage‑guided fuzzing and corpus persistence; Echidna property suites in CI for regression. (foundry-book.zksync.io)
- Symbolic: Mythril against hand‑picked contracts to explore edge‑case paths. (github.com)
- Formal: Certora for critical invariants (asset conservation, authorization, and reentrancy‑free paths). (certora.com)
- Infra testing:
- Port scans, RPC namespace probes, auth bypass attempts.
- Replay and rate‑limit tests against bundlers/relayers.
- Chaos drills (kill a signer node/relayer and observe failover).
Deliverables: what a Web3 pentest report must contain
- Executive summary: Business‑risk framing with prioritized remediation roadmap (what to fix this week vs. next quarter).
- Technical findings with:
- Repro steps and PoC tx/scripts.
- Impact, likelihood, and exploitability narrative.
- Mappings to SWC IDs, OWASP Smart Contract Top 10, and SCSVS controls. (scs.owasp.org)
- Machine‑readable artifacts:
- Slither SARIF, invariant/fuzz seeds, failing tests you can run with
.forge test -vvvv - Config diffs for node/RPC, CI pipelines, and timelock role templates.
- Slither SARIF, invariant/fuzz seeds, failing tests you can run with
- Fix‑ready guidance:
- Minimal‑risk patches; proxy storage layout upgrades; role/Timelock role assignments; CCIP/bridge rate‑limit parameters with rationale. (docs.openzeppelin.com)
- Verification pass:
- Post‑fix re‑testing, updated invariants, and CI guardrails to keep fixes from regressing.
Emerging best practices we’re applying in 2026
- Account Abstraction hygiene
- Enforce EIP‑7562 limits in bundlers; add “triple simulation” (pre‑mempool, pre‑bundle, pre‑submit) to minimize invalidation griefing; cover paymaster edge‑cases in unit tests. (eips.ethereum.org)
- EIP‑7702 authorization lifecycle playbooks: explicit revocation, per‑chain scoping, and monitoring on authorization events. (eips.ethereum.org)
- Oracle resilience
- Blend Chainlink feeds with DEX TWAP cross‑checks and freeze logic under stale/zero readings; treat sequencer downtime distinctly on L2s. (blog.chain.link)
- Cross‑chain defenses
- Prefer designs with explicit rate limiting and independent risk‑management validation (e.g., CCIP RMN); alert on curse/blessing state changes; enforce monotonic replay protection. (docs.chain.link)
- Restaking/AVS integration testing
- Model slashing cascades and contracts controlling withdrawal credentials; run invariant tests that preserve capital safety across AVS failure modes (liquidity and programmable slashing implications). (coinbase.com)
- Supply‑chain rigor
- Lockfile attestations, provenance checks, and continuous SCA on wallet/SDK dependencies; internal incident drills for npm compromise scenarios similar to the 2024 Solana web3.js incident. (reversinglabs.com)
A sample 10‑day Web3 pentest plan (adapt for scope/size)
- Day 1–2: Architecture deep‑dive, threat modeling, and scoping; deploy test harnesses and seed datasets.
- Day 3–4: Static analysis and manual code review of core contracts; stand up invariant/fuzz campaigns; start infra discovery.
- Day 5–6: Focused dynamic testing on high‑risk modules (liquidations, governance upgrades, cross‑chain handlers); bundler/paymaster tests.
- Day 7: Oracle manipulation resistance and market stress simulations; bridge rate‑limit and pause‑flow exercises.
- Day 8: Node/RPC and relayer/infra pentest; KMS/MPC operational checks; CI/SBOM review.
- Day 9: Exploit reproduction hardening, severity triage, and patch workshops with your devs.
- Day 10: Executive readout, technical handoff, and verification plan; schedule re‑test window.
RFP checklist: questions to ask any blockchain pentesting vendor
- Which standards and taxonomies will you map to (OWASP Smart Contract Top 10 2025, SWC, SCSVS)? (scs.owasp.org)
- What’s your approach to ERC‑4337/EIP‑7562/EIP‑7702 testing beyond basic signature checks? (eips.ethereum.org)
- How do you test bridge trust models and cross‑chain rate limiting (e.g., CCIP RMN “blessings/curse” enforcement)? (docs.chain.link)
- What artifacts will we receive to keep fixes in CI (Slither SARIF, Foundry failing tests, Certora specs)? (github.com)
- How do you validate node/RPC hardening (Geth/Clef/Engine API and firewall/WAF posture)? (geth.ethereum.org)
Bottom line
A modern blockchain pentest is a multi‑disciplinary exercise: smart contracts and formal specs, cross‑chain and oracle economics, account abstraction, governance safety, and hardened infra. If your potential vendor can’t show you invariant suites, ERC‑4337/EIP‑7702 test cases, bridge/CCIP rate‑limit drills, and Geth/RPC hardening evidence, they’re not testing what attackers are exploiting today. (docs.erc4337.io)
7Block Labs structures every engagement to deliver actionable patches, machine‑readable artifacts, and re‑test verification—so your team can fix quickly, ship confidently, and keep those protections in place as your protocol evolves.
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

