Ubiquiti - Unusual DNS connection
Id | 14a23ded-7fb9-48ee-ba39-859517a49b51 |
Rulename | Ubiquiti - Unusual DNS connection |
Description | Detects unusual remote to local (R2L) DNS connections. |
Severity | Medium |
Tactics | CommandAndControl |
Techniques | T1090 T1572 |
Required data connectors | UbiquitiUnifi |
Kind | Scheduled |
Query frequency | 1h |
Query period | 1h |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiR2LDns.yaml |
Version | 1.0.0 |
Arm template | 14a23ded-7fb9-48ee-ba39-859517a49b51.json |
let threshold = 50;
UbiquitiAuditEvent
| where EventCategory =~ 'firewall'
| where ipv4_is_private(SrcIpAddr) == 'False'
| where ipv4_is_private(DstIpAddr)
| where DstPortNumber == '53'
| summarize count() by SrcIpAddr, DstIpAddr
| where count_ > threshold
| extend IPCustomEntity = DstIpAddr
requiredDataConnectors:
- connectorId: UbiquitiUnifi
dataTypes:
- UbiquitiAuditEvent
triggerOperator: gt
queryFrequency: 1h
name: Ubiquiti - Unusual DNS connection
status: Available
queryPeriod: 1h
id: 14a23ded-7fb9-48ee-ba39-859517a49b51
description: |
'Detects unusual remote to local (R2L) DNS connections.'
severity: Medium
query: |
let threshold = 50;
UbiquitiAuditEvent
| where EventCategory =~ 'firewall'
| where ipv4_is_private(SrcIpAddr) == 'False'
| where ipv4_is_private(DstIpAddr)
| where DstPortNumber == '53'
| summarize count() by SrcIpAddr, DstIpAddr
| where count_ > threshold
| extend IPCustomEntity = DstIpAddr
version: 1.0.0
kind: Scheduled
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiR2LDns.yaml
entityMappings:
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IPCustomEntity
relevantTechniques:
- T1090
- T1572
tactics:
- CommandAndControl
triggerThreshold: 0
{
"$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/14a23ded-7fb9-48ee-ba39-859517a49b51')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/14a23ded-7fb9-48ee-ba39-859517a49b51')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01-preview",
"properties": {
"displayName": "Ubiquiti - Unusual DNS connection",
"description": "'Detects unusual remote to local (R2L) DNS connections.'\n",
"severity": "Medium",
"enabled": true,
"query": "let threshold = 50;\nUbiquitiAuditEvent\n| where EventCategory =~ 'firewall'\n| where ipv4_is_private(SrcIpAddr) == 'False'\n| where ipv4_is_private(DstIpAddr)\n| where DstPortNumber == '53'\n| summarize count() by SrcIpAddr, DstIpAddr\n| where count_ > threshold\n| extend IPCustomEntity = DstIpAddr\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CommandAndControl"
],
"techniques": [
"T1090",
"T1572"
],
"alertRuleTemplateName": "14a23ded-7fb9-48ee-ba39-859517a49b51",
"customDetails": null,
"entityMappings": [
{
"fieldMappings": [
{
"identifier": "Address",
"columnName": "IPCustomEntity"
}
],
"entityType": "IP"
}
],
"templateVersion": "1.0.0",
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiR2LDns.yaml",
"status": "Available"
}
}
]
}