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 | CustomLogsAma 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.1 |
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
- connectorId: CustomLogsAma
dataTypes:
- Ubiquiti_CL
status: Available
relevantTechniques:
- T1090
- T1572
queryFrequency: 1h
id: 14a23ded-7fb9-48ee-ba39-859517a49b51
name: Ubiquiti - Unusual DNS connection
severity: Medium
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiR2LDns.yaml
queryPeriod: 1h
entityMappings:
- fieldMappings:
- columnName: IPCustomEntity
identifier: Address
entityType: IP
description: |
'Detects unusual remote to local (R2L) DNS connections.'
triggerThreshold: 0
tactics:
- CommandAndControl
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
kind: Scheduled
triggerOperator: gt
version: 1.0.1
{
"$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/14a23ded-7fb9-48ee-ba39-859517a49b51')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/14a23ded-7fb9-48ee-ba39-859517a49b51')]",
"properties": {
"alertRuleTemplateName": "14a23ded-7fb9-48ee-ba39-859517a49b51",
"customDetails": null,
"description": "'Detects unusual remote to local (R2L) DNS connections.'\n",
"displayName": "Ubiquiti - Unusual DNS connection",
"enabled": true,
"entityMappings": [
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "IPCustomEntity",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Ubiquiti UniFi/Analytic Rules/UbiquitiR2LDns.yaml",
"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",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CommandAndControl"
],
"techniques": [
"T1090",
"T1572"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}