Skip to content

Wildcard fingerprint probes run serially and are repeated by every pass #464

Backlog

Description

@TMHSDigital

Summary

Before any candidate is dispatched, each scan pass sends one apex lookup and then 5 wildcard fingerprint probes one after another, while the worker pool waits. The -permute and -ptr passes repeat all of it for a target the main pass just measured. Under -dL that is at least 6 serial round trips per target per pass.

Where

  • internal/scan/runner.go:490-516 (preflight: apex lookup, then FingerprintWildcard)
  • internal/dns/resolver.go:664, :711 (for i := 0; i < probes; i++ { probe() }, fingerprintProbes = 5)
  • internal/cli/permute.go:94, internal/cli/ptr.go:224 (each calls scanTarget -> scan.Run again)
  • internal/cli/session.go:720 (targets run one at a time)

Impact

Take 10k bug-bounty roots with the bundled 5k list at -t 100 and about 200 ms RTT. The scan takes about 10 s per target, and the serial checks add about 1.2 s per pass, or 3.6 s with both extra passes. That is 10 to 35% of wall time with the pool idle, about 3 to 10 hours over the run.

Suggested fix

  • Send the 5 initial probes and the apex lookup concurrently (they are independent; join them as ResolveTypes already does for record types). Keep the rotation-saturating follow-up loop sequential.
  • Pass the main pass's fingerprint and preflight result to the same target's -permute and -ptr passes (for example a Config field that skips the probes) instead of measuring again.
  • Later: overlap target i+1's preflight with target i's tail, the way fetchAhead overlaps passive lookups.

Acceptance criteria

  • Against a local server with 200 ms added latency, time-to-first-dispatch per pass drops from about 6 RTT to about 1 to 2 RTT.
  • -permute/-ptr passes reuse the main pass's fingerprint; wildcard filtering results are unchanged (existing wildcard tests pass).

Getting started

  • Relevant files: internal/dns/resolver.go, internal/scan/runner.go, internal/scan/wildcard.go
  • How to run tests: go test ./internal/dns ./internal/scan

Filed by repo-audit/full-audit at a45b999. Severity: medium. Effort: M. audit-key: performance|internal/dns/resolver.go|checkWildcard

Activity

  1. added
    help wanted
    performance
    area: scan
    severity: medium
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: scanhelp wantedperformanceseverity: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions