To craft specific queries in VMware Carbon Black (CB) Endpoint Detection and Response (EDR) for detecting activities potentially indicative of Cobalt Strike with minimal false positives, it's essential to focus on the unique behaviors and tactics associated with Cobalt Strike deployments. Here are several query examples that highlight different aspects of detection, from process execution patterns to network behavior and other indicators of compromise (IOCs). Remember, the effectiveness of these queries largely depends on the context of your environment and ongoing tuning to minimize false positives.
1. Suspicious Process Execution Patterns
Detect unusual parent-child process relationships that Cobalt Strike might exploit:
parent_name:cmd.exe childproc_name:powershell.exe
This query looks for instances where cmd.exe spawns powershell.exe, which can be common in legitimate scenarios but also a tactic used by attackers to execute scripts or commands.
2. Command-Line Anomalies
Search for command-line arguments commonly used in Cobalt Strike deployments:
process_cmdline:"*powershell.exe*" AND process_cmdline:"*IEX*" OR process_cmdline:"*Invoke-Expression*"
This query targets PowerShell invocations that use IEX (Invoke-Expression), a method often used to execute encoded commands, a technique Cobalt Strike and other malicious actors leverage.
3. Network Beaconing Patterns
Detect potential beaconing behavior based on process network connections:
process_name:powershell.exe AND netconn_count:[10 TO *] AND childproc_count:0
This query looks for powershell.exe processes that have made numerous network connections without spawning any child processes, potentially indicative of beaconing or C2 communication.
4. Suspicious Module Loads
Identify unexpected or rare module loads by Cobalt Strike into common processes:
modload_name:*wevtutil.dll* AND process_name:(powershell.exe OR cmd.exe)
Loading specific modules like wevtutil.dll (often used for event log manipulation) by processes like powershell.exe or cmd.exe can be suspicious, especially if rare in your environment.
5. Malleable C2 Traffic Patterns
Queries for detecting malleable C2 (Command and Control) profiles might involve looking for anomalies in process behavior combined with network activity:
process_name:* AND outbound_network_connection:* AND (process_cmdline:"*chcp 65001*" OR process_cmdline:"*/c*")