# sethdev254/smurf-tool architecture

> Architecture diagram of the GitHub repository sethdev254/smurf-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sethdev254/smurf-tool
- Repository: https://github.com/sethdev254/smurf-tool

## Overview

Smurf Tool is a local security-research toolkit with two command-line products: auditkit for Solidity contracts and binarykit for authorized binary analysis. The workflows begin at each CLI and branch into distinct analysis, scaffold-generation, dynamic-observation, and reporting stages. Edges reflect sampled calls, SOURCE INDEX references, or README descriptions; some subsystem internals are not sampled, so their links are omitted rather than inferred.

Main entry points: [`Tools/auditkit/src/cli.ts`](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/cli.ts) (Audit CLI), [`Tools/binarykit/src/inspect.ts`](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/inspect.ts) (Static inspection), [`Tools/binarykit/src/cli.ts`](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/cli.ts) (Binary CLI), [`Tools/auditkit/src/static.ts`](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/static.ts) (Static scan orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audit_workflows["Contract workflows"]
  node_audit_cli["Audit CLI<br/>[cli.ts]"]
  node_recon["Verified-source recon<br/>[recon.ts]"]
  node_fuzz["Fuzz scaffolding<br/>[fuzz.ts]"]
  node_exploit["Exploit PoC scaffolding<br/>[generate.ts]"]
  node_audit_report["Findings report<br/>[report.ts]"]
end

subgraph group_audit_analysis["Contract analysis"]
  node_static_scan["Static scan orchestration<br/>[static.ts]"]
  node_solidity_ast["Solidity AST parsing<br/>[ast.ts]"]
  node_detectors["Vulnerability detectors"]
  node_slither["Slither cross-check<br/>[slither.ts]"]
end

subgraph group_binary_workflows["Binary workflows"]
  node_binary_cli["Binary CLI<br/>[cli.ts]"]
  node_binary_report["Analysis report<br/>[report.ts]"]
end

subgraph group_binary_analysis["Binary analysis"]
  node_inspect["Static inspection<br/>[inspect.ts]"]
  node_filetype["Format detection<br/>[filetype.ts]"]
  node_hash["File hashing<br/>[hash.ts]"]
  node_entropy["Entropy analysis<br/>[entropy.ts]"]
  node_strings["String analysis<br/>[strings.ts]"]
  node_binutils["Symbol disassembly<br/>[binutils.ts]"]
  node_sandbox["Sandboxed execution<br/>[sandbox.ts]"]
end

node_user(("Researcher"))
node_explorer["Block explorer"]
node_sandbox_tools["bubblewrap and strace"]

node_user -->|"invokes"| node_audit_cli
node_audit_cli -->|"fetches source"| node_recon
node_recon -->|"requests verified source"| node_explorer
node_audit_cli -->|"runs scan"| node_static_scan
node_static_scan -->|"parses contracts"| node_solidity_ast
node_static_scan -->|"runs detectors"| node_detectors
node_static_scan -->|"cross-checks findings"| node_slither
node_audit_cli -->|"generates harness"| node_fuzz
node_fuzz -->|"parses target"| node_solidity_ast
node_audit_cli -->|"generates PoC"| node_exploit
node_audit_cli -->|"renders findings"| node_audit_report
node_user -->|"invokes"| node_binary_cli
node_binary_cli -->|"inspects binary"| node_inspect
node_inspect -->|"detects format"| node_filetype
node_inspect -->|"computes hashes"| node_hash
node_inspect -->|"measures entropy"| node_entropy
node_inspect -->|"extracts strings"| node_strings
node_inspect -->|"reads symbols"| node_binutils
node_binary_cli -->|"disassembles symbol"| node_binutils
node_binary_cli -->|"runs sandbox"| node_sandbox
node_sandbox -->|"executes through"| node_sandbox_tools
node_binary_cli -->|"renders report"| node_binary_report

click node_audit_cli "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/cli.ts"
click node_recon "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/recon.ts"
click node_fuzz "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/fuzz.ts"
click node_exploit "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/exploit/generate.ts"
click node_audit_report "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/report.ts"
click node_static_scan "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/static.ts"
click node_solidity_ast "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/ast.ts"
click node_detectors "https://github.com/sethdev254/smurf-tool/tree/master/Tools/auditkit/src/detectors"
click node_slither "https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/slither.ts"
click node_binary_cli "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/cli.ts"
click node_inspect "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/inspect.ts"
click node_filetype "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/filetype.ts"
click node_hash "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/hash.ts"
click node_entropy "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/entropy.ts"
click node_strings "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/strings.ts"
click node_binutils "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/binutils.ts"
click node_sandbox "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/sandbox.ts"
click node_binary_report "https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/report.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_audit_cli,node_recon,node_fuzz,node_exploit,node_audit_report toneBlue
class node_static_scan,node_solidity_ast,node_detectors,node_slither toneAmber
class node_binary_cli,node_binary_report toneMint
class node_inspect,node_filetype,node_hash,node_entropy,node_strings,node_binutils,node_sandbox toneRose
class node_user,node_explorer,node_sandbox_tools toneIndigo
```

## Components

### Contract workflows

- [Audit CLI](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/cli.ts): `Tools/auditkit/src/cli.ts`
- [Verified-source recon](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/recon.ts): `Tools/auditkit/src/recon.ts`
- [Fuzz scaffolding](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/fuzz.ts): `Tools/auditkit/src/fuzz.ts`
- [Exploit PoC scaffolding](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/exploit/generate.ts): `Tools/auditkit/src/exploit/generate.ts`
- [Findings report](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/report.ts): `Tools/auditkit/src/report.ts`

### Contract analysis

- [Static scan orchestration](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/static.ts): `Tools/auditkit/src/static.ts`
- [Solidity AST parsing](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/ast.ts): `Tools/auditkit/src/ast.ts`
- [Vulnerability detectors](https://github.com/sethdev254/smurf-tool/tree/master/Tools/auditkit/src/detectors): `Tools/auditkit/src/detectors`
- [Slither cross-check](https://github.com/sethdev254/smurf-tool/blob/master/Tools/auditkit/src/slither.ts): `Tools/auditkit/src/slither.ts`

### Binary workflows

- [Binary CLI](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/cli.ts): `Tools/binarykit/src/cli.ts`
- [Analysis report](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/report.ts): `Tools/binarykit/src/report.ts`

### Binary analysis

- [Static inspection](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/inspect.ts): `Tools/binarykit/src/inspect.ts`
- [Format detection](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/filetype.ts): `Tools/binarykit/src/filetype.ts`
- [File hashing](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/hash.ts): `Tools/binarykit/src/hash.ts`
- [Entropy analysis](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/entropy.ts): `Tools/binarykit/src/entropy.ts`
- [String analysis](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/strings.ts): `Tools/binarykit/src/strings.ts`
- [Symbol disassembly](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/binutils.ts): `Tools/binarykit/src/binutils.ts`
- [Sandboxed execution](https://github.com/sethdev254/smurf-tool/blob/master/Tools/binarykit/src/sandbox.ts): `Tools/binarykit/src/sandbox.ts`

### Other components

- **Researcher**
- **Block explorer**
- **bubblewrap and strace**

## Connections

- Researcher → Audit CLI: invokes (evidence: `README.md`)
- Audit CLI → Verified-source recon: fetches source (evidence: `Tools/auditkit/src/cli.ts`)
- Verified-source recon → Block explorer: requests verified source (evidence: `README.md`)
- Audit CLI → Static scan orchestration: runs scan (evidence: `Tools/auditkit/src/cli.ts`)
- Static scan orchestration → Solidity AST parsing: parses contracts (evidence: `Tools/auditkit/src/static.ts`)
- Static scan orchestration → Vulnerability detectors: runs detectors (evidence: `Tools/auditkit/src/static.ts`)
- Static scan orchestration → Slither cross-check: cross-checks findings (evidence: `Tools/auditkit/src/static.ts`)
- Audit CLI → Fuzz scaffolding: generates harness (evidence: `Tools/auditkit/src/cli.ts`)
- Fuzz scaffolding → Solidity AST parsing: parses target (evidence: `Tools/auditkit/src/fuzz.ts`)
- Audit CLI → Exploit PoC scaffolding: generates PoC (evidence: `Tools/auditkit/src/cli.ts`)
- Audit CLI → Findings report: renders findings (evidence: `Tools/auditkit/src/cli.ts`)
- Researcher → Binary CLI: invokes (evidence: `README.md`)
- Binary CLI → Static inspection: inspects binary (evidence: `Tools/binarykit/src/cli.ts`)
- Static inspection → Format detection: detects format (evidence: `Tools/binarykit/src/inspect.ts`)
- Static inspection → File hashing: computes hashes (evidence: `Tools/binarykit/src/inspect.ts`)
- Static inspection → Entropy analysis: measures entropy (evidence: `Tools/binarykit/src/inspect.ts`)
- Static inspection → String analysis: extracts strings (evidence: `Tools/binarykit/src/inspect.ts`)
- Static inspection → Symbol disassembly: reads symbols (evidence: `Tools/binarykit/src/inspect.ts`)
- Binary CLI → Symbol disassembly: disassembles symbol (evidence: `Tools/binarykit/src/cli.ts`)
- Binary CLI → Sandboxed execution: runs sandbox (evidence: `README.md`)
- Sandboxed execution → bubblewrap and strace: executes through (evidence: `Tools/binarykit/src/sandbox.ts`)
- Binary CLI → Analysis report: renders report (evidence: `Tools/binarykit/src/cli.ts`)
