AnyDesk, a remote management tool, is being used by adversaries to establish covert network connections for command and control or persistence. SOC teams should proactively hunt for unusual network behavior associated with AnyDesk in Azure Sentinel to detect potential C2 activity and mitigate advanced threats.
KQL Query
let Time_start = now(-5d);
let Time_end = now();
//
DeviceNetworkEvents
| where Timestamp between (Time_start..Time_end)
| where RemoteUrl has_any (
'anydesk.com',
'api.playanext.com'
)
and InitiatingProcessVersionInfoProductName has 'AnyDesk'
| summarize FirstSeen=min(Timestamp), LastSeen=max(Timestamp),
Report=make_set(ReportId), Count=count() by DeviceId, DeviceName,
RemoteUrl
id: ed1ef511-c52a-4e07-a864-588e96a7eb91
name: Remote Management and Monitoring tool - AnyDesk - 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 (
'anydesk.com',
'api.playanext.com'
)
and InitiatingProcessVersionInfoProductName has 'AnyDesk'
| 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: IT Admin Using AnyDesk for Remote Support
Description: A system administrator uses AnyDesk to provide remote support to an end-user’s desktop.
Filter/Exclusion: process.name != "AnyDesk" OR destination_ip IN (IT_administrator_IPs) OR user.name IN (IT_support_team_users)
Scenario: Scheduled Maintenance Task via AnyDesk
Description: A scheduled job runs via AnyDesk to perform routine maintenance tasks on a remote endpoint.
Filter/Exclusion: process.name != "AnyDesk" OR event_id == 41 (for scheduled task execution) OR destination_ip IN (allowed_maintenance_servers)
Scenario: AnyDesk Used for Remote Desktop Access by Developers
Description: Developers use AnyDesk to access development environments for code debugging or testing.
Filter/Exclusion: process.name != "AnyDesk" OR user.name IN (developer_team_users) OR destination_ip IN (dev_env_servers)
Scenario: AnyDesk Integration with ITSM Tool for Ticket-Based Access
Description: ITSM (IT Service Management) tool automatically initiates AnyDesk sessions for ticket-based remote access.
Filter/Exclusion: process.name != "AnyDesk" OR event_id == 1000 (for ITSM tool integration) OR user.name IN (ITSM_ticket_owners)
Scenario: AnyDesk Used for Remote Monitoring of Network Devices
Description: Network administrators use AnyDesk to monitor and manage network devices such as routers or switches.
Filter/Exclusion: process.name != "AnyDesk" OR destination_ip IN (network_device_IPs) OR user.name IN (network_admin_users)