-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rebase release-3-1-0 from release-3-0-0 (#1109)
* Docs/general update (#1076) * Updated terraform version and git branch Signed-off-by: jack1902 <[email protected]> * removed step no longer required, as the choices are dynamically created based on the @StreamAlertOutput class decorator Signed-off-by: jack1902 <[email protected]> * reset to stable and changed note Signed-off-by: jack1902 <[email protected]> * [docs] Correcting URL in contributing.rst as previous a HTTP 404 error (#1081) Signed-off-by: jack1902 <[email protected]> * [core] Fix a parser bug when processing raw event encapsulated in a string (#1085) see issue: #1084 for more information Signed-off-by: jack1902 <[email protected]> * [unit test] Use single quote around strings (#1087) * [core] Adding trendmicro malware schema and rule (#1077) [testing] Added trendmicro schema and rule test Signed-off-by: jack1902 <[email protected]> * [terraform] Implemented a fix for the count error (#1089) [testing] fixed test for rules_engine assertion Signed-off-by: jack1902 <[email protected]> * [terraform] fixed destroy issue by reverting #1060 (#1093) This in-turn re-introduced #1047. I fixed this by ensuring that the cleanup function removes the metric_filters.tf.json file, otherwise terraform reads this in as part of its deployment. Signed-off-by: jack1902 <[email protected]> * [testing] enable trend tests, previously only schema (#1096) Signed-off-by: jack1902 <[email protected]> * [rule] Fix cloudtrail_public_resources (#1102) Signed-off-by: jack1902 <[email protected]> * [core] Updated cloudtrail:events optional_key (#1101) Updated the optional_top_level_keys for cloudtrail:events Signed-off-by: jack1902 <[email protected]> * [core] Added trendmicro normalized_types (#1105) Signed-off-by: jack1902 <[email protected]> * [outputs] add Microsoft Teams as an alerting output (#1079) * [core] Initial Microsoft Teams output code commit, looking for feedback Signed-off-by: jack1902 <[email protected]> * [testing] added TeamsOutput Testing (used slack tests as template), ammended list for output_base aswell Signed-off-by: jack1902 <[email protected]> * [docs] added Microsoft Teams to output documentation [setup] added pymsteams to reuirements-top-level and added sample-webhook to outputs.json Signed-off-by: jack1902 <[email protected]> * [core] Moved pymsteams to package.py [docs] Corrected docstring for teams and added teams to outputs [core] Added Alert section to card (didn't have the alert_id which made it confusing previously) [testing] re-wrote the tests Signed-off-by: jack1902 <[email protected]> * [core] Added dynamic_outputs to Rule (#1095) * Now possible to pass dynamic_outputs to the @rule decorator and have outputs be dynamically configured based on information in the record. For example, you could use lookup_tables to map an account_id to an owner which maps to an output [testing] Updated unit tests and added additional tests for new dynamic_outputs [docs] Added dynamic_outputs documentation Signed-off-by: jack1902 <[email protected]> * [core] added aws-ses as an output (#1082) [testing] added aws-ses output tests [docs] updated docs/source/outputs.rst to include aws ses [terraform] Added ses:SendRawEmail to tf_alert_processor_iam Signed-off-by: jack1902 <[email protected]> * [docs] added aws-ses to outputs.rst (#1103) Signed-off-by: jack1902 <[email protected]> * threat_intel_downloader module now uses tf_lambda module (#1074) * threat intel downloader terraform module now uses tf_lambda * small cleanups make for happier linters * fixed some stale references in the threat_intel_downloader terraform module Co-authored-by: jack1902 <[email protected]> Co-authored-by: darkjokelady <[email protected]> Co-authored-by: Garret Reece <[email protected]>
- Loading branch information
1 parent
3540535
commit e82ef59
Showing
20 changed files
with
249 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,5 +243,10 @@ | |
"srcuser", | ||
"dstuser" | ||
] | ||
}, | ||
"trendmicro": { | ||
"sourceAccount": [ | ||
"HostOwnerID" | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"trendmicro:malwareevent": { | ||
"configuration": { | ||
"json_path": "[*]", | ||
"optional_top_level_keys": [ | ||
"AMTarget", | ||
"AMTargetType", | ||
"ContainerID", | ||
"CreationTime", | ||
"DetectedSHA1", | ||
"InfectedFilePath", | ||
"ModificationTime" | ||
] | ||
}, | ||
"parser": "json", | ||
"schema": { | ||
"AMTarget": "string", | ||
"AMTargetType": "string", | ||
"AMTargetTypeString": "string", | ||
"ATSEDetectionLevel": "integer", | ||
"ContainerID": "string", | ||
"CreationTime": "string", | ||
"DetectedSHA1": "string", | ||
"EngineType": "integer", | ||
"EngineVersion": "string", | ||
"ErrorCode": "integer", | ||
"EventID": "integer", | ||
"EventType": "string", | ||
"HostAgentGUID": "string", | ||
"HostAgentVersion": "string", | ||
"HostCloudType": "string", | ||
"HostGroupID": "integer", | ||
"HostGroupName": "string", | ||
"HostID": "integer", | ||
"HostInstanceID": "string", | ||
"HostOS": "string", | ||
"HostOwnerID": "string", | ||
"HostSecurityPolicyID": "integer", | ||
"HostSecurityPolicyName": "string", | ||
"Hostname": "string", | ||
"InfectedFilePath": "string", | ||
"LogDate": "string", | ||
"MajorVirusType": "integer", | ||
"MajorVirusTypeString": "string", | ||
"MalwareName": "string", | ||
"MalwareType": "integer", | ||
"ModificationTime": "string", | ||
"Origin": "integer", | ||
"OriginString": "string", | ||
"PatternVersion": "string", | ||
"Protocol": "integer", | ||
"Reason": "string", | ||
"ScanAction1": "integer", | ||
"ScanAction2": "integer", | ||
"ScanResultAction1": "integer", | ||
"ScanResultAction2": "integer", | ||
"ScanResultString": "string", | ||
"ScanType": "integer", | ||
"ScanTypeString": "string", | ||
"Tags": "string", | ||
"TenantID": "integer", | ||
"TenantName": "string" | ||
} | ||
} | ||
} |
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
Empty file.
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,14 @@ | ||
"""Alert on TrendMicro Malware events""" | ||
from streamalert.shared.rule import rule | ||
|
||
|
||
@rule(logs=['trendmicro:malwareevent']) | ||
def trendmicro_malware_event(_): | ||
""" | ||
author: jack (jack1902) | ||
description: Trend Micro identified malware on an agent | ||
testing: (a) Log on to a machine where Trend Agent is active | ||
(b) Upload EICAR Test File: | ||
http://docs.trendmicro.com/all/ent/de/v1.5/en-us/de_1.5_olh/ctm_ag/ctm1_ag_ch8/t_test_eicar_file.htm | ||
""" | ||
return True |
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
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
41 changes: 41 additions & 0 deletions
41
tests/integration/rules/cloudtrail/cloudtrail_quicksight.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,41 @@ | ||
[ | ||
{ | ||
"data": { | ||
"Records": [ | ||
{ | ||
"eventVersion": "1.05", | ||
"userIdentity": { | ||
"arn": "arn", | ||
"accountId": "accountId", | ||
"userName": "userName", | ||
"type": "type" | ||
}, | ||
"eventTime": "eventTime", | ||
"eventSource": "quicksight.amazonaws.com", | ||
"eventName": "QueryDatabase", | ||
"awsRegion": "awsRegion", | ||
"requestParameters": null, | ||
"responseElements": null, | ||
"eventID": "eventID", | ||
"readOnly": true, | ||
"eventType": "AwsServiceEvent", | ||
"recipientAccountId": "recipientAccountId", | ||
"serviceEventDetails": { | ||
"eventRequestDetails": { | ||
"dataSourceId": "dataSourceId", | ||
"queryId": "queryId", | ||
"resourceId": "resourceId", | ||
"dataSetId": "dataSetId", | ||
"dataSetMode": "dataSetMode" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"description": "quicksight event via cloudtrail", | ||
"log": "cloudtrail:events", | ||
"service": "s3", | ||
"source": "prefix.cluster.sample.bucket", | ||
"validate_schema_only": true | ||
} | ||
] |
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,57 @@ | ||
[ | ||
{ | ||
"data": "[{\"AMTargetTypeString\":\"N/A\",\"ATSEDetectionLevel\":0,\"CreationTime\":\"2019-07-16T09:34:31.000Z\",\"EngineType\":12345,\"EngineVersion\":\"version.number\",\"ErrorCode\":0,\"EventID\":1,\"EventType\":\"AntiMalwareEvent\",\"HostAgentGUID\":\"VALID_GUID\",\"HostAgentVersion\":\"VALID.AGENT.VERSION\",\"HostCloudType\":\"amazon\",\"HostGroupID\":1,\"HostGroupName\":\"test.eu-west-1a (subnet-test))\",\"HostID\":1,\"HostInstanceID\":\"i-fffffffffffffffff\",\"HostOS\":\"VALID_HOST_OS\",\"HostOwnerID\":\"123456789012\",\"HostSecurityPolicyID\":1,\"HostSecurityPolicyName\":\"POLICY_NAME\",\"Hostname\":\"HOSTNAME.eu-west-1.compute.amazonaws.com (SERVER NAME) [i-fffffffffffffffff]\",\"InfectedFilePath\":\"/tmp/virus\",\"LogDate\":\"2019-07-16T09:34:31.000Z\",\"MajorVirusType\":2,\"MajorVirusTypeString\":\"Virus\",\"MalwareName\":\"Eicar_test_file\",\"MalwareType\":1,\"ModificationTime\":\"2019-07-16T09:34:31.000Z\",\"Origin\":0,\"OriginString\":\"Agent\",\"PatternVersion\":\"PATTERN.VERSION\",\"Protocol\":0,\"Reason\":\"Advanced Real-Time Scan Configuration\",\"ScanAction1\":4,\"ScanAction2\":3,\"ScanResultAction1\":-81,\"ScanResultAction2\":0,\"ScanResultString\":\"Quarantined\",\"ScanType\":0,\"ScanTypeString\":\"Real Time\",\"Tags\":\"\",\"TenantID\":0,\"TenantName\":\"Primary\"}]", | ||
"description": "Triggers an alert caused by trend malware event for Eicar_test_file", | ||
"log": "trendmicro:malwareevent", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"validate_schema_only": false, | ||
"trigger_rules": [ | ||
"trendmicro_malware_event" | ||
] | ||
}, | ||
{ | ||
"data": "[{\"AMTargetTypeString\": \"N/A\", \"ATSEDetectionLevel\": 0, \"EngineType\": 1074266112, \"EngineVersion\": \"6.2.0.4015\", \"ErrorCode\": 0, \"EventID\": 439, \"EventType\": \"AntiMalwareEvent\", \"HostAgentGUID\": \"FD8A64A9-F66C-49B5-B7AB-03E00EA09E53\", \"HostAgentVersion\": \"VALID.AGENT.VERSION\", \"HostCloudType\": \"amazon\", \"HostGroupID\": 1, \"HostGroupName\": \"test.eu-west-1a (subnet-test)\", \"HostID\": 8076, \"HostInstanceID\": \"i-fffffffffffffffff\", \"HostOS\": \"Windows\", \"HostOwnerID\": \"123456789012\", \"HostSecurityPolicyID\": 1, \"HostSecurityPolicyName\": \"Test_Policy\", \"Hostname\": \"HOSTNAME.eu-west-1.compute.amazonaws.com (SERVER NAME) [i-fffffffffffffffff]\", \"LogDate\": \"2019-07-07T15:36:52.000Z\", \"MajorVirusType\": 4, \"MajorVirusTypeString\": \"SPYWARE\", \"MalwareName\": \"Cookie_DoubleClick\", \"MalwareType\": 2, \"Origin\": 0, \"OriginString\": \"Agent\", \"PatternVersion\": \"\", \"Protocol\": 0, \"Reason\": \"Default Scheduled Scan Configuration\", \"ScanAction1\": 2, \"ScanAction2\": 0, \"ScanResultAction1\": 0, \"ScanResultAction2\": 0, \"ScanResultString\": \"Deleted\", \"ScanType\": 2, \"ScanTypeString\": \"Scheduled\", \"Tags\": \"\", \"TenantID\": 0, \"TenantName\": \"Primary\"}]", | ||
"description": "Triggers an alert caused by trend malware event for Spyware", | ||
"log": "trendmicro:malwareevent", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"validate_schema_only": false, | ||
"trigger_rules": [ | ||
"trendmicro_malware_event" | ||
] | ||
}, | ||
{ | ||
"data": "[{\"AMTargetTypeString\": \"N\/A\", \"ATSEDetectionLevel\": 0, \"ContainerID\": \"\", \"CreationTime\": \"1970-01-01T00:00:00.000Z\", \"DetectedSHA1\": \"0000000000000000000000000000000000000000\", \"EngineType\": 1074790400, \"EngineVersion\": \"8.1.0.1002\", \"ErrorCode\": 0, \"EventID\": 460, \"EventType\": \"AntiMalwareEvent\", \"HostAgentGUID\": \"FD8A64A9-F66C-49B5-B7AB-03E00EA09E53\", \"HostAgentVersion\": \"VALID.AGENT.VERSION\", \"HostCloudType\": \"amazon\", \"HostGroupID\": 1, \"HostGroupName\": \"test.eu-west-1a (subnet-test)\", \"HostID\": 282, \"HostInstanceID\": \"i-fffffffffffffffff\", \"HostOS\": \"Windows\", \"HostOwnerID\": \"123456789012\", \"HostSecurityPolicyID\": 1, \"HostSecurityPolicyName\": \"Test_Policy\", \"Hostname\": \"HOSTNAME.eu-west-1.compute.amazonaws.com (SERVER NAME) [i-fffffffffffffffff]\", \"InfectedFilePath\": \"C:\\\\Users\\\\Local_Admin\\\\AppData\\\\Local\\\\Temp\\\\zdgaa\\\\gigoto.exe\", \"LogDate\": \"2019-07-16T12:45:30.000Z\", \"MajorVirusType\": 1, \"MajorVirusTypeString\": \"Trojan\", \"MalwareName\": \"HEU_AEGISCS918\", \"MalwareType\": 1, \"ModificationTime\": \"1970-01-01T00:00:00.000Z\", \"Origin\": 0, \"OriginString\": \"Agent\", \"PatternVersion\": \"123\", \"Protocol\": 0, \"Reason\": \"Advanced Real-Time Scan Configuration\", \"ScanAction1\": 3, \"ScanAction2\": 0, \"ScanResultAction1\": 0, \"ScanResultAction2\": 0, \"ScanResultString\": \"Quarantined\", \"ScanType\": 0, \"ScanTypeString\": \"Real Time\", \"Tags\": \"\", \"TenantID\": 0, \"TenantName\": \"Primary\"}]", | ||
"description": "Triggers an alert caused by trend malware event for Trojan", | ||
"log": "trendmicro:malwareevent", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"validate_schema_only": false, | ||
"trigger_rules": [ | ||
"trendmicro_malware_event" | ||
] | ||
}, | ||
{ | ||
"data": "[{\"AMTargetTypeString\": \"N\/A\", \"ATSEDetectionLevel\": 2, \"ContainerID\": \"\", \"CreationTime\": \"2019-06-12T11:33:54.000Z\", \"DetectedSHA1\": \"0000000000000000000000000000000000000000\", \"EngineType\": 1207959846, \"EngineVersion\": \"10.0.0.1040\", \"ErrorCode\": 0, \"EventID\": 333, \"EventType\": \"AntiMalwareEvent\", \"HostAgentGUID\": \"FD8A64A9-F66C-49B5-B7AB-03E00EA09E53\", \"HostAgentVersion\": \"VALID.AGENT.VERSION\", \"HostCloudType\": \"amazon\", \"HostGroupID\": 1, \"HostGroupName\": \"test.eu-west-1a (subnet-test)\", \"HostID\": 11693, \"HostInstanceID\": \"i-fffffffffffffffff\", \"HostOS\": \"Windows\", \"HostOwnerID\": \"123456789012\", \"HostSecurityPolicyID\": 1, \"HostSecurityPolicyName\": \"Test_Policy\", \"Hostname\": \"HOSTNAME.eu-west-1.compute.amazonaws.com (SERVER NAME) [i-fffffffffffffffff]\", \"InfectedFilePath\": \"C:\\\\Windows\\\\Temp\\\\fmlFEA4.tmp(017296_Company Profile for COVEENSIPT.RTF)\", \"LogDate\": \"2019-06-12T11:33:54.000Z\", \"MajorVirusType\": 11, \"MajorVirusTypeString\": \"Aggressive Detection Rule\", \"MalwareName\": \"HEUR_RTFEXP.A\", \"MalwareType\": 3, \"ModificationTime\": \"2019-06-12T11:33:54.000Z\", \"Origin\": 0, \"OriginString\": \"Agent\", \"PatternVersion\": \"123\", \"Protocol\": 0, \"Reason\": \"Advanced Real-Time Scan Configuration\", \"ScanAction1\": 1, \"ScanAction2\": 0, \"ScanResultAction1\": 0, \"ScanResultAction2\": 0, \"ScanResultString\": \"Passed\", \"ScanType\": 0, \"ScanTypeString\": \"Real Time\", \"Tags\": \"\", \"TenantID\": 0, \"TenantName\": \"Primary\"}]", | ||
"description": "Triggers an alert caused by trend malware event for Aggressive Detection Rule", | ||
"log": "trendmicro:malwareevent", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"validate_schema_only": false, | ||
"trigger_rules": [ | ||
"trendmicro_malware_event" | ||
] | ||
}, | ||
{ | ||
"data": "[{\"AMTarget\": \"C:\\\\Windows\\\\system32\\\\regsvr32.exe\", \"AMTargetType\": 1, \"AMTargetTypeString\": \"Process\", \"ATSEDetectionLevel\": 0, \"EngineType\": 1074790400, \"EngineVersion\": \"8.1.0.1002\", \"ErrorCode\": 0, \"EventID\": 445, \"EventType\": \"AntiMalwareEvent\", \"HostAgentGUID\": \"FD8A64A9-F66C-49B5-B7AB-03E00EA09E53\", \"HostAgentVersion\": \"VALID.AGENT.VERSION\", \"HostCloudType\": \"amazon\", \"HostGroupID\": 1, \"HostGroupName\": \"test.eu-west-1a (subnet-test)\", \"HostID\": 812, \"HostInstanceID\": \"i-fffffffffffffffff\", \"HostOS\": \"Windows\", \"HostOwnerID\": \"123456789012\", \"HostSecurityPolicyID\": 1, \"HostSecurityPolicyName\": \"Test_Policy\", \"Hostname\": \"HOSTNAME.eu-west-1.compute.amazonaws.com (SERVER NAME) [i-fffffffffffffffff]\", \"InfectedFilePath\": \"c:\\\\program files\\\\notepad++\\\\nppshell_06.dll\", \"LogDate\": \"2019-07-09T12:14:04.000Z\", \"MajorVirusType\": 14, \"MajorVirusTypeString\": \"Suspicious Activity\", \"MalwareName\": \"TM_MALWARE_BEHAVIOR\", \"MalwareType\": 4, \"Origin\": 0, \"OriginString\": \"Agent\", \"PatternVersion\": \"123\", \"Protocol\": 0, \"Reason\": \"Advanced Real-Time Scan Configuration\", \"ScanAction1\": 6, \"ScanAction2\": 0, \"ScanResultAction1\": 0, \"ScanResultAction2\": 0, \"ScanResultString\": \"Terminated\", \"ScanType\": 0, \"ScanTypeString\": \"Real Time\", \"Tags\": \"\", \"TenantID\": 0, \"TenantName\": \"Primary\"}]", | ||
"description": "Triggers an alert caused by trend malware event for Suspicious Activity", | ||
"log": "trendmicro:malwareevent", | ||
"service": "sns", | ||
"source": "prefix_cluster_sample_topic", | ||
"validate_schema_only": false, | ||
"trigger_rules": [ | ||
"trendmicro_malware_event" | ||
] | ||
} | ||
] |
Oops, something went wrong.