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 connectorsCiscoSEG
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.1
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
id: f8ba18c4-81e3-4db0-8f85-4989f2ed2ade
requiredDataConnectors:
- dataTypes:
  - CiscoSEGEvent
  connectorId: CiscoSEG
- dataTypes:
  - CiscoSEGEvent
  connectorId: CiscoSEGAma
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic Rules/CiscoSEGUnexpextedAttachment.yaml
relevantTechniques:
- T1566
kind: Scheduled
name: Cisco SEG - Unexpected attachment
queryFrequency: 1h
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
triggerThreshold: 0
tactics:
- InitialAccess
entityMappings:
- fieldMappings:
  - columnName: AccountCustomEntity
    identifier: Name
  entityType: Account
version: 1.0.1
queryPeriod: 1h
description: |
    'Detects possibly malicious attachments.'
status: Available
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-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",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1566"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}