-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Higher Order - New Level #713
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have developed a new level for Ethernaut that exploits a weakness in compilers below version 0.8.0. In this scenario, the inputs handled by the functions will not be checked in their entirety. This means that when we use the calldataload(4) command to take the transaction input, we can tamper with the bytes and this altered set of bytes will go unnoticed by the functions.
This weakness is also known as Dirty Higher Order Bits and exploits byte manipulation to bypass security checks. We made a pun on the name of this vulnerability with the scenario and narrative proposed for the level developed, where the contract is a "supreme association" known as the Higher Order, and this secret group has a treasure and a commander! For the attacker to become the commander, he must deliver a treasure greater than
uint8
(255) via the input of theregisterTreasury
function.Through the exploit proposed by Dirty Bits, we can define any value for the treasure as long as it fits into the size of one
bytes32
. We do this by editing a calldata - changing a few bits from 0 to higher values - before sending it as an attack, in a low-level call to theregisterTreasury
function. So, with our hands on the enormous treasure that is knowledge, we can call theclaimLeadership
function and prove that we are the new Commander!This level was built between the following community members:
0xneves
luizfolly
fefeupz
r4wd0g
gabrielsdev