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

Potential Remote Desktop Tunneling

Back
Idd2e8fd50-8d66-11ec-b909-0242ac120002
RulenamePotential Remote Desktop Tunneling
DescriptionThis 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
SeverityMedium
TacticsCommandAndControl
TechniquesT1572
Required data connectorsSecurityEvents
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Endpoint Threat Protection Essentials/Analytic Rules/PotentialRemoteDesktopTunneling.yaml
Version1.0.0
Arm templated2e8fd50-8d66-11ec-b909-0242ac120002.json
Deploy To Azure
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"
      }
    }
  ]
}