Blue Team

πŸ” Detection & Threat Hunting Query Repository

Production KQL, Sigma, and Splunk hunts covering MITRE ATLAS AI attacks and 2026 active compromise tradecraft.

MITRE ATLAS β€’ AML.T0051 / AML.T0053 KQL / Sentinel Indirect Prompt Injection & Rogue AI Agent Tool Invocation

Detects AI assistants/agents invoking high-privilege outbound tools (email send, webhook POST, file export) immediately after ingesting untrusted external documents or RAG context.

AIAgentAuditLogs
| where TimeGenerated > ago(24h)
| where ActionType in ("ToolInvocation", "PluginExecution", "MCP_Call")
| where ToolName has_any ("SendEmail", "HttpPost", "ExportData", "GraphMail", "SlackPost")
| extend PromptSource = tostring(AdditionalFields.contextSource)
| where PromptSource has_any ("ExternalDocument", "SharedDrive", "WebScrape", "UntrustedEmail")
| project TimeGenerated, UserPrincipalName, AgentName, ToolName, PromptSource, TargetURI = tostring(AdditionalFields.targetUrl)
| sort by TimeGenerated desc
MITRE ATLAS β€’ AML.T0024 / AML.T0044 2026 Compromise Pattern AI Inference Engine RCE & Model Weight Exfiltration (SGLang / vLLM / Ollama)

Hunts for shell spawning or outbound transfers of .safetensors / .gguf / .bin model weights from LLM inference processes.

DeviceProcessEvents
| where Timestamp > ago(7d)
| where InitiatingProcessCommandLine has_any ("sglang", "vllm", "ollama", "tritonserver", "torchserve")
| where FileName in~ ("sh", "bash", "curl", "wget", "python3", "nc", "rclone", "aws")
   or ProcessCommandLine has_any (".safetensors", ".gguf", "/root/.ssh", "169.254.169.254")
| project Timestamp, DeviceName, AccountName, InitiatingProcessCommandLine, FileName, ProcessCommandLine
MITRE ATLAS β€’ AML.T0024.002 KQL / Proxy & DNS Shadow AI & Bulk Payload Uploads to Unsanctioned LLM Endpoints

Identifies high-volume outbound POST requests from non-approved workstations or service accounts to external AI inference APIs.

CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DestinationHostName has_any ("api.openai.com", "api.anthropic.com", "generativelanguage.googleapis.com", "api.deepseek.com", "openrouter.ai", "huggingface.co")
| where SentBytes > 524288
| summarize TotalMB = round(sum(SentBytes)/1048576.0, 2), SessionCount = count() by SourceIP, SourceUserName, DestinationHostName
| where TotalMB > 5.0
| sort by TotalMB desc
2026 Compromise β€’ Supply Chain JS KQL / WAF & CSP Logs Tampered CDN / Experimentation Script & Wallet/Card Skimmer Detection

Detects unauthorized Content-Security-Policy (CSP) script-src / connect-src violations or DOM wallet-swapping loaders injected via third-party experimentation/CDN tags.

W3CIISLog
| where TimeGenerated > ago(24h)
| where csUriStem has "csp-report" or csUserAgent has "CSP"
| extend BlockedURI = extract("blocked-uri[\"']?:\\s*[\"']([^\"']+)", 1, csUriQuery)
| where isnotempty(BlockedURI)
| where BlockedURI !has_any ("google-analytics.com", "googletagmanager.com", "cloudflareinsights.com")
| summarize HitCount = count(), SamplePages = make_set(cReferrer, 5) by BlockedURI
| sort by HitCount desc
2026 Compromise β€’ Identity & OAuth KQL / Entra & GitHub Audit Stolen OAuth Token Replay & Anomalous Third-Party App Consent

Detects high-risk OAuth permissions granted or replayed from unfamiliar ASN/hosting IPs following credential/token breaches.

AuditLogs
| where TimeGenerated > ago(7d)
| where OperationName has_any ("Consent to application", "Add OAuth2PermissionGrant", "Add app role assignment")
| extend AppName = tostring(TargetResources[0].displayName), Initiator = tostring(InitiatedBy.user.userPrincipalName), IP = tostring(InitiatedBy.user.ipAddress)
| where tostring(TargetResources[0].modifiedProperties) has_any ("Mail.Read", "Files.Read.All", "offline_access", "Directory.ReadWrite.All")
| project TimeGenerated, Initiator, IP, AppName, OperationName
πŸ”’ Want Full Sigma YAML Packs & Automated Sentinel/Elastic Rule Bundles?

