CiscoSEGEvent
| where NetworkDirection =~ 'Incoming'
| where tostring(AdditionalFields) has 'ESAAttachmentDetails'
| extend attachment = replace_string(tostring(extract(@'"ESAAttachmentDetails":"{(.*?):', 1, tostring(AdditionalFields))), "'", "")
| where attachment endswith '.ps1' or attachment endswith '.lnk' or attachment endswith '.exe'
| extend AccountCustomEntity = DstUserName
name: Cisco SEG - Unexpected attachment
queryFrequency: 1h
description: |
'Detects possibly malicious attachments.'
relevantTechniques:
- T1566
id: f8ba18c4-81e3-4db0-8f85-4989f2ed2ade
triggerOperator: gt
version: 1.0.3
entityMappings:
- entityType: Account
fieldMappings:
- columnName: AccountCustomEntity
identifier: Name
kind: Scheduled
status: Available
tactics:
- InitialAccess
triggerThreshold: 0
queryPeriod: 1h
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic Rules/CiscoSEGUnexpextedAttachment.yaml
requiredDataConnectors:
- dataTypes:
- CommonSecurityLog
connectorId: CefAma
query: |
CiscoSEGEvent
| where NetworkDirection =~ 'Incoming'
| where tostring(AdditionalFields) has 'ESAAttachmentDetails'
| extend attachment = replace_string(tostring(extract(@'"ESAAttachmentDetails":"{(.*?):', 1, tostring(AdditionalFields))), "'", "")
| where attachment endswith '.ps1' or attachment endswith '.lnk' or attachment endswith '.exe'
| extend AccountCustomEntity = DstUserName
severity: High