This detection targets the specific execution patterns of the DarkComet malware, which often establishes persistence through subtle file system modifications that may evade standard signature-based defenses. Proactively hunting for these behaviors in Azure Sentinel is critical to identify early-stage compromise indicators before they escalate into lateral movement or data exfiltration events within the cloud environment.
rule DarkComet_3 : RAT
{
meta:
author = " Kevin Breen <kevin@techanarchy.net>"
date = "2014/04"
ref = "http://malwareconfig.com/stats/DarkComet"
maltype = "Remote Access Trojan"
filetype = "exe"
strings:
// Versions 2x
$a1 = "#BOT#URLUpdate"
$a2 = "Command successfully executed!"
$a3 = "MUTEXNAME" wide
$a4 = "NETDATA" wide
// Versions 3x & 4x & 5x
$b1 = "FastMM Borland Edition"
$b2 = "%s, ClassID: %s"
$b3 = "I wasn't able to open the hosts file"
$b4 = "#BOT#VisitUrl"
$b5 = "#KCMDDC"
condition:
all of ($a*) or all of ($b*)
}
This YARA rule can be deployed in the following contexts:
This rule contains 9 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the DarkComet 3 detection rule in an enterprise environment, including suggested filters and exclusions:
Endpoint Protection Agent Self-Updates
ParentProcessName is CfsService.exe (CrowdStrike), smc.exe (SentinelOne), or MsMpEng.exe (Defender) AND the FilePath contains \Program Files\Microsoft Security Client\Antimalware\.Software Deployment via SCCM/Intune
ccmexec.exe or IntuneManagementExtension) mimics the DarkComet behavior of creating temporary files in %TEMP% and executing them with elevated privileges.UserAccount is a service account (e.g., DOMAIN\SCCM-Deploy-Svc) or the CommandLine contains specific deployment identifiers like /install, /silent, or the SCCM package ID ({GUID}).