Reducing False Positives in AI-Driven Penetration Testing: The Dual-Agent Verification Mechanism
AI agents are transforming penetration testing by understanding context and identifying complex vulnerabilities, but they often introduce high false positive rates. This article analyzes an open-source AI pentesting tool that introduces a dual-agent independent verification mechanism to solve this issue. It explores how structural isolation, untrusted evidence handling, and code-driven validation thresholds ensure reliable vulnerability confirmation, offering reusable design principles for building trustworthy AI security tools.
1. The Core Contradiction of AI Penetration Testing: Capability vs. False Positives
In recent years, as Large Language Model (LLM) capabilities have rapidly evolved, the security industry has begun integrating AI Agents into penetration testing workflows. Compared to traditional rule- and signature-based scanners, LLM Agents possess superior context understanding: they can read rendered page content, comprehend business semantics, autonomously plan testing paths, and even perform correlated reasoning across multiple attack surfaces. This gives AI-driven testing tools a distinct advantage in discovering logic-based vulnerabilities and complex injection chains.
However, this enhanced capability brings a new challenge: false positives. A false positive occurs when a tool reports a vulnerability that does not actually exist or cannot be exploited in the target environment. The harm of false positives is twofold: on one hand, it consumes a significant amount of security engineers’ time for manual verification. When the false positive rate is too high, teams gradually lose trust in the tool’s output, eventually abandoning it. On the other hand, “seemingly valid but practically harmless” results can disrupt remediation prioritization, causing teams to waste effort on pseudo-issues.
Traditional false positive suppression methods primarily rely on rule matching and signature comparison, such as judging whether an injection is truly effective based on response characteristics. However, these methods are ineffective in scenarios with complex semantics. A recently open-sourced AI penetration testing tool proposes a more engineering-valuable approach: instead of relying on a single model’s self-assessment, it introduces a second independent Agent to reproduce the exploit. This “dual-Agent independent verification” structural design is used to drive down the false positive rate. This article will analyze this mechanism and discuss the reusable design principles behind it.
2. The Dual-Agent Verification Mechanism: Why “Independence” is Key
The core workflow of this tool can be summarized as follows: the main Agent (Hunting Agent) is responsible for discovering potential vulnerabilities and submitting evidence. The system then dispatches an independent Verification Agent to perform a genuine exploitation reproduction. If the Verification Agent successfully reproduces the vulnerability, it is confirmed. If it cannot be verified or dismissed, the finding is retained and flagged for manual review. Only when a vulnerability is explicitly falsified (e.g., it is an expected product design behavior) is the finding discarded.
The most noteworthy aspect of this mechanism is not the act of “having a secondary check” itself, but the specific implementation of “independence”:
- Fresh Context Initialization: The verification process does not continue the session of the Hunting Agent. Instead, it builds the testing context from scratch. This means the Verification Agent is not influenced by the anchoring effect of prior reasoning. LLMs in a context with an existing conclusion can easily “self-confirm” along the established direction, which is the fundamental reason why self-checks within a single session often fail.
- Evidence Treated as Untrusted Input: The verification evidence submitted by the Hunting Agent (such as request/response screenshots and command outputs) is treated as untrusted content by the Verification Agent and must be re-proven through its own operations. This is similar to applying the “never trust input” principle of the security domain to Agent collaboration.
- Minimal Privilege Toolset: The Verification Agent is only equipped with read-only tools, preventing the verification process itself from causing destructive changes to the target system, while also constraining the boundaries of verification actions.
- Explicit Resource Limits: Each verification supports a maximum of 8 interaction rounds and takes no longer than 3 minutes. These hard limits prevent the verification process from consuming tokens and time in infinite loops, forcing the verification strategy to focus on the most critical determination actions.
From an architectural perspective, this design essentially replaces “self-review” with “adversarial review.” The reliability improvement stems from the structure rather than the stacking of model capabilities—even if the underlying model is the same, as long as the verification path is independent, the evidence is untrusted, and the criteria are clear, the false positive rate can be significantly reduced.
3. Differentiated Verification Thresholds: Turning “Confirmation” into Verifiable Engineering Standards
A major issue with LLM output is the ambiguity of determination criteria: a model might consider “input is echoed” as proof of XSS, or “DNS resolution is triggered” as evidence of SSRF. This tool’s approach is to set differentiated, actionable thresholds for different vulnerability types, allowing code logic to take precedence over model judgment.
Taking two typical vulnerability types as examples:
- XSS (Cross-Site Scripting): Script execution must be triggered; merely the presence of input reflection does not count as a successful verification. This elevates the determination from “reflection phenomenon” to “actual execution,” aligning with manual verification standards in penetration testing.
- SSRF (Server-Side Request Forgery): With redirects disabled, an HTTP callback initiated by the target server to a brand-new random token address must be received. Triggering only a DNS resolution request, or having the callback originate from the scanner itself, does not count as a pass. This embodies two classic anti-bypass techniques: disabling redirects eliminates false positives from “302 jump forged callbacks,” and random tokens eliminate misjudgments from “external noise callbacks.”
More significantly from an engineering perspective is the fallback logic at the code level: if the model returns a “confirmed” result without independently completing a successful re-test, the code will forcefully downgrade the determination to “uncertain.” In other words, the model’s verbal conclusion is not used as the final basis; the determination tier can only be upgraded if the complete verification action chain is executed. This “code-as-rules” design effectively suppresses the LLM’s tendency toward overconfidence and is a model worth emulating for all AI security tools.
4. Scope Control and Tool Orchestration: The Engineering Foundation of AI Security Tools
Beyond the verification mechanism, this tool has two other noteworthy aspects in its engineering implementation:
First, scope control. The tool has built-in protection mechanisms that block all tool calls to hosts outside the configured target and its subdomains, preventing the Agent from conducting unauthorized scans during autonomous exploration. This is crucial for production environments—the autonomy of an AI Agent is a double-edged sword. Without hard boundaries, the LLM might follow external links or API hints on a page to “trace the vine” and scan assets outside the authorized scope, bringing legal and compliance risks. The ideal approach is to perform scope checks at the tool call layer (i.e., the interceptor layer), rather than relying on the model to consciously adhere to prompt constraints.
Second, mainstream tool orchestration and multi-model compatibility. The Agent can call common open-source security tools in the industry—such as port scanners, vulnerability fingerprinting, and SQL injection detectors—using them as an extension of its own capabilities rather than reinventing the wheel. It also supports models from multiple LLM providers and can invoke local models via local inference solutions. The latter is particularly attractive to security teams because penetration testing traffic often involves sensitive data, and local inference can prevent data exfiltration.
Regarding tech stack selection, the tool is built with a compiled language into a single binary program with a local web management panel, lowering the deployment barrier. The entire testing process is broken down into 22 stages, from initial reconnaissance to final report generation, reflecting an approach to engineering and standardizing penetration testing methodologies.
5. The Honest Posture of Benchmarking: Acknowledging the Verification Challenge
A detail worth noting is that the project’s creators stated that the team measures the false positive rate through internal benchmarks but has no plans to publish them for now; comparisons with other tools in the README are limited to broad descriptions of operational principles, without disclosing any testing data.
This posture is actually commendable. Evaluating the false positive rate of a security tool is inherently difficult: the selection of test sets, differences in target environments, and the subjectivity of vulnerability determination can cause massive deviations in the “false positive rate” metric under different criteria. Publishing numbers without independent third-party verification can be misleading. For users, a more pragmatic approach is to establish a small benchmark set in their own environment and use real assets to verify the tool’s judgment quality, rather than blindly trusting vendor numbers.
6. Implications for Security Teams
Overall, this open-source practice provides several reusable design principles for building or evaluating AI penetration testing tools:
- The verification path must be structurally isolated from the discovery path; relying on the model to self-review is unreliable.
- Determination standards must be下沉 (lowered/downshifted) to executable engineering rules, where code logic has veto power over model conclusions.
- Establish differentiated reproduction thresholds for different vulnerability categories, rejecting “phenomenon-level” evidence.
- Scope control must be enforced at the tool call layer, not relying on prompts.
- Results that cannot be automatically determined should flow into a manual review queue, forming a three-branch closed loop of “auto-confirm / auto-discard / manual fallback.”
AI will not replace penetration testing engineers anytime soon, but the collaborative model of “AI handling scaled exploration and reproduction, humans handling fallback and adjudication” is becoming a reality. Structural designs like dual-Agent independent verification are the necessary steps to make AI truly trustworthy in the security domain.
