Skip to content

Fix carve misses on __COMPRESSED_VSTATE fields - #430

Merged
liquidsec merged 1 commit into
devfrom
fix/compressed-viewstate-carve
Aug 4, 2026
Merged

liquidsec merged 1 commit into
devfrom
fix/compressed-viewstate-carve

Conversation

@liquidsec

Copy link
Copy Markdown
Collaborator
  • Add __COMPRESSED_VSTATE to the aspnet_compressedviewstate 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.

8 new tests in tests/aspnet_compressedviewstate_test.py. Full suite: 480 passed.

- 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-commenter

codecov-commenter commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.46%. Comparing base (03956a2) to head (38d586f).
⚠️ Report is 7 commits behind head on dev.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liquidsec
liquidsec merged commit 2bcb51e into dev Aug 4, 2026
9 checks passed
@liquidsec
liquidsec deleted the fix/compressed-viewstate-carve branch August 4, 2026 13:12
@liquidsec liquidsec mentioned this pull request Aug 4, 2026
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

Successfully merging this pull request may close these issues.

2 participants