CommentCrew-threat-apt1 detects potential adversary behavior involving the use of comment-based PowerShell scripts to execute malicious commands, which may indicate a low-severity but persistent threat actor leveraging obfuscation techniques. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate early-stage compromise attempts that may evade traditional detection methods.
YARA Rule
rule APT1_WEBC2_TOCK
{
meta:
author = "AlienVault Labs"
info = "CommentCrew-threat-apt1"
strings:
$1 = "InprocServer32" wide ascii
$2 = "HKEY_PERFORMANCE_DATA" wide ascii
$3 = "<!---[<if IE 5>]id=" wide ascii
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Scenario: Scheduled system maintenance using Task Scheduler
Filter/Exclusion: process.parent_process_name != "schtasks.exe" or process.name != "schtasks.exe"
Scenario: Admin performing a disk cleanup using Disk Cleanup Tool
Filter/Exclusion: process.name != "cleanmgr.exe" or process.parent_process_name != "explorer.exe"
Scenario: Database backup job executed via SQL Server Agent Job
Filter/Exclusion: process.name != "sqlservr.exe" or process.parent_process_name != "sqlagent.exe"
Scenario: User running a legitimate script for log rotation using PowerShell
Filter/Exclusion: process.name != "powershell.exe" or process.parent_process_name != "cmd.exe"
Scenario: IT staff using Windows Event Viewer to review logs
Filter/Exclusion: process.name != "eventvwr.exe" or process.parent_process_name != "explorer.exe"