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

Corelight - C2 DGA Detected Via Repetitive Failures

Back
Id8eaa2268-74ee-492c-b869-450eff707fef
RulenameCorelight - C2 DGA Detected Via Repetitive Failures
DescriptionDetects large amounts of DNS resolution failures.
SeverityMedium
TacticsCommandAndControl
Required data connectorsCorelight
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightC2RepetitiveFailures.yaml
Version2.1.0
Arm template8eaa2268-74ee-492c-b869-450eff707fef.json
Deploy To Azure
let threshold = 25;
union corelight_dns, corelight_dns_red
// rcodes: SERVFAIL=2, NXDOMAIN=3
| where rcode in (2, 3)
| summarize count() by query, id_orig_h, bin(TimeGenerated, 5m)
| where count_ > threshold
queryFrequency: 1h
triggerThreshold: 0
name: Corelight - C2 DGA Detected Via Repetitive Failures
version: 2.1.0
id: 8eaa2268-74ee-492c-b869-450eff707fef
status: Available
tactics:
- CommandAndControl
entityMappings:
- entityType: IP
  fieldMappings:
  - columnName: id_orig_h
    identifier: Address
queryPeriod: 1h
description: |
    'Detects large amounts of DNS resolution failures.'
requiredDataConnectors:
- connectorId: Corelight
  dataTypes:
  - Corelight_v2_dns
  - Corelight_v2_dns_red
  - corelight_dns
  - corelight_dns_red
query: |
  let threshold = 25;
  union corelight_dns, corelight_dns_red
  // rcodes: SERVFAIL=2, NXDOMAIN=3
  | where rcode in (2, 3)
  | summarize count() by query, id_orig_h, bin(TimeGenerated, 5m)
  | where count_ > threshold  
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightC2RepetitiveFailures.yaml
triggerOperator: gt
kind: Scheduled
severity: Medium
{
  "$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/8eaa2268-74ee-492c-b869-450eff707fef')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/8eaa2268-74ee-492c-b869-450eff707fef')]",
      "properties": {
        "alertRuleTemplateName": "8eaa2268-74ee-492c-b869-450eff707fef",
        "customDetails": null,
        "description": "'Detects large amounts of DNS resolution failures.'\n",
        "displayName": "Corelight - C2 DGA Detected Via Repetitive Failures",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "id_orig_h",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightC2RepetitiveFailures.yaml",
        "query": "let threshold = 25;\nunion corelight_dns, corelight_dns_red\n// rcodes: SERVFAIL=2, NXDOMAIN=3\n| where rcode in (2, 3)\n| summarize count() by query, id_orig_h, bin(TimeGenerated, 5m)\n| where count_ > threshold\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "CommandAndControl"
        ],
        "templateVersion": "2.1.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}