Exploit walkthrough for #12:

  1. deploy the malicious vault Contract (for the upgrade)

  2. create interface for 4 low level calls (to):

  3. set attack contract as a proposer for time lock (time lock)

  4. update the delay to 0 (time lock)

  5. upgrade the contract to new implementation (original Vault)

  6. exploit function (in the attack contract (attack contract)

    1. calling the schedule function (with a, b, c, d’s data)
    2. set theSweeper to the attack contract
    3. call sweepFund to drain the fund to this contract

The real hack:

call the execute function(with a, b, c, d as args) (time lock)

  1. call the withdraw function.

Exploit Logic: