Skip to content
Access control Write-up Intermediate

Shezmu Incident Response: A Journey to Duat

An unverified contract with an unprotected mint function allowed an attacker to mint a huge amount of ShezUSD tokens, which were then used to drain liquidity pools. The attacker also exploited the de-pegged assets via MEV bots, causing further losses.

medium.com

Published on medium.com

On September 20th, 2024, Shezmu was exploited. All Hell went loose.

Shezmu, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the mint function in the unverified contract lacked proper access control, allowing anyone to call it and mint tokens arbitrarily.

Impact

The attacker minted a huge amount of ShezUSD and drained multiple liquidity pools, causing millions of dollars in losses; MEV bots further compounded the damage by draining the sDAI pool.

What the attacker needed

Unverified contract with unprotected mint; contract approved for public minting

How it was found

  1. An unverified contract was approved for public minting.
  2. The attacker called the unprotected mint function to mint a huge amount of ShezUSD.
  3. The attacker used the minted tokens to drain liquidity pools.
  4. MEV bots further drained the sDAI pool using the de-pegged assets.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A smart contract had a function that let anyone create new tokens without permission. The attacker used this to create a massive number of tokens and then swapped them for other valuable assets in liquidity pools, stealing funds.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.