Skip to content

feat: add PumbaLP/adguardhome-dot collection for DoT scanner detection#1797

Open
PumbaLP wants to merge 5 commits into
crowdsecurity:masterfrom
PumbaLP:feature/adguardhome-dot
Open

feat: add PumbaLP/adguardhome-dot collection for DoT scanner detection#1797
PumbaLP wants to merge 5 commits into
crowdsecurity:masterfrom
PumbaLP:feature/adguardhome-dot

Conversation

@PumbaLP

@PumbaLP PumbaLP commented May 12, 2026

Copy link
Copy Markdown

Adds a parser and scenario to detect port 853 (DNS-over-TLS) scanners targeting AdGuard Home instances.

Port scanners that probe DoT without completing a proper TLS handshake cause repeated "connection reset by peer" errors in AdGuard Home logs. This collection extracts the remote IP from these errors and bans IPs that trigger 5+ resets within 10 minutes.

Components

  • Parser PumbaLP/adguardhome-dot-errors: extracts remote_ip, log_type and service from AdGuard Home DoT error logs
  • Scenario PumbaLP/adguardhome-dot-scan: leaky bucket, capacity 5, leakspeed 10m, grouped by source_ip
  • Collection PumbaLP/adguardhome-dot: bundles both components

What it detects

Port scanners and probers that connect to port 853 (DoT) without completing a proper TLS handshake. These appear as repeated connection reset by peer errors in AdGuard Home logs.

What it does NOT detect

  • DoQ (port 8853 or 853/udp) – no remote IP in logs
  • Direct DoH (port 443) – no remote IP in logs
  • DoH via Nginx reverse proxy – use crowdsecurity/nginx-logs instead

Testing

Two hubtests are included:

  • adguardhome-dot-errors: validates parser extracts source_ip, log_type and service correctly
  • adguardhome-dot-scan: validates scenario coverage with 6 events from same IP

Tested in production against AdGuard Home v0.107.x running in Docker.

Closes #1753

Checklist

  • I have read the contributing guide
  • I have tested my changes locally
  • For new parsers or scenarios, tests have been added
  • I have run the hub linter and no issues were reported (see contributing guide)
  • Automated tests are passing
  • AI was used to generate any/all content of this PR

Parser: PumbaLP/adguardhome-dot-errors
- Extracts remote IP from AdGuard Home DoT connection reset errors
- Detects port 853 scanners that fail TLS handshake

Scenario: PumbaLP/adguardhome-dot-scan
- Bans after 5 resets within 10 minutes from same IP
- Tested against AdGuard Home v0.107.x in production

Closes: crowdsecurity#1753
Comment thread .tests/adguardhome-dot-errors/adguardhome-dot-errors.log Outdated
@buixor buixor requested a review from Copilot June 2, 2026 08:45
@buixor buixor self-assigned this Jun 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new PumbaLP/adguardhome-dot collection (parser + scenario) that detects port scanners probing AdGuard Home's DNS-over-TLS port 853 by aggregating repeated connection reset by peer errors per source IP.

Changes:

  • New s01 parser PumbaLP/adguardhome-dot-errors extracting source_ip, service and log_type from AdGuard Home DoT reset errors.
  • New leaky scenario PumbaLP/adguardhome-dot-scan (capacity 5 / leakspeed 10m / blackhole 5m) plus the bundling collection.
  • Two hubtests under .tests/adguardhome-dot-errors and .tests/adguardhome-dot-scan, but the scenario assert does not actually validate the overflow.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
collections/PumbaLP/adguardhome-dot.yaml New collection bundling the parser and scenario.
parsers/s01-parse/PumbaLP/adguardhome-dot-errors.yaml New grok parser on Line.Raw extracting remote IP from DoT reset errors.
parsers/s01-parse/PumbaLP/adguardhome-dot-errors.md Parser documentation; has an unterminated YAML code fence.
scenarios/PumbaLP/adguardhome-dot-scan.yaml New leaky scenario on source_ip triggering after 5 resets in 10m.
scenarios/PumbaLP/adguardhome-dot-scan.md Scenario documentation; starts with a stray ```markdown fence.
.tests/adguardhome-dot-errors/* Hubtest validating parser extraction; log fixture uses a real public IP.
.tests/adguardhome-dot-scan/* Hubtest meant to validate the scenario, but scenario.assert asserts zero results.

Comment thread .tests/adguardhome-dot-scan/scenario.assert Outdated
Comment thread scenarios/PumbaLP/adguardhome-dot-scan.md Outdated
Comment thread .tests/adguardhome-dot-errors/adguardhome-dot-errors.log Outdated
Comment thread .tests/adguardhome-dot-errors/parser.assert Outdated
Comment thread parsers/s01-parse/PumbaLP/adguardhome-dot-errors.yaml Outdated
Comment thread parsers/s01-parse/PumbaLP/adguardhome-dot-errors.yaml
Comment thread .tests/adguardhome-dot-scan/parser.assert Outdated
Comment thread parsers/s01-parse/PumbaLP/adguardhome-dot-errors.md
@PumbaLP PumbaLP force-pushed the feature/adguardhome-dot branch from 093b9e1 to 66cf04a Compare June 2, 2026 17:07
@PumbaLP PumbaLP requested a review from buixor June 2, 2026 17:16
@PumbaLP PumbaLP force-pushed the feature/adguardhome-dot branch from 12971c1 to 5836985 Compare June 3, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hub] Add PumbaLP/adguardhome-dot collection

3 participants