Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Add vault version scan module (unauthenticated /v1/sys/health version detection)

Open Sickwoman opened this issue 1 week ago • 1 comments

I'd like to add a vault version scan module in nettacker/modules/scan/, in the same style as the existing *_version_scan modules (jenkins, confluence, grafana, prometheus). It only fingerprints the running Vault build and makes no vulnerability claim — Nettacker does not accept version-number-based vulnerability modules, since a version is a fingerprint, not proof of exploitability.

Why Vault

HashiCorp Vault is widely self-hosted secrets-management infrastructure and is frequently reverse-proxied to the internet, so a reliable version is high-value input for the planned version-to-CVE mapping work. Vault has a steady stream of advisories where the exact build matters (for example CVE-2021-27668, CVE-2020-16250/16251), so pinning the version is useful. There is currently no Vault module in Nettacker, and no other open issue/PR for one. Proposed detection

GET /v1/sys/health on port 8200 (Vault's default API port), plus 80 and 443 for reverse-proxied instances, over http and https. This is a documented, unauthenticated endpoint. Unlike most health checks it returns the version field in every node state, so the module does not gate on HTTP 200 alone: Vault's health endpoint returns 200 (active), 429 (standby), 472/473 (replication secondary / performance standby), 501 (uninitialized) and 503 (sealed) — and the body carries the version in all of them. Matching only 200 would miss sealed, standby and uninitialized instances. The response is a flat JSON object such as {"initialized":true,"sealed":false,"standby":false,...,"version":"1.15.2","cluster_name":"vault-cluster-...","cluster_id":"..."}. The module anchors on Vault's own signature — the presence of both "initialized" and "sealed" keys — and captures the "version" value, so other products that merely expose a "version" field are not matched and the capture is order-independent. Match captures and logs only the version string (single capture group, same approach as the other version-scan modules). Severity 3 / info_severity, profiles scan, http and a new vault profile, so -p vault runs it. Testing plan

Test against the official hashicorp/vault Docker image in two states: an unsealed dev-mode instance and a sealed/uninitialized instance, confirming the version is captured in both (verifying the status-code handling above). Test against non-Vault /v1/sys/health responses and other products that expose a "version" field, to check for false positives. Verify the module stays silent when the endpoint does not return the Vault health signature, and that a crafted response cannot slow the scan down. Add unit tests that load the module through the template engine and exercise its regex the way the HTTP engine does, on real health bodies (sealed/unsealed, both key orders) and on non-matching bodies. I have an implementation ready and will attach Docker lab evidence with the PR once this is assigned. Can this be assigned to me?

OS: Windows 11 (WSL2 Ubuntu 24.04) OS Version: 10.0.26200 Python Version: 3.11.18 (WSL), 3.12.10 (Windows)

Sickwoman avatar Nov 23 '26 08:11 Sickwoman

As everything is fine I guess so, please assign this issue to me @securestep9 .

Sickwoman avatar Nov 24 '26 10:11 Sickwoman