{
  "$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/dfdb9a73-4335-4bb4-b29b-eb713bce61a6')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/dfdb9a73-4335-4bb4-b29b-eb713bce61a6')]",
      "properties": {
        "alertRuleTemplateName": "dfdb9a73-4335-4bb4-b29b-eb713bce61a6",
        "customDetails": null,
        "description": "'Detects possibly phishing emails.'\n",
        "displayName": "Cisco SEG - Multiple suspiciuos attachments received",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "AccountCustomEntity",
                "identifier": "Name"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/CiscoSEG/Analytic%20Rules/CiscoSEGMultipleSuspiciousEmails.yaml",
        "query": "let r_threshold = 5;\nCiscoSEGEvent\n| where NetworkDirection =~ 'Incoming'\n| where isnotempty(EventMessage)\n| where strlen(EventMessage) < 20\n| summarize rec=makeset(DstUserName) by EventMessage, bin(TimeGenerated, 10m)\n| where array_length(rec) > r_threshold\n| extend AccountCustomEntity = rec\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1566"
        ],
        "templateVersion": "1.0.3",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
