feat: add honeypot detection to reduce false positives (Fixes #6403)
/claim #6403
Certain hosts (commonly observed via Shodan or internet-wide scans) intentionally return static or misleading responses that satisfy matchers across many unrelated templates.
This results in:
These hosts effectively behave as honeypots or sinkholes, polluting scan results.
This PR adds a non-breaking honeypot detection mechanism to Nuclei to reduce false positives caused by hosts that intentionally match a large number of unrelated templates.
Certain hosts (commonly observed via Shodan) return static or misleading responses that satisfy matchers across many unrelated technologies (e.g., Cisco, Fortinet, Apache, PHP, Tomcat), causing excessive noise in scan results.
To address this, the change introduces a lightweight, post-processing detector that analyzes per-host match patterns and flags likely honeypots using multiple conservative signals.
This PR introduces a non-breaking, conservative honeypot detection mechanism that analyzes per-host match patterns during result aggregation and flags hosts whose results are likely unreliable.
Key properties:
A host is flagged only when multiple independent signals align:
| Signal | Description |
|---|---|
| High template count | Large number of unique templates matched on a single host |
| Category diversity | Matches span many unrelated technology tags/categories |
| Response reuse | Majority of templates return identical HTTP response bodies |
| Technology conflicts | Mutually exclusive technologies detected together |
Detection is conservative and requires at least 3 signals to be present.
example.com
When a host exhibits honeypot-like behavior, Nuclei emits a clear warning while preserving all findings.
[HONEYPOT WARNING]
Host: http://example.com
Matched 41 templates across 9 unrelated categories.
Results may be unreliable.
All findings are still emitted. Users are explicitly informed that results from this host may be unreliable, enabling informed triage decisions.
# Default behavior (honeypot detection disabled)
nuclei -u target.com
# Enable honeypot detection (warn-only, non-breaking)
nuclei -u target.com --honeypot-detect
# Enable detection and tag results for downstream filtering
nuclei -u target.com --honeypot-detect --honeypot-mode tag
When tagging mode is enabled, affected results include metadata that can be filtered in JSON output:
{
"host": "example.com",
"metadata": {
"honeypot": true
}
}
Unit tests were added to verify the following scenarios:
All tests are deterministic and do not rely on live scanning.
Hardik Taneja
@Hardik-Taneja
ProjectDiscovery
@projectdiscovery