Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReDoS grep plugin #3

Open
viyatb opened this issue Aug 15, 2017 · 0 comments
Open

ReDoS grep plugin #3

viyatb opened this issue Aug 15, 2017 · 0 comments

Comments

@viyatb
Copy link
Member

viyatb commented Aug 15, 2017

.NET appears to display regular expressions used on the server-side in the HTML for user-friendly client-side validation.

We can leverage this to help the tester identify Regular Expression Denial of Service vulnerabilities (ReDoS) by simply looking at the HTML and organise the matches via the usual "unique as text, unique as html and all as html".

Something similar to:
https://github.com/7a/owtf/blob/master/plugins/web/grep/Application_Configuration_Management%40OWASP-CM-004.py

Where regular expressions (yeah, we should review those XD) are defined here:
https://github.com/7a/owtf/blob/master/framework/config/framework_config.cfg

I think the pattern to look for is ".validationexpression" based examples from:

http://msdn.microsoft.com/en-us/magazine/ff646973.aspx
http://www.abemiester.com/AbeMiester/post/RegEx-DOS-attack-Regular-Expressions-Now-you-have-3-problems.aspx

Examples of bad regexes (external plugin?):
https://github.com/EnDe/ReDoS/blob/master/ReDoS.txt

More background:
https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
http://en.wikipedia.org/wiki/ReDoS
http://www.slideshare.net/source-code-analysis/redos-regular-expression-denial-of-service-attacks
http://www.cs.bham.ac.uk/~hxt/research/reg-exp-sec.pdf

Interesting: Ruby also seems affected but not PHP
http://www.mail-archive.com/[email protected]/msg00683.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant