This hunt targets adversaries deploying the DarkComet Remote Access Trojan to establish persistent command-and-control channels and execute remote sessions on compromised endpoints. Proactively hunting for this behavior in Azure Sentinel is critical because its low-severity classification may cause initial alerts to be overlooked, allowing attackers to maintain undetected access while exfiltrating sensitive data over time.
rule DarkComet_1 : RAT
{
meta:
description = "DarkComet RAT"
author = "botherder https://github.com/botherder"
strings:
$bot1 = /(#)BOT#OpenUrl/ wide ascii
$bot2 = /(#)BOT#Ping/ wide ascii
$bot3 = /(#)BOT#RunPrompt/ wide ascii
$bot4 = /(#)BOT#SvrUninstall/ wide ascii
$bot5 = /(#)BOT#URLDownload/ wide ascii
$bot6 = /(#)BOT#URLUpdate/ wide ascii
$bot7 = /(#)BOT#VisitUrl/ wide ascii
$bot8 = /(#)BOT#CloseServer/ wide ascii
$ddos1 = /(D)DOSHTTPFLOOD/ wide ascii
$ddos2 = /(D)DOSSYNFLOOD/ wide ascii
$ddos3 = /(D)DOSUDPFLOOD/ wide ascii
$keylogger1 = /(A)ctiveOnlineKeylogger/ wide ascii
$keylogger2 = /(U)nActiveOnlineKeylogger/ wide ascii
$keylogger3 = /(A)ctiveOfflineKeylogger/ wide ascii
$keylogger4 = /(U)nActiveOfflineKeylogger/ wide ascii
$shell1 = /(A)CTIVEREMOTESHELL/ wide ascii
$shell2 = /(S)UBMREMOTESHELL/ wide ascii
$shell3 = /(K)ILLREMOTESHELL/ wide ascii
condition:
4 of ($bot*) or all of ($ddos*) or all of ($keylogger*) or all of ($shell*)
}
This YARA rule can be deployed in the following contexts:
This rule contains 18 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the DarkComet RAT detection rule in an enterprise environment, including suggested filters and exclusions:
Legitimate Remote Administration via DarkComet Enterprise Suite
DarkCometAgent.exe communication with the central server as malicious because the process name matches known RAT signatures.C:\Program Files\DarkComet\) and the destination IP belongs to the organization’s internal Remote Management subnet or verified public cloud endpoints (e.g., AWS/Azure IPs used by your DarkComet instance).Scheduled Backup Jobs Utilizing DarkComet CLI
DarkCometCLI.exe tool. This script pushes configuration snapshots and logs to a central repository, generating network connections identical to those of an active RAT agent, triggering alerts during off-hours maintenance windows.DarkCometCLI.exe process with a known file hash.Third-Party Vendor Onboarding and Asset Inventory Scans