Files
sif/modules/recon/kafka-ui-exposure.yaml
T
TigahandGitHub 79794638e4 feat(modules): add kafka ui and kafdrop exposure modules (#261)
add two recon modules detecting exposed kafka management consoles that ship without authentication by default:

- kafka-ui-exposure (high): probes /api/clusters on a kafbat/provectus kafka ui and matches the kafka-ui-specific defaultCluster/brokerCount keys plus the online/offline/initializing status enum; an open instance leaks the cluster topology and lets an unauthenticated session browse and produce records, while a login- or oauth-protected instance returns 401 and is not flagged

- kafdrop-exposure (high): probes / with an Accept: application/json header and matches the ClusterInfoVO summary/preferredReplicaPercent/brokers/topics shape; an open instance discloses broker hostnames, topics and messages, while an instance with the optional basic auth returns 401

both modules carry hard-test coverage with cross false-positive guards both ways, non-enum-status and missing-key negative cases, a wire-level check that the kafdrop module sends the Accept header, and 401 secured-instance cases
2026-07-02 12:56:29 -07:00

42 lines
880 B
YAML

# Kafka UI Exposure Detection Module
id: kafka-ui-exposure
info:
name: Kafka UI Exposure
author: sif
severity: high
description: Detects an exposed Kafka UI (provectus/kafbat) console that leaks cluster, broker and topic details and can browse and produce messages
tags: [kafka, kafka-ui, kafbat, provectus, streaming, management, exposure, unauth, recon]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/api/clusters"
matchers:
- type: word
part: body
words:
- "\"defaultCluster\""
- "\"brokerCount\""
condition: and
- type: regex
part: body
regex:
- '"status"\s*:\s*"(online|offline|initializing)"'
- type: status
status:
- 200
extractors:
- type: regex
name: kafka_version
part: body
regex:
- '"version"\s*:\s*"([^"]+)"'
group: 1