SIEM & Detection Engineering Hub
Detection Engineering is the discipline of building, testing, and maintaining detection logic that finds real attacks in the noise. This hub covers everything from writing your first KQL query to building a mature detection programme with SLAs, coverage metrics, and continuous improvement pipelines.
Detection Use Case Library
226 production-ready detection use cases covering all 14 MITRE ATT&CK tactics. Each use case includes the threat scenario, log sources required, detection logic in KQL/SPL, false positive considerations, and tuning guidance.
| Use Case | Tactic | Technique | Severity | Log Sources | Platform |
|---|---|---|---|---|---|
| Suspicious PowerShell Encoded Command | Execution | T1059.001 | Critical | Windows Event 4104, Sysmon 1 | KQL / SPL |
| LSASS Memory Dump (Credential Theft) | Credential Access | T1003.001 | Critical | Sysmon 10, Windows 4656 | KQL / SPL |
| Kerberoasting Attack Detection | Credential Access | T1558.003 | Critical | Windows 4769 (AD) | KQL / SPL |
| Pass-the-Hash / Pass-the-Ticket | Lateral Movement | T1550.002 | Critical | Windows 4768/4769/4624 | KQL / SPL |
| DCSync Attack (Domain Replication) | Credential Access | T1003.006 | Critical | Windows 4662 (AD DS) | KQL / SPL |
| SideWinder Spearphishing Document | Initial Access | T1566.001 | Critical | Email Gateway, EDR | KQL / SPL |
| Ransomware Shadow Copy Deletion | Impact | T1490 | Critical | Windows Event 524/4688 | KQL / SPL |
| CRIMSON RAT (APT36) C2 Beaconing | C&C | T1071.001 | Critical | Proxy, DNS, Firewall | KQL / SPL |
| Suspicious Scheduled Task Creation | Persistence | T1053.005 | High | Windows 4698/4702, Sysmon 1 | KQL / SPL |
| Living-off-the-Land (LOLBin) Abuse | Defense Evasion | T1218 | High | Sysmon 1/7, Windows 4688 | KQL / SPL |
| Cloud Storage Exfiltration (AWS S3) | Exfiltration | T1537 | High | AWS CloudTrail, S3 Access Logs | KQL |
| MFA Fatigue / Push Spam Attack | Credential Access | T1621 | High | Azure AD Sign-in Logs | KQL |
| DNS Tunnelling for Data Exfil | Exfiltration | T1048.003 | High | DNS Logs, Sysmon 22 | KQL / SPL |
| Privilege Escalation via Token Impersonation | Privilege Escalation | T1134.001 | High | Windows 4672/4673 | KQL / SPL |
Detection Query Reference
Production-ready detection queries in KQL (Microsoft Sentinel), SPL (Splunk), and XQL (Cortex XSIAM). Each query includes the threat scenario, required log sources, tuning notes, and expected false positive rate.
SecurityEvent
| where EventID == 4104
| where ScriptBlockText has_any ("-EncodedCommand", "-enc", "-ec")
| where ScriptBlockText !has "Microsoft.PowerShell"
| project TimeGenerated, Account, Computer, ScriptBlockText
| extend DecodedHint = base64_decodestring(extract(@"-[Ee][Nn][Cc].*?\s+([A-Za-z0-9+/=]+)", 1, ScriptBlockText))
| where isnotempty(DecodedHint)
EventCode=4104 ScriptBlockText IN ("*-EncodedCommand*", "*-enc *", "*-ec *")
NOT ScriptBlockText="*Microsoft.PowerShell*"
| eval decoded=base64decode(mvindex(split(ScriptBlockText,"-EncodedCommand "),1))
| table _time, ComputerName, UserID, ScriptBlockText, decoded
Event
| where Source == "Microsoft-Windows-Sysmon"
| where EventID == 10
| parse EventData with * '<TargetImage>' TargetImage '</TargetImage>' *
| where TargetImage has "lsass.exe"
| parse EventData with * '<SourceImage>' SourceImage '</SourceImage>' *
| where SourceImage !has_any ("svchost.exe", "MsMpEng.exe", "csrss.exe")
| project TimeGenerated, Computer, SourceImage, TargetImage
SecurityEvent
| where EventID == 4769
| where TicketEncryptionType == "0x17"
| where ServiceName !startswith "$"
| where ServiceName !in ("krbtgt", "kadmin")
| summarize RequestCount=count(), Accounts=make_set(Account) by bin(TimeGenerated, 1h), Computer, ServiceName
| where RequestCount > 5
| order by RequestCount desc
SecurityEvent
| where EventID == 4688
| where NewProcessName has_any ("vssadmin.exe","wmic.exe","bcdedit.exe","wbadmin.exe")
| where CommandLine has_any ("delete shadows","resize shadowstorage","recoveryenabled No","delete systemstatebackup")
| project TimeGenerated, Account, Computer, CommandLine, NewProcessName
| extend Severity = "CRITICAL • Ransomware Stage 4 Indicator"
Sigma Rules • Platform-Agnostic Detection
Sigma is the vendor-agnostic detection rule format • write once, convert to KQL, SPL, XQL, or Elasticsearch DSL. The community repository has 3,000+ rules. This section covers Sigma fundamentals, structure, and top rules for India-targeting threats.
id: 8d72c5bb-f461-4c91-a5f8-a6c81fa70854
status: production
description: Detects PowerShell execution with encoded command to bypass detection
references:
- https://attack.mitre.org/techniques/T1059/001/
author: Cyber Handbook
date: 2025/01/15
tags:
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
detection:
selection:
ScriptBlockText|contains:
- '-EncodedCommand'
- '-enc '
- '-ec '
filter:
ScriptBlockText|contains: 'Microsoft.PowerShell'
condition: selection and not filter
falsepositives:
- Legitimate admin scripts using encoded commands
level: high
sigma convert -t microsoft365defender -p windows rules/powershell_encoded.yml
sigmac -t splunk -c splunk-windows rules/powershell_encoded.yml
SOC KPIs & Performance Metrics
A high-performing SOC measures everything that matters and ignores vanity metrics. These are the KPIs that Gartner, MITRE, and leading security operations programmes use to measure detection effectiveness, analyst efficiency, and programme maturity. Track these monthly and present to the board quarterly.
SOC Maturity Model
SOC maturity is not about headcount • it's about process, automation, and measurable outcomes. This model maps 5 maturity levels across 8 capability domains. Use it to baseline your current state and build a credible 12-month improvement roadmap for CISO and board reporting.
| Capability | L1 Initial | L2 Developing | L3 Defined | L4 Managed | L5 Optimising |
|---|---|---|---|---|---|
| Alert Triage | Manual, ad hoc | Basic playbooks | Documented SLA | SOAR-automated 60% | 90%+ auto-resolved |
| Detection Coverage | <10% ATT&CK | 10•25% ATT&CK | 25•50% ATT&CK | 50•75% ATT&CK | >75% ATT&CK |
| Threat Intelligence | No TI programme | IOC blocking only | TIP with SIEM integration | Threat-driven detection | Intel-led hunt operations |
| Log Coverage | <5 sources | 5•15 sources | All Tier 1 sources | Full stack incl. cloud | Universal telemetry |
| Incident Response | No IR plan | Basic IR runbook | Tested IR playbooks | SOAR-orchestrated IR | Autonomous containment |
| Threat Hunting | No hunting | Ad hoc investigations | Hypothesis-driven hunts | Monthly structured hunts | Continuous hunting pipeline |
| MTTD Target | >30 days | 7•30 days | 1•7 days | 1•24 hours | <1 hour |
| False Positive Rate | >70% | 40•70% | 20•40% | 10•20% | <10% |
Log Volume & Cost Estimator
Estimate daily EPS (Events Per Second), GB/day ingest volume, and annual SIEM licensing cost based on your infrastructure. Accurate sizing prevents budget overruns • SIEM cost surprises are the #1 reason SOC programmes are scaled back.
MITRE ATT&CK Detection Coverage
Map your detection rules to the 14 MITRE ATT&CK tactics. Coverage analysis drives prioritisation • focus on the tactics most used by APT groups targeting India and your sector, not just the most common generic threats.
India SIEM Compliance Mapping
SIEM is no longer optional for Indian regulated entities. CERT-In, RBI, SEBI, and IRDAI all mandate log collection, retention, and alerting for specific event types. This mapping shows which SIEM controls satisfy which regulatory requirements.
| Regulatory Requirement | Regulator | SIEM Control | Log Sources Required | Retention |
|---|---|---|---|---|
| 6-Hour Incident Reporting | CERT-In | Alert on 20 incident categories, auto-notify workflow | All log sources, EDR, Firewall, Email | 180 days |
| 180-Day Log Retention in India | CERT-In | SIEM storage with India-region data residency | All ICT system logs | 180 days |
| VPN/Remote Access Logging | CERT-In | Ingest and retain all VPN authentication logs | VPN Gateway, IAM, PAM | 180 days |
| NTP Sync Monitoring | CERT-In | Alert on NTP drift >5 seconds from approved servers | Syslog, NTP Logs | 180 days |
| Privileged User Activity Monitoring | RBI | UBA rules for admin account anomalies, PAM session alerts | AD, PAM, Windows 4672 | 1 year |
| Cybersecurity Incident Detection | RBI | SIEM alerting for all RBI-defined incident categories | Full stack | 1 year |
| SOC Operations Mandate | SEBI | 24x7 SIEM monitoring with documented escalation | Trading systems, Market data | 5 years |
| Annual Cyber Audit Evidence | SEBI | SIEM compliance reports, alert logs, IR evidence | All SIEM events | 5 years |
| Personal Data Breach Detection | DPDP Act | DLP alerts, data access anomaly detection, exfil detection | DLP, EDR, Proxy, Email | As needed |
SIEM Platform Comparison
Choosing the wrong SIEM is a multi-year, multi-million rupee mistake. This comparison covers the 5 leading platforms on query language, pricing model, India data residency, and total cost of ownership.
- Pay-per-GB • scales down at low volume
- 200+ native connectors for M365/Azure
- India region (Central India) available
- SOAR via Logic Apps included
- Free Defender data ingest for E5
- Cost spikes at high log volume
- KQL learning curve for SPL teams
- Weaker on-prem log source support
- Unmatched search flexibility with SPL
- Largest app/addon ecosystem (2000+)
- Excellent on-prem deployment support
- Splunk ES + SOAR (Phantom) bundleable
- Highest TCO • ingest-based pricing expensive
- Complex licensing negotiation
- Cisco acquisition adds roadmap uncertainty
- Flat-fee pricing • unlimited data ingest
- VirusTotal + Mandiant intel built-in
- Petabyte-scale without cost penalty
- 1-second search across years of data
- India data residency options limited
- YARA-L learning curve
- Smaller connector ecosystem
- Open-source core • no vendor lock-in
- EQL (Event Query Language) for sequences
- Self-hosted option for data sovereignty
- Strong India deployment community
- Free tier for small environments
- Requires significant operational investment
- Less mature SOAR integration
- Enterprise support expensive
- Strong out-of-box correlation rules
- On-prem deployment for air-gapped environments
- Dominant in India PSU banks & govt
- Deep network flow analysis
- Palo Alto asset acquisition adds uncertainty
- UI lagging modern platforms
- High professional services dependency
Log Source Priority Guide
Not all log sources are equal. Tier 1 sources are critical • missing any of them creates detection blind spots that attackers reliably exploit. This priority framework is used by mature SOC programmes to sequence log onboarding.
| Log Source | Tier | Key Events | EPS (est.) | CERT-In Required |
|---|---|---|---|---|
| Windows Security Events (DC) | Tier 1 | 4624,4625,4648,4662,4769,4768,7045 | 500•2000 | ✅ Yes |
| Sysmon (Windows Endpoints) | Tier 1 | 1,3,7,10,11,13,22,25 | 200•1000 per host | Recommended |
| Perimeter Firewall | Tier 1 | Allowed/denied connections, geo-blocks | 2000•50000 | ✅ Yes |
| EDR Telemetry (CrowdStrike/Defender) | Tier 1 | Process, network, file, registry events | 1000•5000 per host | Recommended |
| DNS Logs | Tier 1 | All DNS queries • C2 detection, DGA, tunnelling | 5000•100000 | ✅ Yes |
| VPN / Remote Access | Tier 1 | Auth, failures, geo-anomalies | 50•500 | ✅ Yes (CERT-In mandated) |
| Azure AD / Entra ID | Tier 1 | Sign-ins, MFA, Conditional Access, PIM | 200•2000 | Recommended |
| Email Gateway (Proofpoint/Defender) | Tier 2 | Blocked/allowed, phishing, malware | 100•500 | Recommended |
| Web Proxy / SWG | Tier 2 | URL categories, blocked requests, data exfil | 1000•10000 | Recommended |
| AWS CloudTrail | Tier 2 | API calls, IAM changes, S3 access | 100•5000 | Required if AWS used |
| PAM (CyberArk/BeyondTrust) | Tier 2 | Privileged sessions, password checks, vault access | 50•200 | Required if PAM deployed |
| Linux Syslog / Auditd | Tier 2 | Auth, sudo, process execution, file access | 200•2000 per host | Recommended |
Alert Tuning Playbook
Alert fatigue is the #1 SOC killer. A single poorly-tuned rule can generate 10,000 false positives per day, burying real alerts. This playbook provides a systematic approach to reducing false positives without increasing missed detections.