Study guide
14.3 Data Exfiltration, C2 Detection & Incident Reconstruction
Elastic Certified SIEM Analyst Exam
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview & Study Strategy
1.1 Elastic Certified SIEM Analyst Exam Facts, Objectives & Study Plan
2 Chapter 2: Elastic Stack Architecture & SIEM Foundations
2.1 Elastic Stack Architecture for Security Operations 2.2 Telemetry Ingestion Architecture & Data Pipelines 2.3 Security Data Storage, Data Streams & ILM
3 Chapter 3: Elastic Common Schema (ECS) & Ingestion Normalization
3.1 ECS Structure, Core Principles & Essential Field Sets 3.2 Ingest Pipelines, Processors & Normalization Workflows 3.3 Fleet Server & Elastic Agent Integration Management
4 Chapter 4: Discover, Data Views & Security Query Languages
4.1 Kibana Discover, Security Data Views & Runtime Fields 4.2 Kibana Query Language (KQL) & Lucene for SecOps 4.3 ES|QL for Multi-Stage Security Analysis
5 Chapter 5: Security Visualizations & Threat Analytics
5.1 Metric, Aggregation & Histogram Visualizations for SOC 5.2 Data Tables, Heatmaps & Specialized Security Charts 5.3 Elastic Maps & Geospatial Telemetry Analysis
6 Chapter 6: Kibana Lens for Security Workflows
6.1 Lens Architecture & Multi-Layer Telemetry Visualizations 6.2 Lens Formulas, Ratios & Anomaly Baseline Metrics 6.3 Operationalizing Lens in SOC Triage & Drilldowns
7 Chapter 7: Security Dashboards & SOC Operations
7.1 Security Dashboard Architecture & SOC Layout Design 7.2 Interactive Controls, Time Sync & Cross-Filtering 7.3 Dashboard Exporting, Reporting & Spaces Sharing
8 Chapter 8: The Elastic Security App: Capabilities, Explore & Dashboards
8.1 Security App Capabilities & the Explore Pages (Hosts, Network, Users) 8.2 Monitoring with the Security App Dashboards
9 Chapter 9: Elastic Security Detection Engine & Core Rules
9.1 Detection Engine Architecture & Prebuilt Rule Management 9.2 Custom Query & Threshold Detection Rules 9.3 Event Correlation Rules with Event Query Language (EQL)
10 Chapter 10: Advanced Detection Rules, ML & Rule Tuning
10.1 Threat Intelligence & Indicator Match Rules 10.2 New Terms, ES|QL & Machine Learning Detection Rules 10.3 Detection Rule Tuning, Exceptions & Alert Suppression
11 Chapter 11: Alert Triage, Timelines & Investigation Workflows
11.1 Alert Triage Workflow & the Alert Details Flyout 11.2 Elastic Security Timeline & Timeline Templates 11.3 Visual Event Analyzer & Session View Forensics
12 Chapter 12: Case Management, Integrations & AI Assistant
12.1 Elastic Security Case Management & Triage Workflows 12.2 Case Connectors & External Incident Escalation 12.3 Elastic AI Assistant for Security & Attack Discovery
13 Chapter 13: Security Administration, RBAC & Kibana Spaces
13.1 Kibana Spaces for SOC Multitenancy & Segmentation 13.2 Role-Based Access Control, Feature Privileges & Index Security 13.3 Elastic Defend Administration & Endpoint Policy Controls
14 Chapter 14: End-to-End Threat Hunting & Incident Investigation Capstone
14.1 Hypothesis-Driven Threat Hunting & Baselining in Elastic 14.2 Investigating Lateral Movement & Credential Access Campaigns 14.3 Data Exfiltration, C2 Detection & Incident Reconstruction
14.3 Data Exfiltration, C2 Detection & Incident Reconstruction
Key Takeaways Explain This Topic AI
C2 beaconing produces many regular or jittered outbound connections, which ES|QL can surface by aggregating per source-destination pair and deriving an average interval from the first and last timestamps with DATE_DIFF.
DNS tunneling and Domain Generation Algorithms (DGAs) exploit port 53 to evade perimeter firewalls, identifiable via Shannon entropy scoring of dns.question.name, excessive NXDOMAIN rates, and non-standard query types.
Data exfiltration investigations correlate data staging activities (archive creation via 7z.exe, tar, rar.exe with password encryption) with anomalous outbound volumetric spikes to unsanctioned cloud providers or untrusted ASNs.
End-to-end incident timeline reconstruction organizes multi-stream telemetry chronologically across the MITRE ATT&CK kill chain, establishing verified links from initial access to data exfiltration.
Post-incident documentation operationalizes forensic findings into executive summaries, technical incident response reports, actionable IOC ledgers, and newly deployed detection rules and exception lists.
Last updated: September 2026
The Architecture of Command and Control (C2) & Exfiltration
In complex multi-stage cyber intrusions, an adversary's operational actions ultimately converge toward two paramount objectives: establishing resilient Command and Control (C2) to maintain interactive access across the target environment, and executing Data Exfiltration to extract intellectual property, confidential customer records, or financial databases. While initial compromise and lateral movement may be executed rapidly, C2 communication and exfiltration often operate under stealthy, low-and-slow operational profiles designed to defeat network boundary controls.
Adversaries avoid crude, cleartext reverse shells in modern enterprise environments. Instead, they leverage encrypted HTTPS transport, statistical jitter to defeat static threshold rules, covert DNS encapsulation, and legitimate cloud storage application programming interfaces (APIs) such as AWS S3, Mega.nz, or Dropbox. As a SIEM analyst, uncovering these sophisticated egress channels requires advanced analytical techniques in ES|QL, deep protocol inspection, and disciplined chronological timeline reconstruction across the MITRE ATT&CK matrix.
- Investigating C2 Beaconing and Statistical Jitter
- 1. Fixed-Interval Beaconing vs. Statistical Jitter
Fixed-Interval Beaconing : Early malware connected to C2 servers on rigid timers (e.g., precisely every 60 seconds). Automated security tools easily identified these through basic periodic frequency analysis.
Statistical Jitter : Modern adversary C2 frameworks (such as Cobalt Strike, Sliver, Havoc, and Mythic) implement jitter —a mathematical randomization factor applied to sleep cycles. For example, a C2 agent configured with a 60-second sleep interval and 30% jitter connects at pseudo-random intervals between 42 and 78 seconds. This variation breaks simple threshold rules while still maintaining consistent outbound communication.
2. Hunting Jittered Beaconing with ES|QL
Elasticsearch Query Language (ES|QL) provides the mathematical and temporal primitives required to calculate inter-arrival times and statistical variance directly across millions of network connection documents in logs-network.* : FROM logs-network.*
- | WHERE event.category == "network" AND event.type == "connection"
- AND network.direction == "egress"
- | STATS
- connection_count = COUNT(),
- first_seen = MIN(@timestamp),
- last_seen = MAX(@timestamp),
- total_bytes_sent = SUM(destination.bytes)
- BY source.ip, destination.ip, destination.port
- | WHERE connection_count > 50
- | EVAL duration_seconds = DATE_DIFF("seconds", first_seen, last_seen)
- | EVAL avg_interval = duration_seconds / connection_count
- | WHERE avg_interval >= 10 AND avg_interval <= 300
- | SORT connection_count DESC
- | LIMIT 25
By computing the duration between first_seen and last_seen and dividing by total connection_count , the analyst computes avg_interval . Destinations with hundreds of connections maintaining an average interval between 10 and 300 seconds represent potential beaconing channels that warrant deep inspection. ES|QL in 8.15 has no window functions, so it cannot compute the gap between each pair of consecutive connections directly. The average-interval method finds candidates, and the analyst confirms the regular rhythm by reviewing that source-destination pair in Timeline or with a machine learning job.
3. Session Fingerprinting & Metadata Anomalies
Once candidate beaconing destinations are isolated, hunters examine secondary session indicators:
JA3 / JA3S TLS Fingerprints : Evaluating cryptographic client hello parameters. Malicious C2 frameworks compiled on standard Linux or Go environments produce distinct JA3 hashes that differ sharply from enterprise web browsers.
Non-Standard User-Agent Strings : Identifying generic, outdated, or default library headers (e.g., Go-http-client/1.1 , curl/7.68.0 , Python-urllib/3.10 ) communicating with external endpoints.
Autonomous System Number (ASN) Profiling : Evaluating destination.as.organization.name . Workstation web traffic naturally terminates in major consumer Content Delivery Networks (Akamai, Cloudflare, Fastly). Workstation traffic establishing high-frequency connections to budget Virtual Private Server (VPS) providers or bulletproof hosting providers indicates high compromise probability.
DNS Tunneling & Domain Generation Algorithms (DGA)
Adversaries frequently weaponize the Domain Name System (DNS) because firewalls almost universally permit outbound UDP/TCP port 53 traffic to ensure internal hosts can resolve internet addresses.
1. Covert DNS Tunneling Mechanics
In a DNS tunneling attack, the adversary registers an apex domain (e.g., tunnel-c2.net ) and delegates its authoritative nameserver to an adversary-controlled server running a DNS tunneling listener. The compromised internal endpoint executes DNS queries where commands or exfiltrated data are encoded into subdomain labels: aW5maWx0cmF0aW9uX2RhdGE_01.tunnel-c2.net
The internal DNS resolver recursively routes the query to the attacker's authoritative nameserver, which decodes the data and transmits response commands back encapsulated inside TXT , NULL , or CNAME records.
Forensic Telemetry in Elastic Security :
Shannon Entropy of Domain Names : High randomness in dns.question.name . Standard corporate domains (e.g., mail.google.com ) have low entropy, whereas encrypted or encoded data strings produce high entropy (typically > 3.8).
Abnormal Query Length : Query string length exceeding 60 to 100 characters.
High Subdomain Cardinality : Thousands of unique, single-use subdomains querying the exact same registered apex domain ( dns.question.registered_domain ).
Non-Standard Query Types : High volume of TXT (type 16) or NULL (type 10) queries, which allow larger payload capacities than standard A records.
- An ES|QL query to detect DNS tunneling by calculating unique subdomain cardinality: FROM logs-network.*
- | WHERE event.dataset == "network_traffic.dns"
- | STATS
- unique_subdomains = COUNT_DISTINCT(dns.question.name),
- total_queries = COUNT()
- BY dns.question.registered_domain, source.ip
- | WHERE unique_subdomains > 100
- | SORT unique_subdomains DESC
- | LIMIT 20
- 2. Domain Generation Algorithms (DGA)
Malware families utilize DGAs to generate hundreds or thousands of pseudo-random domain names daily (e.g., k9x2w1m4p.biz ). The malware queries these domains sequentially until connecting to the active C2 server registered by the attacker. In Elastic Security, DGAs manifest as sudden spikes in DNS query failures where dns.response_code: "NXDOMAIN" (Non-Existent Domain) originating from an endpoint within a short time window.
Investigating Data Staging and Exfiltration Vectors
Adversaries rarely transmit individual sensitive files directly from their original storage locations. Instead, they execute structured Collection & Staging procedures prior to exfiltration:
1. Data Staging Forensics
Archive Utilities & LOLBins : Attackers compress target directories using command-line archiving tools ( 7z.exe , rar.exe , tar , compact.exe ) or native PowerShell ( Compress-Archive ).
Password Protection & Header Encryption : To bypass network data loss prevention (DLP) inspection, attackers encrypt archives using command switches like -p (password) and -mhe=on or -hp (encrypt archive file headers, hiding internal file names): 7z.exe a -pSecretPass123! -mhe=on C:\ProgramData\staging.7z D:\Confidential\Financials\*
Staging Locations : Archives are typically assembled in user-writable system directories ( C:\ProgramData\ , C:\Windows\Temp\ , C:\Users\Public\ , or /tmp/ ). In logs-endpoint.events.file-* , this manifests as rapid file read events across file shares followed immediately by the creation of a large compressed archive file.
2. Exfiltration Channels
Unsanctioned Cloud Storage APIs : Uploading staged archives to legitimate public cloud repositories (such as AWS S3 buckets, Mega.nz, Dropbox, Google Drive) or developer platforms (GitHub, Discord webhooks). Because these services use legitimate TLS certificates over port 443, perimeter firewalls rarely block them.
Direct Raw Volumetric Transfers : Streaming archives over encrypted channels (SSH, SFTP, HTTPS) directly to an untrusted external IP.
- Detection via ES|QL : Aggregating outbound byte volume per external destination: FROM logs-network.*
- | WHERE network.direction == "egress"
| STATS total_bytes_sent = SUM(destination.bytes) BY source.ip, destination.ip, destination.as.organization.name
- | WHERE total_bytes_sent > 500000000
- | SORT total_bytes_sent DESC
- Reference Table: C2 & Exfiltration Indicators, Queries & Forensic Artifacts
Attack Vector / Phase Forensic Indicators / TTP Detection Query & Analytical Method Forensic Artifact / ECS Field Location
Periodic C2 Beaconing Outbound HTTP/S connections with low variance or fixed intervals ES|QL DATE_DIFF interval variance; aggregation by destination.ip and destination.port logs-network.* : source.ip , destination.ip , @timestamp , url.domain
Covert DNS Tunneling High-entropy subdomains; high volume of TXT/NULL record requests ES|QL COUNT_DISTINCT(dns.question.name) grouped by dns.question.registered_domain logs-network.* : dns.question.name , dns.question.type , dns.question.registered_domain
DGA Domain Queries Bursts of non-existent domain resolutions KQL: dns.response_code: "NXDOMAIN" aggregated by source.ip (>50 failures/min) logs-network.* : dns.response_code , dns.question.name , source.ip
Archive Data Staging Compression tools with password protection flags ( -p , -hp , -mhe ) KQL: process.name: ("7z.exe" or "rar.exe" or "tar.exe") and process.command_line: (*-p* or *-hp* or *-mhe*) logs-endpoint.events.process-* : process.command_line , process.parent.executable
Volumetric Cloud Exfiltration Large outbound file upload to cloud storage or untrusted ASN ES|QL: SUM(destination.bytes) > 500000000 BY destination.as.organization.name , source.ip logs-network.* : destination.bytes , destination.as.organization.name , destination.domain
End-to-End Incident Timeline Reconstruction Methodology
When conducting a capstone incident investigation, an analyst must synthesize disparate alerts, log streams, and forensic artifacts into a unified, chronological master timeline. The reconstruction methodically maps evidence across the MITRE ATT&CK Kill Chain : +--------------------------------------------------------------------------+
- | Master Incident Kill Chain Reconstruction |
- | |
- | 1. Initial Access: Phishing email delivered; user opens attachment |
- | [Logs: email.from, email.recipient, file.name: Invoice.docm] |
- | |
- | 2. Execution: Word macro spawns PowerShell download cradle |
- | [Logs: winword.exe -> powershell.exe -ep bypass -enc ...] |
- | |
- | 3. Persistence: Scheduled task created to maintain access |
- | [Logs: Event ID 4698 / schtasks.exe /create /tn "SysUpdate"] |
- | |
- | 4. Defense Evasion: Log clearing attempted via wevtutil |
- | [Logs: wevtutil.exe cl Security; AMSI memory patching] |
- | |
- | 5. Credential Access: LSASS dumped via comsvcs.dll; Kerberoasting |
- | [Logs: rundll32.exe comsvcs.dll MiniDump; Event ID 4769 RC4] |
- | |
- | 6. Discovery: Network and domain enumeration executed |
- | [Logs: net group "domain admins" /domain; nltest /dclist] |
- | |
- | 7. Lateral Movement: PsExec SMB service creation on Database Server |
- | [Logs: Event ID 4624 Type 3; System Event ID 7045 DBUpdater] |
- | |
- | 8. Collection & Staging: Database backup encrypted into 7z archive |
- | [Logs: 7za.exe a -pEncryptedPass! C:\ProgramData\dump.7z] |
- | |
- | 9. Command & Control: HTTPS beaconing with 25% jitter on port 8443 |
- | [Logs: network.direction: egress; destination.ip: 198.51.100.44] |
- | |
- | 10. Exfiltration: 4.2 GB upload to cloud storage bucket |
- | [Logs: destination.bytes: 4294967296; host: srv-db01] |
- +--------------------------------------------------------------------------+
- Operationalizing Reconstruction in Elastic Security
Case Initialization : The lead responder initializes an Elastic Security Case (e.g., INC-2026-8802: Advanced Lateral Movement & Data Exfiltration Intrusion ).
Timeline Evidence Pinning : As each milestone event is identified across endpoints, domain controllers, and network monitors, it is pinned to the Timeline canvas. Pinned events lock in view, allowing the investigator to continuously adjust queries without losing sight of established anchors.
Markdown Forensic Notes : The investigator annotates each pinned event with a markdown note documenting the forensic finding, analyst rationale, and confidence rating (e.g., "Milestone 5: LSASS dumped by user jsmith using comsvcs.dll export ordinal 24" ). Attaching the Timeline to the case gives the whole team these notes and pinned events.
Compiling Post-Incident Documentation & Threat Remediation
An investigation formally concludes with comprehensive post-incident documentation and operational feedback:
1. Post-Incident Review (PIR) Deliverables
Executive Summary : A concise, non-technical overview detailing root cause, business impact, compromised entities, data exposure assessment, and final containment status for C-suite leadership.
Technical Chronology : A detailed millisecond-accurate timeline detailing every adversary action from initial access to final remediation.
Actionable IOC Ledger : A structured table of all verified indicators of compromise, including SHA-256 hashes, C2 IP addresses, tunneling domains, dropped file paths, and compromised user credentials.
2. Detection Engineering & Hardening Feedback Loop
To ensure enterprise resilience against identical future campaigns, the incident findings are fed directly back into security engineering:
New Detection Rules : Codifying observed attack patterns into automated rules. For instance, deploying an EQL Correlation Rule that alerts whenever winword.exe spawns a command shell that establishes an outbound network socket within 120 seconds.
Indicator Match Rules : Uploading the verified IOC ledger into threat intelligence indices and deploying Indicator Match Rules across streaming network and endpoint logs.
Rule Tuning & Exceptions : Defining precise rule exceptions for authorized backup utilities identified during baseline validation, maintaining a high signal-to-noise ratio in operational queues.