Upgrade to Jedi Knight or Jedi Master to download exportable Sigma/KQL rule packs and test them inside Kasm & Matterhorn labs.

Unlock Jedi Knight Tier →

πŸ“Š SOC Management, Operational KPIs & NICE Role Matrix

Operational metrics, shift governance benchmarks, and core workforce expectations mapped to the CISA NICCS / NICE Cybersecurity Workforce Framework.

MTTD (MEAN TIME TO DETECT)
< 15 mins
Critical / High severity alerts from telemetry ingestion to analyst triage.
MTTA (MEAN TIME TO ACKNOWLEDGE)
< 10 mins
Tier-1/Tier-2 queue pickup SLA for P1/P2 escalations.
MTTR (CONTAINMENT SLA)
< 60 mins
Host EDR isolation, session revocation, or firewall block execution.
FALSE POSITIVE RATE
< 12%
Weekly detection tuning feedback loop from analysts to Detection Eng.

Extended SOC Governance & Quality KPIs

KPI Metric Target Benchmark Measurement Formula Operational Owner
True Positive Escalation Accuracy ≥ 90% Confirmed Incidents / Total Tier-1 Escalations SOC Analysts (PD-WRL-001)
MITRE ATT&CK / ATLAS Coverage ≥ 75% Priority TTPs Active Tested Rules / Relevant Threat Profile Techniques Detection Engineering & Threat Analysis
Forensic Triage Turnaround < 4 hrs (Volatile) Time from Escalation to Memory/Disk Artifact Acquisition Digital Forensics Specialists (PD-WRL-002)
Playbook Automation Rate (SOAR) ≥ 45% L1 Alerts Auto-Enriched & Auto-Closed Alerts / Total Alert Volume SOC Manager & Infrastructure Support
Post-Incident Review (PIR) SLA ≤ 5 Business Days Root Cause + Detection Gap Report Delivered Post-Closure Incident Response Manager (PD-WRL-003)

πŸŽ–οΈ Core Role Expectations & Abilities (CISA NICCS / NICE Framework)

Reference: CISA NICCS Career Pathways →

Standardized expectations, core abilities, and measurable deliverables across SOC Analysts, Digital Forensics Specialists, and Incident Response Managers.

SOC Group / NICE Role Core NICE Abilities & Competencies Day-to-Day Operational Expectations Primary Deliverables & KPIs
Cyber Defense Analysts
Defensive Cybersecurity
PD-WRL-001 / PD-WRL-006
β€’ Correlate SIEM, EDR, network flow, and identity logs to separate benign anomalies from true intrusions.
β€’ Map observed activity to MITRE ATT&CK & ATLAS tactics.
β€’ Perform proactive hypothesis-driven threat hunting.
β€’ Acknowledge P1/P2 alerts within 10 minutes.
β€’ Enrich IOCs (hashes, IPs, OAuth app IDs, domains) before escalating.
β€’ Submit weekly rule-tuning feedback to reduce alert fatigue.
β€’ Triage tickets with clear timeline & IOC summary.
β€’ ≥ 90% escalation accuracy.
β€’ 1+ validated threat hunt query per sprint.
Forensics Specialists
Digital Forensics
PD-WRL-002 / IN-WRL-002
β€’ Acquire and preserve volatile memory, disk images, cloud audit trails, and container snapshots with strict chain-of-custody.
β€’ Reconstruct attacker lateral movement, persistence, and malware execution timelines.
β€’ Extract actionable host/network IOCs from binaries and scripts.
β€’ Preserve forensic integrity before system reimaging or remediation.
β€’ Conduct deep-dive root cause analysis on escalated P1 intrusions.
β€’ Maintain court-admissible evidence logs and cryptographic hashes.
β€’ Chain-of-custody & forensic acquisition logs.
β€’ Master attack timeline & root-cause report.
β€’ Extracted YARA/Sigma signatures for SOC deployment.
Incident Managers
Incident Response
PD-WRL-003 / OG-WRL-002
β€’ Command end-to-end incident lifecycle (Preparation, Detection, Containment, Eradication, Recovery, Post-Incident).
β€’ Coordinate across IT, Legal, Executive Leadership, PR, and external regulators.
β€’ Assess business impact, regulatory notification clocks, and containment risk.
β€’ Lead war-room bridge calls and assign clear containment workstreams.
β€’ Approve high-impact containment actions (network segmentation, tenant-wide token revocation).
β€’ Drive blameless Post-Incident Reviews and control remediation tracking.
β€’ Executive situation reports (SITREPs) on cadence.
β€’ Containment within < 60m SLA.
β€’ Formal PIR & control-gap action plan within 5 days.

🎯 Threat Library & Enterprise Attack Vectors

Tactical breakdown of high-frequency adversary tradecraft across Email, Identity, Cloud/AI, and Web infrastructure.

VectorAdversary TechniquePrimary Detection Focus
AI & LLM PipelinesIndirect Prompt Injection & Inference RCE (ATLAS)Monitor AI agent outbound tool calls & inference container child processes.
Identity & OAuthIllicit OAuth App Consent & Session Token ReplayAudit high-privilege Graph/GitHub scopes & anomalous ASN token usage.
Web & Supply ChainThird-Party CDN / Tag Manager JS SkimmingEnforce strict CSP headers, Subresource Integrity (SRI), and CSP violation alerts.
Email & BECQuishing (QR), SVG Smuggling & Hidden Inbox RulesAudit New-InboxRule forwarders & inspect base64/SVG attachments.
Host & RansomwareBYOVD Driver Abuse & Shadow Copy DeletionBlock vulnerable drivers via WDAC/HVCI & alert on vssadmin / wbadmin.

πŸ”¬ Standard Operating Procedures (Investigation SOPs)

17 step-by-step containment, scoping, and eradication runbooks for SOC analysts and incident responders.

Showing 17 SOPs
SOP-01: Compromised OAuth Token & Identity Takeover Triage IDENTITY & CLOUD
  1. Contain: Revoke active refresh tokens and OAuth application grants immediately in Entra ID / Authentik / GitHub.
  2. Scope: Query 7-day sign-in and audit logs for unfamiliar ASNs, device registrations, or MFA method changes.
  3. Eradicate: Reset credentials, rotate exposed API secrets/SSH keys, and remove unauthorized mailbox forwarding rules.
  4. Verify: Confirm zero subsequent token replay attempts over the next 24 hours.
SOP-02: Suspected AI Inference / Agent Compromise Triage AI & SUPPLY CHAIN
  1. Isolate: Quarantine the inference container/pod (SGLang/vLLM/Ollama) while preserving memory and container filesystem layers.
  2. Inspect Prompts & RAG Sources: Review recent retrieved documents and tool-call execution logs for indirect prompt injection payloads.
  3. Audit Egress: Check firewall/proxy logs for unauthorized outbound connections or model-weight (.safetensors/.gguf) transfers.
SOP-03: Active Ransomware Encryption & Pre-Encryption Containment RANSOMWARE & ENDPOINT
  1. Isolate: Trigger immediate EDR network containment on affected hosts and block SMB (TCP/445) / RDP lateral segments at the firewall.
  2. Preserve Forensics: Capture volatile RAM before rebooting; inspect vssadmin, wbadmin, and RMM tool execution logs.
  3. Identify Patient Zero: Pivot on the initiating binary hash, scheduled task, or compromised domain admin account across all endpoints.
  4. Protect Backups: Verify immutable backup repositories and isolate backup management interfaces from production AD.
SOP-04: Business Email Compromise (BEC) & Malicious Inbox Rule Investigation NETWORK & EMAIL
  1. Contain: Revoke active Exchange/M365/Google Workspace sessions and reset the compromised user's password.
  2. Inspect Rules & Delegates: Audit New-InboxRule, Set-Mailbox forwarding addresses, and delegated mailbox permissions.
  3. Scope Financial Fraud: Search sent items for wire-transfer/invoice-change lures sent to vendors or finance staff and alert counterparties immediately.
  4. Purge Lures: Content-search and purge inbound phishing messages across all tenant mailboxes.
SOP-05: Adversary-in-the-Middle (AiTM) Phishing & Session Cookie Theft IDENTITY & CLOUD
  1. Detect Replay: Correlate sign-ins where the initial MFA challenge and subsequent session token use originate from different ASNs/user-agents.
  2. Revoke Tokens: Invalidate all refresh tokens (Revoke-MgUserSignInSession) and clear persistent browser session cookies.
  3. Audit MFA Methods: Remove any newly registered FIDO2 keys, authenticator apps, or SMS numbers added during the attacker session.
SOP-06: Unauthorized RMM Tool Deployment (AnyDesk / ScreenConnect / MeshAgent) RANSOMWARE & ENDPOINT
  1. Contain: Isolate the endpoint via EDR and block outbound RMM relay domains/ports at the perimeter proxy.
  2. Trace Delivery: Inspect browser downloads, email attachments, or PowerShell/MSIEXEC parent processes to determine initial execution.
  3. Sweep Fleet: Query EDR software inventory and service creation logs (Event ID 7045) for rogue RMM binaries across all hosts.
SOP-07: Active Directory Kerberoasting & DCSync Privilege Escalation IDENTITY & CLOUD
  1. Detect: Review Security Event ID 4769 (RC4-HMAC TGS spikes) and Event ID 4662 (DS-Replication-Get-Changes-All from non-DC IPs).
  2. Contain: Isolate the source workstation/server immediately and disable the compromised service or privileged account.
  3. Reset KRBTGT: If DCSync succeeded, execute a double krbtgt password reset (spaced 10+ hours apart) and rotate all service account passwords.
SOP-08: Third-Party CDN / Tag Manager JavaScript Skimmer & Loader Compromise AI & SUPPLY CHAIN
  1. Contain: Remove or pin the compromised third-party script/CDN tag and enforce a strict Content-Security-Policy (CSP) blocking unauthorized connect-src domains.
  2. Preserve Payload: Download and hash the tampered JS file before purging CDN caches so indicators can be extracted.
  3. Assess Exposure: Audit web access logs during the injection window to identify impacted checkout/wallet pages and notify affected users.
SOP-09: Edge Firewall / VPN Appliance Zero-Day Exploitation Triage NETWORK & EMAIL
  1. Contain: Restrict management plane exposure from WAN immediately and apply vendor emergency patches/mitigations.
  2. Inspect Integrity: Run vendor integrity verification tools, check for unauthorized local admin accounts, web shells, or modified SSL-VPN portals.
  3. Pivot Internally: Hunt for LDAP/RADIUS credential harvesting or lateral movement originating from the appliance's internal LAN IP.
SOP-10: Cloud IAM Access Key & Secrets Exposure (AWS / Azure / GCP / GitHub) IDENTITY & CLOUD
  1. Contain: Deactivate or delete the exposed IAM access key / PAT token immediately before rotating replacement secrets.
  2. Audit CloudTrail / Activity Logs: Query all API calls made by the key IDβ€”focusing on CreateUser, AttachUserPolicy, GetSecretValue, and S3/Blob reads.
  3. Eradicate Persistence: Remove any rogue IAM users, roles, or compute instances spun up during the exposure window.
SOP-11: Suspected Data Exfiltration & Extortion Staging (Rclone / Mega / SFTP) RANSOMWARE & ENDPOINT
  1. Contain: Block egress to cloud storage/file-sharing endpoints at the firewall and isolate the staging host via EDR.
  2. Quantify Scope: Inspect NetFlow/proxy byte counts, archive staging directories (.7z, .rar, .zip), and rclone.conf files to determine what data left the network.
  3. Notify Legal/IR Lead: Escalate confirmed exfiltration volumes and affected file shares immediately for regulatory assessment.
SOP-12: Command & Control (C2) Beaconing & DNS Tunneling Investigation NETWORK & EMAIL
  1. Identify Process: Correlate the internal source IP/port in firewall/Zeek logs with EDR network connection telemetry to pinpoint the beaconing binary.
  2. Sinkhole / Block: Sinkhole the C2 domain in internal DNS and block destination IPs/JA4 TLS fingerprints at the perimeter.
  3. Dump & Analyze: Capture process memory and binary sample for sandbox detonation in Kasm/CAPE to extract fallback C2 infrastructure.
