After trying many different strategies on Remix-IDE and getting VM instance revert
, i thought let's just deploy on Rinkeby and Attack instance directly. ( instead of failed testing in Remix)
And...It worked!
It's same reentrancy, just not working in Remix-IDE.
- Deploy Attack contract on Rinkeby by passing address of
Reentrance.sol instance
received from Ethernaut and0.001 ether
- Call
attack()
to deposit0.001 ether
. - Call
fallback()
simply and in metamask popup, manuallyedit
and increaase the gas, just add an extra 0 at the end to help it make multiple external calls. - That's all and it will drain all the funds from the
Reentrance.sol
.