Files
sif/modules/recon/nats-api-exposure.yaml
T
TigahandGitHub 3ed9ea4b6f feat(modules): add kong, jolokia and nats api exposure modules (#215)
modules/recon/kong-api-exposure.yaml flags an exposed Kong admin api that grants
full control of the gateway, keyed on the available plugins map paired with the
admin listen address that the node reports, then extracts the kong version.

modules/recon/jolokia-api-exposure.yaml flags an exposed Jolokia agent that
bridges http to jmx, keyed on the agent and protocol fields of its version
response, then extracts the agent version.

modules/recon/nats-api-exposure.yaml flags an exposed NATS monitoring endpoint
that leaks the server topology, keyed on the server id paired with the max
payload, then extracts the server version.

internal/modules/management_api_exposure_test.go drives the three modules end to
end through ExecuteHTTPModule and asserts the leak alongside the near misses a
strict review wants pinned: each service with one keying field missing, a generic
version response, a plain 200 and a 404.

verify: go test ./internal/modules, each matcher and extractor proven to bite
(break -> red, restore -> green).
2026-06-22 16:49:45 -07:00

40 lines
703 B
YAML

# NATS Monitoring API Exposure Detection Module
id: nats-api-exposure
info:
name: NATS Monitoring API Exposure
author: sif
severity: medium
description: Detects an exposed NATS monitoring endpoint that leaks the server topology
tags: [nats, messaging, api, exposure, recon]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/varz"
matchers:
- type: status
status:
- 200
- type: word
part: body
words:
- "\"server_id\""
- type: word
part: body
words:
- "\"max_payload\""
extractors:
- type: regex
name: nats_version
part: body
regex:
- '"version"\s*:\s*"([^"]+)"'
group: 1