Lateral Movement Detection: Stopping Attackers from Spreading Through Your Network
Jean-Vincent QUILICHINI
The attacker's initial foothold was a single workstation—an employee who clicked a phishing link. But the breach didn't stop there. Over the next three weeks, the attacker moved from workstation to server, from server to domain controller, and finally to the database containing customer payment information. Each hop used legitimate credentials and authorized tools. Detecting lateral movement is the difference between a contained incident and a catastrophic breach.
What Is Lateral Movement?
Lateral movement describes techniques attackers use to move through a network after gaining initial access. Rather than stopping at the first compromised system, attackers traverse the environment seeking:
- Elevated privileges: Domain admin or root access.
- Valuable data: Databases, file shares, intellectual property.
- Persistence: Multiple footholds to survive detection.
- Strategic positions: Systems enabling further attacks.
The Attack Lifecycle
Lateral movement occurs mid-attack:
- Initial access: Phishing, exploitation, or stolen credentials.
- Persistence: Establishing reliable access to the compromised system.
- Privilege escalation: Gaining higher-level access locally.
- Lateral movement: Moving to additional systems.
- Objective completion: Data theft, ransomware deployment, or sabotage.
Common Lateral Movement Techniques
Credential-Based Movement
Pass-the-Hash (PtH): Using captured NTLM hashes to authenticate without knowing the plaintext password.
Pass-the-Ticket (PtT): Stealing and reusing Kerberos tickets for authentication.
Credential Dumping: Extracting passwords from memory, registry, or files.
Kerberoasting: Requesting service tickets to crack offline.
Remote Execution
PsExec and Alternatives: Using administrative tools to execute commands on remote systems.
Windows Management Instrumentation (WMI): Leveraging WMI for remote code execution.
PowerShell Remoting: Using WinRM and PowerShell for remote access.
Remote Desktop Protocol (RDP): Interactive access to systems with valid credentials.
SSH: Moving between Linux/Unix systems using stolen keys or credentials.
Exploitation-Based Movement
Internal Exploitation: Exploiting unpatched systems on the internal network.
Trust Relationship Abuse: Leveraging domain trusts to access additional forests.
Application Pivoting: Using web applications or databases to reach other systems.
Detecting Lateral Movement
Network-Based Detection
Monitor network traffic for movement indicators:
- Unusual internal connections: Systems communicating that normally don't.
- Port anomalies: Administrative ports (445, 3389, 22) from unexpected sources.
- Volume changes: Large data transfers between internal systems.
- Protocol anomalies: Unusual protocols or encrypted traffic internally.
- Time-based patterns: Activity outside normal business hours.
Authentication-Based Detection
Track credential usage patterns:
- Impossible travel: Same account logging in from distant systems simultaneously.
- Account anomalies: Service accounts used interactively.
- Privilege usage: Normal users accessing sensitive systems.
- Authentication type changes: NTLM where Kerberos is expected.
- Failed authentication spikes: Password spraying or credential stuffing.
Endpoint-Based Detection
Monitor system activity for movement tools:
- Process creation: PsExec, WMI, PowerShell launching remotely.
- Credential access: LSASS access, SAM registry reads.
- Scheduled tasks: New tasks created on remote systems.
- Service installation: Services installed for persistence or execution.
- File transfers: Tools or data staged for movement.
Behavioral Analytics
Identify deviations from normal:
- User baselines: Unusual systems or data accessed.
- System baselines: Unexpected outbound connections or processes.
- Peer comparison: Activity different from similar roles.
- Temporal analysis: Actions at unusual times.
How isMalicious Can Help
isMalicious enhances lateral movement detection with external intelligence:
- C2 Detection: Identify compromised systems communicating with command-and-control infrastructure.
- Exfiltration Alerts: Detect data leaving to malicious destinations during movement phases.
- IP Reputation: Flag internal systems connecting to known threat actor infrastructure.
- API Integration: Automate reputation checks for suspicious outbound connections.
- Real-Time Monitoring: Alert when compromised systems exhibit beacon-like behavior.
Prevention Strategies
Network Segmentation
Limit attacker movement paths:
- VLAN segmentation: Separate networks by function and sensitivity.
- Microsegmentation: Granular controls between individual workloads.
- Jump servers: Require privileged access through controlled systems.
- Zero trust architecture: Verify every connection, internal or external.
Privileged Access Management
Control high-value credentials:
- Just-in-time access: Grant privileges only when needed.
- Privileged workstations: Dedicate systems for administrative tasks.
- Credential tiering: Prevent domain admin credentials on workstations.
- Password rotation: Regularly change service account passwords.
Endpoint Hardening
Reduce attack surface on systems:
- Local admin removal: Eliminate unnecessary local administrator rights.
- Credential guard: Protect credentials from memory extraction.
- Application whitelisting: Block unauthorized executables.
- Disable unused protocols: Turn off SMBv1, LLMNR, NetBIOS.
Authentication Strengthening
Make credential theft less valuable:
- Multi-factor authentication: Require MFA for sensitive access.
- Smart cards or FIDO2: Deploy phishing-resistant authentication.
- Protected Users group: Enable additional protections for sensitive accounts.
- Kerberos armoring: Prevent credential relay attacks.
Building a Detection Program
Data Collection
Ensure visibility into movement:
- Enable logging: Windows Security events, PowerShell, Sysmon.
- Centralize data: Aggregate logs in SIEM for correlation.
- Network visibility: Deploy sensors for traffic analysis.
- Endpoint telemetry: Install EDR for detailed system visibility.
Detection Rules
Implement specific detections:
Example: Unusual Administrative Tool Use
- Alert when PsExec runs from non-IT workstations.
- Flag WMI process creation across network boundaries.
- Detect PowerShell remoting from unexpected sources.
Example: Credential Access
- Alert on LSASS memory access by unusual processes.
- Detect SAM registry hive exports.
- Flag DCSync replication requests from non-domain controllers.
Example: Authentication Anomalies
- Alert on NTLM authentication to domain controllers.
- Detect Kerberos ticket requests for high-privilege accounts.
- Flag logon type 10 (RDP) to servers from workstations.
Response Playbooks
Prepare for detections:
- Triage: Validate alert and assess severity.
- Scope: Identify other potentially compromised systems.
- Contain: Isolate affected systems and reset credentials.
- Investigate: Determine attack vector and timeline.
- Remediate: Remove attacker presence and close gaps.
Advanced Detection Techniques
Honey Tokens
Deploy decoys to detect movement:
- Fake credentials: Plant credentials that alert when used.
- Decoy systems: Systems that should never receive connections.
- Fake files: Documents that alert when accessed.
- DNS canaries: Domains that resolve only for detection.
Graph Analysis
Map and monitor relationships:
- Access graphs: Visualize who can reach what systems.
- Credential chains: Identify paths from user to domain admin.
- Anomaly detection: Alert on new edges in access graphs.
- Attack path analysis: Proactively identify risky configurations.
Machine Learning
Apply advanced analytics:
- User behavior baselines: Learn normal access patterns.
- Entity risk scoring: Aggregate indicators into risk levels.
- Clustering analysis: Group similar behaviors to find outliers.
- Time series analysis: Detect unusual patterns over time.
Measuring Detection Effectiveness
Red Team Validation
Test detection capabilities:
- Purple team exercises: Collaborative testing of specific techniques.
- Attack simulations: Automated tools mimicking attacker behaviors.
- Adversary emulation: Replicate real threat actor TTPs.
- Breach and attack simulation: Continuous automated testing.
Metrics
Track program performance:
- Detection coverage: Percentage of techniques with detections.
- Mean time to detect: Speed of identifying lateral movement.
- False positive rate: Alert accuracy and analyst efficiency.
- Dwell time: How long attackers remain before detection.
Contain the Blast Radius
Attackers who gain initial access will attempt to move through your network. The goal is not to prevent all movement—that's nearly impossible—but to detect it quickly and limit how far attackers can go. By combining network segmentation, robust detection, and threat intelligence from isMalicious, organizations can contain breaches before they become catastrophic.
Start improving your lateral movement detection today. Assess your visibility, implement key detections, and test your capabilities regularly. The attackers will try to move—make sure you see them when they do.
Protect Your Infrastructure
Check any IP or domain against our threat intelligence database with 500M+ records.
Try the IP / Domain Checker