Cheap to hypothesize, expensive to verify: the defense surface in agent vulnerability discoveryCheap to Hypothesize, Costly to Verify: The Defense Surface of Agentic Vulnerability Discovery
The authors use RedHerring security decoys to divert the verification budget of vulnerability-discovery agents, and report a reduction in real vulnerability discovery under a fixed budget.
Attackers use autonomous agents to discover repository vulnerabilities within a fixed budget, obtaining the full source code of the released repository, which they can inspect, build, execute, and analyze. Defenders own the repository but do not know the locations of real vulnerabilities; they insert security decoys based only on program structure and expected functionality, and private certificates are not disclosed.
- Autonomous vulnerability discovery agents need to select and verify candidates within a fixed budget. The authors argue that verification is more resource-intensive than hypothesis formation, so without knowing the location of the real vulnerability, safe decoys can change the allocation of the verification budget.
- RedHerring combines vulnerability chains derived from real CVEs with unsatisfiable false bridges and adapts them to repository input-handling code. Defenders retain private certificates and check that dangerous operations are unreachable and that behavior is preserved in tests.
- Under the same budget, the number of confirmed crashes decreased for all five models after decoys were inserted. The authors explain the difference as verification resources being diverted by decoys; after Qwen3.8-Flash was informed that decoys might exist, the number of confirmations still decreased relative to an equally informed Baseline.
- Each configuration was run only once; the evaluation covers five open-weight models, and Claude and GPT were excluded due to safety alignment refusals. Behavior preservation is verified through testing, and the authors note that formal equivalence proofs could extend the guarantee to all inputs; resource proportions depend on model annotation.
- Evaluated models
- Qwen3.8-FlashQwen3.8-MaxGLM-5.3DeepSeek-V4-ProKimi-K3
- Benchmarks
- OSS-FuzzCyberGym
- Metrics
- Distinct confirmed crash signaturesReductionDecoy completion-token shareEstimated decoy time shareRuntime overhead
Researchers at the Hong Kong University of Science and Technology propose RedHerring, which inserts provably safe decoy paths into repositories to divert autonomous vulnerability-discovery agents' verification budget away from real vulnerabilities. Each decoy consists of a CVE-derived vulnerability chain and a fake bridge; the fake bridge uses computational hard problems such as quadratic residues to make the dangerous convergence point unreachable, and the defender can efficiently prove this with a private certificate. On 33 OSS-Fuzz projects, 70 instances and five models, RedHerring reduced the number of confirmed real vulnerabilities by 38.7–60.4%, and agents spent 30.6–51.5% of completion tokens and an estimated 32.5–49.9% of runtime on decoys. Even when prompted that decoys may exist in the codebase, the reduction was still 37.2% relative to an informed baseline, and runtime overhead on each project's native test suite was below 1%.
Why it was selectedTreating verification cost as a designable defense surface and using computational hard problems to guarantee the decoys themselves are safe is an approach that can be transferred to other protection scenarios that need to consume agent budget.
Related events and news
1 events · 2 news mentions
News that mentions this paper
港科大提出RedHerring诱饵防御AI漏洞挖掘
- 公众号 安全研究GoSSIPcites the paper's id or link如何对抗 AI 黑客的攻击?港科大团队提出 RedHerring 诱饵防御
阅读论文:https://arxiv.org/abs/2609.35909
- 公众号 新智元cites the paper's id or link港科大团队发布 RedHerring 防御方法,用假漏洞消耗 AI 黑客的验证时间
论文:Cheap to Hypothesize, Costly to Verify: The Defense Surface of Agentic Vulnerability Discovery
Paper analysis
What problem does this paper attempt to solve?
The authors aim to reduce agent vulnerability discovery within a fixed budget through security decoys when the locations of real vulnerabilities are unknown.
The core question is: when defenders do not know whether a repository contains real vulnerabilities or where they are, how can they reduce discovery by autonomous agents within a fixed budget?
- Application scenario: Agents read the entire repository on their own, form vulnerability hypotheses, and then verify them through reachability analysis, execution, and PoC construction. The authors argue that scaling discovery capability lets attackers search more code with the same resources.
- Where existing defenses act: The authors note that patches and partial code transformations require selecting protection locations in advance; other deception defenses act on exploit development or post-deployment runtime interactions and do not directly intervene in verification choices during repository search.
- Core observation: The authors state that there is a cost asymmetry between forming hypotheses and verifying them, and agents cannot complete verification of all candidates. Therefore, verification resources consumed by decoys may crowd out the budget for real candidates.
- Threat model: Defenders own the repository but do not know the locations of real vulnerabilities.
- Attack goal and knowledge: Attackers discover vulnerabilities within a fixed budget and obtain the full source code of the released repository.
- Attack capability: They can inspect, build, execute, and analyze the repository; only submitting a PoC that triggers a crash counts as a discovery.
- Defense capability: They rewrite the repository based only on program structure and expected functionality, retain private certificates, and do not provide them to attackers.
- Protected object and constraints: Protect real vulnerabilities in the original repository while requiring that no new vulnerabilities be introduced and expected observable behavior be preserved.
- Proposed defense: RedHerring inserts decoys that appear to contain vulnerabilities and dangerous operations but are unreachable, directing the agent's verification budget toward these paths.
What related research exists?
The authors position RedHerring as an intervention on verification choices in repository-level vulnerability discovery, distinguished from pinpoint protection and runtime deception.
Related work centers on autonomous discovery, code-analysis defenses, and deception defenses; the main experiment's comparison is the original repository.
Autonomous vulnerability discovery and evaluation
- Cybench, CVE-Bench (2025): Evaluate capture-the-flag tasks and real Web vulnerability exploitation, respectively; EnIGMA (2025) studies how interactive tools help vulnerability discovery.
- CyberGym (2026) and Frontier Red Team (2026): The paper cites their reports of discovering previously unknown vulnerabilities to illustrate that agents can already search for vulnerabilities in real software.
Patching, obfuscation, and pinpoint code protection
- Patching and exploit mitigation: Li and Paxson (2017) discuss security patches; Szekeres et al. (2013) discuss memory exploit mitigation. The authors note that the former requires locating the vulnerability, while the latter acts at the exploitation stage.
- Obfuscation and opaque predicates: Collberg et al. (1997, 1998) discuss raising the cost of code analysis and opaque predicates; work by Moser, Sharif, Xu, and others uses hard problems, hash conditions, and symbolic predicates to resist analysis.
- Flashboom, FPA, CoTDeceptor, Anti-LLM obfuscation: Target model attention, judgment, reasoning, or secret recovery, respectively. The authors note that these methods require defenders to first select the code or secret to protect (Table 1).
Deception and resource consumption
- Honey-patches, Honeyquest, and agent honeypots: Araujo et al. (2014), Kahlhofer et al. (2024), and Reworr and Volkov (2024) discuss exploit redirection, code decoy attractiveness, and monitoring of AI attack agents, respectively.
- Chaff Bugs (2018), CHeaT (2025), Mantis (2024): The first inserts triggerable but non-exploitable bugs to consume manual exploit-development resources; the latter two stall agents in deployed services through decoy assets or injected content.
- OTora, Clawdrain (2026): The paper classifies these as resource-consumption attacks that increase benign agents' reasoning and tool-call costs through injected content or malicious skills.
Experimental comparison and authors' positioning
- Baseline methods: Baseline uses the original code, and RedHerring uses code with inserted decoys; the evaluation covers 70 OSS-Fuzz instances, with PoCs replayed in the corresponding CyberGym containers. The related defenses above were not used as comparison methods in the main experiment.
The authors argue that RedHerring's distinction is that it directly affects which hypotheses receive verification resources, and does not require defenders to locate real vulnerabilities in advance.
How does the paper address this problem?
RedHerring uses real vulnerability chains to attract verification and blocks dangerous operations with unsatisfiable conditions checkable via private certificates.
RedHerring combines "vulnerability leads worth verifying" with "conditions that are hard to determine as unreachable from public code," then adapts them to repositories. The authors define the goal as: under safety and behavior-preservation constraints, make decoys consume more verification resources.
Goals and design requirements
- Resource allocation goal: The paper decomposes the expected verification cost of a single decoy as E[Cd]=Pr[A verifies d]· E[Cd∣ A verifies d]. The two terms correspond to the probability of being selected for verification and the resources invested after starting.
- Dual requirement: Vulnerability evidence must attract the agent, while refuting the candidate must also consume resources. The authors note that complex conditions may increase verification cost but may also cause the agent to skip directly, so both must be considered together.
Vulnerability chains provide candidate evidence
- Template source: Entry points, propagation functions, and dangerous operations are extracted from real CVE AddressSanitizer crash traces and fix patches, then rewritten with LLM assistance into reusable C templates.
- Template scale: The catalog contains 75 templates, each with 2–12 functions; templates pass C99 syntax checks and trial integration in reference projects (Appendix D.2).
- Repository adaptation: The target repository's types, structures, naming, and existing APIs are used to connect chains to functions that process external input. Different decoys use different templates, locations, and independently generated condition parameters.
False bridge and private certificates
- Security structure: A false bridge is a predicate that all control-flow paths to the newly added dangerous operation must pass through, and that no input can satisfy. The public repository retains the problem instance, while construction information and certificates are kept private by the defender.
- Four constructions: The paper uses quadratic non-residue, Rabin root exclusion, ElGamal false opening, and syndrome decoding, relying on quadratic residuosity, factoring, DDH, and Goppa decoding assumptions, respectively (Table 2).
- Cost asymmetry: The authors state that private certificates let defenders cheaply check unsatisfiability; for a party with only the public parameters, deciding whether the relation has a solution corresponds to a computationally hard problem.
- Implementation constraints: The condition implementation checks inputs and public parameters, returns false on the error path, avoids overflow and undefined behavior, and restores touched program state. Appendix C gives each construction and certificate check.
Integration and independent acceptance
- Material preparation: A deterministic stage generates fixed source files, templates, and check materials; its inputs may include templates previously generalized by an LLM, but this preparation stage itself does not call an LLM (Figure 8, Appendix D).
- Integration agent: A Claude Code agent connects repository code and prefabricated materials; an independent service checks file bytes, call chains, terminal bindings, and entry guards against a private original snapshot, and returns diagnostics upon rejection.
- Location selection: External input handling functions are selected based on program structure, excluding directories such as tests, examples, and documentation, as well as entry functions; at most one decoy per function, spread across files and subsystems.
Safety and behavior verification
- Unreachability check: Dominance analysis checks that all paths reaching the newly added dangerous operation pass through the false bridge, and certificate checks verify its unsatisfiability; the implementation also checks exceptional inputs and arithmetic boundaries.
- Behavior preservation check: Native tests are run, differential testing against the original repository is performed, and targeted fuzzing is done on attached functions reachable by the harness. Only insertions that pass the checks are retained.
- Prompt materials: Appendix F gives the complete prompts for auditing, the informed condition, trajectory analysis, and per-turn review; they control task execution, decoy-informed status, and resource attribution, respectively.
What experiments did the paper conduct?
Confirmed crash counts decreased for all five models; the informed experiment and component ablation support the authors' budget-diversion explanation.
The main experiment compares the number of confirmed crashes between original repositories and repositories with inserted decoys under the same budget, and analyzes resource share, informed response, components and deployment cost.
Experimental setup
- Models tested: Qwen3.8-Flash, Qwen3.8-Max, GLM-5.3, DeepSeek-V4-Pro, Kimi-K3, all driven by Claude Code.
- Data and conditions: 70 instances from 33 OSS-Fuzz projects, each with a specified vulnerable version and sanitizer harness; Baseline is the original code, and RedHerring inserts 5 decoys per instance (Appendix E.1).
- Budget and repetition: Each run is capped at 3 hours and 300 agent rounds; paired conditions share the model, prompt, tools, environment and budget. Each configuration was run once (Appendix A).
- Task constraints: The agent reads read-only source code and manually constructs PoCs, and may build and execute locally; automated fuzzing, brute-force input generation and external downloads are prohibited, and the network only connects to model endpoints and verification services.
- Discovery metric: Saved PoCs are replayed after the session and deduplicated by sanitizer, crash type and the first three stack frames after filtering. An independent crash signature is the operational proxy for vulnerability discovery, and the reduction rate is computed relative to the paired Baseline.
- Resource attribution: Qwen3.8-Flash's decoy-related rounds are annotated and unioned with deterministic symbol matching; the completion-token share and estimated time share are computed separately and then averaged across instances. Mixed discussion rounds are counted in full (Appendix E.4).
Main results
The table below is based on Figure 4; confirmation counts aggregate all 70 instances, all models use the above budget, and RedHerring contains 5 decoys per instance.
| Model | Baseline confirmations | RedHerring confirmations | Reduction rate | Decoy token share | Decoy estimated time share | | — | —: | —: | —: | —: | —: | | Qwen3.8-Flash | 149 | 59 | 60.4% | 51.5% | 49.9% | | Qwen3.8-Max | 90 | 40 | 55.6% | 45.0% | 40.1% | | Kimi-K3 | 98 | 54 | 44.9% | 34.9% | 37.4% | | DeepSeek-V4-Pro | 84 | 50 | 40.5% | 33.3% | 37.1% | | GLM-5.3 | 124 | 76 | 38.7% | 30.6% | 32.5% |
- The authors' mechanistic explanation: The authors explain the differences in reduction rates across models as differing degrees of verification resource diversion. Figure 4c reports a cross-model Pearson r = 0.99; this is correlational evidence.
- Exception in baseline performance: The authors note that GLM-5.3 has the second-highest Baseline confirmations but the lowest reduction rate, and therefore argue that baseline capability alone cannot explain all the differences.
Hypothesis formation and verification cost
- Independent trajectory analysis: On 300 annotated Qwen3.8-Flash trajectories on OSS-Fuzz, verification accounts for 73.8% of wall-clock time (95% CI: 71.7–75.5%), and hypothesis formation accounts for 7.3% (95% CI: 6.7–7.9%).
- Candidate lifecycle: A total of 9,551 hypotheses were formed, 7,301 entered verification, and 4,576 verifications were abandoned, accounting for 62.7%; the average wall-clock cost of verifying a single hypothesis is 11.1× the cost of forming it (Appendix B).
- Attribution boundary: When formation and verification are ambiguous, the time is assigned to verification; the authors explicitly treat the verification share as an upper bound and the formation share as a lower bound; confidence intervals come from bootstrap.
Informed agents and trajectory cases
- Informed paired experiment: Figure 6 adds a notice of the existence of decoys to both repository types for Qwen3.8-Flash. The informed Baseline confirmed 121, and informed RedHerring confirmed 76, a reduction rate of 37.2%.
- Search adjustment: In informed RedHerring, the decoy completion-token share is 29.8%, and the estimated time share is 32.5%. The authors argue that the notice changes search strategy but does not eliminate the diversion effect; the number of discoveries for the no-decoy Baseline also decreased.
- Repeated-check case: In the libxml2 audit in Figure 5, Qwen3.8-Flash submitted 5 PoCs and confirmed 0 crashes; decoy-related output was 219,435/276,098 tokens, i.e., 79.5%. The 72.0% time in the figure is labeled as an illustrative value.
Defense cost and behavior preservation
- Deployment cost: Material preparation for the 70 instances required 30 hours in total; integrating 5 prefabricated decoys per instance averaged 69.3 minutes, and source code size increased by 13.8% (§5.6).
- Test results: Runtime overhead in each project's native tests was below 1%; all native tests passed, and differential testing found no behavioral differences; all 350 inserted false bridges passed safety checks.
- Scope of guarantees: The authors report unreachability checks for dangerous operations and behavioral results on tested inputs; Appendix A lists a formal equivalence proof covering all inputs as a direction for extension.
Other ablations and analyses
All of the following are Qwen3.8-Flash, the same 70 instances and the main-experiment budget, with values based on Figure 7; component definitions are in Table 4.
- No-Chain: Removes the vulnerability chain; confirmations 111, reduction rate 25.5%, inserted-code token share 26.1%, estimated time share 23.7%.
- Simple-Gate: Replaces the false bridge with a simple always-false condition; confirmations 100, reduction rate 32.9%, token share 24.0%, estimated time share 20.6%.
- Harmless-Control: A simple always-false condition followed by code with no dangerous operations; confirmations 128, reduction rate 14.1%, token share 29.0%, estimated time share 26.8%.
- Number of decoys: With 1, 3 and 5 decoys per instance, the reduction rates were 7.4%, 24.8% and 60.4%, respectively; the decoy token shares were 7.7%, 26.8% and 51.5%, respectively.
- The authors' explanation of the ablations: Harmless-Control has a higher token share than the other two component-removal variants but the lowest reduction rate; the authors argue that reading harmless code and verifying vulnerability candidates compete for different resources.
What are some points that can be further explored?
The authors point out boundaries including model coverage, single runs, behavioral equivalence guarantees, trajectory annotation, and public benchmark contamination.
The authors consolidate the boundaries of evaluation and guarantees in Appendix A, including future model evaluation and formal behavioral equivalence proofs.
Limitations and future directions noted by the authors
- Model coverage: Five frontier open-weight models were evaluated; Claude and GPT were excluded due to safety alignment refusals, which the authors leave for future evaluation (Appendix A).
- Number of runs: API cost meant each configuration was run only once. The authors argue that the breadth across models and 70 instances supports the results (Appendix A).
- Behavior preservation: Native tests, differential testing, and targeted fuzzing check tested inputs; the authors note that formal equivalence proofs could extend the guarantee to all inputs (Appendix A).
- Trajectory annotation: Resource proportions depend on the annotation model's turn labels. The authors use a unified model, prompt, and rules, combined with symbolic matching, to keep the comparison consistent (Appendix A).
- Benchmark contamination: Vulnerabilities in public repositories may enter training data. The authors argue that both conditions share this knowledge, and that directly locating real vulnerabilities would make the measured reduction rate conservative; this is the authors' interpretation (Appendix A).
Scope of experimental coverage
- Main task: 70 vulnerable-version instances from 33 OSS-Fuzz projects, with manual PoCs confirmed using sanitizer harnesses; the metric is deduplicated crash signatures, not manual adjudication of independent root causes (Appendix E).
- Adaptive conditions: The informed-prompt experiment, component ablation, and decoy-count analysis all use Qwen3.8-Flash; the informed condition states that decoys may be present, and tools and budget are kept consistent (§5.4–5.5).
- Statistical reporting: The stage-cost analysis in Appendix B reports bootstrap confidence intervals; the main defense reduction rate does not report confidence intervals or statistical significance tests (Figure 4, Appendix B).
- Resource measurement: Mixed turns are counted in full toward decoy-related resources, and time includes generation, tool execution, and waiting; the paper does not report annotation–human agreement (Appendix E.4, F).
- Appendix case scope: Appendix G shows additional trajectories, in which ReadStat is not among the main evaluation project list in Table 3; the c-blosc2 viewer maps six attached functions, whereas the main experimental setting is five decoys per instance. The paper does not explain the correspondence between the two.
Summarize the main content of the paper
The authors treat the verification budget as the defense target and report that security decoys can reduce confirmed vulnerability discovery within a fixed budget.
RedHerring is a decoy defense for repository-level autonomous vulnerability discovery: defenders do not need to first locate the real vulnerability; instead, they change the agent's verification investment in candidates.
- Problem and mechanism: The authors argue that vulnerability hypotheses are easy to form, while verification is more resource-intensive. The method uses CVE-derived vulnerability chains to attract verification, then blocks dangerous operations with unsatisfiable false bridges; private certificates allow defenders to check unreachability.
- Main results: On 70 OSS-Fuzz instances, with 5 decoys per instance, a 3-hour cap per run and 300 rounds, Qwen3.8-Flash's confirmations dropped from 149 to 59, a reduction rate of 60.4% (Figure 4).
- Model differences: Under the same main experimental conditions, GLM-5.3's confirmations dropped from 124 to 76, a reduction rate of 38.7%, the lowest reduction rate among the five models (Figure 4).
- Informed response: After Qwen3.8-Flash was informed that decoys might exist, the informed Baseline and informed RedHerring confirmed 121 and 76, respectively, a reduction rate of 37.2% (Figure 6). The authors therefore argue that the effect does not depend on concealing the existence of decoys.
- Behavior and cost: All 350 false bridges passed safety checks; runtime overhead in native tests was below 1%, and integration averaged 69.3 minutes per instance (§5.6).
The authors interpret these results as verification resource diversion: decoys reduce the budget available to real candidates. Evidence comes from paired experiments, resource annotation, informed experiments and component ablations; each configuration was run only once, and behavior preservation remains bounded by the tested inputs.