Files
sif/modules/recon/clickhouse-http-exposure.yaml
TigahandGitHub 3a289a3ac4 feat(modules): add clickhouse and dgraph exposure modules (#258)
add recon modules for self-hosted databases whose http interface is reachable
without credentials: clickhouse runs arbitrary sql because the default user has
an empty password, confirmed here by reading the server version through the
http interface, and the open-source dgraph alpha has no authentication so its
/health endpoint discloses the cluster while /query and /admin read and drop
all data; a clickhouse that requires a password returns 403 and an alpha behind
an authenticating proxy returns 401 and neither is flagged.
2026-07-02 13:22:24 -07:00

39 lines
854 B
YAML

# ClickHouse HTTP Interface Exposure Detection Module
id: clickhouse-http-exposure
info:
name: ClickHouse HTTP Interface Exposure
author: sif
severity: high
description: Detects an unauthenticated ClickHouse http interface that executes arbitrary sql and reaches server-side files and internal urls
tags: [clickhouse, database, sql, olap, exposure, unauth, recon]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/?query=SELECT+version()+FORMAT+JSON"
matchers:
- type: word
part: body
words:
- "\"meta\""
- "\"statistics\""
- "\"rows_read\""
- "\"bytes_read\""
condition: and
- type: status
status:
- 200
extractors:
- type: regex
name: clickhouse_version
part: body
regex:
- '"version\(\)"\s*:\s*"([^"]+)"'
group: 1