paperbot · PL 论文追踪

全部论文 待读 收藏

P2 ReScue: crafting regular expression DoS attacks

ReScue:构造正则表达式拒绝服务攻击
ASE Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering2018匹配度 2/10 · 该论文研究正则表达式 ReDoS 攻击字符串的自动生成,属于安全测试与灰盒分析,与用户关注的 PL 与 AI 交叉、浮点程序分析、贝叶斯程序分析等核心方向没有直接关联;虽然涉及程序分析与自动化技术,但未涉及 LLM/Agent,也不是用户当前追的静态分析/形式化验证问题。引用 52 inbox
Yuju Shen, Yanyan Jiang, Chang Xu, Ping Yu, Xiaoxing Ma, Jian Lu
crossref: 2026-09-12

AI 速览

一句话:提出三阶段灰盒分析技术,自动生成最大化匹配时间的 ReDoS 攻击字符串。

现代正则表达式被广泛用于字符串处理,但设计不当的正则可能产生指数级匹配步骤,在精心构造的输入下导致正则表达式拒绝服务(ReDoS)攻击。本文提出 ReScue,一种三阶段灰盒分析技术,用于自动生成能够暴露给定正则漏洞的 ReDoS 字符串。ReScue 依次通过遗传搜索进行播种、再次通过遗传搜索进行孵化,并最终利用正则专用算法进行泵送,从而生成搜索时间最大化的字符串。作者实现了 ReScue 工具,并在真实项目中的 29,088 个实用正则上进行了评估。结果表明,与当时最佳现有技术相比,ReScue 多发现 49% 的攻击字符串,并将其应用于流行 GitHub 项目后发现了十个此前未知的 ReDoS 漏洞。

问题
设计不良的正则表达式在恶意输入下可能触发指数级匹配时间,造成 ReDoS 安全漏洞。
方法
提出三阶段灰盒分析技术:遗传搜索播种、遗传搜索孵化、正则专用算法泵送,自动生成最大化搜索时间的攻击字符串。
评估
在真实项目中的 29,088 个实际正则上评估,并与现有最佳技术比较;同时在流行 GitHub 项目中发现十个未知 ReDoS 漏洞。
原文摘要(Abstract)

Regular expression (regex) with modern extensions is one of the most popular string processing tools. However, poorly-designed regexes can yield exponentially many matching steps, and lead to regex Denial-of-Service (ReDoS) attacks under well-conceived string inputs. This paper presents Rescue, a three-phase gray-box analytical technique, to automatically generate ReDoS strings to highlight vulnerabilities of given regexes. Rescue systematically seeds (by a genetic search), incubates (by another genetic search), and finally pumps (by a regex-dedicated algorithm) for generating strings with maximized search time. We implemenmted the Rescue tool and evaluated it against 29,088 practical regexes in real-world projects. The evaluation results show that Rescue found 49% more attack strings compared with the best existing technique, and applying Rescue to popular GitHub projects discovered ten previously unknown ReDoS vulnerabilities.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4750,
  title = {ReScue: crafting regular expression DoS attacks},
  author = {Yuju Shen and Yanyan Jiang and Chang Xu and Ping Yu and Xiaoxing Ma and Jian Lu},
  booktitle = {ASE},
  year = {2018},
  doi = {10.1145/3238147.3238159}
}