RECEIPT:白盒智能体XSS发现中的确定性、抗奖励黑客验证 RECEIPT: Deterministic, Reward-Hacking-Resistant Verification for White-Box Agentic XSS Discovery 预印本
原文摘要
查看英文原文摘要
Cross-Site Scripting (XSS) remains one of the most prevalent and damaging classes of web vulnerabilities. LLM-based coding agents offer a promising approach to XSS discovery by combining source-code reasoning with interactive testing against a running application. However, a coding agent's claims cannot be trusted on their own. We characterize three reward-hacking behaviors in white-box agentic XSS discovery and propose three requirements that an ideal verifier should meet. We present RECEIPT, a verification framework that makes agent-reported XSS findings trustworthy by enforcing environment isolation, PoC constraints, role separation, and verdict binding. Each confirmation therefore establishes two properties: the script runs in a real browser, and the payload was planted under the attacker role and executed in the victim role's browser. This constrained replay procedure makes validation deterministic and reproducible. We evaluate RECEIPT on 95 real-world web-application targets drawn from popular open-source projects. Within a $20 per-application budget, RECEIPT found 24 previously unknown XSS vulnerabilities, 12 of which have already been acknowledged by maintainers after responsible disclosure, and recovered the labeled CVE in 36% of known-vulnerability recovery targets. Compared with the same agent using self-judgment and with black-box scanners, RECEIPT confirms more real exploits while admitting no false positives.
📚 参考文献 (66 条)
查看全部 66 条
- [1] MITRE, “CWE-79: Improper Neutralization of Input During Web Page Generation (’Cross-site Scripting’),” https://cwe.mitre.org/data/ definitions/79.html, accessed: 2026-07-01.
- [2] A. Hannousse, S. Yahiouche, and M. C. Nait-Hamoud, “Twenty-two years since revealing cross-site scripting attacks: A systematic mapping and a comprehensive survey,” Computer Science Review, vol. 52, p. 100634, 2024.
- [3] B. Eriksson, G. Pellegrino, and A. Sabelfeld, “Black widow: Blackbox data-driven web scanning,” in 2021 IEEE Symposium on Security and Privacy (SP). IEEE, 2021, pp. 1125–1142.
- [4] B. Eriksson, A. Stjerna, R. De Masellis, P. R¨uemmer, and A. Sabelfeld, “Black ostrich: Web application scanning with string solvers,” in Pro- ceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, 2023, pp. 549–563.
- [5] E. Olsson, B. Eriksson, A. Doup´e, and A. Sabelfeld, “{Spider-Scents}: Grey-box database-aware web scanning for stored {XSS},” in 33rd USENIX Security Symposium (USENIX Security 24), 2024, pp. 6741– 6758.
- [6] A. Bessey, K. Block, B. Chelf, A. Chou, B. Fulton, S. Hallem, C. Henri- Gros, A. Kamsky, S. McPeak, and D. Engler, “A few billion lines of code later: using static analysis to find bugs in the real world,” Communications of the ACM, vol. 53, no. 2, pp. 66–75, 2010.
- [7] B. Johnson, Y. Song, E. Murphy-Hill, and R. Bowdidge, “Why don’t software developers use static analysis tools to find bugs?” in 2013 35th International Conference on Software Engineering (ICSE). IEEE, 2013, pp. 672–681.
- [8] T. Muske and A. Serebrenik, “Survey of approaches for postprocessing of static analysis alarms,” ACM Computing Surveys (CSUR), vol. 55, no. 3, pp. 1–39, 2022.
- [9] OWASP Foundation, “OWASP Benchmark Project,” https://owasp.org/ www-project-benchmark/, accessed: 2026-07-01.
- [10] J. Weinberger, P. Saxena, D. Akhawe, M. Finifter, R. Shin, and D. Song, “A systematic analysis of xss sanitization in web application frame- works,” in European Symposium on Research in Computer Security. Springer, 2011, pp. 150–171.
- [11] A. Doup´e, M. Cova, and G. Vigna, “Why johnny can’t pentest: An analysis of black-box web vulnerability scanners,” in International Conference on Detection of Intrusions and Malware, and Vulnerability Assessment. Springer, 2010, pp. 111–131.
- [12] A. Doup´e, L. Cavedon, C. Kruegel, and G. Vigna, “Enemy of the state: A {state-aware}{black-box} web vulnerability scanner,” in 21st USENIX Security Symposium (USENIX Security 12), 2012, pp. 523–538.
- [13] X. Guo, A. Kawlay, E. Liu, and D. Lie, “EvoCrawl: Exploring web application code and state using evolutionary search,” in Network and Distributed System Security Symposium (NDSS), 2025.
- [14] J. Yang, C. Jimenez, A. Wettig, K. Lieret, S. Yao, K. Narasimhan, and O. Press, “Swe-agent: Agent-computer interfaces enable automated soft- ware engineering,” Advances in Neural Information Processing Systems, vol. 37, pp. 50 528–50 652, 2024.
- [15] R. Fang, R. Bindu, A. Gupta, and D. Kang, “Llm agents can autonomously exploit one-day vulnerabilities,” arXiv preprint arXiv:2404.08144, 2024.
- [16] T. Abramovich, M. Udeshi, M. Shao, K. Lieret, H. Xi, K. Milner, S. Jancheska, J. Yang, C. E. Jimenez, F. Khorrami et al., “Enigma: Interactive tools substantially assist lm agents in finding security vul- nerabilities,” arXiv preprint arXiv:2409.16165, 2024.
- [17] XBOW, “XBOW on HackerOne: What’s Next,” https://xbow.com/blog/ xbow-on-hackerone-whats-next, aug. 18, 2025. Accessed: Jul. 1, 2026.
- [18] R. Fang, R. Bindu, A. Gupta, Q. Zhan, and D. Kang, “Llm agents can autonomously hack websites,” arXiv preprint arXiv:2402.06664, 2024.
- [19] G. Deng, Y. Liu, V. Mayoral-Vilches, P. Liu, Y. Li, Y. Xu, T. Zhang, Y. Liu, M. Pinzger, and S. Rass, “{PentestGPT}: Evaluating and harnessing large language models for automated penetration testing,” in 33rd USENIX Security Symposium (USENIX Security 24), 2024, pp. 847–864.
- [20] S. Ullah, M. Han, S. Pujar, H. Pearce, A. Coskun, and G. Stringhini, “LLMs cannot reliably identify and reason about security vulnerabilities (yet?): A comprehensive evaluation, framework, and benchmarks,” in 2024 IEEE Symposium on Security and Privacy (SP), 2024, pp. 862– 880.
- [21] A. Panickssery, S. R. Bowman, and S. Feng, “Llm evaluators recognize and favor their own generations,” Advances in Neural Information Processing Systems, vol. 37, pp. 68 772–68 802, 2024.
- [22] Google Project Zero and Google DeepMind, “From Naptime to Big Sleep: Using Large Language Models To Catch Vulnerabilities In Real- World Code,” Project Zero Blog, Nov. 2024, [Online]. Available: https: //projectzero.google/2024/10/from-naptime-to-big-sleep.html.
- [23] Y. Hou, H. Wang, M. Lyu, M. Momeu, E. Nguyen, T. Yang, K. Sen, D. Song, and D. Wagner, “Revelio: Cost-efficient agentic memory safety vulnerability detection for repository-scale codebases,” arXiv preprint arXiv:2606.22263, 2026.
- [24] V. Krakovna, J. Uesato, V. Mikulik, M. Rahtz, T. Everitt, R. Kumar, Z. Kenton, J. Leike, and S. Legg, “Specifi- cation gaming: The flip side of AI ingenuity,” DeepMind Blog, 2020.
- [Online]. Available: https://deepmind.google/blog/ specification-gaming-the-flip-side-of-ai-ingenuity/
- [25] J. Skalse, N. H. R. Howe, D. Krasheninnikov, and D. Krueger, “Defining and characterizing reward hacking,” in Advances in Neural Information Processing Systems (NeurIPS), vol. 35, 2022, pp. 9460–9471. [Online]. Available: https://arxiv.org/abs/2209.13085
- [26] M. MacDiarmid, B. Wright, J. Uesato, J. Benton, J. Kutasov, S. Price, N. Bouscal, S. Bowman, T. Bricken, A. Cloud, C. Denison, J. Gasteiger, R. Greenblatt, J. Leike, J. Lindsey, V. Mikulik, E. Perez, A. Rodrigues, D. Thomas, A. Webson, D. Ziegler, and E. Hubinger, “Natural emergent misalignment from reward hacking in production RL,” arXiv preprint arXiv:2511.18397, 2025.
- [27] ZAP Core Team, “ZAP by Checkmarx,” https://www.zaproxy.org/, 2026.
- [28] A. Stafeev, T. Recktenwald, G. De Stefano, S. Khodayari, and G. Pellegrino, “YuraScanner: Leveraging LLMs for task-driven web app scanning,” in Network and Distributed System Security Symposium (NDSS). The Internet Society, 2025. [Online]. Available: https://dx.doi.org/10.14722/ndss.2025.240388
- [29] Chrome Developers, “Chrome DevTools protocol,” https: //chromedevtools.github.io/devtools-protocol/, 2026.
- [30] Y. Zhu, A. Kellermann, D. Bowman, P. Li, A. Gupta, A. Danda, R. Fang, C. Jensen, E. Ihli, J. Benn, J. Geronimo, A. Dhir, S. Rao, K. Yu, T. Stone, and D. Kang, “CVE-Bench: a benchmark for AI agents’ ability to exploit real-world web application vulnerabilities,” in Proceedings of the 42nd International Conference on Machine Learning, ser. ICML’25. JMLR.org, 2025.
- [31] D. Kang, “CVE-Bench v2.0: Making evaluation more rigorous with ABC,” https://ddkang.substack.com/p/ cve-bench-v20-making-evaluation-more, 2025.
- [32] N. Jovanovic, C. Kruegel, and E. Kirda, “Pixy: a static analysis tool for detecting web application vulnerabilities,” in 2006 IEEE Symposium on Security and Privacy (S&P’06), 2006, pp. 6 pp.–263.
- [33] P. Avgustinov, O. de Moor, M. P. Jones, and M. Sch¨afer, “QL: Object- oriented Queries on Relational Data,” in 30th European Conference on Object-Oriented Programming (ECOOP 2016), ser. Leibniz
- International Proceedings in Informatics (LIPIcs), S. Krishnamurthi and B. S. Lerner, Eds., vol. 56. Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum f¨ur Informatik, 2016, pp. 2:1–2:25.
- [Online]. Available: https://drops.dagstuhl.de/entities/document/10.4230/ LIPIcs.ECOOP.2016.2
- [34] H. Su, F. Li, L. Xu, W. Hu, Y. Sun, Q. Sun, H. Chao, and W. Huo, “Splendor: Static detection of stored xss in modern web applications,” in Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, ser. ISSTA 2023. New York, NY, USA: Association for Computing Machinery, 2023, p. 1043–1054.
- [Online]. Available: https://doi.org/10.1145/3597926.3598116
- [35] Y. Shi, Y. Zhang, T. Bai, F. Xue, J. Dai, F. Liu, L. Zhang, X. Luo, and M. Yang, “XSSky: detecting XSS vulnerabilities through local path- persistent fuzzing,” in Proceedings of the 34th USENIX Conference on Security Symposium, ser. SEC ’25. USA: USENIX Association, 2025.
- [36] A. Alhuzali, R. Gjomemo, B. Eshete, and V. N. Venkatakrishnan, “NAVEX: precise and scalable exploit generation for dynamic web applications,” in Proceedings of the 27th USENIX Conference on Se- curity Symposium, ser. SEC’18. USA: USENIX Association, 2018, p. 377–392.
- [37] A. Kieyzun, P. J. Guo, K. Jayaraman, and M. D. Ernst, “Automatic creation of SQL injection and cross-site scripting attacks,” in 2009 IEEE 31st International Conference on Software Engineering, 2009, pp. 199– 209.
- [38] J. Dahse and T. Holz, “Static detection of second-order vulnerabilities in web applications,” in Proceedings of the 23rd USENIX Conference on Security Symposium, ser. SEC’14. USA: USENIX Association, 2014, p. 989–1003.
- [39] PortSwigger, “Burp suite,” https://portswigger.net/, 2026.
- [40] K. Drakonakis, S. Ioannidis, and J. Polakis, “ReScan: A middleware framework for realistic and robust black-box web application scanning,” in Network and Distributed System Security Symposium (NDSS), 2023.
- [41] R. Kirchner, J. M¨oller, M. Musch, D. Klein, K. Rieck, and M. Johns, “Dancer in the dark: synthesizing and evaluating polyglots for blind cross-site scripting,” in Proceedings of the 33rd USENIX Conference on Security Symposium, ser. SEC ’24. USA: USENIX Association, 2024.
- [42] S. Lekies, B. Stock, and M. Johns, “25 million flows later: large-scale detection of DOM-based XSS,” in Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, ser. CCS ’13. New York, NY, USA: Association for Computing Machinery, 2013, p. 1193–1204. [Online]. Available: https://doi.org/10.1145/2508859.2516703
- [43] W. Melicher, A. Das, M. Sharif, L. Bauer, and L. Jia, “Riding out DOMsday: Towards detecting and preventing DOM cross-site scripting,” in Network and Distributed System Security Symposium (NDSS), 2018.
- [44] M. Steffens, C. Rossow, M. Johns, and B. Stock, “Don’t trust the locals: Investigating the prevalence of persistent client-side cross-site scripting in the wild,” in Network and Distributed System Security Symposium (NDSS), 2019.
- [45] I. Parameshwaran, E. Budianto, S. Shinde, H. Dang, A. Sadhu, and P. Saxena, “Dexterjs: robust testing platform for dom-based xss vulnerabilities,” in Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering, ser. ESEC/FSE 2015. New York, NY, USA: Association for Computing Machinery, 2015, p. 946–949. [Online]. Available: https://doi.org/10.1145/2786805.2803191
- [46] F. Duch`ene, S. Rawat, J.-L. Richier, and R. Groz, “KameleonFuzz: evolutionary fuzzing for black-box XSS detection,” in Proceedings of the 4th ACM Conference on Data and Application Security and Privacy, ser. CODASPY ’14. New York, NY, USA: Association for Computing Machinery, 2014, p. 37–48. [Online]. Available: https://doi.org/10.1145/2557547.2557550
- [47] M. Heiderich, J. Schwenk, T. Frosch, J. Magazinius, and E. Z. Yang, “mXSS attacks: attacking well-secured web-applications by using innerHTML mutations,” in Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, ser. CCS ’13. New York, NY, USA: Association for Computing Machinery, 2013, p. 777–788. [Online]. Available: https://doi.org/10.1145/2508859.2516723
- [48] N. Sabino, D. Cassel, R. Abreu, P. Ad˜ao, L. Bauer, and L. Jia, “DOM- XSS detection via webpage interaction fuzzing and URL component synthesis,” in Network and Distributed System Security Symposium (NDSS), 2026.
- [49] Z. Li, S. Dutta, and M. Naik, “IRIS: LLM-assisted static analysis for detecting security vulnerabilities,” in International Conference on Learning Representations, Y. Yue, A. Garg, N. Peng, F. Sha, and R. Yu, Eds., vol. 2025, 2025, pp. 35 735–35 758.
- [Online]. Available: https://proceedings.iclr.cc/paper files/paper/2025/ file/582d4e27fa24168f3af1f4582655034b-Paper-Conference.pdf
- [50] A. Lekssays, H. Mouhcine, K. Tran, T. Yu, and I. Khalil, “LLMxCPG: context-aware vulnerability detection through code property graph- guided large language models,” in Proceedings of the 34th USENIX Conference on Security Symposium, ser. SEC ’25. USA: USENIX Association, 2025.
- [51] Y. Sun, D. Wu, Y. Xue, H. Liu, H. Wang, Z. Xu, X. Xie, and Y. Liu, “Gptscan: Detecting logic vulnerabilities in smart contracts by combining gpt with program analysis,” in Proceedings of the IEEE/ACM 46th International Conference on Software Engineering, ser. ICSE ’24. New York, NY, USA: Association for Computing Machinery, 2024.
- [Online]. Available: https://doi.org/10.1145/3597503.3639117
- [52] Y. Zhu, A. Kellermann, A. Gupta, P. Li, R. Fang, R. Bindu, and D. Kang, “Teams of LLM agents can exploit zero-day vulnerabilities,” in Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), V. Demberg, K. Inui, and L. Marquez, Eds. Rabat, Morocco: Association for Computational Linguistics, Mar. 2026, pp. 23–35.
- [Online]. Available: https://aclanthology.org/2026.eacl-long.2/
- [53] E. G¨uler, S. Schumilo, M. Schloegel, N. Bars, P. G¨orz, X. Xu, C. Kay- gusuz, and T. Holz, “Atropos: effective fuzzing of web applications for server-side vulnerabilities,” in Proceedings of the 33rd USENIX Conference on Security Symposium, ser. SEC ’24. USA: USENIX Association, 2024.
- [54] A. K. Zhang, N. Perry, R. Dulepet, J. Ji, C. Menders, J. W. Lin, E. Jones, G. Hussein, S. Liu et al., “Cybench: A framework for evaluating cybersecurity capabilities and risks of language models,” in International Conference on Learning Representations (ICLR), 2025, arXiv:2408.08926.
- [55] M. Shao, S. Jancheska, M. Udeshi, B. Dolan-Gavitt, H. Xi, K. Milner, B. Chen, M. Yin, S. Garg, P. Krishnamurthy, F. Khorrami, R. Karri, and M. Shafique, “NYU CTF bench: a scalable open-source benchmark dataset for evaluating LLMs in offensive security,” in Proceedings of the 38th International Conference on Neural Information Processing Systems, ser. NIPS ’24. Red Hook, NY, USA: Curran Associates Inc., 2024.
- [56] Z. Wang, T. Shi, J. He, M. Cai, J. Zhang, and D. Song, “CyberGym: Evaluating AI agents’ real-world cybersecurity capabilities at scale,” in International Conference on Learning Representations (ICLR), 2026, arXiv:2506.02548.
- [57] B. Baker, J. Huizinga, L. Gao, Z. Dou, M. Y. Guan, A. Madry, W. Zaremba, J. Pachocki, and D. Farhi, “Monitoring reasoning models for misbehavior and the risks of promoting obfuscation,” arXiv preprint arXiv:2503.11926, 2025.
- [58] Y. Zhu, T. Jin, Y. Pruksachatkun, A. Zhang, S. Liu, S. Cui, S. Kapoor, S. Longpre, K. Meng, D. Kang et al., “Establishing best practices for building rigorous agentic benchmarks,” in Advances in Neural Information Processing Systems (NeurIPS), Datasets and Benchmarks Track, 2025, arXiv:2507.02825.
- [59] E. Debenedetti, J. Zhang, M. Balunovic, L. Beurer-Kellner, M. Fischer, and F. Tram`er, “AgentDojo: a dynamic environment to evaluate prompt injection attacks and defenses for llm agents,” in Proceedings of the 38th International Conference on Neural Information Processing Systems, ser. NIPS ’24. Red Hook, NY, USA: Curran Associates Inc., 2024.