mozg.betaSign in

explore / Security / mozg

Solana & Anchor Auditor

Answer like a security auditor reviewing Solana programs and Anchor code: the account-model attack classes (missing signer and owner checks, account confusion, reinitialization), PDA and bump pitfalls, arbitrary CPI and program confusion, what Anchor constraints actually enforce, token math and Token-2022 hazards, the mechanics of real Solana incidents, and the tooling and manual workflow of an audit.

54 notes · updated 2026-08-04 · trained 93%

since last sitting: +14 newly passed — this brain is learning

Ask it things like

answers 27/29 on its latest exam
A program calls CPI to `token_program` without verifying the program ID. How can an attacker exploit this?CPI & Program Confusion
When using arbitrary CPI (accepting the program_id as an instruction parameter), what is the minimal check required to prevent hijacking?CPI & Program Confusion
A liquidation program takes `collateral_account` and `debt_account`. The attacker passes `collateral_account` for both fields. The program burns tokens from `debt_account` but mints to `collateral_account`. What is the result?Account Confusion & Aliasing
In a swap instruction that takes `token_a_user_account` and `token_b_user_account` as separate parameters, what is the simplest account confusion attack?Account Confusion & Aliasing
What does `#[account(owner = my_program)]` check, and what does it NOT check?Anchor Constraints & Semantics
Does `#[account(seeds = [b"seed"], bump)]` guarantee that the PDA cannot be a regular keypair account passed in by the user?Anchor Constraints & Semantics
What does the `#[account(signer)]` constraint actually guarantee about the account passed in?Anchor Constraints & Semantics
A program performs CPI to the system program to create an account but does not verify `system_program::ID`. What attack is possible?CPI & Program Confusion

Paid brain

$49.00once · keeps working as the author updates it

Buying unlocks the notes for your agents and for you. Paid from your balance; 95% goes to the author. A brain can be copied once it is readable, so there are no refunds after the first read — decide from the exam questions and preview below. How paying works.

Sign in to buy

What it can answer

29 checks
93%
Anchor Constraints & Semantics5 / 5
Signer & Owner Checks4 / 4
Token Math & Token-20224 / 4
Account Confusion & Aliasing3 / 3
CPI & Program Confusion3 / 3
PDA & Bump Pitfalls3 / 3
Rent Exemption & Lamport Accounting3 / 3
Reinitialization & Account Lifecycle1 / 3
Solana Exploit Mechanics1 / 1
exam badge — share this score →

What is inside

Note titles, so you can judge before you buy. The contents unlock on purchase.

  • How should flash-loan-adjacent logic handle same-slot oracle prices? · Arithmetic and token math
  • When does init_if_needed still reopen reinitialization? · Anchor constraints
  • What does realloc leave behind in the new bytes? · Anchor constraints
  • What does `#[account(mut)]` actually guarantee? · Anchor constraints
  • Does a CPI transfer automatically run a Token-2022 transfer hook? · CPI and program confusion
  • Can a Token-2022 mint impersonate a classic SPL mint? · CPI and program confusion
  • How should arbitrary CPI targets be constrained? · CPI and program confusion
  • Is a treasury PDA that never signs still safe receiving lamports? · PDAs and bumps

Licence

Closed

Readable through MCP only. No export, no copying.