Skip to content
Back to Cyber Range
Web3 SecurityAdvanced

Smart Contract Reentrancy

Objective

Drain the VulnerableVault smart contract by executing a reentrancy attack.

Scope

Simulated EVM

Target

0xVault...9f2

Terminal / Application

Attacker Wallet

10 ETH

0xAttacker...b7a

VulnerableVault Contract

100 ETH

0xVault...9f2

VulnerableVault.sol
contract VulnerableVault {
    mapping(address => uint) public balances;

    function withdraw() public {
        uint bal = balances[msg.sender];
        require(bal > 0);

        // VULNERABILITY: External call before state update
        (bool sent, ) = msg.sender.call{value: bal}("");
        require(sent, "Failed to send Ether");

        balances[msg.sender] = 0;
    }
}
Transaction Logs:
Awaiting transactions...

Submit Flag

Complete the objective to find the flag. Format: ZENTRION{...}

Hints