-
Notifications
You must be signed in to change notification settings - Fork 76
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
[BUG] Sigma keywords field not handled correctly #683
Labels
bug
Something isn't working
Comments
1 task
5 tasks
5 tasks
eirsep
pushed a commit
that referenced
this issue
Nov 29, 2023
* changed windows sample rule and query construction Signed-off-by: Joanne Wang <[email protected]> * remove wildcard Signed-off-by: Joanne Wang <[email protected]> * changed wildcardtest Signed-off-by: Joanne Wang <[email protected]> * fixed wildcards Signed-off-by: Joanne Wang <[email protected]> * fixed wildcard query test Signed-off-by: Joanne Wang <[email protected]> * fixed correlation engine tests Signed-off-by: Joanne Wang <[email protected]> * fixed query backend tests Signed-off-by: Joanne Wang <[email protected]> * clean up Signed-off-by: Joanne Wang <[email protected]> * added two integration tests Signed-off-by: Joanne Wang <[email protected]> --------- Signed-off-by: Joanne Wang <[email protected]>
opensearch-trigger-bot bot
pushed a commit
that referenced
this issue
Nov 29, 2023
* changed windows sample rule and query construction Signed-off-by: Joanne Wang <[email protected]> * remove wildcard Signed-off-by: Joanne Wang <[email protected]> * changed wildcardtest Signed-off-by: Joanne Wang <[email protected]> * fixed wildcards Signed-off-by: Joanne Wang <[email protected]> * fixed wildcard query test Signed-off-by: Joanne Wang <[email protected]> * fixed correlation engine tests Signed-off-by: Joanne Wang <[email protected]> * fixed query backend tests Signed-off-by: Joanne Wang <[email protected]> * clean up Signed-off-by: Joanne Wang <[email protected]> * added two integration tests Signed-off-by: Joanne Wang <[email protected]> --------- Signed-off-by: Joanne Wang <[email protected]> (cherry picked from commit 43040d6)
jowg-amazon
added a commit
that referenced
this issue
Jan 17, 2024
* changed windows sample rule and query construction Signed-off-by: Joanne Wang <[email protected]> * remove wildcard Signed-off-by: Joanne Wang <[email protected]> * changed wildcardtest Signed-off-by: Joanne Wang <[email protected]> * fixed wildcards Signed-off-by: Joanne Wang <[email protected]> * fixed wildcard query test Signed-off-by: Joanne Wang <[email protected]> * fixed correlation engine tests Signed-off-by: Joanne Wang <[email protected]> * fixed query backend tests Signed-off-by: Joanne Wang <[email protected]> * clean up Signed-off-by: Joanne Wang <[email protected]> * added two integration tests Signed-off-by: Joanne Wang <[email protected]> --------- Signed-off-by: Joanne Wang <[email protected]> (cherry picked from commit 43040d6) Co-authored-by: Joanne Wang <[email protected]>
riysaxen-amzn
pushed a commit
to riysaxen-amzn/security-analytics
that referenced
this issue
Feb 20, 2024
* fixed abbreviations Signed-off-by: Amardeepsingh Siglani <[email protected]> * fixed log type name validation Signed-off-by: Amardeepsingh Siglani <[email protected]> --------- Signed-off-by: Amardeepsingh Siglani <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the bug?
Sigma rules with "keywords" as a field under detection section generate broken queries where the field being queried is an index number (0, 1, 2 and so on)
Example:
Possible CVE-2021-1675 Print Spooler Exploitation (A prepackaged rule) has this Sigma Detection field:
The query is then translated to this:
((((winlog.event_id: 808) OR (winlog.event_id: 4909)) AND ((winlog.event_data.ErrorCode: "0x45A") OR (winlog.event_data.ErrorCode: "0x7e"))) OR ((_21: "The_ws_print_ws_spooler_ws_failed_ws_to_ws_load_ws_a_ws_plug\-in_ws_module") OR (_22: "MyExploit.dll") OR (_23: "evil.dll") OR (_24: "\\addCube.dll") OR (_25: "\\rev.dll") OR (_26: "\\rev2.dll") OR (_27: "\\main64.dll") OR (_28: "\\mimilib.dll") OR (_29: "\\mimispool.dll"))) AND ((NOT _30: "_ws_registration_ws_timed_ws_out"))
Where the fields from keyword are incremental numbers preceded by _ (This bug happens for multiple rules, I am pulling just one out of sequence here)
The same bug happens when you duplicate this standard rule with slightly different results.
The YAML for the rule after duplication is changed to this:
Which is reflected in GUI like this:
This also occurs when you upload a rule via the custom rule API.
How can one reproduce the bug?
Steps to reproduce the behavior:
POST /_plugins/_security_analytics/rules/_search?pre_packaged=true
What is the expected behavior?
Sigma rules with the keywords field under detection section to be properly translated to a query that can be used by the Security Analytics plugin.
What is your host/environment?
Thanks,
Jay
The text was updated successfully, but these errors were encountered: