Nettacker
Nettacker copied to clipboard
grafana_version_scan - Grafana version scanning module
I'd like to add a grafana_version_scan module.
Why Grafana
- One of the most commonly internet-exposed dashboards / observability UIs
- Has CISA KEV-listed CVEs (e.g. CVE-2021-43798, which already has
grafana_cve_2021_43798_vuln) plus a steady stream of newer advisories, so a reliable version is useful input for the planned version-to-CVE mapping feature - There is currently no Grafana version module, and no open issue/PR for one
Proposed detection
GET /api/healthon ports 80, 443, 3000 (Grafana default), http and https- This is a documented, unauthenticated endpoint
(https://grafana.com/docs/grafana/latest/developers/http_api/other/#health-api)
that returns the version unless the admin set
[auth.anonymous] hide_version = true - Match on status 200 and the
"database"key immediately followed by"version"(with an optional"enterpriseCommit"between them), then log only the captured version string - The
"database"+"version"pairing works for both the old alphabetically sorted JSON (commit, database, version, e.g. 8.x) and the current struct-ordered JSON (database, version, commit, e.g. 13.x), and avoids matching generic health endpoints - Added to the existing
grafanaprofile so-p grafanaruns it alongside the CVE module
Testing plan
Test against official Grafana releases (an old one and the latest), with hide_version
on/off, and against non-Grafana /api/health responses to check for false positives.
Can this be assigned to me?
OS: Windows 11
OS Version: 10.0.26200
Python Version: 3.12.10
@Sickwoman please follow the contribution guidelines and the pull request template