Add vpatch-CVE-2022-25322 rule and test #1532
Open
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.
This rule targets SQL injection attempts in the ZEROF Web Server 2.0, specifically on the
/HandleEventendpoint. The nuclei template shows that the vulnerable parameter isO33in the POST body, which is manipulated to include a single quote (') to trigger SQL errors./HandleEventendpoint, using a case-insensitive comparison (lowercasetransform).O33parameter in the POST body (BODY_ARGS), applying bothlowercaseandurldecodetransforms to ensure normalization and to catch encoded payloads. It matches if the value contains a single quote, a common SQL injection indicator.labelssection includes the correct CVE, ATT&CK, and CWE references, and the product/vuln class label is formatted as required.The test nuclei template is adapted to send a POST request with the vulnerable parameter and expects a 403 response, as per the detection rule. All
value:fields are lowercase, and the rule usescontainsfor the SQL metacharacter, as per guidelines. No regex is used where a simplecontainssuffices, and all transforms are present for case insensitivity and decoding.