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

Malware attachment delivered

Back
Id0558155e-4556-447e-9a22-828f2a7de06b
RulenameMalware attachment delivered
DescriptionThis query identifies a message containing a malware attachment that was delivered.
SeverityMedium
TacticsInitialAccess
TechniquesT1566.001
Required data connectorsProofpointTAP
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ProofPointTap/Analytic Rules/MalwareAttachmentDelivered.yaml
Version1.0.5
Arm template0558155e-4556-447e-9a22-828f2a7de06b.json
Deploy To Azure
ProofPointTAPMessagesDeliveredV2_CL
| mv-expand todynamic(threatsInfoMap)
| mv-expand todynamic(messageParts)
| extend threatType = tostring(threatsInfoMap.threatType), classification = tostring(threatsInfoMap.classification)
| extend filename = tostring(messageParts.filename)
| where threatType =~ "attachment" and classification =~ "malware"
| summarize filenames = make_set(filename), StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), count() by TimeGenerated, Sender = sender, SenderIPAddress = senderIP, Recipient = tostring(recipient), threatType, classification, Subject = subject
| mv-expand todynamic(Recipient)
| extend RecipientName = tostring(split(Recipient, "@")[0]), RecipientUPNSuffix = tostring(split(Recipient, "@")[1])
| extend SenderName = tostring(split(Sender, "@")[0]), SenderUPNSuffix = tostring(split(Sender, "@")[1])
name: Malware attachment delivered
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ProofPointTap/Analytic Rules/MalwareAttachmentDelivered.yaml
queryPeriod: 1h
version: 1.0.5
severity: Medium
id: 0558155e-4556-447e-9a22-828f2a7de06b
triggerOperator: gt
triggerThreshold: 0
kind: Scheduled
requiredDataConnectors:
- dataTypes:
  - ProofPointTAPMessagesDeliveredV2_CL
  connectorId: ProofpointTAP
relevantTechniques:
- T1566.001
description: |
    'This query identifies a message containing a malware attachment that was delivered.'
query: |
  ProofPointTAPMessagesDeliveredV2_CL
  | mv-expand todynamic(threatsInfoMap)
  | mv-expand todynamic(messageParts)
  | extend threatType = tostring(threatsInfoMap.threatType), classification = tostring(threatsInfoMap.classification)
  | extend filename = tostring(messageParts.filename)
  | where threatType =~ "attachment" and classification =~ "malware"
  | summarize filenames = make_set(filename), StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), count() by TimeGenerated, Sender = sender, SenderIPAddress = senderIP, Recipient = tostring(recipient), threatType, classification, Subject = subject
  | mv-expand todynamic(Recipient)
  | extend RecipientName = tostring(split(Recipient, "@")[0]), RecipientUPNSuffix = tostring(split(Recipient, "@")[1])
  | extend SenderName = tostring(split(Sender, "@")[0]), SenderUPNSuffix = tostring(split(Sender, "@")[1])  
tactics:
- InitialAccess
entityMappings:
- entityType: Account
  fieldMappings:
  - columnName: Recipient
    identifier: FullName
  - columnName: RecipientName
    identifier: Name
  - columnName: RecipientUPNSuffix
    identifier: UPNSuffix
- entityType: Account
  fieldMappings:
  - columnName: Sender
    identifier: FullName
  - columnName: SenderName
    identifier: Name
  - columnName: SenderUPNSuffix
    identifier: UPNSuffix
- entityType: IP
  fieldMappings:
  - columnName: SenderIPAddress
    identifier: Address
status: Available
queryFrequency: 1h
{
  "$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/0558155e-4556-447e-9a22-828f2a7de06b')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/0558155e-4556-447e-9a22-828f2a7de06b')]",
      "properties": {
        "alertRuleTemplateName": "0558155e-4556-447e-9a22-828f2a7de06b",
        "customDetails": null,
        "description": "'This query identifies a message containing a malware attachment that was delivered.'\n",
        "displayName": "Malware attachment delivered",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "Recipient",
                "identifier": "FullName"
              },
              {
                "columnName": "RecipientName",
                "identifier": "Name"
              },
              {
                "columnName": "RecipientUPNSuffix",
                "identifier": "UPNSuffix"
              }
            ]
          },
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "Sender",
                "identifier": "FullName"
              },
              {
                "columnName": "SenderName",
                "identifier": "Name"
              },
              {
                "columnName": "SenderUPNSuffix",
                "identifier": "UPNSuffix"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "SenderIPAddress",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ProofPointTap/Analytic Rules/MalwareAttachmentDelivered.yaml",
        "query": "ProofPointTAPMessagesDeliveredV2_CL\n| mv-expand todynamic(threatsInfoMap)\n| mv-expand todynamic(messageParts)\n| extend threatType = tostring(threatsInfoMap.threatType), classification = tostring(threatsInfoMap.classification)\n| extend filename = tostring(messageParts.filename)\n| where threatType =~ \"attachment\" and classification =~ \"malware\"\n| summarize filenames = make_set(filename), StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), count() by TimeGenerated, Sender = sender, SenderIPAddress = senderIP, Recipient = tostring(recipient), threatType, classification, Subject = subject\n| mv-expand todynamic(Recipient)\n| extend RecipientName = tostring(split(Recipient, \"@\")[0]), RecipientUPNSuffix = tostring(split(Recipient, \"@\")[1])\n| extend SenderName = tostring(split(Sender, \"@\")[0]), SenderUPNSuffix = tostring(split(Sender, \"@\")[1])\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [
          "T1566.001"
        ],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1566"
        ],
        "templateVersion": "1.0.5",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}