How megamansec/ssh-snake works
SSH-Snake is a Bash-based SSH network traversal and mapping tool. The principal workflow recursively discovers local SSH keys and destinations, attempts SSH connections, and continues discovery on reachable systems while avoiding rescanning; it emits traversal results for visualization and lookup utilities. The shell scripts were not sampled, so traversal links below rely on README statements. The Python utilities are sampled; their graph and lookup behavior is visible in their source.
Main entry points: Snake.sh SSH-Snake Runtime · generate-graph.py Graph Generator · forward-lookup-host.py Forward Lookup · reverse-lookup-host.py Reverse Lookup
Components 15
SSH Traversal
- SSH-Snake Runtime
Snake.sh - Privilege Elevation
Snake.sh - Remote Execution
Snake.sh - Rescan Guard
Snake.sh - Traversal Output
Snake.sh
Host Discovery
- Key Discovery
Snake.sh - History Key Search
Snake.sh - Destination Discovery
Snake.sh - Custom Commands
Snake.sh
Output Analysis
- Graph Generator
tools/generate-graph.py - Forward Lookup
tools/forward-lookup-host.py - Reverse Lookup
tools/reverse-lookup-host.py - Shortest Path
tools/shortest-path-create-chain.py - Network Graph
Other components
- Operator
Connections 15
- Operator → SSH-Snake Runtime: runs scan
README.md - SSH-Snake Runtime → Privilege Elevation: tries elevation
README.md - SSH-Snake Runtime → Key Discovery: discovers keys
README.md - Key Discovery → History Key Search: searches history
README.md - SSH-Snake Runtime → Destination Discovery: finds destinations
README.md - SSH-Snake Runtime → Custom Commands: runs configured
README.md - SSH-Snake Runtime → Remote Execution: attempts SSH
README.md - Remote Execution → Rescan Guard: checks rescan
README.md - Remote Execution → Key Discovery: repeats discovery
README.md - SSH-Snake Runtime → Traversal Output: emits results
README.md - Traversal Output → Graph Generator: reads output
tools/generate-graph.py - Graph Generator → Network Graph: writes graph
tools/generate-graph.py - Traversal Output → Forward Lookup: reads output
tools/forward-lookup-host.py - Traversal Output → Reverse Lookup: reads output
tools/reverse-lookup-host.py - Traversal Output → Shortest Path: reads output
tools/shortest-path-create-chain.py