The Ethereum DAO Reentrancy Lab

SMART CONTRACT SECURITY
Exploit a reentrancy vulnerability in a decentralized autonomous organization, then rewrite the contract securely.
DAO_Contract.sol
function withdraw(uint amount) public {
1. CHECK: Ensure user has fundsrequire(balances[msg.sender] > 0);
2. INTERACT: Send Ether to usermsg.sender.call.value(amount)("");
3. EFFECT: Update internal balancebalances[msg.sender] = 0;
}
Live Network Balances
DAO Vault
(Community Fund)
150M ETH
Hacker0M ETH
EVM Call Stack
Gas
_ SYS_IDLE : 0x0000
_ SYS_IDLE : 0x0001
_ SYS_IDLE : 0x0002
_ SYS_IDLE : 0x0003
_ SYS_IDLE : 0x0004