Smart contract hacks (Re-entrance, Arithmetic overflow and underflow, Accessing private data)
Procedure
Overflow & Underflow
Choose overflow and underflow from the following options.

Enter the value for Uint8.

Enter a value greater than 255.

Click on the help button to see the explanation.

Click on the underflow button.

Enter a value for Uint8.

Enter a value less than 0.

Click on the help button to see the explanation.
Re-entrancy
Click on the attack button and observe the changes happening carefully.

Step 1: The attack() function deposits 1 ETH into the Bank contract.

Step 2: The attack() function deposits 1 ETH into the Bank contract.

Step 3: Since the balance of msg.sender (the Attack contract's address) is greater than 0, an external contract is called to send the value.

Step 4: When the Attack contract receives ETH from the Bank contract, the fallback() function is called. First, it checks the balance in the Bank contract, then it calls the withdraw() function in the Bank contract again.

Step 5: The line balances[msg.sender] = 0 is not reached because msg.sender.call has not finished yet. This continues until all the funds in the Bank contract are drained.
