The hypothesis is that an adversary is using RustDesk, a Remote Management and Monitoring tool, to establish a covert network connection for command and control or persistence. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential C2 channels and mitigate advanced persistent threats leveraging legitimate RMM tools.
KQL Query
let Time_start = now(-5d);
let Time_end = now();
//
DeviceNetworkEvents
| where Timestamp between (Time_start..Time_end)
| where RemoteUrl has 'rustdesk.com'
and InitiatingProcessVersionInfoProductName has 'rustdesk'
| summarize FirstSeen=min(Timestamp), LastSeen=max(Timestamp),
Report=make_set(ReportId), Count=count() by DeviceId, DeviceName,
RemoteUrl
id: 9d6ce6ba-f13e-473c-ac2b-56b74c4a5900
name: Remote Management and Monitoring tool - RustDesk - 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 'rustdesk.com'
and InitiatingProcessVersionInfoProductName has 'rustdesk'
| 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: Legitimate Remote Management Session via RustDesk
Description: An IT admin is using RustDesk to remotely manage a user’s endpoint for troubleshooting.
Filter/Exclusion: process.name != "RustDesk.exe" OR process.parent.name == "RustDesk.exe" AND process.name == "explorer.exe" (to exclude legitimate remote sessions)
Scenario: Scheduled Maintenance Task Using RustDesk
Description: A scheduled job runs via RustDesk to perform routine system updates or patching on remote machines.
Filter/Exclusion: process.name == "schtasks.exe" OR process.parent.name == "RustDesk.exe" AND process.name == "taskeng.exe"
Scenario: Admin Access for Remote Support via RustDesk
Description: A support technician uses RustDesk to access a user’s machine for assistance, which is a common legitimate use case.
Filter/Exclusion: process.name == "RustDesk.exe" AND process.parent.name == "Remote Desktop Services" OR process.parent.name == "mstsc.exe"
Scenario: Network Discovery via RustDesk for Inventory Purposes
Description: IT uses RustDesk to scan and inventory endpoints on the network as part of regular asset management.
Filter/Exclusion: process.name == "RustDesk.exe" AND network.destination_port == 443 OR network.destination_port == 80 (to exclude inventory scans)
Scenario: Remote PowerShell Execution via RustDesk
Description: An admin uses RustDesk to establish a remote session and run PowerShell scripts for configuration management.
Filter/Exclusion: process.name == "powershell.exe" AND process.parent.name == "RustDesk.exe" OR process.parent.name == "Remote Desktop Services"