Common expressions (regexes) are extensively utilized in totally different fields of pc science. Nevertheless, the Common expression Denial of Service (ReDoS) vulnerability varieties a category of frequent and severe algorithmic complexity assaults.
The present ReDoS-vulnerability detection instruments have defects of low precision or low recall price because of the missing of formal and complete detection circumstances of ReDoS-vulnerabilities.
A analysis group led by Prof. Chen Haiming from the Institute of Software program of the Chinese language Academy of Sciences developed high-performance detection instrument for ReDoS-vulnerability.
Their examine was issued at USENIX Safety Symposium 2021.
By inspecting huge ReDoS-vulnerable regexes, Chen’s group proposed the ReDoS-vulnerability detection circumstances, specifically the ReDoS-vulnerability patterns, and gave the required circumstances for triggering these patterns formally.
Based mostly on this, they developed a static and dynamic mixed ReDoS-vulnerability detection algorithm, and designed ReDoSHunter, the ReDoS-vulnerability detection instrument.
ReDoSHunter can pinpoint a number of root causes in a susceptible regex, prescribe the diploma of the vulnerability and generate attack-triggering strings, and so on. It has achieved 100% precision and recall ratio on datasets of Corpus, RegExLib and Snort with 37,651 regexes.
In detecting the publicly-confirmed sensible vulnerabilities in Widespread Vulnerabilities and Publicity (CVE), ReDoSHunter can detect 100% ReDoS-related CVEs.
Of their earlier examine, Chen’s group proposed a programming-by-example framework, FlashRegex, for producing anti-ReDoS regexes by both synthesizing or repairing from given examples. It’s the first framework that integrates regex synthesis and restore with the attention of ReDoS-vulnerabilities.
FlashRegex can effectively generate or restore regexes with out ReDoS-vulnerabilities, and there’re 0 ReDoS-vulnerabilities in repaired regexes.