Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

Aztec Connect Exploit- 2084

RektsPosted 17 Days Ago
  • Aztec Connect is a legacy ZK-rollup deprecated in 2023. The Aztec Network is the live version of their product, after this was on deprecated. They had given up the admin keys to it. There are two systems to consider: the validity proof and the on-chain settlement code.
  • Every rollup bundle has a batch of individual transactions that called called rows. The proof does validation on everything. For efficiency, it examines rows in fixed-size groups of 32, even when there are fewer rows than this. The onchain settlement code trust a single number carried in the batch: numRealTxs. This is a difference between two parts of the system that led to the exploit.
  • The proof accepts a whole group of 32 rows. The settlement code only acts on the frist numRealTxs of them. So, it's possible to submit a row that is accepted by the proof but the settlement code never processes it. So, just add entries to the end of the list: the verification never happens but the execution does.
  • This exploit happened because of a smart contract upgrade that occurred after the sunset without an audit. The goal was to open up the function processRollup() to all users with the deprecation. It seems like the bug was always there but required this authorization change to be exploitable.
  • The attack targeted seven assets still in the contract for withdrawal that led to $2.19M in losses. A day later, the same bug was exploited to extract open positions on Aave, Compound, and TroveBridge for about $88K. A cautionary tale about code deprecation never really being deprecated.