Documentation

Installing SubnetSleuth, running a scan, connecting your platforms and documenting what you find.

Command line

The command line runs the same scanner on the same project file as the desktop app, for scripted and scheduled runs. It shares saved credentials, connections and the licence with the desktop app on the same computer. subnetsleuth --help and subnetsleuth COMMAND --help list the options.

Where to find it

  • Installed app: Start ▸ SubnetSleuth command line opens a Command Prompt where subnetsleuth … works as in the examples below. Elsewhere (a script, a scheduled task), run subnetsleuth-cli.exe from the app's folder, %LOCALAPPDATA%\Programs\SubnetSleuth unless you chose another. SubnetSleuth.exe beside it is the desktop app.
  • Portable folder: subnetsleuth-cli.exe is in the folder, beside SubnetSleuth.exe.
  • One-file download: subnetsleuth-<version>-win-x64.exe needs no installation. Run it by that name, or save it as subnetsleuth.exe in a folder of your own.
  • Linux: the one-file subnetsleuth-<version>-linux-x64; make it executable (chmod +x) and, if you like, rename it subnetsleuth.

Credentials

You don't type a secret on the command line. SubnetSleuth asks for it (without echoing it) or reads it from an environment variable.

subnetsleuth credentials add snmp-v3 --label campus-ro --set user=netops --set auth=SHA256 --set priv=AES256 \
    --secret auth_key --secret priv_key
subnetsleuth credentials add snmp-community --label legacy-ro --secret community=env:LEGACY_RO --networks 10.40.0.0/16
subnetsleuth credentials test campus-ro 10.20.0.1
subnetsleuth credentials list

Scans

# Inventory only the ranges you're responsible for
subnetsleuth crawl --target 10.20.0.0/24 --target 10.30.0.0/24 --credential campus-ro \
    --dns --out site.sleuth --xlsx site.xlsx --drawio site.drawio

# Follow neighbours outwards from a core device, bounded by a scope
subnetsleuth crawl --seed 10.10.0.1 --scope 10.10.0.0/16 --saved-credentials --out site.sleuth

# Identify hosts and scan their ports (needs Nmap for --port-scan)
subnetsleuth crawl --target 10.20.0.0/24 --credential campus-ro --identify --port-scan --out site.sleuth

# Later: re-poll everything already known; notes and layout are kept
subnetsleuth crawl --resume --refresh --seed 10.10.0.1 --scope 10.10.0.0/16 --credential campus-ro --out site.sleuth

# Every six hours, unattended (--repeat is in seconds)
subnetsleuth crawl --resume --refresh --seed 10.10.0.1 --scope 10.10.0.0/16 --credential campus-ro \
    --out site.sleuth --repeat 21600

Connections and pulls

subnetsleuth connections sources
subnetsleuth credentials add token --label meraki-key --secret token=env:MERAKI_KEY
subnetsleuth connections add meraki --label "Acme Meraki" --credential meraki-key
subnetsleuth connections test "Acme Meraki"
subnetsleuth pull -m site.sleuth --all --scan

# Clouds and hypervisors. A key file is loaded into the credential and kept encrypted, not saved as a path
subnetsleuth credentials add gcp-sa --label gcp-inventory --secret-file key_json=inventory-key.json
subnetsleuth connections add gcp --label "Acme Google Cloud" -S sign_in=service-account --credential gcp-inventory
subnetsleuth connections add aws --label "Acme AWS" -S sign_in=profile -S profile=inventory -S organization=true
subnetsleuth pull -m site.sleuth "Acme Google Cloud" "Acme AWS"
subnetsleuth domains -m site.sleuth        # cloud and virtual address spaces: on the map, or kept apart

Outputs

subnetsleuth render -m site.sleuth --html map.html --xlsx site.xlsx --csv site- --drawio site.drawio
subnetsleuth diff last-month.sleuth site.sleuth
subnetsleuth coverage -m site.sleuth --csv coverage.csv   # what no scan has covered yet
subnetsleuth show -m site.sleuth           # a text summary, ending with the health checks
subnetsleuth serve -m site.sleuth          # read-only REST API on this computer, with the query language:
curl "http://127.0.0.1:8088/query?q=hosts%20where%20os%20~%20windows%20and%20port%20%3D%203389"

Licence

subnetsleuth license status
subnetsleuth license activate subnetsleuth-pro-lic_0123456789abcdef.lic
subnetsleuth license remove

Asking AI

subnetsleuth ai types
subnetsleuth ai add bedrock --label "Claude on Bedrock" -S aws_region=us-east-1 -S aws_profile=corp-ai --default
subnetsleuth ask -m site.sleuth --preset overview
subnetsleuth ask -m site.sleuth --handoff chat --out ~/Documents "What is on VLAN 30?"
subnetsleuth mcp install            # SubnetSleuth as a connector in Claude Desktop and Cowork