ReScue: crafting regular expression DoS attacks
Yuju Shen, Yanyan Jiang, Chang Xu et al. · IEEE/ACM International Conference on Automated Software Engineering (ASE) · 2018
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.
Cited by 52 works. doi:10.1145/3238147.3238159
Authors
References
- Finite Automata and Their Decision Problems
- Introduction to automata theory, languages, and computation
- Representation of Events in Nerve Nets and Finite Automata
- Three models for the description of language
- A genetic algorithm tutorial
- Programming Techniques: Regular expression search algorithm
- Automated Whitebox Fuzz Testing.
- Search‐based software test data generation: a survey
- Feedback-Directed Random Test Generation
- Search-based software engineering