CommentCrew-threat-apt1 detects potential adversary behavior involving suspicious comment-based PowerShell scripts that may be used for initial access or command and control. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate early-stage compromise attempts by advanced persistent threats.
YARA Rule
rule ccrewQAZ
{
meta:
author = "AlienVault Labs"
info = "CommentCrew-threat-apt1"
strings:
$a = "!QAZ@WSX" wide ascii
condition:
$a
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: Scheduled System Maintenance Job
Description: A legitimate scheduled task runs a script that includes a comment referencing “Crew” as part of a maintenance log.
Filter/Exclusion: Exclude events where the process is schtasks.exe or the script path contains SystemMaintenance or ScheduledTasks.
Scenario: Admin Task for User Management
Description: An administrator uses PowerShell to create a user with a comment field containing “Crew” as part of a user naming convention.
Filter/Exclusion: Exclude events where the process is powershell.exe and the command includes New-LocalUser or Add-LocalGroupMember.
Scenario: Log File Parsing Tool
Description: A log parsing tool (e.g., logparser.exe) processes logs and includes a comment field with “Crew” as part of a log entry.
Filter/Exclusion: Exclude events where the process is logparser.exe or the log source is a known internal log server (e.g., logserver01).
Scenario: Backup Script with Comment
Description: A backup script (e.g., backup_script.bat) includes a comment line with “Crew” to indicate the script’s purpose.
Filter/Exclusion: Exclude events where the process is cmd.exe and the script path contains backup or backup_script.
Scenario: Internal Documentation Tool
Description: An internal documentation tool (e.g., docgen.exe) generates a document with a comment field that includes “Crew” as part of a team name.
Filter/Exclusion: Exclude events where the process is docgen.exe or the document path contains internal_docs or team_notes.