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.3
Arm template0558155e-4556-447e-9a22-828f2a7de06b.json
Deploy To Azure
ProofPointTAPMessagesDelivered_CL
| mv-expand todynamic(threatsInfoMap_s)
| mv-expand todynamic(messageParts_s)
| extend threatType = tostring(threatsInfoMap_s.threatType), classification = tostring(threatsInfoMap_s.classification)
| extend filename = tostring(messageParts_s.filename)
| where threatType =~ "attachment" and classification =~ "malware"
| summarize filenames = make_set(filename), StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), count() by TimeGenerated, Sender = sender_s, SenderIPAddress = senderIP_s, Recipient = recipient_s, threatType, classification,  Subject = subject_s
| extend timestamp = StartTime, AccountCustomEntity = Recipient, IPCustomEntity = SenderIPAddress
severity: Medium
name: Malware attachment delivered
queryPeriod: 1h
id: 0558155e-4556-447e-9a22-828f2a7de06b
requiredDataConnectors:
- connectorId: ProofpointTAP
  dataTypes:
  - ProofPointTAPMessagesDelivered_CL
kind: Scheduled
tactics:
- InitialAccess
triggerThreshold: 0
description: |
    'This query identifies a message containing a malware attachment that was delivered.'
entityMappings:
- fieldMappings:
  - columnName: AccountCustomEntity
    identifier: FullName
  entityType: Account
- fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
  entityType: IP
triggerOperator: gt
queryFrequency: 1h
status: Available
relevantTechniques:
- T1566.001
query: |
  ProofPointTAPMessagesDelivered_CL
  | mv-expand todynamic(threatsInfoMap_s)
  | mv-expand todynamic(messageParts_s)
  | extend threatType = tostring(threatsInfoMap_s.threatType), classification = tostring(threatsInfoMap_s.classification)
  | extend filename = tostring(messageParts_s.filename)
  | where threatType =~ "attachment" and classification =~ "malware"
  | summarize filenames = make_set(filename), StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), count() by TimeGenerated, Sender = sender_s, SenderIPAddress = senderIP_s, Recipient = recipient_s, threatType, classification,  Subject = subject_s
  | extend timestamp = StartTime, AccountCustomEntity = Recipient, IPCustomEntity = SenderIPAddress  
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ProofPointTap/Analytic Rules/MalwareAttachmentDelivered.yaml
version: 1.0.3
{
  "$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/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": "AccountCustomEntity",
                "identifier": "FullName"
              }
            ]
          },
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "IPCustomEntity",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ProofPointTap/Analytic Rules/MalwareAttachmentDelivered.yaml",
        "query": "ProofPointTAPMessagesDelivered_CL\n| mv-expand todynamic(threatsInfoMap_s)\n| mv-expand todynamic(messageParts_s)\n| extend threatType = tostring(threatsInfoMap_s.threatType), classification = tostring(threatsInfoMap_s.classification)\n| extend filename = tostring(messageParts_s.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_s, SenderIPAddress = senderIP_s, Recipient = recipient_s, threatType, classification,  Subject = subject_s\n| extend timestamp = StartTime, AccountCustomEntity = Recipient, IPCustomEntity = SenderIPAddress\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1566"
        ],
        "templateVersion": "1.0.3",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}