-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Security analytics latest tests (#825)
* updated tests Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * excluded a couple tests; fixed alerts tests Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * dummy change to trigger tests Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * Updated cypress commands to avoid duplication (#835) * updated commands to avoid duplication Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * updated command header for create rule; changed url for searching rules Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * fix linter issues Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * updated mappings for test index (#841) Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * avoid clicking filter menu btn twice (#849) Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * removed check for url since it differs with and without security (#863) Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * namespaced all commands; updated tests for 2.11 Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> * addressed PR comments Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com> --------- Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
- Loading branch information
Showing
30 changed files
with
2,079 additions
and
1,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 3 additions & 19 deletions
22
...ytics-dashboards-plugin/integration_tests/detector/create_usb_detector_mappings_data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,12 @@ | ||
{ | ||
"properties": { | ||
"event_uid": { | ||
"winlog.event_id": { | ||
"type": "alias", | ||
"path": "EventID" | ||
}, | ||
"windows-event_data-CommandLine": { | ||
"winlog-provider_name": { | ||
"type": "alias", | ||
"path": "CommandLine" | ||
}, | ||
"windows-hostname": { | ||
"type": "alias", | ||
"path": "HostName" | ||
}, | ||
"windows-message": { | ||
"type": "alias", | ||
"path": "Message" | ||
}, | ||
"windows-provider-name": { | ||
"type": "alias", | ||
"path": "Provider_Name" | ||
}, | ||
"windows-servicename": { | ||
"type": "alias", | ||
"path": "ServiceName" | ||
"path": "winlog.provider_name" | ||
} | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...gins/security-analytics-dashboards-plugin/integration_tests/index/add_dns_index_data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"DnsAnswerType": "QWE", | ||
"DnsQuestionRegisteredDomain": "EC2AMAZ-EPWO7HKA", | ||
"DnsQuestionName": "QWE" | ||
"dns.answers.type": "AnswerType", | ||
"dns.question.registered_domain": "EC2AMAZ-EPWO7HKA", | ||
"dns.question.name": "QuestionName" | ||
} |
38 changes: 1 addition & 37 deletions
38
.../security-analytics-dashboards-plugin/integration_tests/index/add_windows_index_data.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,3 @@ | ||
{ | ||
"EventTime": "2020-02-04T14:59:39.343541+00:00", | ||
"HostName": "EC2AMAZ-EPO7HKA", | ||
"Keywords": "9223372036854775808", | ||
"SeverityValue": 2, | ||
"Severity": "ERROR", | ||
"EventID": 2003, | ||
"SourceName": "Microsoft-Windows-Sysmon", | ||
"ProviderGuid": "{5770385F-C22A-43E0-BF4C-06F5698FFBD9}", | ||
"Version": 5, | ||
"TaskValue": 22, | ||
"OpcodeValue": 0, | ||
"RecordNumber": 9532, | ||
"ExecutionProcessID": 1996, | ||
"ExecutionThreadID": 2616, | ||
"Channel": "Microsoft-Windows-Sysmon/Operational", | ||
"Domain": "NT AUTHORITY", | ||
"AccountName": "SYSTEM", | ||
"UserID": "S-1-5-18", | ||
"AccountType": "User", | ||
"Message": "Dns query:\r\nRuleName: \r\nUtcTime: 2020-02-04 14:59:38.349\r\nProcessGuid: {b3c285a4-3cda-5dc0-0000-001077270b00}\r\nProcessId: 1904\r\nQueryName: EC2AMAZ-EPO7HKA\r\nQueryStatus: 0\r\nQueryResults: 172.31.46.38;\r\nImage: C:\\Program Files\\nxlog\\nxlog.exe", | ||
"Category": "Dns query (rule: DnsQuery)", | ||
"Opcode": "Info", | ||
"UtcTime": "2020-02-04 14:59:38.349", | ||
"ProcessGuid": "{b3c285a4-3cda-5dc0-0000-001077270b00}", | ||
"ProcessId": "1904", | ||
"QueryName": "EC2AMAZ-EPO7HKA", | ||
"QueryStatus": "0", | ||
"QueryResults": "172.31.46.38;", | ||
"Image": "C:\\Program Files\\nxlog\\regsvr32.exe", | ||
"EventReceivedTime": "2020-02-04T14:59:40.780905+00:00", | ||
"SourceModuleName": "in", | ||
"SourceModuleType": "im_msvistalog", | ||
"CommandLine": "eachtest", | ||
"Initiated": "true", | ||
"Provider_Name": "Service_ws_Control_ws_Manager", | ||
"TargetObject": "\\SOFTWARE\\Microsoft\\Office\\Outlook\\Security", | ||
"EventType": "SetValue" | ||
"EventID": "2003" | ||
} |
6 changes: 3 additions & 3 deletions
6
...ins/security-analytics-dashboards-plugin/integration_tests/index/create_dns_settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 1 addition & 13 deletions
14
...security-analytics-dashboards-plugin/integration_tests/index/create_windows_settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...alytics-dashboards-plugin/integration_tests/rule/create_dns_rule_with_type_selection.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"id": "25b9c01c-350d-4b95-bed1-836d04a4f325", | ||
"category": "dns", | ||
"title": "Cypress DNS Type Rule", | ||
"description": "Detects DNS type as QWE", | ||
"status": "experimental", | ||
"author": "Cypress Tests", | ||
"references": [ | ||
{ | ||
"value": "" | ||
} | ||
], | ||
"tags": [ | ||
{ | ||
"value": "dns.high" | ||
} | ||
], | ||
"log_source": "", | ||
"detection": "selection:\n dns-answers-type:\n - AnswerType\ncondition: selection", | ||
"level": "high", | ||
"false_positives": [ | ||
{ | ||
"value": "" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ecurity-analytics-dashboards-plugin/integration_tests/rule/sample_dns_field_mappings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dns-question-registered_domain": "dns.question.registered_domain", | ||
"dns-question-name": "dns.question.name", | ||
"dns-answers-type": "dns.answers.type" | ||
} |
12 changes: 2 additions & 10 deletions
12
cypress/fixtures/plugins/security-analytics-dashboards-plugin/sample_alias_mappings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
{ | ||
"properties": { | ||
"source_ip": { | ||
"winlog.event_id": { | ||
"type": "alias", | ||
"path": "src_ip" | ||
}, | ||
"windows-event_data-CommandLine": { | ||
"path": "CommandLine", | ||
"type": "alias" | ||
}, | ||
"event_uid": { | ||
"path": "EventID", | ||
"type": "alias" | ||
"path": "EventID" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
cypress/fixtures/plugins/security-analytics-dashboards-plugin/sample_dns_index_settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"mappings": { | ||
"properties": { | ||
"dns.question.name": { | ||
"type": "text" | ||
}, | ||
"dns.answers.type": { | ||
"type": "text" | ||
}, | ||
"dns.question.registered_domain": { | ||
"type": "text" | ||
} | ||
} | ||
}, | ||
"settings": { | ||
"index": { | ||
"number_of_shards": "1", | ||
"number_of_replicas": "1" | ||
} | ||
} | ||
} |
38 changes: 1 addition & 37 deletions
38
cypress/fixtures/plugins/security-analytics-dashboards-plugin/sample_document.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,3 @@ | ||
{ | ||
"EventTime": "2020-02-04T14:59:39.343541+00:00", | ||
"HostName": "EC2AMAZ-EPO7HKA", | ||
"Keywords": "9223372036854775808", | ||
"SeverityValue": 2, | ||
"Severity": "INFO", | ||
"EventID": 2003, | ||
"SourceName": "Microsoft-Windows-Sysmon", | ||
"ProviderGuid": "{5770385F-C22A-43E0-BF4C-06F5698FFBD9}", | ||
"Version": 5, | ||
"TaskValue": 22, | ||
"OpcodeValue": 0, | ||
"RecordNumber": 9532, | ||
"ExecutionProcessID": 1996, | ||
"ExecutionThreadID": 2616, | ||
"Channel": "Microsoft-Windows-Sysmon/Operational", | ||
"Domain": "NT AUTHORITY", | ||
"AccountName": "SYSTEM", | ||
"UserID": "S-1-5-18", | ||
"AccountType": "User", | ||
"Message": "Dns query:\r\nRuleName: \r\nUtcTime: 2020-02-04 14:59:38.349\r\nProcessGuid: {b3c285a4-3cda-5dc0-0000-001077270b00}\r\nProcessId: 1904\r\nQueryName: EC2AMAZ-EPO7HKA\r\nQueryStatus: 0\r\nQueryResults: 172.31.46.38;\r\nImage: C:\\Program Files\\nxlog\\nxlog.exe", | ||
"Category": "Dns query (rule: DnsQuery)", | ||
"Opcode": "Info", | ||
"UtcTime": "2020-02-04 14:59:38.349", | ||
"ProcessGuid": "{b3c285a4-3cda-5dc0-0000-001077270b00}", | ||
"ProcessId": "1904", | ||
"QueryName": "EC2AMAZ-EPO7HKA", | ||
"QueryStatus": "0", | ||
"QueryResults": "172.31.46.38;", | ||
"Image": "C:\\Program Files\\nxlog\\regsvr32.exe", | ||
"EventReceivedTime": "2020-02-04T14:59:40.780905+00:00", | ||
"SourceModuleName": "in", | ||
"SourceModuleType": "im_msvistalog", | ||
"CommandLine": "eachtest", | ||
"Initiated": "true", | ||
"Provider_Name": "Microsoft-Windows-Kernel-General", | ||
"TargetObject": "\\SOFTWARE\\Microsoft\\Office\\Outlook\\Security", | ||
"EventType": "SetValue" | ||
"EventID": 2003 | ||
} |
Oops, something went wrong.