The hypothesis is that an adversary is using DistantDesktop as a remote management tool to establish covert network connections for command and control or persistence. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect potential abuse of legitimate RMM tools by threat actors leveraging T1219 techniques.
KQL Query
let Time_start = now(-5d);
let Time_end = now();
//
DeviceNetworkEvents
| where Timestamp between (Time_start..Time_end)
| where RemoteUrl has_any (
'distantdesktop.com',
'signalserver.xyz'
)
and InitiatingProcessVersionInfoCompanyName has 'Distant Software'
and InitiatingProcessVersionInfoProductName has 'Distant Desktop'
| summarize FirstSeen=min(Timestamp), LastSeen=max(Timestamp),
Report=make_set(ReportId), Count=count() by DeviceId, DeviceName,
RemoteUrl
id: def063fd-a00f-4aec-9d46-e81fdf0bf1e9
name: Remote Management and Monitoring tool - DistantDesktop - Network Connection
description: |
Remote Monitoring and Management (RMM) programs are IT to manage remote endpoints. Attackers have begun to abuse these programs to persist or provide C2 channels.
https://github.com/jischell-msft/RemoteManagementMonitoringTools
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
dataTypes:
- DeviceNetworkEvents
tactics: CommandAndControl
relevantTechniques: T1219
query: |
let Time_start = now(-5d);
let Time_end = now();
//
DeviceNetworkEvents
| where Timestamp between (Time_start..Time_end)
| where RemoteUrl has_any (
'distantdesktop.com',
'signalserver.xyz'
)
and InitiatingProcessVersionInfoCompanyName has 'Distant Software'
and InitiatingProcessVersionInfoProductName has 'Distant Desktop'
| summarize FirstSeen=min(Timestamp), LastSeen=max(Timestamp),
Report=make_set(ReportId), Count=count() by DeviceId, DeviceName,
RemoteUrl
| Sentinel Table | Notes |
|---|---|
DeviceNetworkEvents | Ensure this data connector is enabled |
Scenario: A system administrator is using DistantDesktop to remotely manage a server during a scheduled maintenance window.
Filter/Exclusion: Exclude connections initiated from known admin IP ranges or during scheduled maintenance windows using a time-based filter.
Scenario: A PowerShell script is executed via DistantDesktop to perform a routine system update on multiple endpoints.
Filter/Exclusion: Exclude connections where the command line includes known update or patching scripts, or where the user is a domain admin with elevated privileges.
Scenario: A scheduled job is configured to use DistantDesktop to monitor system performance and collect logs from remote endpoints.
Filter/Exclusion: Exclude connections associated with known monitoring or logging jobs, or those originating from a centralized monitoring server.
Scenario: An IT helpdesk technician uses DistantDesktop to troubleshoot a user’s endpoint, which involves remote desktop access and file transfer.
Filter/Exclusion: Exclude connections from known helpdesk IP ranges or where the user is a helpdesk technician with a documented access policy.
Scenario: A backup job is configured to use DistantDesktop to transfer data from a remote server to a backup server.
Filter/Exclusion: Exclude connections associated with backup processes, or where the source and destination IPs match known backup server pairs.