Create a Malicious Contract
Reentrancy Attack is a typical vulnerability of the Solidity smart contracts involving withdraw and deposit in Solidity.
The Attack contract executes the following:
Attack contract deposits the address itself by invoking the Victim
deposit
function.Attack contract calls the Victim
withdraw
function.The fallback function of Attack contract is called and
withdraw
to send Ether to Attack contract.
After compiling, deploy it and run attack
function to get balances of the victim contract.
Last updated