Files
sif/modules/recon/redis-dump-exposure.yaml
T
TigahandGitHub 761e570d59 feat(modules): add sql dump, sqlite and redis rdb exposure modules (#204)
modules/recon/sql-dump-exposure.yaml flags an exposed SQL dump on its
mysqldump and pg_dump idioms paired against a guard that drops SQL shown
inside an html page, then extracts the dumped table name.

modules/recon/sqlite-database-exposure.yaml flags an exposed SQLite file on
the 16 byte format magic anchored to the start of the body, then extracts a
schema table name. anchoring the magic keeps a page that merely embeds the
header from being reported.

modules/recon/redis-dump-exposure.yaml flags an exposed Redis RDB snapshot on
the RDB magic anchored to the start of the body, then extracts the format
version.

internal/modules/database_file_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: a SQL tutorial page, a bare select, prose
that names the sqlite or redis format, a header embedded mid body, a plain 200
body and a 404, none of which may match.

verify: go test ./internal/modules, each matcher, magic anchor, guard and
extractor proven to bite (break -> red, restore -> green).
2026-06-22 17:07:15 -07:00

38 lines
717 B
YAML

# Redis RDB Dump Exposure Detection Module
id: redis-dump-exposure
info:
name: Redis RDB Dump Exposure
author: sif
severity: high
description: Detects an exposed Redis RDB snapshot that leaks the full keyspace
tags: [database, redis, rdb, dump, exposure, recon]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/dump.rdb"
- "{{BaseURL}}/redis/dump.rdb"
- "{{BaseURL}}/data/dump.rdb"
- "{{BaseURL}}/var/lib/redis/dump.rdb"
matchers:
- type: status
status:
- 200
- type: regex
part: body
regex:
- '^REDIS00\d\d'
extractors:
- type: regex
name: rdb_version
part: body
regex:
- 'REDIS(\d{4})'
group: 1