Fix carve misses on __COMPRESSED_VSTATE fields - #430
Merged
Merged
Conversation
- add __COMPRESSED_VSTATE to the compressed viewstate carve regex and YARA prefilter; it was in neither, so pages using that field name were never detected - _carve_body walks re.finditer instead of taking only re.search's first match, so an empty decoy __VIEWSTATE no longer shadows a real payload - reshape the aspnet_compressedviewstate and jsf_viewstate carve regexes to assert the field name in a lookahead: allows attributes between name= and value=, and fixes quadratic backtracking
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #430 +/- ##
==========================================
+ Coverage 99.45% 99.46% +0.01%
==========================================
Files 30 30
Lines 3102 3189 +87
==========================================
+ Hits 3085 3172 +87
Misses 17 17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
__COMPRESSED_VSTATEto theaspnet_compressedviewstatecarve regex and YARA prefilter. It was in neither, so pages using that field name were never detected._carve_bodywalksre.finditerinstead of taking onlyre.search's first match, so an empty decoy__VIEWSTATEno longer shadows a real payload.aspnet_compressedviewstateandjsf_viewstatecarve regexes to assert the field name in a lookahead: allows attributes betweenname=andvalue=, and fixes quadratic backtracking.8 new tests in
tests/aspnet_compressedviewstate_test.py. Full suite: 480 passed.