Ethernaut — Level 13 — Gatekeeper One
This challenge is more about revesting some older topics and learning about type conversions in solidity.
Click here to access the source code.
To complete the challenge we need to pass three gates
gateThree which are modifiers and get the
entrant role. Investigate the require statement of each modifier and pass a value to pass all the gates.
As seen in the previous challenge, just by making a call to the deployed via our malicious contract we pass the Gate 1. i.e.,
msg.sender != tx.origin
the value of the
To pass Gate 2, we need to pass the
require(gasleft().mod(8191) == 0); condition. We can create special function within our malicious that brute forces the value.
Thanks for Reading!
Credits to Kyte G for the detailed explanation.