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
status: Available
queryFrequency: 1h
id: f8ba18c4-81e3-4db0-8f85-4989f2ed2ade
tactics:
- InitialAccess
entityMappings:
- fieldMappings:
- columnName: AccountCustomEntity
identifier: Name
entityType: Account
requiredDataConnectors:
- connectorId: CefAma
dataTypes:
- CommonSecurityLog
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic Rules/CiscoSEGUnexpextedAttachment.yaml
version: 1.0.3
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
description: |
'Detects possibly malicious attachments.'
relevantTechniques:
- T1566
triggerThreshold: 0
queryPeriod: 1h
triggerOperator: gt
name: Cisco SEG - Unexpected attachment
severity: High
kind: Scheduled