bb-methodology
The "3rd eye" for pentesting — reminds agent to understand before assuming, validate before…
External research synthesis from Trail of Bits, SlowMist, ConsenSys, Immunefi, and Cyfrin. Use this for advanced audit methodology, Echidna/Medusa fuzzing setup, Slither custom detector writing, attack pattern deep dives, or the 4-phase learning roadmap.
$ npx -y skills add Gabson0x/bountyforge --skill web3-methodology-research --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/web3-methodology-researchContext preview
The summary Claude sees to decide when to auto-load this skill.
External research synthesis from Trail of Bits, SlowMist, ConsenSys, Immunefi, and Cyfrin. Use this for advanced audit methodology, Echidna/Medusa fuzzing setup, Slither custom detector writing, attack pattern deep dives, or the 4-phase learning roadmap.
name: web3-methodology-research description: External research synthesis from Trail of Bits, SlowMist, ConsenSys, Immunefi, and Cyfrin. Use this for advanced audit methodology, Echidna/Medusa fuzzing setup, Slither custom detector writing, attack pattern deep dives, or the 4-phase learning roadmap.
External research from Trail of Bits, SlowMist, ConsenSys, Immunefi, Cyfrin.
See also: [[Web3 Audit]], [[Methodology]], [[Smart Contract Audit]], [[Web3 Bug Classes]]
---
| Tool | What It Does | When to Use | |------|-------------|-------------| | **Slither** | Static analysis for Solidity/Vyper | Always — run first | | **Echidna** | Property-based fuzzer (write invariants, it breaks them) | Write 3-5 invariants before reading code | | **Medusa** | Next-gen fuzzer, multi-core, parallel corpus | Deeper campaigns after Echidna | | **Manticore** | Symbolic execution — confirms if a path is truly reachable | Specific PoC confirmation | | **Halmos** | Symbolic unit testing — proves for ALL inputs | Math-heavy functions |
---
# Install pip3 install slither-analyzer # First pass — protocol overview slither . --print human-summary slither . --print contract-summary # Targeted detectors slither . --detect reentrancy-eth,reentrancy-no-eth,unchecked-lowlevel slither . --detect arbitrary-send-erc20,controlled-delegatecall slither . --detect uninitialized-state,uninitialized-storage slither . --detect suicidal,controlled-array-length # Visualization slither . --print inheritance-graph slither . --print function-summary slither . --print call-graph # Filtered run (skip tests and libs) slither . --exclude-low --filter-paths "test|lib"
---
// Write invariants BEFORE fully reading the code
contract VaultInvariants {
Vault vault;
// Protocol should never owe more than it holds
function echidna_solvency() public view returns (bool) {
return vault.totalAssets() >= vault.totalDebt();
}
// Share math must be consistent
function echidna_share_math() public view returns (bool) {
return vault.balanceOf(address(this)) <= vault.totalSupply();
}
// cumulativeRewardPerShare only ever increases
function echidna_reward_monotonic() public view returns (bool) {
return vault.cumulativeRewardPerShare() >= lastRewardPerShare;
}
}echidna contracts/VaultInvariants.sol --contract VaultInvariants --test-mode assertion # With config echidna Test.sol --contract EchidnaTest --config echidna.yaml
# echidna.yaml testLimit: 50000 seqLen: 100 workers: 4 corpusDir: corpus/
---
# Install
# github.com/crytic/medusa
go install github.com/crytic/medusa@latest
# Run (coverage-guided, multi-core)
medusa fuzz --config medusa.json
# medusa.json
{
"fuzzing": {
"workers": 4,
"testLimit": 500000,
"corpusDirectory": "corpus"
}
}Medusa vs Echidna: Medusa is faster on large contracts due to coverage-guided exploration. Use Echidna for first pass, Medusa for extended campaigns.
---
1. THREAT MODEL FIRST - What are the assets? (tokens, governance power, user funds) - What are the trust boundaries? (who can call what?) - What are the attack surfaces? (entry points, external calls) 2. STATIC ANALYSIS - Run Slither with all detectors - Examine SlithIR output for complex functions - Map ALL state variables and who can write them 3. WRITE INVARIANTS BEFORE READING EVERYTHING - "totalAssets >= totalDebt always" - "shares * pricePerShare == underlying always" - "user can always withdraw their full deposit" - Run Echidna. Watch it break them. 4. SYMBOLIC EXECUTION ON HIGH-VALUE PATHS - Use Manticore/Halmos for precise reachability confirmation - Confirms "can an attacker actually reach state X?" 5. MANUAL REVIEW — FOCUS ON - Business logic (not syntax — Slither caught that) - Economic invariants (is the math right under adversarial conditions?) - Access control (who can call what, when, with what params?) 6. DIFFERENTIAL TESTING - Compare against reference implementation - "Function A does X. Function B does the same thing differently. Why?" - The inconsistency IS the bug.
---
**EVM / Solidity:**
REENTRANCY VARIANTS (still common) - Cross-function: lock in depositA, reenter via depositB before state update - Cross-contract: callback to attacker contract via safeTransfer - Read-only: view function reads stale state during reentrant call (Curve $70M — most underestimated variant) ROUNDING ERRORS - Division before multiplication: (a / b) * c vs (a * c) / b - Wrong rounding direction (should round up for safety, rounds down) - Precision loss in sequential operations WEAK FIAT-SHAMIR (ZK SYSTEMS — ToB IEEE S&P 2023) - ZK proof prover can forge proofs if transcript not fully committed - Missing: challenge must bind all public inputs - Check: is the verifier challenge a hash of EVERYTHING the prover touches? ACCESS CONTROL GAPS - Function A has onlyOwner → sibling function B does NOT - Emergency functions callable by non-emergency roles - Initializer called after deployment without restrictions UNSAFE UPGRADES - Storage slot collision between proxy and implementation - Uninitialized implementation contract (selfdestruct vector) - delegatecall to address from storage (attacker controls target) SIGNATURE REPLAY - Missing nonce in signed message - Missing chainId in signed message - Missing contract address in signed message
**DeFi-Specific (from Uniswap, Frax, Reserve Protocol, Scroll audits):**
LIQUIDITY MATH EDGE CASES - Integer overflow at extreme tick values (Uniswap V3 type) - Rounding direction matters at boundary ORACLE MANIPULATION - TWAP too short → manipulable in same block - Spot price
All-round bug bounty skill for Claude Code — parallelized agents for smart contract audits (EVM, Move, Solana, TRON), web/API security, local tooling orchestration, and submission-ready reports for HackerOne, Bugcrowd, Intigriti & Immunefi.
Repo: Gabson0x/bountyforge
The "3rd eye" for pentesting — reminds agent to understand before assuming, validate before…
Complete bug bounty workflow — recon (subdomain enumeration, asset discovery, fingerprinting,…
Analyze EVM smart contracts for storage-safety vulnerabilities that can cause persistent…
Generate Echidna/Medusa-compatible Solidity fuzz suites from Foundry or Hardhat projects.…
Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into…