#683 Sigma keywords field not handled correctly#725
#683 Sigma keywords field not handled correctly#725eirsep merged 9 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Joanne Wang <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
|
Thanks for making this change @jowg-amazon. Have we tested with a sigma rule where condition has Can you add a test to verify this scenario doens't fail and simply doesn't generate findings? |
Signed-off-by: Joanne Wang <jowg@amazon.com>
| " selection:\n" + | ||
| " EventID: 21\n" + | ||
| " keywords:\n" + | ||
| " - \"2020-02-04T14:59:39.343541+00:00\"\n" + |
There was a problem hiding this comment.
why are we explicitly adding double quotes to the values in the conditions.. in this the data 2020-02-04T14:59:39.343541+00:00
why can't it just be
" keywords:\n" +
" - 2020-02-04T14:59:39.343541+00:00\n" +
There was a problem hiding this comment.
We don't support 2020-02-04T14:59:39.343541+00:00 itself as a field even for non keywords values. I think date types have to be surrounded by either single or double quotes otherwise it throws a parsing exception.
* changed windows sample rule and query construction Signed-off-by: Joanne Wang <jowg@amazon.com> * remove wildcard Signed-off-by: Joanne Wang <jowg@amazon.com> * changed wildcardtest Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcards Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcard query test Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed correlation engine tests Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed query backend tests Signed-off-by: Joanne Wang <jowg@amazon.com> * clean up Signed-off-by: Joanne Wang <jowg@amazon.com> * added two integration tests Signed-off-by: Joanne Wang <jowg@amazon.com> --------- Signed-off-by: Joanne Wang <jowg@amazon.com> (cherry picked from commit 43040d6)
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.11 2.11
# Navigate to the new working tree
cd .worktrees/backport-2.11
# Create a new branch
git switch --create backport/backport-725-to-2.11
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.11
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.11Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.7 2.7
# Navigate to the new working tree
cd .worktrees/backport-2.7
# Create a new branch
git switch --create backport/backport-725-to-2.7
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.7
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.7Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.9 2.9
# Navigate to the new working tree
cd .worktrees/backport-2.9
# Create a new branch
git switch --create backport/backport-725-to-2.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.9
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.9Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.5 2.5
# Navigate to the new working tree
cd .worktrees/backport-2.5
# Create a new branch
git switch --create backport/backport-725-to-2.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.5Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.8 2.8
# Navigate to the new working tree
cd .worktrees/backport-2.8
# Create a new branch
git switch --create backport/backport-725-to-2.8
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.8
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.8Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.6 2.6
# Navigate to the new working tree
cd .worktrees/backport-2.6
# Create a new branch
git switch --create backport/backport-725-to-2.6
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.6
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.6Then, create a pull request where the |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.10 2.10
# Navigate to the new working tree
cd .worktrees/backport-2.10
# Create a new branch
git switch --create backport/backport-725-to-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 43040d6c8c6685c5bd484f736d76ed3367f4e8c4
# Push it to GitHub
git push --set-upstream origin backport/backport-725-to-2.10
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.10Then, create a pull request where the |
* changed windows sample rule and query construction Signed-off-by: Joanne Wang <jowg@amazon.com> * remove wildcard Signed-off-by: Joanne Wang <jowg@amazon.com> * changed wildcardtest Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcards Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcard query test Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed correlation engine tests Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed query backend tests Signed-off-by: Joanne Wang <jowg@amazon.com> * clean up Signed-off-by: Joanne Wang <jowg@amazon.com> * added two integration tests Signed-off-by: Joanne Wang <jowg@amazon.com> --------- Signed-off-by: Joanne Wang <jowg@amazon.com> (cherry picked from commit 43040d6) Co-authored-by: Joanne Wang <109310487+jowg-amazon@users.noreply.github.com>
* * changed windows sample rule and query construction Signed-off-by: Joanne Wang <jowg@amazon.com> * remove wildcard Signed-off-by: Joanne Wang <jowg@amazon.com> * changed wildcardtest Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcards Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcard query test Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed correlation engine tests Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed query backend tests Signed-off-by: Joanne Wang <jowg@amazon.com> * clean up Signed-off-by: Joanne Wang <jowg@amazon.com> * added two integration tests Signed-off-by: Joanne Wang <jowg@amazon.com> --------- Signed-off-by: Joanne Wang <jowg@amazon.com> * fix integTest Signed-off-by: Joanne Wang <jowg@amazon.com> --------- Signed-off-by: Joanne Wang <jowg@amazon.com>
* * changed windows sample rule and query construction Signed-off-by: Joanne Wang <jowg@amazon.com> * remove wildcard Signed-off-by: Joanne Wang <jowg@amazon.com> * changed wildcardtest Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcards Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed wildcard query test Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed correlation engine tests Signed-off-by: Joanne Wang <jowg@amazon.com> * fixed query backend tests Signed-off-by: Joanne Wang <jowg@amazon.com> * clean up Signed-off-by: Joanne Wang <jowg@amazon.com> * added two integration tests Signed-off-by: Joanne Wang <jowg@amazon.com> --------- Signed-off-by: Joanne Wang <jowg@amazon.com> * fix integ test Signed-off-by: Joanne Wang <jowg@amazon.com> --------- Signed-off-by: Joanne Wang <jowg@amazon.com>
Description
Changes the query construction of keywords in sigma rules from
(_0:"value")to("value")to create a query string query without a designated field so that the keywords are instead matched against all the fields in a document.Issues Resolved
#683
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.