Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Cisco SEG - Unexpected attachment

Back
Idf8ba18c4-81e3-4db0-8f85-4989f2ed2ade
RulenameCisco SEG - Unexpected attachment
DescriptionDetects possibly malicious attachments.
SeverityHigh
TacticsInitialAccess
TechniquesT1566
Required data connectorsCefAma
CiscoSEG
CiscoSEGAma
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic Rules/CiscoSEGUnexpextedAttachment.yaml
Version1.0.2
Arm templatef8ba18c4-81e3-4db0-8f85-4989f2ed2ade.json
Deploy To Azure
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
kind: Scheduled
relevantTechniques:
- T1566
description: |
    'Detects possibly malicious attachments.'
queryPeriod: 1h
queryFrequency: 1h
tactics:
- InitialAccess
name: Cisco SEG - Unexpected attachment
requiredDataConnectors:
- connectorId: CiscoSEG
  dataTypes:
  - CiscoSEGEvent
- connectorId: CiscoSEGAma
  dataTypes:
  - CiscoSEGEvent
- connectorId: CefAma
  dataTypes:
  - CommonSecurityLog
entityMappings:
- entityType: Account
  fieldMappings:
  - identifier: Name
    columnName: AccountCustomEntity
triggerThreshold: 0
version: 1.0.2
id: f8ba18c4-81e3-4db0-8f85-4989f2ed2ade
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  
status: Available
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic Rules/CiscoSEGUnexpextedAttachment.yaml
severity: High
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/f8ba18c4-81e3-4db0-8f85-4989f2ed2ade')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/f8ba18c4-81e3-4db0-8f85-4989f2ed2ade')]",
      "properties": {
        "alertRuleTemplateName": "f8ba18c4-81e3-4db0-8f85-4989f2ed2ade",
        "customDetails": null,
        "description": "'Detects possibly malicious attachments.'\n",
        "displayName": "Cisco SEG - Unexpected attachment",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "Name"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic Rules/CiscoSEGUnexpextedAttachment.yaml",
        "query": "CiscoSEGEvent\n| where NetworkDirection =~ 'Incoming'\n| where tostring(AdditionalFields) has 'ESAAttachmentDetails'\n| extend attachment = replace_string(tostring(extract(@'\"ESAAttachmentDetails\":\"{(.*?):', 1, tostring(AdditionalFields))), \"'\", \"\")\n| where attachment endswith '.ps1' or attachment endswith '.lnk' or attachment endswith '.exe'\n| extend AccountCustomEntity = DstUserName\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1566"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}