-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/improve-mimecast-parsing
- Loading branch information
Showing
15 changed files
with
557 additions
and
20 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
39 changes: 39 additions & 0 deletions
39
Mimecast/mimecast-email-security/tests/test_attachment_protect.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,39 @@ | ||
{ | ||
"input": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"sha1\": \"816b013c8be6e5708690645964b5d442c085041e\", \"accountId\": \"C0A0\", \"fileName\": \"tpsreport.docx\", \"sha256\": \"efe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12\", \"fileExtension\": \"xlsm\", \"subType\": null, \"eventType\": \"attachment protect\", \"timestamp\": 1689692409135, \"md5\": \"4dbe9dbfb53438d9ce410535355cd973\"}" | ||
}, | ||
"expected": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"sha1\": \"816b013c8be6e5708690645964b5d442c085041e\", \"accountId\": \"C0A0\", \"fileName\": \"tpsreport.docx\", \"sha256\": \"efe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12\", \"fileExtension\": \"xlsm\", \"subType\": null, \"eventType\": \"attachment protect\", \"timestamp\": 1689692409135, \"md5\": \"4dbe9dbfb53438d9ce410535355cd973\"}", | ||
"event": { | ||
"category": [ | ||
"email" | ||
], | ||
"dataset": "attachment protect", | ||
"provider": "Mimecast", | ||
"type": [ | ||
"info" | ||
] | ||
}, | ||
"@timestamp": "2023-07-18T15:00:09.135000Z", | ||
"email": { | ||
"attachments": [ | ||
{ | ||
"file": { | ||
"name": "tpsreport.docx" | ||
} | ||
} | ||
], | ||
"from": { | ||
"address": [ | ||
"null" | ||
] | ||
} | ||
}, | ||
"mimecast": { | ||
"siem": { | ||
"aggregate_id": "aggregateId", | ||
"processing_id": "processingId" | ||
} | ||
} | ||
} | ||
} |
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,56 @@ | ||
{ | ||
"input": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"fileName\": \"tpsreport.docx\", \"sha256\": \"efe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12\", \"subject\": \"siem_av - email subject line\", \"senderEnvelope\": \"auser@mimecast.com\", \"messageId\": \"messageId\", \"senderDomainInternal\": \"true\", \"eventType\": \"av\", \"sha1\": \"816b013c8be6e5708690645964b5d442c085041e\", \"accountId\": \"C0A0\", \"virusFound\": \"bad.virus.found\", \"route\": \"Inbound\", \"recipients\": \"auser@mimecast.com\", \"fileExtension\": \"docx\", \"subType\": null, \"senderIp\": \"123.123.123.123\", \"senderDomain\": \"mimecast.com\", \"timestamp\": 1689685338586, \"emailSize\": \"1648832\", \"md5\": \"4dbe9dbfb53438d9ce410535355cd973\"}" | ||
}, | ||
"expected": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"fileName\": \"tpsreport.docx\", \"sha256\": \"efe51c2453821310c7a34dca3054021d0f6d453b7133c381d75e3140901efd12\", \"subject\": \"siem_av - email subject line\", \"senderEnvelope\": \"auser@mimecast.com\", \"messageId\": \"messageId\", \"senderDomainInternal\": \"true\", \"eventType\": \"av\", \"sha1\": \"816b013c8be6e5708690645964b5d442c085041e\", \"accountId\": \"C0A0\", \"virusFound\": \"bad.virus.found\", \"route\": \"Inbound\", \"recipients\": \"auser@mimecast.com\", \"fileExtension\": \"docx\", \"subType\": null, \"senderIp\": \"123.123.123.123\", \"senderDomain\": \"mimecast.com\", \"timestamp\": 1689685338586, \"emailSize\": \"1648832\", \"md5\": \"4dbe9dbfb53438d9ce410535355cd973\"}", | ||
"event": { | ||
"category": [ | ||
"email" | ||
], | ||
"dataset": "av", | ||
"provider": "Mimecast", | ||
"type": [ | ||
"info" | ||
] | ||
}, | ||
"@timestamp": "2023-07-18T13:02:18.586000Z", | ||
"email": { | ||
"attachments": [ | ||
{ | ||
"file": { | ||
"name": "tpsreport.docx" | ||
} | ||
} | ||
], | ||
"from": { | ||
"address": [ | ||
"auser@mimecast.com" | ||
] | ||
}, | ||
"message_id": "messageId", | ||
"subject": "siem_av - email subject line", | ||
"to": { | ||
"address": [ | ||
"auser@mimecast.com" | ||
] | ||
} | ||
}, | ||
"mimecast": { | ||
"siem": { | ||
"aggregate_id": "aggregateId", | ||
"processing_id": "processingId", | ||
"virus_found": "bad.virus.found" | ||
} | ||
}, | ||
"related": { | ||
"ip": [ | ||
"123.123.123.123" | ||
] | ||
}, | ||
"source": { | ||
"address": "123.123.123.123", | ||
"ip": "123.123.123.123" | ||
} | ||
} | ||
} |
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,50 @@ | ||
{ | ||
"input": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"accountId\": \"C0A0\", \"timestamp\": 1731187649343, \"messageId\": \"<11111111111111111111111111111111111111@mail.gmail.com>\", \"senderEnvelope\": \"john.doe@example.org\", \"subject\": \"My little subject\", \"recipients\": \"jane.doe@example.com\", \"delivered\": \"true\", \"destinationIp\": \"5.6.7.8\", \"Hostname\": \"mail-111111111.inbound.protection.outlook.com\", \"numberAttachments\": \"0\", \"direction\": \"Inbound\", \"totalSizeAttachments\": \"0\", \"deliveryAttempts\": \"1\", \"tlsVersion\": \"TLSv1.3\", \"tlsCipher\": \"TLS_AES_256_GCM_SHA384\", \"emailSize\": \"30126\", \"tlsUsed\": \"Yes\", \"route\": \"Office 365 Inbound Routing Policy Definition\", \"deliveryErrors\": null, \"rejectionType\": null, \"rejectionCode\": null, \"rejectionInfo\": null, \"deliveryTime\": \"5333\", \"type\": \"delivery\", \"subtype\": \"true\", \"_offset\": 1069263, \"_partition\": 66}" | ||
}, | ||
"expected": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"accountId\": \"C0A0\", \"timestamp\": 1731187649343, \"messageId\": \"<11111111111111111111111111111111111111@mail.gmail.com>\", \"senderEnvelope\": \"john.doe@example.org\", \"subject\": \"My little subject\", \"recipients\": \"jane.doe@example.com\", \"delivered\": \"true\", \"destinationIp\": \"5.6.7.8\", \"Hostname\": \"mail-111111111.inbound.protection.outlook.com\", \"numberAttachments\": \"0\", \"direction\": \"Inbound\", \"totalSizeAttachments\": \"0\", \"deliveryAttempts\": \"1\", \"tlsVersion\": \"TLSv1.3\", \"tlsCipher\": \"TLS_AES_256_GCM_SHA384\", \"emailSize\": \"30126\", \"tlsUsed\": \"Yes\", \"route\": \"Office 365 Inbound Routing Policy Definition\", \"deliveryErrors\": null, \"rejectionType\": null, \"rejectionCode\": null, \"rejectionInfo\": null, \"deliveryTime\": \"5333\", \"type\": \"delivery\", \"subtype\": \"true\", \"_offset\": 1069263, \"_partition\": 66}", | ||
"event": { | ||
"category": [ | ||
"email" | ||
], | ||
"dataset": "delivery", | ||
"provider": "Mimecast", | ||
"type": [ | ||
"info" | ||
] | ||
}, | ||
"@timestamp": "2024-11-09T21:27:29.343000Z", | ||
"destination": { | ||
"address": "5.6.7.8", | ||
"ip": "5.6.7.8" | ||
}, | ||
"email": { | ||
"direction": "Inbound", | ||
"from": { | ||
"address": [ | ||
"john.doe@example.org" | ||
] | ||
}, | ||
"message_id": "11111111111111111111111111111111111111@mail.gmail.com", | ||
"subject": "My little subject", | ||
"to": { | ||
"address": [ | ||
"jane.doe@example.com" | ||
] | ||
} | ||
}, | ||
"mimecast": { | ||
"siem": { | ||
"aggregate_id": "aggregateId", | ||
"delivered": true, | ||
"processing_id": "processingId" | ||
} | ||
}, | ||
"related": { | ||
"ip": [ | ||
"5.6.7.8" | ||
] | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
Mimecast/mimecast-email-security/tests/test_impersonation_protect.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,48 @@ | ||
{ | ||
"input": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"taggedMalicious\": \"false\", \"subject\": \"siem_impersonation - email subject line\", \"internalUserName\": \"false\", \"senderEnvelope\": \"auser@mimecast.com\", \"policyDefinition\": \"Default Impersonation Definition\", \"newDomain\": \"false\", \"customThreatDictionary\": \"false\", \"action\": \"Hold\", \"senderIp\": \"123.123.123.123\", \"timestamp\": 1689685338545, \"similarInternalDomain\": \"false\", \"messageId\": \"\", \"eventType\": \"impersonation protect\", \"itemsDetected\": \"1\", \"mimecastThreatDictionary\": \"false\", \"accountId\": \"C0A0\", \"customNameMatch\": \"false\", \"route\": \"Inbound\", \"similarMimecastExternalDomain\": \"false\", \"recipients\": \"auser@mimecast.com\", \"similarCustomExternalDomain\": \"false\", \"subType\": \"Hold\", \"taggedExternal\": \"false\", \"replyMismatch\": \"false\"}" | ||
}, | ||
"expected": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"taggedMalicious\": \"false\", \"subject\": \"siem_impersonation - email subject line\", \"internalUserName\": \"false\", \"senderEnvelope\": \"auser@mimecast.com\", \"policyDefinition\": \"Default Impersonation Definition\", \"newDomain\": \"false\", \"customThreatDictionary\": \"false\", \"action\": \"Hold\", \"senderIp\": \"123.123.123.123\", \"timestamp\": 1689685338545, \"similarInternalDomain\": \"false\", \"messageId\": \"\", \"eventType\": \"impersonation protect\", \"itemsDetected\": \"1\", \"mimecastThreatDictionary\": \"false\", \"accountId\": \"C0A0\", \"customNameMatch\": \"false\", \"route\": \"Inbound\", \"similarMimecastExternalDomain\": \"false\", \"recipients\": \"auser@mimecast.com\", \"similarCustomExternalDomain\": \"false\", \"subType\": \"Hold\", \"taggedExternal\": \"false\", \"replyMismatch\": \"false\"}", | ||
"event": { | ||
"action": "Hold", | ||
"category": [ | ||
"email" | ||
], | ||
"dataset": "impersonation protect", | ||
"provider": "Mimecast", | ||
"type": [ | ||
"info" | ||
] | ||
}, | ||
"@timestamp": "2023-07-18T13:02:18.545000Z", | ||
"email": { | ||
"from": { | ||
"address": [ | ||
"auser@mimecast.com" | ||
] | ||
}, | ||
"subject": "siem_impersonation - email subject line", | ||
"to": { | ||
"address": [ | ||
"auser@mimecast.com" | ||
] | ||
} | ||
}, | ||
"mimecast": { | ||
"siem": { | ||
"aggregate_id": "aggregateId", | ||
"processing_id": "processingId" | ||
} | ||
}, | ||
"related": { | ||
"ip": [ | ||
"123.123.123.123" | ||
] | ||
}, | ||
"source": { | ||
"address": "123.123.123.123", | ||
"ip": "123.123.123.123" | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
Mimecast/mimecast-email-security/tests/test_internal_email_project.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,40 @@ | ||
{ | ||
"input": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"accountId\": \"C0A0\", \"timestamp\": 1730905847558, \"messageId\": \"<11111111111111111111111111111111111111@mail.gmail.com>\", \"senderEnvelope\": \"john.doe@example.org\", \"subject\": \"My dangerous email\", \"recipients\": \"jane.doe@example.com\", \"urlCategory\": \"Dangerous file extension\", \"scanResults\": \"Restricted File Type - Found executable extension: dll\", \"route\": \"Internal\", \"monitoredDomainSource\": null, \"similarDomain\": null, \"type\": \"internal email protect\", \"subtype\": null, \"_offset\": 994904, \"_partition\": 66}" | ||
}, | ||
"expected": { | ||
"message": "{\"processingId\": \"processingId\", \"aggregateId\": \"aggregateId\", \"accountId\": \"C0A0\", \"timestamp\": 1730905847558, \"messageId\": \"<11111111111111111111111111111111111111@mail.gmail.com>\", \"senderEnvelope\": \"john.doe@example.org\", \"subject\": \"My dangerous email\", \"recipients\": \"jane.doe@example.com\", \"urlCategory\": \"Dangerous file extension\", \"scanResults\": \"Restricted File Type - Found executable extension: dll\", \"route\": \"Internal\", \"monitoredDomainSource\": null, \"similarDomain\": null, \"type\": \"internal email protect\", \"subtype\": null, \"_offset\": 994904, \"_partition\": 66}", | ||
"event": { | ||
"category": [ | ||
"email" | ||
], | ||
"dataset": "internal email protect", | ||
"provider": "Mimecast", | ||
"type": [ | ||
"info" | ||
] | ||
}, | ||
"@timestamp": "2024-11-06T15:10:47.558000Z", | ||
"email": { | ||
"from": { | ||
"address": [ | ||
"john.doe@example.org" | ||
] | ||
}, | ||
"message_id": "11111111111111111111111111111111111111@mail.gmail.com", | ||
"subject": "My dangerous email", | ||
"to": { | ||
"address": [ | ||
"jane.doe@example.com" | ||
] | ||
} | ||
}, | ||
"mimecast": { | ||
"siem": { | ||
"aggregate_id": "aggregateId", | ||
"processing_id": "processingId", | ||
"scan_results": "Restricted File Type - Found executable extension: dll" | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.