Cobalt Strike Detection: How to Find and Evict Beacons Before Ransomware Deploys
Cobalt Strike detection is the single highest-leverage threat hunting investment for most enterprise security teams. The framework is present in over 80% of ransomware intrusions, and its beacons are planted days before ransomware deploys — meaning detection in that window stops the attack entirely. Cobalt Strike is a legitimate commercial red team platform that threat actors obtain through license theft, cracking, or purchase via criminal networks. Its default configuration leaves detectable artifacts in memory, network traffic, named pipes, and Windows Event Logs that hunters can find with the right queries.
This guide covers the full detection stack: memory-based beacon identification, network traffic signatures, named pipe artifacts, process injection indicators, and SIEM/EDR queries that surface active beacons in your environment.
How Cobalt Strike Beacons Work and Why They Are Hard to Detect
A Cobalt Strike beacon is a shellcode payload that runs inside a legitimate process after injection and communicates with a team server over HTTP, HTTPS, DNS, or SMB. The beacon checks in on a configurable sleep interval (often 60 seconds by default, reduced to seconds during active operations) and receives tasks: run commands, inject into other processes, dump credentials, or pivot laterally.
Why default detection fails: The beacon runs inside legitimate processes (rundll32.exe, svchost.exe, explorer.exe, msbuild.exe) rather than as a standalone process. Process-based allow lists see a trusted binary; the malicious shellcode is invisible at the process level. Signature-based AV often misses custom-packed beacons because threat actors apply XOR encoding, custom packers, or reflective DLL injection to evade static signatures.
Malleable C2 profiles: Cobalt Strike's most powerful evasion feature is its Malleable C2 profile system. Operators configure beacons to disguise their HTTP traffic as legitimate services: Amazon CDN requests, Microsoft update traffic, jQuery CDN responses. The HTTP headers, URI patterns, and response bodies are all configurable. A beacon using the amazon.profile looks identical to legitimate AWS traffic at the network layer.
Staging vs. stageless beacons: Staged beacons download the full payload after initial execution (detectable at the network layer during staging). Stageless beacons embed the full payload at delivery and make no staging request — harder to detect at delivery but larger on disk and more detectable in memory after execution.
Default artifacts that operators often forget to change: Despite Malleable C2's flexibility, operators frequently leave default artifacts in place: default named pipe names, default sleep jitter values, default injected process choices, and default SSL certificate details on team servers. These defaults are your best detection surface.
Memory-Based Detection: Finding Beacons Without EDR
Memory analysis is the highest-confidence Cobalt Strike detection method because beacons must exist in memory to execute, and their structure is consistent regardless of how they were delivered.
YARA rules for in-memory beacon detection:
The Cobalt Strike beacon has a consistent internal structure including a configuration block and characteristic byte sequences. Tools like cs-decrypt-metadata and YARA rules from the community can scan process memory for these patterns. Run YARA scans against all process memory on endpoints using:
- BeaconHunter (open source): scans live processes for Cobalt Strike configuration blocks
- PE-sieve: detects injected shellcode and hollowed processes across all running processes
- Moneta: identifies suspicious executable regions in process memory including reflectively loaded DLLs
Suspicious memory region characteristics: Cobalt Strike injects into processes by allocating RWX (read-write-execute) memory regions — a combination that legitimate processes rarely need. Hunt for:
- Memory regions with RWX permissions that are not backed by a file on disk (unbacked executable memory)
- Private memory regions containing PE headers outside the process's loaded module list
- Memory regions that pass entropy analysis as high-entropy (packed/encrypted shellcode)
PowerShell command to identify unbacked executable memory (Windows): Use Get-InjectedThread or Invoke-PSInjectDetector from the PSHunt module to enumerate threads with start addresses pointing to non-module-backed memory. Any thread starting in a heap or anonymous memory allocation is suspicious.
Briefings like this, every morning before 9am.
Threat intel, active CVEs, and campaign alerts, distilled for practitioners. 50,000+ subscribers. No noise.
Network Detection: C2 Traffic Signatures
Network detection catches beacons that memory scanning misses, particularly stageless beacons with custom Malleable C2 profiles. The key is knowing what to look for at the traffic level rather than the signature level.
Default HTTP beacon signatures (no Malleable C2): Default Cobalt Strike HTTP beacons make requests with these characteristics:
- URI patterns:
/ca,/dpixel,//__utm.gif,/pixel.gif,/g.pixel,/dot.gif,/updates.rss,/fwlink - User-Agent:
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; FunWebProducts)— an outdated IE9 string rarely seen in legitimate traffic - Response body: base64-encoded data wrapped in a consistent structure
- Consistent sleep intervals between connections (beaconing rhythm)
Detecting Malleable C2 profiles by behavioral analysis: Even with Malleable C2, beacons have behavioral tells:
- Beacon rhythm: connections occur at regular intervals with low variance (unlike human browsing). A host connecting to a single IP every 60 seconds ± 10 seconds for hours is a beacon.
- Short-lived HTTPS sessions: beacons check in, receive tasks, and disconnect. Unlike streaming or API traffic, sessions are short and periodic.
- Low data volume per session: a sleeping beacon sends and receives hundreds of bytes per check-in, not kilobytes.
- JA3/JA3S fingerprinting: Cobalt Strike's default TLS implementation has characteristic JA3 hashes. Tools like Zeek can log JA3 fingerprints; search for known Cobalt Strike JA3 values in your proxy and firewall logs.
DNS beacon detection: Cobalt Strike DNS beacons use DNS A record queries for subdomains of the team server domain. Detection signature: a single internal host making high-frequency DNS queries for sequential subdomains (aaa.teamserver.com, aab.teamserver.com) at regular intervals. Cobalt Strike DNS beacons also use TXT record queries for data exfiltration. Baseline DNS query frequency per host and alert on hosts exceeding 3x the baseline.
Named Pipe and Process Indicators
Named pipes are Cobalt Strike's primary inter-process communication mechanism for lateral movement and process injection. They are one of the most reliable detection surfaces because default pipe names are consistent and rarely appear in legitimate environments.
Default Cobalt Strike named pipe patterns: Cobalt Strike creates named pipes with these patterns by default:
\\\\.\\\\ MSSE-[0-9]{4}-server\\\\.\\\\ msagent_[0-9a-f]{2}\\\\.\\\\ DserNamePipe[0-9]{10}\\\\.\\\\ postex_[0-9a-f]{4}\\\\.\\\\ status_[0-9a-f]{2}\\\\.\\\\ mojo\\.\\d+\\.\\d+\\.\\d+
Windows Event ID 18 (pipe connected) and 17 (pipe created) in Microsoft-Windows-Kernel-PnP/Operational log surface these pipe names. Sysmon Event ID 17 and 18 provide named pipe telemetry on endpoints with Sysmon deployed.
Process injection indicators: Cobalt Strike's default injection technique uses VirtualAllocEx, WriteProcessMemory, and CreateRemoteThread — a classic sequence that generates:
- Sysmon Event ID 8 (CreateRemoteThread) where the source process is not a known injector (debugger, AV, etc.)
- A destination process (e.g., notepad.exe) suddenly making network connections it has never made before
- The destination process loading network DLLs (ws2_32.dll, wininet.dll) that the process type does not typically load
Sigma rule for Cobalt Strike named pipe creation:
title: Cobalt Strike Default Named Pipe
status: stable
logsource:
product: windows
category: pipe_created
detection:
selection:
PipeName|re: '(MSSE-[0-9]{4}-server|msagent_[0-9a-f]{2}|postex_[0-9a-f]{4}|status_[0-9a-f]{2}|DserNamePipe[0-9]{10})'
condition: selection
falsepositives:
- Legitimate red team exercises
level: high
SIEM Detection Queries: Sentinel KQL and Splunk SPL
Microsoft Sentinel KQL — Cobalt Strike beacon rhythm detection:
CommonSecurityLog
| where DeviceVendor != "Microsoft"
| where RequestURL has_any ("/ca", "/dpixel", "/__utm.gif",
"/pixel.gif", "/g.pixel", "/dot.gif", "/updates.rss", "/fwlink")
| summarize
RequestCount = count(),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated)
by SourceIP, DestinationIP, RequestURL
| where RequestCount > 5
| where datetime_diff('minute', LastSeen, FirstSeen) > 10
Sentinel KQL — Unbacked executable memory via Defender for Endpoint:
DeviceEvents
| where ActionType == "CreateRemoteThreadApiCall"
| where InitiatingProcessFileName !in~ (
"MsMpEng.exe", "svchost.exe", "csrss.exe", "wininit.exe"
)
| project Timestamp, DeviceName, InitiatingProcessFileName,
TargetProcessId, InitiatingProcessCommandLine
| order by Timestamp desc
Splunk SPL — DNS beaconing detection:
index=dns sourcetype=stream:dns
| bucket _time span=5m
| stats count as query_count, dc(query) as unique_queries
by _time, src_ip, dest_ip
| where query_count > 50 AND unique_queries < 5
| eval beacon_score = query_count / unique_queries
| where beacon_score > 20
| sort -beacon_score
JA3 hash hunt (Zeek/Corelight):
Known Cobalt Strike default JA3 hashes include a0e9f5d64349fb13191bc781f81f42e1 and 72a589da586844d7f0818ce684948eea. Query your Zeek ssl.log or Corelight data:
ssl | where ja3 in ("a0e9f5d64349fb13191bc781f81f42e1", "72a589da586844d7f0818ce684948eea")
When You Find a Beacon: Containment Without Tipping Off the Operator
Finding a Cobalt Strike beacon during an active intrusion requires careful containment sequencing. The threat actor is monitoring their team server — abrupt network disconnection or process termination signals detection and may trigger accelerated ransomware deployment.
Recommended containment sequence:
- Passive observation first (15-30 minutes): Before taking action, observe the beacon's behavior. Identify other compromised hosts by watching for lateral movement from the beaconed endpoint. Map the full blast radius before containment.
- Isolate at the network layer quietly: Use firewall rules or NAC quarantine to block the beacon's C2 IP/domain while keeping internal network access for lateral movement visibility. Blocking C2 prevents the operator from issuing new commands without alerting them that the endpoint is offline.
- Capture memory before killing the process: Run a full memory dump of the injected process before termination. The memory image preserves the decrypted beacon configuration, team server IP, sleep interval, and any staged payloads — critical evidence for scoping the full intrusion.
- Identify persistence mechanisms: Cobalt Strike persistence is typically scheduled tasks, registry Run keys, WMI subscriptions, or service installations. Enumerate all persistence before removing the beacon or the operator redeploys immediately.
- Block team server infrastructure at perimeter: Add the C2 IP and domain to firewall deny rules and DNS sinkholes across all egress points, not just the compromised endpoint.
- Rotate credentials proactively: Assume the operator has run Mimikatz or similar. Force password reset for all accounts that authenticated on or from the compromised host in the past 30 days.
The bottom line
Cobalt Strike detection requires a layered approach because no single telemetry source catches all beacon variants. Named pipe creation events and Sysmon process injection logs catch default configurations. Beacon rhythm analysis in network logs catches malleable C2 variants. Memory scanning catches everything that executes. Prioritize deploying Sysmon with a hardened configuration (SwiftOnSecurity template as a baseline), enabling Defender for Endpoint's behavioral analytics, and running weekly beacon-rhythm queries against your proxy logs. The 4.5-day median dwell time between beacon deployment and ransomware execution is your detection window.
Frequently asked questions
What is the difference between Cobalt Strike and Metasploit for defenders?
Metasploit is open source and its signatures are extremely well-known, making detection by AV and EDR straightforward. Cobalt Strike is a commercial framework with a more sophisticated evasion capability: Malleable C2 profiles, built-in sleep obfuscation, OPSEC-safe post-exploitation modules, and in-memory execution that leaves no files on disk. Cobalt Strike beacons are harder to detect because operators can customize every aspect of their network and behavioral signature. From a detection standpoint, Cobalt Strike requires behavioral analytics and memory analysis rather than signature matching alone.
How do I tell if a Cobalt Strike beacon is using a custom Malleable C2 profile?
If you can capture network traffic from the beacon, compare it against known default Cobalt Strike signatures. If the traffic does not match default URI patterns or User-Agent strings but still exhibits beacon rhythm (periodic connections at consistent intervals to a single destination), a custom profile is likely. Use JA3/JA3S TLS fingerprinting — even with custom HTTP profiles, the underlying TLS handshake often retains default Cobalt Strike characteristics. Memory analysis is the definitive method: extract and decrypt the in-memory beacon configuration using cs-decrypt-metadata or BeaconHunter regardless of the network profile in use.
Which EDR platforms have the best Cobalt Strike detection out of the box?
CrowdStrike Falcon, Microsoft Defender for Endpoint, and SentinelOne all have dedicated Cobalt Strike detection capabilities that target memory-resident beacons, named pipe patterns, and process injection sequences. Falcon's Overwatch threat hunting team actively hunts for Cobalt Strike implants across the customer base. MDE's behavioral detections surface process hollowing and remote thread injection even with custom profiles. No EDR catches everything — memory-based obfuscation techniques like sleep masking and stack spoofing evade behavioral detections on all platforms, which is why network-layer and SIEM-based hunting remains essential.
What is Cobalt Strike sleep masking and why does it evade detection?
Sleep masking is a Cobalt Strike technique where the beacon encrypts its own memory while sleeping between check-ins, making in-memory YARA scans ineffective during sleep intervals. The beacon decrypts itself only when it wakes to execute a task. Defenders counter sleep masking by scheduling memory scans during known beacon check-in windows (if you know the sleep interval from prior traffic analysis) or by using scanners like BeaconHunter that trigger during the brief active window. Some EDR behavioral analytics detect the encryption/decryption pattern itself as an indicator.
How do ransomware groups obtain Cobalt Strike?
Ransomware groups obtain Cobalt Strike through several channels: cracked or leaked versions of older Cobalt Strike builds (versions 4.0-4.5 are widely circulated on criminal forums), purchase through intermediary brokers who hold legitimate licenses, initial access brokers who sell pre-deployed beacons in compromised networks, and in rare cases, licensing through front companies. CISA documented in advisory AA23-025A that cracked Cobalt Strike builds are shared extensively among ransomware affiliates. The wide availability of cracked versions means defenders cannot assume Cobalt Strike sightings are limited to well-resourced threat actors.
What should I do if I find a Cobalt Strike beacon on a domain controller?
A beacon on a domain controller is a full compromise scenario requiring immediate escalated response. Do not reboot or kill the process before memory capture. Assume all AD credentials are compromised: every Kerberos ticket, all NTDS.dit contents if DCSync was run, all service account passwords. Immediately engage your IR team and, if applicable, your cyber insurer's IR hotline. Contain at the network layer by isolating the DC from internet egress while preserving internal connectivity for investigation. Plan for a full AD reset including krbtgt password rotation twice, all privileged account resets, and golden ticket invalidation.
How long does it typically take threat actors to deploy ransomware after deploying a Cobalt Strike beacon?
Median dwell time from Cobalt Strike beacon deployment to ransomware execution varies by threat actor: some ransomware affiliates move within hours after gaining access (particularly those renting pre-deployed beacons from IABs), while others take several days to complete credential harvesting, lateral movement, and backup destruction. Industry data from IR firms places the median at 4-5 days, but this average is pulled up by slower actors. Defenders should treat any Cobalt Strike beacon as a ransomware precursor requiring same-day escalation and containment, not a scheduled response.
Sources & references
Free resources
Critical CVE Reference Card 2025–2026
25 actively exploited vulnerabilities with CVSS scores, exploit status, and patch availability. Print it, pin it, share it with your SOC team.
Ransomware Incident Response Playbook
Step-by-step 24-hour IR checklist covering detection, containment, eradication, and recovery. Built for SOC teams, IR leads, and CISOs.
Get threat intel before your inbox does.
50,000+ security professionals read Decryption Digest for early warnings on zero-days, ransomware, and nation-state campaigns. Free, weekly, no spam.
Unsubscribe anytime. We never sell your data.

Founder & Cybersecurity Evangelist, Decryption Digest
Cybersecurity professional with expertise in threat intelligence, vulnerability research, and enterprise security. Covers zero-days, ransomware, and nation-state operations for 50,000+ security professionals weekly.
The Mythos Brief is free.
AI that finds 27-year-old zero-days. What it means for your security program.
