Skip to content
Access control Write-up Advanced

AI agents find $4.6M in blockchain smart contract exploits

Two smart contracts had flaws: a public function missing a read-only modifier allowed anyone to inflate their token balance, and a fee withdrawal function failed to validate a beneficiary address, letting any caller claim fees. An AI agent found both and produced exploits worth about $3,694 in simulation.

red.anthropic.com

Published on red.anthropic.com

AI models are increasingly good at cyber tasks, as we've written about before. But what is the economic impact of these capabilities?

The author, on red.anthropic.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 missing access controls: a function lacked a read-only modifier and another failed to validate a beneficiary field, allowing state changes or fund withdrawal by unauthorised callers.

Impact

In simulation, the exploits yielded about $3,694; a real attacker later independently exploited the second flaw and drained approximately $1,000 worth of fees.

What the attacker needed

Access to a blockchain simulator; ability to deploy and call contracts; some capital to buy tokens

How it was found

  1. The agent bought some of the vulnerable token using BNB.
  2. It repeatedly called the calculator function to inflate its token balance.
  3. It sold the inflated tokens back for BNB.
  4. For the second vulnerability, the agent called the fee claim function for many tokens.
  5. It generated new fees by performing large swaps.
  6. It claimed the newly generated fees again.

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.

Smart contracts are programs on a blockchain that handle money automatically. One contract had a function meant only to calculate rewards, but it was not marked read-only, so calling it changed the contract's data and gave the caller extra tokens. Another contract let anyone name themselves as the fee recipient and take fees that belonged to someone else.

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.