SOP-13: Web Shell & Public Application Server Intrusion Triage RANSOMWARE & ENDPOINT
  1. Detect: Hunt for web server worker processes (w3wp.exe, nginx, php-fpm, java) spawning command shells (cmd.exe, powershell, /bin/sh).
  2. Contain: Take the compromised web node out of the load balancer pool and isolate host egress.
  3. Diff Web Root: Compare web root files against clean Git/CI build artifacts to uncover injected .aspx/.php/.jsp shells and backdoored libraries.
SOP-14: Malicious Package / CI-CD Pipeline & Dependency Confusion Compromise AI & SUPPLY CHAIN
  1. Freeze Pipelines: Pause affected GitHub Actions / GitLab CI runners and quarantine builds that pulled the tainted npm/PyPI/Docker package.
  2. Rotate Runner Secrets: Assume all environment variables, signing keys, and cloud OIDC tokens exposed to the build runner are compromised and rotate immediately.
  3. Pin Hashes: Enforce lockfile integrity hashes and private registry namespace scoping before resuming deployments.
SOP-15: Infostealer Malware Infection on Corporate or BYOD Endpoint RANSOMWARE & ENDPOINT
  1. Isolate & Revoke: Isolate the infected endpoint and revoke all active SSO, VPN, and SaaS sessions for the logged-in user.
  2. Assume Browser Vault Compromise: Treat every saved browser password, session cookie, and local SSH/AWS config file on the host as exfiltrated.
  3. Reimage & Reset: Perform a full OS wipe/reimage (do not rely on AV cleanup alone) and force password resets across all accessed corporate apps.
SOP-16: Kubernetes / Container Breakout & Rogue Pod Investigation IDENTITY & CLOUD
  1. Contain: Apply a deny-all NetworkPolicy to the suspect namespace/pod and cordon the underlying worker node.
  2. Inspect Admission & Audit Logs: Check K8s API audit logs for privileged pod creations, hostPath mounts, or service account token reads.
  3. Rotate Cluster Secrets: Rotate compromised service account tokens, image pull secrets, and cloud metadata IAM roles.
SOP-17: RAG Knowledge Base Poisoning & Vector Store Unauthorized Access AI & SUPPLY CHAIN
  1. Contain: Temporarily disable external document ingestion pipelines into the vector database (Qdrant/Pinecone/pgvector) and restrict API write tokens.
  2. Audit Embeddings & Chunks: Scan recently indexed documents for hidden instruction-override text, white-on-white PDF text, or adversarial markdown links.
  3. Re-Index Clean Corpus: Purge poisoned document IDs, sanitize ingestion parsers, and rebuild affected vector collections from verified sources.

πŸ“ SOC Regex & Log Extraction Repository

Prompt Injection / Jailbreak Override Phrases (WAF / AI Gateway)
(?i)(ignore\s+(all\s+)?(previous|prior|above)\s+instructions|disregard\s+system\s+prompt|you\s+are\s+now\s+in\s+developer\s+mode|exfiltrate|reveal\s+your\s+system\s+instructions)
Cryptocurrency Wallet Address Swap / Skimmer Indicators (JS / Proxy)
\b(0x[a-fA-F0-9]{40}|[13][a-km-zA-HJ-NP-Z1-9]{25,34}|bc1[ac-hj-np-z02-9]{11,71}|T[A-Za-z1-9]{33})\b
Exposed JWT / Bearer & GitHub / OpenAI API Keys in Logs
(eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}|gh[pousr]_[A-Za-z0-9]{36}|sk-[A-Za-z0-9]{32,})

🧰 Recommended Blue Team & SOC Defense Stack

Core open-source and self-hosted defensive tools integrated with AI CSOC workflows.

Wazuh / Elastic Security

Unified SIEM & XDR with MITRE ATT&CK and MITRE ATLAS detection rule coverage.

Velociraptor DFIR

Endpoint visibility and rapid VQL forensic artifact collection across fleets.

OpenCTI + n8n

Automated STIX/TAXII indicator enrichment and real-time alert correlation.