# strongwind1/nfswolf architecture

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

- Interactive diagram: https://gitdiagram.com/strongwind1/nfswolf
- Repository: https://github.com/strongwind1/nfswolf

## Overview

NFSWolf is a native NFS security toolkit. Its principal workflow discovers NFS hosts, analyzes exports for security findings, and presents results; separate command paths support export escape, handle and UID attacks, an interactive shell, and FUSE mounting. Protocol clients cover NFSv2/v3/v4, while a shared transport layer supplies connection policy. The README documents capabilities that are not fully visible in the sampled source; those links are marked as unverified rather than inferred as direct calls.

Main entry points: [`src/cli/escape.rs`](https://github.com/strongwind1/nfswolf/blob/main/src/cli/escape.rs) (Escape Command), [`src/main.rs`](https://github.com/strongwind1/nfswolf/blob/main/src/main.rs) (CLI Runtime), [`src/cli/analyze.rs`](https://github.com/strongwind1/nfswolf/blob/main/src/cli/analyze.rs) (Export Audit), [`src/proto/transport.rs`](https://github.com/strongwind1/nfswolf/blob/main/src/proto/transport.rs) (Pooled Transport)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["Command Workflows"]
  node_app["CLI Runtime<br/>[main.rs]"]
  node_scan["Host Scan<br/>[scan.rs]"]
  node_analyze["Export Audit<br/>[analyze.rs]"]
  node_escape_cli["Escape Command<br/>[escape.rs]"]
  node_shell_cli["Shell Command<br/>[shell.rs]"]
  node_mount_cli["Mount Command<br/>[mount.rs]"]
  node_brute_cli["Handle Sweep<br/>[brute_handle.rs]"]
  node_uid_cli["UID Spray<br/>[uid_spray.rs]"]
end

subgraph group_security["Security Engines"]
  node_scanner["Scanner<br/>[scanner.rs]"]
  node_analyzer["Analysis Engine<br/>[analyzer.rs]"]
  node_escape_engine["Escape Engine<br/>[escape.rs]"]
  node_handle_engine["Handle Oracle<br/>[file_handle.rs]"]
end

subgraph group_access["NFS Access"]
  node_shell["Interactive Shell<br/>[mod.rs]"]
  node_fuse["FUSE Mount<br/>[fuse.rs]"]
  node_nfs2["NFSv2 Client<br/>[client.rs]"]
  node_nfs3["NFSv3 Client<br/>[ops.rs]"]
  node_nfs4["NFSv4 Client<br/>[client.rs]"]
  node_mount_proto["MOUNT Protocol<br/>[mount.rs]"]
end

subgraph group_rpc["RPC Infrastructure"]
  node_pool_transport["Pooled Transport<br/>[transport.rs]"]
  node_connection["RPC Connection<br/>[conn.rs]"]
  node_credentials["Credentials<br/>[auth.rs]"]
  node_portmap["Portmapper<br/>[portmap.rs]"]
end

subgraph group_results["Results"]
  node_report["Report Renderers<br/>[mod.rs]"]
  node_output["Output Formats<br/>[output.rs]"]
  node_convert["Report Conversion<br/>[convert.rs]"]
end

node_operator(("Operator"))

node_operator -->|"scans hosts"| node_scan
node_operator -->|"audits export"| node_analyze
node_operator -->|"requests escape"| node_escape_cli
node_operator -->|"opens shell"| node_shell_cli
node_operator -->|"mounts export"| node_mount_cli
node_operator -->|"sweeps handles"| node_brute_cli
node_operator -->|"sprays credentials"| node_uid_cli
node_app -->|"dispatches"| node_scan
node_app -->|"dispatches"| node_analyze
node_app -->|"dispatches"| node_escape_cli
node_app -->|"dispatches"| node_shell_cli
node_scan -.->|"runs discovery"| node_scanner
node_analyze -.->|"runs audit"| node_analyzer
node_escape_cli -->|"uses engine"| node_escape_engine
node_escape_cli -->|"uses oracle"| node_handle_engine
node_escape_cli -->|"probes exports"| node_nfs3
node_escape_cli -->|"probes exports"| node_nfs2
node_escape_cli -->|"probes exports"| node_nfs4
node_shell_cli -.->|"starts REPL"| node_shell
node_mount_cli -.->|"starts mount"| node_fuse
node_analyzer -->|"issues compounds"| node_nfs4
node_nfs3 -->|"uses transport"| node_pool_transport
node_nfs4 -->|"uses transport"| node_pool_transport
node_pool_transport -->|"checks out sessions"| node_connection
node_pool_transport -->|"encodes identity"| node_credentials
node_connection -->|"mounts export"| node_mount_proto
node_connection -->|"queries service port"| node_portmap
node_analyze -.->|"produces findings"| node_report
node_convert -->|"renders formats"| node_report
node_convert -->|"writes output"| node_output

click node_app "https://github.com/strongwind1/nfswolf/blob/main/src/main.rs"
click node_scan "https://github.com/strongwind1/nfswolf/blob/main/src/cli/scan.rs"
click node_analyze "https://github.com/strongwind1/nfswolf/blob/main/src/cli/analyze.rs"
click node_escape_cli "https://github.com/strongwind1/nfswolf/blob/main/src/cli/escape.rs"
click node_shell_cli "https://github.com/strongwind1/nfswolf/blob/main/src/cli/shell.rs"
click node_mount_cli "https://github.com/strongwind1/nfswolf/blob/main/src/cli/mount.rs"
click node_brute_cli "https://github.com/strongwind1/nfswolf/blob/main/src/cli/brute_handle.rs"
click node_uid_cli "https://github.com/strongwind1/nfswolf/blob/main/src/cli/uid_spray.rs"
click node_scanner "https://github.com/strongwind1/nfswolf/blob/main/src/engine/scanner.rs"
click node_analyzer "https://github.com/strongwind1/nfswolf/blob/main/src/engine/analyzer.rs"
click node_escape_engine "https://github.com/strongwind1/nfswolf/blob/main/src/engine/escape.rs"
click node_handle_engine "https://github.com/strongwind1/nfswolf/blob/main/src/engine/file_handle.rs"
click node_shell "https://github.com/strongwind1/nfswolf/blob/main/src/shell/mod.rs"
click node_fuse "https://github.com/strongwind1/nfswolf/blob/main/src/fuse.rs"
click node_nfs2 "https://github.com/strongwind1/nfswolf/blob/main/crates/nfs-v2/src/client.rs"
click node_nfs3 "https://github.com/strongwind1/nfswolf/blob/main/crates/nfs-v3/src/api/ops.rs"
click node_nfs4 "https://github.com/strongwind1/nfswolf/blob/main/crates/nfs-v4/src/client.rs"
click node_mount_proto "https://github.com/strongwind1/nfswolf/blob/main/src/proto/mount.rs"
click node_pool_transport "https://github.com/strongwind1/nfswolf/blob/main/src/proto/transport.rs"
click node_connection "https://github.com/strongwind1/nfswolf/blob/main/src/proto/conn.rs"
click node_credentials "https://github.com/strongwind1/nfswolf/blob/main/src/proto/auth.rs"
click node_portmap "https://github.com/strongwind1/nfswolf/blob/main/src/proto/portmap.rs"
click node_report "https://github.com/strongwind1/nfswolf/blob/main/src/report/mod.rs"
click node_output "https://github.com/strongwind1/nfswolf/blob/main/src/output.rs"
click node_convert "https://github.com/strongwind1/nfswolf/blob/main/src/cli/convert.rs"

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_app,node_scan,node_analyze,node_escape_cli,node_shell_cli,node_mount_cli,node_brute_cli,node_uid_cli toneBlue
class node_scanner,node_analyzer,node_escape_engine,node_handle_engine toneAmber
class node_shell,node_fuse,node_nfs2,node_nfs3,node_nfs4,node_mount_proto toneMint
class node_pool_transport,node_connection,node_credentials,node_portmap toneRose
class node_report,node_output,node_convert,node_operator toneIndigo
```

## Components

### Command Workflows

- [CLI Runtime](https://github.com/strongwind1/nfswolf/blob/main/src/main.rs): `src/main.rs`
- [Host Scan](https://github.com/strongwind1/nfswolf/blob/main/src/cli/scan.rs): `src/cli/scan.rs`
- [Export Audit](https://github.com/strongwind1/nfswolf/blob/main/src/cli/analyze.rs): `src/cli/analyze.rs`
- [Escape Command](https://github.com/strongwind1/nfswolf/blob/main/src/cli/escape.rs): `src/cli/escape.rs`
- [Shell Command](https://github.com/strongwind1/nfswolf/blob/main/src/cli/shell.rs): `src/cli/shell.rs`
- [Mount Command](https://github.com/strongwind1/nfswolf/blob/main/src/cli/mount.rs): `src/cli/mount.rs`
- [Handle Sweep](https://github.com/strongwind1/nfswolf/blob/main/src/cli/brute_handle.rs): `src/cli/brute_handle.rs`
- [UID Spray](https://github.com/strongwind1/nfswolf/blob/main/src/cli/uid_spray.rs): `src/cli/uid_spray.rs`

### Security Engines

- [Scanner](https://github.com/strongwind1/nfswolf/blob/main/src/engine/scanner.rs): `src/engine/scanner.rs`
- [Analysis Engine](https://github.com/strongwind1/nfswolf/blob/main/src/engine/analyzer.rs): `src/engine/analyzer.rs`
- [Escape Engine](https://github.com/strongwind1/nfswolf/blob/main/src/engine/escape.rs): `src/engine/escape.rs`
- [Handle Oracle](https://github.com/strongwind1/nfswolf/blob/main/src/engine/file_handle.rs): `src/engine/file_handle.rs`

### NFS Access

- [Interactive Shell](https://github.com/strongwind1/nfswolf/blob/main/src/shell/mod.rs): `src/shell/mod.rs`
- [FUSE Mount](https://github.com/strongwind1/nfswolf/blob/main/src/fuse.rs): `src/fuse.rs`
- [NFSv2 Client](https://github.com/strongwind1/nfswolf/blob/main/crates/nfs-v2/src/client.rs): `crates/nfs-v2/src/client.rs`
- [NFSv3 Client](https://github.com/strongwind1/nfswolf/blob/main/crates/nfs-v3/src/api/ops.rs): `crates/nfs-v3/src/api/ops.rs`
- [NFSv4 Client](https://github.com/strongwind1/nfswolf/blob/main/crates/nfs-v4/src/client.rs): `crates/nfs-v4/src/client.rs`
- [MOUNT Protocol](https://github.com/strongwind1/nfswolf/blob/main/src/proto/mount.rs): `src/proto/mount.rs`

### RPC Infrastructure

- [Pooled Transport](https://github.com/strongwind1/nfswolf/blob/main/src/proto/transport.rs): `src/proto/transport.rs`
- [RPC Connection](https://github.com/strongwind1/nfswolf/blob/main/src/proto/conn.rs): `src/proto/conn.rs`
- [Credentials](https://github.com/strongwind1/nfswolf/blob/main/src/proto/auth.rs): `src/proto/auth.rs`
- [Portmapper](https://github.com/strongwind1/nfswolf/blob/main/src/proto/portmap.rs): `src/proto/portmap.rs`

### Results

- [Report Renderers](https://github.com/strongwind1/nfswolf/blob/main/src/report/mod.rs): `src/report/mod.rs`
- [Output Formats](https://github.com/strongwind1/nfswolf/blob/main/src/output.rs): `src/output.rs`
- [Report Conversion](https://github.com/strongwind1/nfswolf/blob/main/src/cli/convert.rs): `src/cli/convert.rs`

### Other components

- **Operator**

## Connections

- Operator → Host Scan: scans hosts
- Operator → Export Audit: audits export
- Operator → Escape Command: requests escape
- Operator → Shell Command: opens shell
- Operator → Mount Command: mounts export
- Operator → Handle Sweep: sweeps handles
- Operator → UID Spray: sprays credentials
- CLI Runtime → Host Scan: dispatches (evidence: `src/main.rs`)
- CLI Runtime → Export Audit: dispatches (evidence: `src/main.rs`)
- CLI Runtime → Escape Command: dispatches (evidence: `src/main.rs`)
- CLI Runtime → Shell Command: dispatches (evidence: `src/main.rs`)
- Host Scan → Scanner: runs discovery
- Export Audit → Analysis Engine: runs audit
- Escape Command → Escape Engine: uses engine (evidence: `src/cli/escape.rs`)
- Escape Command → Handle Oracle: uses oracle (evidence: `src/cli/escape.rs`)
- Escape Command → NFSv3 Client: probes exports (evidence: `src/cli/escape.rs`)
- Escape Command → NFSv2 Client: probes exports (evidence: `src/cli/escape.rs`)
- Escape Command → NFSv4 Client: probes exports (evidence: `src/cli/escape.rs`)
- Shell Command → Interactive Shell: starts REPL
- Mount Command → FUSE Mount: starts mount
- Analysis Engine → NFSv4 Client: issues compounds (evidence: `src/engine/analyzer.rs`)
- NFSv3 Client → Pooled Transport: uses transport
- NFSv4 Client → Pooled Transport: uses transport
- Pooled Transport → RPC Connection: checks out sessions (evidence: `src/proto/transport.rs`)
- Pooled Transport → Credentials: encodes identity (evidence: `src/proto/transport.rs`)
- RPC Connection → MOUNT Protocol: mounts export (evidence: `src/proto/conn.rs`)
- RPC Connection → Portmapper: queries service port (evidence: `src/proto/conn.rs`)
- Export Audit → Report Renderers: produces findings
- Report Conversion → Report Renderers: renders formats (evidence: `src/cli/convert.rs`)
- Report Conversion → Output Formats: writes output (evidence: `src/cli/convert.rs`)
