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

False negative: /^.*.*.*a.*$/ #7

Open
ChALkeR opened this issue Feb 28, 2018 · 6 comments
Open

False negative: /^.*.*.*a.*$/ #7

ChALkeR opened this issue Feb 28, 2018 · 6 comments

Comments

@ChALkeR
Copy link

ChALkeR commented Feb 28, 2018

Enter a regular expression to analyze:
/^.*.*.*a.*$/
3. pattern = "^.*.*.*a.*$"
NFA constructed in: 1ms
EDA analysis performed in: 12ms
Does not contain EDA
IDA analysis performed in: 792ms
Does not contain IDA
Total analysis time: 805

False negatives: /^.*.*.*a.*$/, /^.*.*a.*$/. Obviously block on a long string of non-a characters.
Ok: /^.*.*.*a$/, /^.*.*a$/, /^.*.*.*a/, etc.

Looks like .* at the end confuses the tool in some cases.
/cc @davisjam

@davisjam
Copy link
Contributor

How are you invoking?

With driver.Main -i /tmp/query-weideman-RegexStaticAnalysis-32079.regex --test-eda-exploit-string=false --ida=true --timeout=0 --simple I get a three-pump attack recommendation. The attack string exhibits catastrophic backtracking in java.

@ChALkeR
Copy link
Author

ChALkeR commented Feb 28, 2018

@davisjam I launched ./run.sh 😝

@davisjam
Copy link
Contributor

Ah, I never trust the user interface!

@ChALkeR
Copy link
Author

ChALkeR commented Feb 28, 2018

@davisjam Apparently, --simple changes the result.

To clarify: it works correctly with --simple, but gives wrong output when not using --simple.

@davisjam
Copy link
Contributor

The flags are somewhat a mystery to me. I picked the ones I posted above because they seemed to work ;-).

@davisjam
Copy link
Contributor

If @NicolaasWeideman were to post recommendations if multiple variations of flags would be suitable that would be great. No need for dynamic validation since we're interested in JavaScript behavior anyway. But if alternatives to the flags I listed above might result in other vulnerabilities I'd love to hear it.

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

2 participants