mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 22:40:54 -07:00
add recon modules for unauthenticated proxy and server admin interfaces that should be loopback-only: caddy /config/ returns the full running configuration and accepts a config-replacing post, and envoy /server_info exposes the build and command-line options of an admin interface that also offers config_dump and shutdown.
42 lines
834 B
YAML
42 lines
834 B
YAML
# Caddy Admin API Exposure Detection Module
|
|
|
|
id: caddy-admin-exposure
|
|
info:
|
|
name: Caddy Admin API Exposure
|
|
author: sif
|
|
severity: high
|
|
description: Detects a Caddy admin api bound to a routable address that leaks the running config and accepts config-replacing loads
|
|
tags: [caddy, reverse-proxy, web-server, admin, api, controlplane, exposure, unauth, recon]
|
|
|
|
type: http
|
|
|
|
http:
|
|
method: GET
|
|
paths:
|
|
- "{{BaseURL}}/config/"
|
|
|
|
matchers:
|
|
- type: regex
|
|
part: body
|
|
regex:
|
|
- '"apps"\s*:\s*\{'
|
|
|
|
- type: word
|
|
part: body
|
|
words:
|
|
- "\"servers\""
|
|
- "\"handler\""
|
|
condition: and
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
extractors:
|
|
- type: regex
|
|
name: caddy_handler
|
|
part: body
|
|
regex:
|
|
- '"handler"\s*:\s*"([^"]+)"'
|
|
group: 1
|