let threshold = 2;
let err = dynamic(['NXDOMAIN', 'SERVFAIL', 'REFUSED']);
GCPCloudDNS
| where EventResultDetails in~ (err)
| summarize ips = makeset(SrcIpAddr) by Query, bin(TimeGenerated, 10m)
| where array_length(ips) >= threshold
| extend DNSCustomEntity = Query, IPCustomEntity = ips
tactics:
- CommandAndControl
severity: Medium
requiredDataConnectors:
- connectorId: GCPDNSDataConnector
dataTypes:
- GCPCloudDNS
triggerOperator: gt
query: |
let threshold = 2;
let err = dynamic(['NXDOMAIN', 'SERVFAIL', 'REFUSED']);
GCPCloudDNS
| where EventResultDetails in~ (err)
| summarize ips = makeset(SrcIpAddr) by Query, bin(TimeGenerated, 10m)
| where array_length(ips) >= threshold
| extend DNSCustomEntity = Query, IPCustomEntity = ips
triggerThreshold: 0
name: Google DNS - Multiple errors to same domain
kind: Scheduled
version: 1.0.0
relevantTechniques:
- T1095
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformDNS/Analytic Rules/GCPDNSMultipleErrorsQuery.yaml
description: |
'Detects multiple errors to same domain.'
entityMappings:
- entityType: DNS
fieldMappings:
- identifier: DomainName
columnName: DNSCustomEntity
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
queryFrequency: 1h
queryPeriod: 1h
id: da04a5d6-e2be-4cba-8cdb-a3f2efa87e9e
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace": {
"type": "String"
}
},
"resources": [
{
"id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/da04a5d6-e2be-4cba-8cdb-a3f2efa87e9e')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/da04a5d6-e2be-4cba-8cdb-a3f2efa87e9e')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01",
"properties": {
"displayName": "Google DNS - Multiple errors to same domain",
"description": "'Detects multiple errors to same domain.'\n",
"severity": "Medium",
"enabled": true,
"query": "let threshold = 2;\nlet err = dynamic(['NXDOMAIN', 'SERVFAIL', 'REFUSED']);\nGCPCloudDNS\n| where EventResultDetails in~ (err)\n| summarize ips = makeset(SrcIpAddr) by Query, bin(TimeGenerated, 10m)\n| where array_length(ips) >= threshold\n| extend DNSCustomEntity = Query, IPCustomEntity = ips\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CommandAndControl"
],
"techniques": [
"T1095"
],
"alertRuleTemplateName": "da04a5d6-e2be-4cba-8cdb-a3f2efa87e9e",
"customDetails": null,
"entityMappings": [
{
"fieldMappings": [
{
"columnName": "DNSCustomEntity",
"identifier": "DomainName"
}
],
"entityType": "DNS"
},
{
"fieldMappings": [
{
"columnName": "IPCustomEntity",
"identifier": "Address"
}
],
"entityType": "IP"
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/GoogleCloudPlatformDNS/Analytic Rules/GCPDNSMultipleErrorsQuery.yaml",
"templateVersion": "1.0.0"
}
}
]
}