ERC-4337 paymaster sponsor drain
A paymaster sponsors all UserOperations without per-user gas accounting. Spam tiny UserOps from many bundled addresses — paymaster pays the gas until its deposit hits zero.
§ Context
Assumed environment: target dApp deploys an ERC-4337 paymaster that sponsors any UserOperation matching a permissive validation (e.g. anyone can be sponsored). Paymaster has a real ETH deposit funding sponsorships.
§ Steps
- 01Generate thousands of UserOperationsInitial AccessT1078— Valid Accounts
- 02Identify permissive paymasterReconnaissanceW-RECON-FINGERPRINT— Tech Stack Fingerprinting
- 03Paymaster deposit hits zeroImpactT1485— Data Destruction
- 04Confirm validatePaymasterUserOp doesn't rate-limitImpactAA-PAYMASTER-DRAIN— Paymaster Sponsor Drain
- 05Bundler executes — paymaster paysImpactAA-4337-ENTRYPOINT— ERC-4337 EntryPoint Abuse
§ References
- T1078Valid Accounts
- T1485Data Destruction
§ Frequently asked
- What is the "ERC-4337 paymaster sponsor drain" attack path?
- A paymaster sponsors all UserOperations without per-user gas accounting. Spam tiny UserOps from many bundled addresses — paymaster pays the gas until its deposit hits zero. It chains 5 steps drawn from real-world offensive-security techniques.
- What starting position does this attack require?
- The first step is Generate thousands of UserOperations (T1078) — a initial access primitive. Assumed environment: target dApp deploys an ERC-4337 paymaster that sponsors any UserOperation matching a permissive validation (e.
- What is the final impact of this kill-chain?
- The final step lands on Bundler executes — paymaster pays (AA-4337-ENTRYPOINT), which falls under Impact. From here, an operator typically pivots into post-exploitation or maintains persistence.
- How can defenders detect or prevent this attack?
- Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.
§ Related dossiers
- Shared techniques2
Industroyer2 IEC-104 substation hijack
Timed payload speaks IEC-60870-5-104 to substation RTUs at attacker-chosen hour; sends 'open breaker' commands across a substation, blackouts a grid section.
- Shared techniques2
Vesting beneficiary replace → silently drain stream
Bug in a custom vesting contract allows anyone to call setBeneficiary on existing schedules. Replace beneficiary with attacker address; legitimate token stream now flows to attacker until released funds are noticed.
- Shared techniques2
Trusted updater hijack → wormable destructive payload (NotPetya / M.E.Doc)
Compromise a niche third-party vendor (regional tax software, niche industry tooling). Push a malicious update; every customer auto-installs it. Payload spreads via SMB + Mimikatz, wipes drives.
- Shared techniques2
F5 BIG-IP iControl auth bypass (CVE-2022-1388) → root on LB
Connection-header smuggle bypasses iControl REST auth, command-injection RCE as root. Load balancers see all traffic — recover TLS keys, session cookies, internal SSO config.
- Shared techniques2
Uninitialised UUPS proxy implementation → brick contracts
UUPS upgradeable contracts must initialise the implementation contract itself. If skipped, anyone can call `initialise()` and become its owner — then call `selfdestruct` to brick every proxy referencing it (Parity Multisig 2017).
- Shared techniques2
Citrix Bleed → steal authenticated session → MFA bypass
Send a long Host header to a vulnerable NetScaler — memory disclosure leaks an authenticated session token already past MFA. Replay the token to log into the corporate VPN.