mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 14:37:01 -07:00
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
41 lines
822 B
YAML
41 lines
822 B
YAML
# Kafdrop Exposure Detection Module
|
|
|
|
id: kafdrop-exposure
|
|
info:
|
|
name: Kafdrop Exposure
|
|
author: sif
|
|
severity: high
|
|
description: Detects an exposed Kafdrop ui that leaks brokers, topics and the cluster summary and can browse topic messages without authentication
|
|
tags: [kafka, kafdrop, streaming, dashboard, exposure, unauth, recon]
|
|
|
|
type: http
|
|
|
|
http:
|
|
method: GET
|
|
headers:
|
|
Accept: application/json
|
|
paths:
|
|
- "{{BaseURL}}/"
|
|
|
|
matchers:
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "\"summary\""
|
|
- "\"preferredReplicaPercent\""
|
|
- "\"brokers\""
|
|
- "\"topics\""
|
|
condition: and
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
extractors:
|
|
- type: regex
|
|
name: kafka_broker
|
|
part: body
|
|
regex:
|
|
- '"host"\s*:\s*"([^"]+)"'
|
|
group: 1
|