detecting-lateral-movement-with-splunk
Detect adversary lateral movement across networks using Splunk SPL queries against Windows authentication logs, SMB traffic, and remote service abuse.
What this skill does
# Detecting Lateral Movement with Splunk ## When to Use - When hunting for adversary movement between compromised systems - After detecting credential theft to trace subsequent lateral activity - When investigating unusual authentication patterns across the network - During incident response to scope the breadth of compromise - When proactively hunting for TA0008 (Lateral Movement) techniques ## Prerequisites - Splunk Enterprise or Splunk Cloud with Windows event data ingested - Windows Security Event Logs forwarded (4624, 4625, 4648, 4672, 4768, 4769) - Sysmon deployed for process creation and network connection data - Network flow data or firewall logs for SMB/RDP/WinRM correlation - Active Directory user and group membership reference data ## Workflow 1. **Define Lateral Movement Scope**: Identify which lateral movement techniques to hunt (RDP, SMB/Admin Shares, WinRM, PsExec, WMI, DCOM, SSH). 2. **Query Authentication Events**: Use SPL to search for Type 3 (Network) and Type 10 (RemoteInteractive) logons across the environment. 3. **Build Authentication Graphs**: Map source-to-destination authentication relationships to identify unusual connection patterns. 4. **Detect First-Time Relationships**: Identify new source-destination pairs that have not been seen in the historical baseline. 5. **Correlate with Process Activity**: Link authentication events to subsequent process creation on destination hosts. 6. **Identify Anomalous Patterns**: Flag lateral movement to sensitive servers, unusual hours, service account misuse, or rapid multi-host access. 7. **Report and Contain**: Document lateral movement path, affected systems, and coordinate containment response. ## Key Concepts | Concept | Description | |---------|-------------| | T1021 | Remote Services (parent technique) | | T1021.001 | Remote Desktop Protocol (RDP) | | T1021.002 | SMB/Windows Admin Shares | | T1021.003 | Distributed COM (DCOM) | | T1021.004 | SSH | | T1021.006 | Windows Remote Management (WinRM) | | T1570 | Lateral Tool Transfer | | T1047 | Windows Management Instrumentation | | T1569.002 | Service Execution (PsExec) | | Logon Type 3 | Network logon (SMB, WinRM, mapped drives) | | Logon Type 10 | Remote Interactive (RDP) | | Event ID 4624 | Successful logon | | Event ID 4648 | Explicit credential logon (runas, PsExec) | ## Tools & Systems | Tool | Purpose | |------|---------| | Splunk Enterprise | SIEM for log aggregation and SPL queries | | Splunk Enterprise Security | Threat detection and notable events | | Windows Event Forwarding | Centralize Windows logs | | Sysmon | Detailed process and network telemetry | | BloodHound | AD attack path analysis | | PingCastle | AD security assessment | ## Common Scenarios 1. **PsExec Lateral Movement**: Adversary uses PsExec to execute commands on remote systems via SMB, generating Type 3 logon with ADMIN$ share access. 2. **RDP Pivoting**: Attacker RDPs to internal systems using stolen credentials, creating Type 10 logon events. 3. **WMI Remote Execution**: Adversary uses WMIC process call create to spawn processes on remote hosts. 4. **WinRM PowerShell Remoting**: Attacker uses Enter-PSSession or Invoke-Command to execute code on remote systems. 5. **Pass-the-Hash via SMB**: Compromised NTLM hashes used to authenticate to remote systems without knowing the plaintext password. ## Output Format ``` Hunt ID: TH-LATMOV-[DATE]-[SEQ] Movement Type: [RDP/SMB/WinRM/WMI/DCOM/PsExec] Source Host: [Hostname/IP] Destination Host: [Hostname/IP] Account Used: [Username] Logon Type: [3/10/other] First Seen: [Timestamp] Event Count: [Number of events] Risk Level: [Critical/High/Medium/Low] Lateral Movement Path: [A -> B -> C -> D] ```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.