mirror of
https://github.com/autistic-symposium/blockchains-security-toolkit.git
synced 2025-05-13 12:12:19 -04:00
.. | ||
proxies.md | ||
README.md |
Attacks via code injection with DELEGATECALL
🖤 This is my favorite vuln
TL;DR
- Call to untrusted contracts may introduce unexpected risks and errors.
- External calls controlled by an attacker may force a contract to transition into an undefined state.
- Types of external calls:
STATIC CALL
andDELEGATE CALL
. - Using DELEGATE CALL, contract can preserve the storage state while using the logic of the contract. This introduces the concept of Proxies.
- The proxy contract redirects all the calls it receives to an "logic contract", whose address is stored in its "proxy contract". The proxy runs the "logic contract"'s code as its own (modifying its storage and the balance of the "proxy contract").
