{
  "$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/710f4755-490d-4fa7-aef0-43b5a66edc7b')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/710f4755-490d-4fa7-aef0-43b5a66edc7b')]",
      "properties": {
        "alertDetailsOverride": {
          "alertDescriptionFormat": "{{Description}} ",
          "alertDisplayNameFormat": "CYFIRMA - Medium Severity Social Media Handle Impersonation Detected - {{AssetType}}  :  {{AssetValue}} ",
          "alertDynamicProperties": [
            {
              "alertProperty": "ProductName",
              "value": "ProductName"
            },
            {
              "alertProperty": "ProviderName",
              "value": "ProviderName"
            }
          ]
        },
        "alertRuleTemplateName": "710f4755-490d-4fa7-aef0-43b5a66edc7b",
        "customDetails": {
          "AlertUID": "AlertUID",
          "AssetType": "AssetType",
          "AssetValue": "AssetValue",
          "Description": "Description",
          "FirstSeen": "FirstSeen",
          "Impact": "Impact",
          "LastSeen": "LastSeen",
          "Recommendation": "Recommendation",
          "RiskScore": "RiskScore",
          "SourceSype": "SourceSype",
          "TimeGenerated": "TimeGenerated",
          "UID": "UID"
        },
        "description": "\"Detects high-severity alerts related to impersonation of official social media handles associated with your brand. \nThese spoofed accounts may be used for phishing, disinformation, or fraud campaigns, posing significant reputational and security risks.\"\n",
        "displayName": "CYFIRMA - Brand Intelligence - Social Media Handle Impersonation Detected Medium Rule",
        "enabled": true,
        "entityMappings": null,
        "eventGroupingSettings": {
          "aggregationKind": "AlertPerResult"
        },
        "incidentConfiguration": {
          "createIncident": true,
          "groupingConfiguration": {
            "enabled": false,
            "lookbackDuration": "PT5H",
            "matchingMethod": "AllEntities",
            "reopenClosedIncident": false
          }
        },
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Cyfirma%20Brand%20Intelligence/Analytic%20Rules/BISocialMediaHandlerMediumRule.yaml",
        "query": "// Medium severity - Social Media Handle Impersonation\nlet timeFrame = 5m;\nCyfirmaBISocialHandlersAlerts_CL \n  | where severity == 'High' and TimeGenerated between (ago(timeFrame) .. now())\n  | extend\n      Description=description,\n      FirstSeen=first_seen,\n      LastSeen=last_seen,\n      RiskScore=risk_score,\n      AlertUID=alert_uid,\n      UID=uid,\n      AssetType=asset_type,\n      AssetValue=asset_value,\n      Impact=impact,\n      Recommendation=recommendation,\n      SourceSype=source_type,\n      ProviderName=\"CYFIRMA\",\n      ProductName=\"DeCYFIR/DeTCT\"\n  | project \n      TimeGenerated,\n      Description,\n      RiskScore,\n      FirstSeen,\n      LastSeen,\n      AlertUID,\n      UID,\n      AssetType,\n      AssetValue,\n      Impact,\n      Recommendation,\n      SourceSype,\n      ProductName,\n      ProviderName\n",
        "queryFrequency": "PT5M",
        "queryPeriod": "PT5M",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [
          "T1589.003",
          "T1591.002",
          "T1585.001",
          "T1566.002"
        ],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess",
          "Reconnaissance",
          "ResourceDevelopment"
        ],
        "techniques": [
          "T1566",
          "T1585",
          "T1589",
          "T1591"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
