Adversaries may use Azure Blob Storage to exfiltrate data by leveraging comment fields in blob metadata to conceal malicious payloads. SOC teams should proactively hunt for this behavior to detect potential data exfiltration attempts masked by seemingly benign cloud storage activity.
YARA Rule
rule TrojanCookies_CCREW
{
meta:
author = "AlienVault Labs"
info = "CommentCrew-threat-apt1"
strings:
$a = "sleep:" wide ascii
$b = "content=" wide ascii
$c = "reqpath=" wide ascii
$d = "savepath=" wide ascii
$e = "command=" wide ascii
condition:
4 of ($a,$b,$c,$d,$e)
}
This YARA rule can be deployed in the following contexts:
This rule contains 5 string patterns in its detection logic.
Scenario: A system administrator is using PowerShell to automate the deployment of a software update via Group Policy.
Filter/Exclusion: process.parent_process_name == "task scheduler" or process.name == "powershell.exe" and process.parent_process_name == "task scheduler"
Scenario: A database administrator is running a SQL Server Agent Job that includes a comment in the script related to “Crew” as part of a naming convention.
Filter/Exclusion: process.name == "sqlservr.exe" or process.name == "sqlagent.exe" and process.parent_process_name == "sqlservr.exe"
Scenario: A DevOps engineer is using Ansible to deploy configuration changes, and one of the playbooks includes a comment mentioning “Crew” as part of a team name.
Filter/Exclusion: process.name == "ansible" or process.name == "ansible-playbook" and process.parent_process_name == "bash"
Scenario: A user is running a scheduled task via Task Scheduler that includes a comment in the script related to “Crew” as part of a project name.
Filter/Exclusion: process.parent_process_name == "task scheduler" or process.name == "schtasks.exe"
Scenario: A security analyst is testing a SIEM alert and manually triggers a test event that includes the term “Crew” in a comment.
Filter/Exclusion: process.name == "cmd.exe" or process.name == "powershell.exe" and process.parent_process_name == "explorer.exe" and user == "security_analyst"