Skip to content

Visualize SMAP network scans with this Grafana dashboard. SMAP is a passive Nmap alternative using Shodan.io’s API. The dashboard shows scanned hosts, open ports, services, and detected CVEs, importing JSON output into SQLite for monitoring, historical analysis, and vulnerability tracking.

Notifications You must be signed in to change notification settings

czantoine/smap-grafana-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Linkedin Stars Issues Last Commit Grafana Dashboard Badge

If you enjoy my projects and want to support my work, consider buying me a coffee! ☕️

ko-fi

Smap Network Scanner – Nmap Alternative with Shodan.io

Project overview

This project shows how to use Smap (a passive network scanner that leverages the Shodan.io API as an Nmap alternative) together with a lightweight pipeline that imports Smap JSON output into a local SQLite database and visualizes results with Grafana. The purpose is to provide an easy, reproducible way to monitor scanned hosts, open ports, services and detected CVEs over time — useful for monitoring, historical analysis and basic vulnerability tracking.

The packaged Grafana dashboard used in this project is “Smap Network Scanner – Nmap Alternative with Shodan.io” (Grafana Dashboard ID 24085). It visualizes hosts, ports, service fingerprints and CVE information coming from the SQLite import of Smap JSON results.

grafana_dashboard_smap

A Docker Compose setup is available if you wish to test the dashboard. Available here.

Key concepts / data flow

  1. Smap queries Shodan (passively) and produces JSON scan results for target hosts.
  2. A small importer converts the Smap JSON into rows and stores them in a SQLite database (smap.db).
  3. Grafana uses a provisioned SQLite datasource that reads smap.db.
  4. The Grafana dashboard (ID 24085) (to import manually) reads that datasource and displays:
    • list of scanned hosts and metadata,
    • discovered open ports and services,
    • detected CVEs and their counts,
    • historical trends and simple vulnerability tracking.

This setup is intended to be lightweight and easy to run locally or in a small containerized environment.

Adding targets (how to include new hosts)

Adding new scan targets is intentionally simple, but how you update targets depends on how the importer is deployed:

Important: in this project targets.txt is copied into the Docker image at build time. That means the built image contains the target list baked in.

Two practical options to update targets:

  • Option 1 — rebuild the image with an updated targets.txt

    1. Edit targets.txt in your project working tree.
    2. Rebuild the importer image via docker compose build smap-importer
    3. Redeploy the smap-importer service so the new image (containing the updated targets.txt) is used via docker compose up -d smap-importer

    This replaces the running container with an image that contains the new target list.

  • Option 2 — schedule automated updates instead of rebuilding
    If you prefer not to rebuild the image every time you change targets, consider:

    • Adding a small cron job inside the smap-importer image that periodically pulls an external targets.txt (or otherwise refreshes targets) and triggers the importer; or
    • Using a scheduler for Docker Swarm such as crazymax/swarm-cronjob to run the importer periodically with an externally mounted or dynamically provided targets.txt.
      Both approaches let you change targets without an image rebuild: the importer fetches or reads the current target list at runtime.

Why this approach

  • Using Shodan makes Smap passive and quick to run against many hosts without active probing overhead.
  • Importing structured Smap JSON into SQLite keeps the stack simple and self-contained.
  • Grafana gives immediate, shareable visualizations (dashboard 24085 is focused on hosts, ports and CVEs), making the output easy to explore and useful for monitoring or light SOC workflows.

Smap

Smap project: https://github.com/s0md3v/Smap see more for additional information.

Features

  • Scans 200 hosts per second
  • Doesn’t require any account / API key (note: querying Shodan directly requires an API key; you can also import local Smap JSON output without using a Shodan key)
  • Vulnerability detection (CVE enumeration from service fingerprints)
  • Supports all Nmap output formats (import Smap/Nmap JSON outputs)
  • Service and version fingerprinting
  • Makes no contact to the targets (passive scanning using Shodan data)

You can directly find the dashboard here or use the ID: 24085.


If you find this project useful, please give it a star ⭐️ ! Your support is greatly appreciated. Also, feel free to contribute to this project. All contributions, whether bug fixes, improvements, or new features, are welcome!

About

Visualize SMAP network scans with this Grafana dashboard. SMAP is a passive Nmap alternative using Shodan.io’s API. The dashboard shows scanned hosts, open ports, services, and detected CVEs, importing JSON output into SQLite for monitoring, historical analysis, and vulnerability tracking.

Topics

Resources

Stars

Watchers

Forks