Cross-site scripting (XSS) remains a persistent web security vulnerability, especially because obfuscation can change the surface form of a malicious payload while preserving its behavior. These transformations make it difficult for traditional and machine learning-based detection systems to reliably identify attacks. Existing approaches for generating obfuscated payloads often emphasize syntactic diversity, but they do not always ensure that the generated samples remain behaviorally valid. This paper presents a structured pipeline for generating and evaluating obfuscated XSS payloads using large language models (LLMs). The pipeline combines deterministic transformation techniques with LLM-based generation and uses a browser- based runtime evaluation procedure to compare payload behavior in a controlled execution environment. This allows generated samples to be assessed through observable runtime behavior rather than syntactic similarity alone. In the evaluation, an untuned baseline language model achieves a runtime behavior match rate of 0.15, while fine-tuning on behavior-preserving source-target obfuscation pairs improves the match rate to 0.22. Although this represents a measurable improvement, the results show that current LLMs still struggle to generate obfuscations that preserve observed runtime behavior. A downstream classifier evaluation further shows that adding generated payloads does not improve detection performance in this setting, although behavior- filtered generated samples can be incorporated without materially degrading performance. Overall, the study demonstrates both the promise and the limits of applying generative models to adversarial security data generation and emphasizes the importance of runtime behavior checks in improving the quality of generated data for downstream detection systems.


翻译:跨站脚本(XSS)仍是一种持续存在的Web安全漏洞,尤其是因为混淆技术可以在保留恶意载荷行为的同时改变其表面形式。这些变换使得传统及基于机器学习的检测系统难以可靠识别攻击。现有的混淆载荷生成方法通常强调句法多样性,但未必能保证生成的样本在行为上保持有效。本文提出了一种结构化流程,利用大型语言模型(LLM)生成并评估混淆XSS载荷。该流程将确定性变换技术与基于LLM的生成相结合,并通过基于浏览器的运行时评估程序,在受控执行环境中比较载荷行为。这使得生成的样本能够通过可观测的运行时行为(而非仅凭句法相似性)进行评估。在评估中,未经调优的基线语言模型达到0.15的运行时行为匹配率,而针对保持行为的源-目标混淆对进行微调后,匹配率提升至0.22。尽管这代表了可衡量的改进,但结果表明,当前LLM在生成保留观测运行时行为的混淆时仍存在困难。下游分类器评估进一步显示,在此场景下添加生成的载荷并未改善检测性能,尽管经行为过滤的生成样本可在不显著降低性能的情况下被纳入。总体而言,本研究展示了生成式模型在对抗性安全数据生成中的应用前景与局限,并强调运行时行为检查对提升下游检测系统生成数据质量的重要性。

0
下载
关闭预览

相关内容

《利用 LLM 进行高级持续性威胁 (APT) 检测和智能解释》
专知会员服务
24+阅读 · 2025年2月14日
【ICLR2024】能检测到LLM产生的错误信息吗?
专知会员服务
25+阅读 · 2024年1月23日
如何检测LLM内容?UCSB等最新首篇《LLM生成内容检测》综述
《基于高斯混合流和入包的异常检测》2023最新57页论文
专知会员服务
29+阅读 · 2023年5月15日
对抗机器学习在网络入侵检测领域的应用
专知会员服务
35+阅读 · 2022年1月4日
专知会员服务
34+阅读 · 2021年9月16日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
Mask-RCNN模型的实现自定义对象(无人机)检测
计算机视觉life
17+阅读 · 2019年8月12日
动手写机器学习算法:异常检测 Anomaly Detection
七月在线实验室
11+阅读 · 2017年12月8日
基于机器学习的KPI自动化异常检测系统
运维帮
13+阅读 · 2017年8月16日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
驱动军事决策变革的顶尖人工智能指挥系统
专知会员服务
6+阅读 · 8月11日
非对称防御中的自组织临界性:俄乌战争
专知会员服务
10+阅读 · 8月10日
《战争中的大语言模型监管》
专知会员服务
12+阅读 · 8月10日
《边缘计算关键技术分析及美军作战实践应用》
边缘计算的军事应用
专知会员服务
12+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
13+阅读 · 8月8日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员