Potential Remote Desktop Tunneling
Id | d2e8fd50-8d66-11ec-b909-0242ac120002 |
Rulename | Potential Remote Desktop Tunneling |
Description | This query detects remote desktop authentication attempts with a localhost source address which can indicate a tunneled login. Ref: https://www.mandiant.com/resources/bypassing-network-restrictions-through-rdp-tunneling |
Severity | Medium |
Tactics | CommandAndControl |
Techniques | T1572 |
Required data connectors | SecurityEvents |
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/Endpoint Threat Protection Essentials/Analytic Rules/PotentialRemoteDesktopTunneling.yaml |
Version | 1.0.0 |
Arm template | d2e8fd50-8d66-11ec-b909-0242ac120002.json |
SecurityEvent
| where EventID in (4624,4625) and LogonType in (10) and IpAddress in ("::1","127.0.0.1")
| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by EventID, Computer, TargetUserName, TargetLogonId, LogonType, IpAddress
queryFrequency: 1h
triggerOperator: gt
tactics:
- CommandAndControl
description: |
'This query detects remote desktop authentication attempts with a localhost source address which can indicate a tunneled login.
Ref: https://www.mandiant.com/resources/bypassing-network-restrictions-through-rdp-tunneling'
status: Available
relevantTechniques:
- T1572
name: Potential Remote Desktop Tunneling
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Endpoint Threat Protection Essentials/Analytic Rules/PotentialRemoteDesktopTunneling.yaml
severity: Medium
triggerThreshold: 0
version: 1.0.0
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: TargetUserName
- entityType: Host
fieldMappings:
- identifier: FullName
columnName: Computer
- entityType: IP
fieldMappings:
- identifier: Address
columnName: IpAddress
query: |
SecurityEvent
| where EventID in (4624,4625) and LogonType in (10) and IpAddress in ("::1","127.0.0.1")
| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by EventID, Computer, TargetUserName, TargetLogonId, LogonType, IpAddress
id: d2e8fd50-8d66-11ec-b909-0242ac120002
requiredDataConnectors:
- connectorId: SecurityEvents
dataTypes:
- SecurityEvent
kind: Scheduled
queryPeriod: 1h
{
"$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/d2e8fd50-8d66-11ec-b909-0242ac120002')]",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/d2e8fd50-8d66-11ec-b909-0242ac120002')]",
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
"kind": "Scheduled",
"apiVersion": "2022-11-01",
"properties": {
"displayName": "Potential Remote Desktop Tunneling",
"description": "'This query detects remote desktop authentication attempts with a localhost source address which can indicate a tunneled login.\nRef: https://www.mandiant.com/resources/bypassing-network-restrictions-through-rdp-tunneling'\n",
"severity": "Medium",
"enabled": true,
"query": "SecurityEvent\n | where EventID in (4624,4625) and LogonType in (10) and IpAddress in (\"::1\",\"127.0.0.1\")\n | summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated) by EventID, Computer, TargetUserName, TargetLogonId, LogonType, IpAddress\n",
"queryFrequency": "PT1H",
"queryPeriod": "PT1H",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0,
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"CommandAndControl"
],
"techniques": [
"T1572"
],
"alertRuleTemplateName": "d2e8fd50-8d66-11ec-b909-0242ac120002",
"customDetails": null,
"entityMappings": [
{
"entityType": "Account",
"fieldMappings": [
{
"identifier": "FullName",
"columnName": "TargetUserName"
}
]
},
{
"entityType": "Host",
"fieldMappings": [
{
"identifier": "FullName",
"columnName": "Computer"
}
]
},
{
"entityType": "IP",
"fieldMappings": [
{
"identifier": "Address",
"columnName": "IpAddress"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Endpoint Threat Protection Essentials/Analytic Rules/PotentialRemoteDesktopTunneling.yaml",
"status": "Available",
"templateVersion": "1.0.0"
}
}
]
}