mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 22:40:54 -07:00
modules/recon/solr-api-exposure.yaml flags an exposed Apache Solr admin api, keyed on the solr spec version paired with the solr home that a generic json endpoint does not carry, then extracts the solr version. modules/recon/spark-api-exposure.yaml flags an exposed Apache Spark master whose cluster state is reachable without authentication, keyed on a spark:// master url paired with the alive worker count, then extracts the master url. modules/recon/hadoop-yarn-api-exposure.yaml flags an exposed Hadoop YARN resource manager, keyed on the cluster info wrapper paired with the resource manager version, then extracts the hadoop version. internal/modules/bigdata_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 non spark url behind the worker count, a generic json endpoint, a plain 200 and a 404. verify: go test ./internal/modules, each matcher and extractor proven to bite (break -> red, restore -> green).
40 lines
748 B
YAML
40 lines
748 B
YAML
# Apache Spark Master API Exposure Detection Module
|
|
|
|
id: spark-api-exposure
|
|
info:
|
|
name: Apache Spark Master API Exposure
|
|
author: sif
|
|
severity: high
|
|
description: Detects an exposed Apache Spark master that leaks its cluster workers and applications
|
|
tags: [spark, apache, cluster, api, exposure, recon]
|
|
|
|
type: http
|
|
|
|
http:
|
|
method: GET
|
|
paths:
|
|
- "{{BaseURL}}/json/"
|
|
|
|
matchers:
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
- type: regex
|
|
part: body
|
|
regex:
|
|
- '"url"\s*:\s*"spark://'
|
|
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "\"aliveworkers\""
|
|
|
|
extractors:
|
|
- type: regex
|
|
name: spark_master_url
|
|
part: body
|
|
regex:
|
|
- '"url"\s*:\s*"(spark://[^"]+)"'
|
|
group: 1
|