-
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
Sigma Aggregation rule fixes #622
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -349,6 +349,7 @@ public static String productIndexMaxAggRule() { | |
|
||
public static String randomProductDocument(){ | ||
return "{\n" + | ||
" \"name\": \"laptop\",\n" + | ||
" \"fieldA\": 123,\n" + | ||
" \"mappedB\": 111,\n" + | ||
" \"fieldC\": \"valueC\"\n" + | ||
|
@@ -560,6 +561,9 @@ public static String netFlowMappings() { | |
|
||
public static String productIndexMapping(){ | ||
return "\"properties\":{\n" + | ||
" \"name\":{\n" + | ||
" \"type\":\"keyword\"\n" + | ||
" },\n" + | ||
" \"fieldA\":{\n" + | ||
" \"type\":\"long\"\n" + | ||
" },\n" + | ||
|
@@ -588,13 +592,32 @@ public static String productIndexAvgAggRule(){ | |
" category: test_category\n" + | ||
" product: test_product\n" + | ||
" detection:\n" + | ||
" timeframe: 5m\n" + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to add documentation or does sigma have a format which we support for timevalue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sigma has a format which supports |
||
" sel:\n" + | ||
" fieldA: 123\n" + | ||
" fieldB: 111\n" + | ||
" fieldC: valueC\n" + | ||
" condition: sel | avg(fieldA) by fieldC > 110"; | ||
} | ||
|
||
public static String productIndexCountAggRule(){ | ||
return " title: Test\n" + | ||
" id: 39f918f3-981b-4e6f-a975-8af7e507ef2b\n" + | ||
" status: test\n" + | ||
" level: critical\n" + | ||
" description: Detects QuarksPwDump clearing access history in hive\n" + | ||
" author: Florian Roth\n" + | ||
" date: 2017/05/15\n" + | ||
" logsource:\n" + | ||
" category: test_category\n" + | ||
" product: test_product\n" + | ||
" detection:\n" + | ||
" timeframe: 5m\n" + | ||
" sel:\n" + | ||
" name: laptop\n" + | ||
" condition: sel | count(*) by name > 2"; | ||
} | ||
|
||
public static String randomAggregationRule(String aggFunction, String signAndValue) { | ||
String rule = "title: Remote Encrypting File System Abuse\n" + | ||
"id: 5f92fff9-82e2-48eb-8fc1-8b133556a551\n" + | ||
|
@@ -616,6 +639,7 @@ public static String randomAggregationRule(String aggFunction, String signAndVa | |
" category: application\n" + | ||
" definition: 'Requirements: install and apply the RPC Firewall to all processes with \"audit:true action:block uuid:df1941c5-fe89-4e79-bf10-463657acf44d or c681d488-d850-11d0-8c52-00c04fd90f7e'\n" + | ||
"detection:\n" + | ||
" timeframe: 5m\n" + | ||
" sel:\n" + | ||
" Opcode: Info\n" + | ||
" condition: sel | %s(SeverityValue) by Version %s\n" + | ||
|
@@ -646,6 +670,7 @@ public static String randomAggregationRule(String aggFunction, String signAndVa | |
" category: application\n" + | ||
" definition: 'Requirements: install and apply the RPC Firewall to all processes with \"audit:true action:block uuid:df1941c5-fe89-4e79-bf10-463657acf44d or c681d488-d850-11d0-8c52-00c04fd90f7e'\n" + | ||
"detection:\n" + | ||
" timeframe: 5m\n" + | ||
" sel:\n" + | ||
" Opcode: %s\n" + | ||
" condition: sel | %s(SeverityValue) by Version %s\n" + | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if timeframe is not set is there a default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fixed this.