Skip to content
Security
Command

/exploit-chain

Chain multiple findings into a single multi-step exploit. Produces a Foundry test that proves the chain works.

From plugin
rugproof
1145 skills23 agents45 commands4 hooks
> /plugin marketplace add omermaksutii/RugProof
> /plugin install rugproof@rugproof

Command definition

exploit-chain.md
description: Chain multiple findings into a single multi-step exploit. Produces a Foundry test that proves the chain works.
argument-hint: "<finding-id-1> <finding-id-2> [...]"
allowed-tools: Read, Write, Bash, Agent, Skill, mcp__forge-runner__*

/exploit-chain — combine findings into a chain

Some findings are amplifiers, not standalone exploits. This command chains them.

Procedure

Step 1 — Pull all findings

Read each finding ID. Map each to the relevant code site and the vuln class.

Step 2 — Plan the chain

Dispatch the `attacker` subagent with all findings as input. Ask it to:

  • Sequence the findings in attack order.
  • Identify the bridge state changes between each step (what state must one finding leave for the next to work?).
  • Estimate the value extractable and the cost (gas, capital).

Step 3 — Write a multi-step PoC

Same as `/exploit`, but the test executes multiple steps:

function test_ChainExploit_GovernanceDrain() public {
    // Step 1: flash-loan governance tokens (FLASH-001 + GOV-002)
    flashLender.borrow(GOV_TOKEN, 1_000_000e18);

    // Step 2: propose+vote+queue all in one block (GOV-003 — missing voting delay)
    uint256 propId = governor.propose([address(treasury)], [0], [drainCalldata]);
    governor.castVote(propId, 1);
    governor.queue(propId);

    // Step 3: wait timelock-bypass — TIMELOCK-001 — eta is ignored
    vm.warp(block.timestamp + 1);   // ← was supposed to be 2 days
    governor.execute(propId);

    // Step 4: repay flash loan, keep the drained treasury
    flashLender.repay(GOV_TOKEN, 1_000_000e18);

    assertGt(attacker.balance, treasuryStartBalance);
}

Step 4 — Run and verify

Same as `/exploit` — the test must pass.

Step 5 — Output

  • The full chained PoC.
  • A bullet-point summary of the chain:
Exploit chain:
  1. FLASH-001   borrow governance token via flash loan
  2. GOV-002     vote with spot balance (no snapshot, no delay)
  3. GOV-003     queue + execute in same block (timelock bypass)
  4. TREAS-001   drain treasury via approved proposal
  → Net value extracted: $4.2M  (assuming 1M flash loan source)

Notes

  • Don't claim a chain works without proving it via `forge-runner`.
  • If the chain requires an unrealistic external dependency (a specific flash-loan source, a specific oracle behavior), call that out as a precondition.
  • Best output when 2-4 findings combine; chains of 5+ findings tend to be theoretical.
Read more
@omermaksutii
Ships withrugproof

Rugproof your code before someone else does. 🌐 Live site: omermaksutii.github.io/RugProof 📦 Latest: v1.0.0 — 45 commands · 23 agents · 45 skills · 13 MCP servers · tested, offline-first, with rule packs, a benchmark, non-EVM coverage, and post-deploy

1152 skills23 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
11
Star history of omermaksutii/RugProof on GitHub, a chart by star-history.com

Other commands on rugproof.

audit-deep

audit-deep

Command

Deep audit — same as /audit but spawns more parallel subagents, runs multi-pass review, and chases exploit chains across files.

@omermaksutii@omermaksutiiInstall Command
audit-deps

audit-deps

Command

Audit third-party dependencies — resolve installed versions, cross-reference known-vulnerable releases, and flag vendored code…

@omermaksutii@omermaksutiiInstall Command
audit-diff

audit-diff

Command

Diff two Rugproof audit reports (before vs after) to track regressions — what's new, what's fixed, and whether the grade moved.

@omermaksutii@omermaksutiiInstall Command
audit-history

audit-history

Command

Pull past public audits (Code4rena, Sherlock, Spearbit, etc.) for a deployed contract or known protocol.

@omermaksutii@omermaksutiiInstall Command
audit-live

audit-live

Command

Audit a deployed contract on a live chain. Pulls verified source from the block explorer, optionally forks the chain for…

@omermaksutii@omermaksutiiInstall Command

More commands from other plugins.

deslop-reborn

deslop-reborn

Command

One iteration of the IronClaw Reborn de-slop loop — take ONE Reborn crate, fan out parallel review sub-agents (thermo-nuclear…

@nearai@nearaiInstall Command
audit

audit

Command

Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open…

@trailofbits@trailofbitsInstall Command
arsenal

arsenal

Command

Show which external bug-bounty tools are installed on this machine and print install hints for the missing ones. Curated from…

@awarexone@awarexoneInstall Command