The hypothesis is that an adversary is using Ammyy, 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 identify potential C2 channels and mitigate advanced persistent threats leveraging RMM tools.
KQL Query
let Time_start = now(-5d);
let Time_end = now();
//
DeviceNetworkEvents
| where Timestamp between (Time_start..Time_end)
| where RemoteUrl has 'ammyy.com'
and InitiatingProcessVersionInfoCompanyName has 'ammyy'
and InitiatingProcessVersionInfoProductName has 'ammyy admin'
| summarize FirstSeen=min(Timestamp), LastSeen=max(Timestamp),
Report=make_set(ReportId), Count=count() by DeviceId, DeviceName,
RemoteUrl
id: 0e92144a-d108-45dd-abb4-b0200c8c8cd0
name: Remote Management and Monitoring tool - Ammyy - 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 'ammyy.com'
and InitiatingProcessVersionInfoCompanyName has 'ammyy'
and InitiatingProcessVersionInfoProductName has 'ammyy admin'
| 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: Scheduled System Maintenance via Ammyy
Description: An admin uses Ammyy to perform routine system maintenance on remote endpoints, such as patching or configuration updates.
Filter/Exclusion: process.name != "ammyy.exe" OR event.action == "scheduled_task" OR user.account_type == "domain_admin"
Scenario: Remote Desktop Protocol (RDP) Session via Ammyy
Description: An IT admin uses Ammyy to establish an RDP session to troubleshoot a user’s machine.
Filter/Exclusion: process.name != "ammyy.exe" OR destination.port != 3389 OR user.account_type == "domain_admin"
Scenario: Ammyy Used for Remote File Transfer
Description: An admin uses Ammyy to transfer files between servers for backup or deployment purposes.
Filter/Exclusion: process.name != "ammyy.exe" OR file.hash in ("known_safe_hashes") OR user.account_type == "domain_admin"
Scenario: Ammyy Used for Remote Monitoring of Network Devices
Description: An admin uses Ammyy to monitor network devices (e.g., routers, switches) for performance or configuration changes.
Filter/Exclusion: process.name != "ammyy.exe" OR destination.ip in ("known_network_devices") OR user.account_type == "domain_admin"
Scenario: Ammyy Used for Remote Software Deployment
Description: An admin uses Ammyy to deploy software updates or configurations to multiple endpoints in the environment.
Filter/Exclusion: process.name != "ammyy.exe" OR event.action == "software_deployment" OR user.account_type == "domain_admin"