SlideShare a Scribd company logo
Threat Hunting for
Lateral Movement
Presented by:
Ryan Nolette – Security Technologist
Adam Fuchs – CTO
© 2017 Sqrrl Data, Inc. All rights reserved. 2
Your Presenters
Adam Fuchs
Sqrrl CTO
Ryan Nolette
Sqrrl Security Technologist
2	
  
© 2017 Sqrrl Data, Inc. All rights reserved. 3
Agenda
  Lateral Movement Overview
  What is it?
  Common Techniques
  The Lateral Movement Process
  Compromise
  Reconnaissance
  Credential Theft
  The Lateral Movement event
Sqrrl Lateral Movement Detectors
  Demo
  Q&A
© 2017 Sqrrl Data, Inc. All rights reserved. 4
  Techniques that enable attackers to
access and control systems within your
network
  Leveraged for:
  Access to specific information or files
  Remote execution of tools
  Pivoting to additional systems
  Access to additional credentials
  Movement across a network from one
system to another may be necessary to
achieve goals
  Often key to an attacker’s capabilities and
a piece of a larger set of dependencies
What am I referring to when I say Lateral Movement?
© 2017 Sqrrl Data, Inc. All rights reserved. 5
Application Deployment Software
Exploitation of VulnerabilityLogon Scripts
Pass the Hash
Remote Desktop Protocol
Remote File Copy
Remote ServicesReplication Through Removable Media
Shared Webroot
Taint Shared Content
Third-party Software
Windows Admin Shares
Windows Remote Management
Different Types of Lateral Movement
BAD
Patient 0:
original
Infection
Successful
Lateral
Movement
Failed Data access
from compromised
host after lateral
movement
Failed Data access
from Patient 0
Successful
Lateral
Movement
Successful Data access
from compromised host
after lateral movement
Company’s
Customer
Financial
Records
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 7
Login to new
system
•  psexec - shell
•  RDP – GUI
•  Profit
LateralMovement
Tools
•  Mimikatz
•  Pwdump
•  Generic memory
dump
Goal
•  To gather either
plaintext credential
to use for generic
system
authentication
•  Password hash to
pass to a system in
place of a password
•  Ultimately elevate
your privileges from
the current
compromised user
to an administrative
user
CredentialTheft
Human Attacker
starts running
system
commands to
gather
intelligence
Examples of recon:
•  Network
•  netstat – see active
network
connections
•  Nmap – network
scanner
•  Net use – access to
resources
•  System
•  Net user – manage
local/domain
accounts
•  Task list – what
processes are
running on system
Reconnaissance
Stages
•  Infected system
checks in with
command and
control server/s
•  Human Attacker
gives command to
infected system to
allow access
•  remote shell
•  GUI interface
options
•  Human attacker
starts
reconnaissance
Compromise
Infection to Lateral Movement Process
Infection
Techniques
•  Phishing email
•  Drive by
•  Exploit kit
•  Flash drive
Infection
Rinse and Repeat for each system as needed or wanted
© 2017 Sqrrl Data, Inc. All rights reserved. 8
  Communication with the
compromised systems and C&C
(command and control) servers
is established
  Threat actors need to sustain
persistent access across the
network
  They move laterally within the
network and gain higher
privileges through the use of
different tools
Windows	
  Reverse	
  Shell	
  
Compromise
© 2017 Sqrrl Data, Inc. All rights reserved. 9
  To move laterally within a breached
network and maintain persistence,
attackers obtain information like
network hierarchy, services used in
the servers and operating systems
  Attackers check the host naming
conventions to easily identify
specific assets to target
  Attackers utilize this info to map the
network and acquire intelligence
about their next move
Recon Local Accounts
Recon Domain Accounts
Reconnaissance
© 2017 Sqrrl Data, Inc. All rights reserved. 10
  Once threat actors identify other
“territories” they need to access, the next
step is to gather login credentials
  Cracking and Stealing Passwords
  Pass the Hash: involves the use of a
hash instead of a plaintext password
in order to authenticate and gain
higher access
  Brute force attack: simply guessing
passwords through a predefined set
of passwords
  Using gathered information, threat actors
move to new territories within the network
and widen their control
Running Mimikatz in memory via powershell
Credential Theft
  These activities are often unnoticed by IT
administrators, since they only check
failed logins without tracking the
successful ones
	
  
© 2017 Sqrrl Data, Inc. All rights reserved. 11
  Attackers can now remotely access
desktops
  Accessing desktops in this manner is not
unusual for IT support staff
  Remote access will therefore not be readily
associated with an ongoing attack
  Attackers may also gather domain
credentials to log into systems, servers,
and switches
  Remote control tools enable attackers to
access other desktops in the network and
perform actions like executing programs,
scheduling tasks, and managing data
collection on other systems
Lateral Movement – Using Stolen Credentials
  Tools and techniques used for this
purpose include remote desktop tools,
PsExec, and Windows Management
Instrumentation (WMI)
  Note that these tools are not the only
mechanisms used by threat actors in
lateral movement
	
  
© 2017 Sqrrl Data, Inc. All rights reserved. 12
https://xkcd.com/1831/
DETECTING LATERAL
MOVEMENT WITH DATA
SCIENCE
© 2017 Sqrrl Data, Inc. All rights reserved. 14
  LM evidence comes from:
  Windows Events
  Syslog
  VPN
  Endpoint sensors
  Primary fields:
  Source
  Destination
  User
  Time
  Extra Information:
Data
© 2017 Sqrrl Data, Inc. All rights reserved. 15
Target Specific Techniques
•  e.g. Pass The Hash detection
•  Very specific means low false positives
•  May miss new techniques
Search for General Graph Patterns
•  Hard to hide from
•  May pick up unrelated similar patterns
Specialized Generic
Abstraction Spectrum Trade-Off
© 2017 Sqrrl Data, Inc. All rights reserved. 16
(3)	
  Rarely-­‐Seen	
  Logins	
  
(4)	
  Fan-­‐outs,	
  including	
  failed	
  logins	
  	
  
(2) Overall Timeframe in expected range
(1) Expected Inter-login
Time Distribution
(5) Not too big,
Not too small
LM Graph Pattern Characteristics
© 2017 Sqrrl Data, Inc. All rights reserved. 17
Lateral Movement Strategy
  Rank individual logins
  Train: learn common user login patterns from the data
  Predict: assign rank (logLikelihoodRatio) to every login. Rank high those that are
unusual
  Construct time-ordered connected sequences of logins
  Predict: find top N sequences of logins with the highest combined rank
© 2017 Sqrrl Data, Inc. All rights reserved. 18
  Used to determine base risk for logins
  Extensible feature vectors mix numerical,
categorical, and text features
TDigests for numerical
  Bag of words for text
Vectorized categorical statistics
  Learns “normal” in-situ
  Priors out-of-the-box
  Every network is different
  Scalable spark implementations
Generalized “Rarity” Classifier
© 2017 Sqrrl Data, Inc. All rights reserved. 19
Multi-Hop Predict
192.168.1.101	
   192.168.1.104	
  
192.168.1.78	
   192.168.1.83	
  
© 2017 Sqrrl Data, Inc. All rights reserved. 20
Multi-Hop Predict: Combinatorics
  General Problem: Subgraph Isomorphism
  5 edges è 25 = 32 subgraphs
  10 edges è 210 = 1024 subgraphs
  20 edges è 220 = 1,048,576 subgraphs
  We run with billions of edges...
  Solution: grow small subgraphs in parallel
  Prune early and often
Aglomerative clustering
  Message passing
192.168.1.101	
   192.168.1.104	
  
192.168.1.78	
   192.168.1.83	
  
© 2017 Sqrrl Data, Inc. All rights reserved. 21
Multi-Hop Predict: Message Passing
© 2017 Sqrrl Data, Inc. All rights reserved. 22
Multi-Hop Predict: Message Passing
© 2017 Sqrrl Data, Inc. All rights reserved. 23
Multi-Hop Predict: Message Passing
© 2017 Sqrrl Data, Inc. All rights reserved. 24
Scalable Implementation
  Large scale, parallel implementation
  Multiple Independent Variable Bayesian
Classifier (MIVB)
  Spark extension for graph processing
  High performance message passing
implementation
  Used for agglomerative clustering /
detection of LM structures
© 2017 Sqrrl Data, Inc. All rights reserved. 25
Processing Workflow
Sqrrl Auth/Login
Sources
Spark / GraphX
Classifier
Training
Single-Hop
Predict
Multi-Hop
Predict
Evidence Tables
Sqrrl CounterOps
Model
Trained
Classifier
© 2017 Sqrrl Data, Inc. All rights reserved. 26
False Positive Reduction
1.  Rank:
2.  Normalize:
•  Smooth out discontinuities in ranking function
•  Apply historical context to determine probability of seeing a given rank
•  Convert to risk score based on likelihood * impact
3.  Threshold:
•  Analysts usually care about LMs over risk X
Base risk factor Time risk factor Size risk factor
© 2017 Sqrrl Data, Inc. All rights reserved. 27
Building the LM Detector
TTP Alignment
Threat Hunters
Behavior and
Structural
Decomposition
High-Risk Classifier
(Subgraphs)
Data Scientists
Log-Likelihood
Ranking
Normality Classifier
(MIVB)
Scalable Implementation
(Spark, GraphX)
Computer Scientists
Deployable Workflow
with In-Situ Training
Rank Statistics
Normalization
Security Analyst
Contextual Exploration
and Visualization
REAL WORLD
THREAT HUNTING FOR
LATERAL MOVEMENT
© 2017 Sqrrl Data, Inc. All rights reserved. 29
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 30
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 31
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 32
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 33
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 34
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 35
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 36
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 37
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 38
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 39
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 40
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 41
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 42
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 43
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 44
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 45
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 46
Lateral Movement
© 2017 Sqrrl Data, Inc. All rights reserved. 47
Thank you!
threathunting.org
For hunting eCourses, papers and
other resources
&
threathunting.net
For a repository of hunting techniques
Q & A

More Related Content

PDF
Windows Threat Hunting
PDF
Hunting Lateral Movement in Windows Infrastructure
PPTX
I hunt sys admins 2.0
PDF
PHDays 2018 Threat Hunting Hands-On Lab
PDF
Threat hunting 101 by Sandeep Singh
PDF
Derbycon - The Unintended Risks of Trusting Active Directory
PDF
Threat Hunting with Splunk Hands-on
PDF
Hunting for Privilege Escalation in Windows Environment
Windows Threat Hunting
Hunting Lateral Movement in Windows Infrastructure
I hunt sys admins 2.0
PHDays 2018 Threat Hunting Hands-On Lab
Threat hunting 101 by Sandeep Singh
Derbycon - The Unintended Risks of Trusting Active Directory
Threat Hunting with Splunk Hands-on
Hunting for Privilege Escalation in Windows Environment

What's hot (20)

PDF
A Threat Hunter Himself
PPTX
Effective Threat Hunting with Tactical Threat Intelligence
PPTX
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
PDF
Threat Hunting
PPTX
Bsides 2019 - Intelligent Threat Hunting
PDF
A Threat Hunter Himself
PPTX
Cyber Threat Hunting Workshop
PDF
Threat Modeling Basics with Examples
PDF
Threat Hunting Report
PDF
Threat Hunting Procedures and Measurement Matrice
PPTX
Threat hunting for Beginners
PPTX
Kheirkhabarov24052017_phdays7
PPTX
Threat hunting - Every day is hunting season
PDF
How MITRE ATT&CK helps security operations
PPTX
Threat Hunting
PDF
Threat Hunting Playbook.pdf
PDF
Osint presentation nov 2019
PPTX
Cyber Threat Hunting with Phirelight
PPTX
MITRE ATT&CK framework
PPT
Malware Analysis Made Simple
A Threat Hunter Himself
Effective Threat Hunting with Tactical Threat Intelligence
BSidesLV 2016 - Powershell - Hunting on the Endpoint - Gerritz
Threat Hunting
Bsides 2019 - Intelligent Threat Hunting
A Threat Hunter Himself
Cyber Threat Hunting Workshop
Threat Modeling Basics with Examples
Threat Hunting Report
Threat Hunting Procedures and Measurement Matrice
Threat hunting for Beginners
Kheirkhabarov24052017_phdays7
Threat hunting - Every day is hunting season
How MITRE ATT&CK helps security operations
Threat Hunting
Threat Hunting Playbook.pdf
Osint presentation nov 2019
Cyber Threat Hunting with Phirelight
MITRE ATT&CK framework
Malware Analysis Made Simple
Ad

Viewers also liked (20)

PDF
Kaspersky managed protection
PDF
Generalized Elias Schemes for Truly Random Bits
PDF
Terra Bruciata: an open source initiative for software correctness
PDF
Deploying Privileged Access Workstations (PAWs)
PDF
Threat Intelligence Field of Dreams
PDF
Rtos ameba
PPTX
Io t security-ameba-ppt
PDF
PHDays '14 Cracking java pseudo random sequences by egorov & soldatov
PDF
Advanced Threats and Lateral Movement Detection
PDF
RTOS on ARM cortex-M platform -draft
PPTX
Active Directory - Real Defense For Domain Admins
PDF
A Very Stable Diode-Based Physically Unclonable Constant
PPTX
Whitewood entropy and random numbers - owasp - austin - jan 2017
PDF
Physically Unclonable Random Permutations
PDF
Threat hunting as SOC process
PDF
Two-fet based PUF
PDF
Трудовые будни охотника на угрозы
PDF
Very stable PUF based on two mosfet
PDF
Dakotacon 2017
PDF
Ubuntu 16.04 LTS Security Features
Kaspersky managed protection
Generalized Elias Schemes for Truly Random Bits
Terra Bruciata: an open source initiative for software correctness
Deploying Privileged Access Workstations (PAWs)
Threat Intelligence Field of Dreams
Rtos ameba
Io t security-ameba-ppt
PHDays '14 Cracking java pseudo random sequences by egorov & soldatov
Advanced Threats and Lateral Movement Detection
RTOS on ARM cortex-M platform -draft
Active Directory - Real Defense For Domain Admins
A Very Stable Diode-Based Physically Unclonable Constant
Whitewood entropy and random numbers - owasp - austin - jan 2017
Physically Unclonable Random Permutations
Threat hunting as SOC process
Two-fet based PUF
Трудовые будни охотника на угрозы
Very stable PUF based on two mosfet
Dakotacon 2017
Ubuntu 16.04 LTS Security Features
Ad

Similar to How to Hunt for Lateral Movement on Your Network (20)

PPTX
Dynamic Population Discovery for Lateral Movement (Using Machine Learning)
PDF
October 2014 Webinar: Cybersecurity Threat Detection
PDF
Bsides NYC 2018 - Hunting for Lateral Movement
PPTX
Needles, Haystacks and Algorithms: Using Machine Learning to detect complex t...
PPTX
Lateral Movement by Default
PDF
User and Entity Behavior Analytics using the Sqrrl Behavior Graph
PDF
SANS Threat Hunting Summit 2018 - Hunting Lateral Movement with Windows Event...
PDF
Network security monitoring elastic webinar - 16 june 2021
PDF
Applying Machine Learning to Network Security Monitoring - BayThreat 2013
PPTX
Splunk Enterpise for Information Security Hands-On
PPTX
A review of machine learning based anomaly detection
PPTX
A review of machine learning based anomaly detection
PDF
Shusei tomonaga pac_sec_20171026
PDF
Creating Your Own Threat Intel Through Hunting & Visualization
PDF
Using Data Science for Cybersecurity
PDF
Derbycon 2017: Hunting Lateral Movement For Fun & Profit
PDF
Finding the needle in the haystack: how Nestle is leveraging big data to defe...
PDF
Reducing Mean Time to Know
PDF
Visualization in the Age of Big Data
PPTX
Using Big Data to Counteract Advanced Threats
Dynamic Population Discovery for Lateral Movement (Using Machine Learning)
October 2014 Webinar: Cybersecurity Threat Detection
Bsides NYC 2018 - Hunting for Lateral Movement
Needles, Haystacks and Algorithms: Using Machine Learning to detect complex t...
Lateral Movement by Default
User and Entity Behavior Analytics using the Sqrrl Behavior Graph
SANS Threat Hunting Summit 2018 - Hunting Lateral Movement with Windows Event...
Network security monitoring elastic webinar - 16 june 2021
Applying Machine Learning to Network Security Monitoring - BayThreat 2013
Splunk Enterpise for Information Security Hands-On
A review of machine learning based anomaly detection
A review of machine learning based anomaly detection
Shusei tomonaga pac_sec_20171026
Creating Your Own Threat Intel Through Hunting & Visualization
Using Data Science for Cybersecurity
Derbycon 2017: Hunting Lateral Movement For Fun & Profit
Finding the needle in the haystack: how Nestle is leveraging big data to defe...
Reducing Mean Time to Know
Visualization in the Age of Big Data
Using Big Data to Counteract Advanced Threats

More from Sqrrl (20)

PDF
Transitioning Government Technology
PDF
Leveraging Threat Intelligence to Guide Your Hunts
PDF
Machine Learning for Incident Detection: Getting Started
PDF
Building a Next-Generation Security Operations Center (SOC)
PDF
Threat Hunting Platforms (Collaboration with SANS Institute)
PPTX
Sqrrl and IBM: Threat Hunting for QRadar Users
PPTX
Threat Hunting for Command and Control Activity
PPTX
Modernizing Your SOC: A CISO-led Training
PPTX
Threat Hunting vs. UEBA: Similarities, Differences, and How They Work Together
PPTX
Leveraging DNS to Surface Attacker Activity
PDF
The Art and Science of Alert Triage
PDF
Sqrrl Enterprise: Big Data Security Analytics Use Case
PDF
The Linked Data Advantage
PDF
Sqrrl Enterprise: Integrate, Explore, Analyze
PDF
Sqrrl Datasheet: Cyber Hunting
PDF
Benchmarking The Apache Accumulo Distributed Key–Value Store
PDF
Scalable Graph Clustering with Pregel
PDF
What's Next for Google's BigTable
PDF
April 2015 Webinar: Cyber Hunting with Sqrrl
PDF
Sqrrl 2.0 Launch Webinar
Transitioning Government Technology
Leveraging Threat Intelligence to Guide Your Hunts
Machine Learning for Incident Detection: Getting Started
Building a Next-Generation Security Operations Center (SOC)
Threat Hunting Platforms (Collaboration with SANS Institute)
Sqrrl and IBM: Threat Hunting for QRadar Users
Threat Hunting for Command and Control Activity
Modernizing Your SOC: A CISO-led Training
Threat Hunting vs. UEBA: Similarities, Differences, and How They Work Together
Leveraging DNS to Surface Attacker Activity
The Art and Science of Alert Triage
Sqrrl Enterprise: Big Data Security Analytics Use Case
The Linked Data Advantage
Sqrrl Enterprise: Integrate, Explore, Analyze
Sqrrl Datasheet: Cyber Hunting
Benchmarking The Apache Accumulo Distributed Key–Value Store
Scalable Graph Clustering with Pregel
What's Next for Google's BigTable
April 2015 Webinar: Cyber Hunting with Sqrrl
Sqrrl 2.0 Launch Webinar

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
MYSQL Presentation for SQL database connectivity
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Per capita expenditure prediction using model stacking based on satellite ima...
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing
Dropbox Q2 2025 Financial Results & Investor Presentation

How to Hunt for Lateral Movement on Your Network

  • 1. Threat Hunting for Lateral Movement Presented by: Ryan Nolette – Security Technologist Adam Fuchs – CTO
  • 2. © 2017 Sqrrl Data, Inc. All rights reserved. 2 Your Presenters Adam Fuchs Sqrrl CTO Ryan Nolette Sqrrl Security Technologist 2  
  • 3. © 2017 Sqrrl Data, Inc. All rights reserved. 3 Agenda   Lateral Movement Overview   What is it?   Common Techniques   The Lateral Movement Process   Compromise   Reconnaissance   Credential Theft   The Lateral Movement event Sqrrl Lateral Movement Detectors   Demo   Q&A
  • 4. © 2017 Sqrrl Data, Inc. All rights reserved. 4   Techniques that enable attackers to access and control systems within your network   Leveraged for:   Access to specific information or files   Remote execution of tools   Pivoting to additional systems   Access to additional credentials   Movement across a network from one system to another may be necessary to achieve goals   Often key to an attacker’s capabilities and a piece of a larger set of dependencies What am I referring to when I say Lateral Movement?
  • 5. © 2017 Sqrrl Data, Inc. All rights reserved. 5 Application Deployment Software Exploitation of VulnerabilityLogon Scripts Pass the Hash Remote Desktop Protocol Remote File Copy Remote ServicesReplication Through Removable Media Shared Webroot Taint Shared Content Third-party Software Windows Admin Shares Windows Remote Management Different Types of Lateral Movement
  • 6. BAD Patient 0: original Infection Successful Lateral Movement Failed Data access from compromised host after lateral movement Failed Data access from Patient 0 Successful Lateral Movement Successful Data access from compromised host after lateral movement Company’s Customer Financial Records Lateral Movement
  • 7. © 2017 Sqrrl Data, Inc. All rights reserved. 7 Login to new system •  psexec - shell •  RDP – GUI •  Profit LateralMovement Tools •  Mimikatz •  Pwdump •  Generic memory dump Goal •  To gather either plaintext credential to use for generic system authentication •  Password hash to pass to a system in place of a password •  Ultimately elevate your privileges from the current compromised user to an administrative user CredentialTheft Human Attacker starts running system commands to gather intelligence Examples of recon: •  Network •  netstat – see active network connections •  Nmap – network scanner •  Net use – access to resources •  System •  Net user – manage local/domain accounts •  Task list – what processes are running on system Reconnaissance Stages •  Infected system checks in with command and control server/s •  Human Attacker gives command to infected system to allow access •  remote shell •  GUI interface options •  Human attacker starts reconnaissance Compromise Infection to Lateral Movement Process Infection Techniques •  Phishing email •  Drive by •  Exploit kit •  Flash drive Infection Rinse and Repeat for each system as needed or wanted
  • 8. © 2017 Sqrrl Data, Inc. All rights reserved. 8   Communication with the compromised systems and C&C (command and control) servers is established   Threat actors need to sustain persistent access across the network   They move laterally within the network and gain higher privileges through the use of different tools Windows  Reverse  Shell   Compromise
  • 9. © 2017 Sqrrl Data, Inc. All rights reserved. 9   To move laterally within a breached network and maintain persistence, attackers obtain information like network hierarchy, services used in the servers and operating systems   Attackers check the host naming conventions to easily identify specific assets to target   Attackers utilize this info to map the network and acquire intelligence about their next move Recon Local Accounts Recon Domain Accounts Reconnaissance
  • 10. © 2017 Sqrrl Data, Inc. All rights reserved. 10   Once threat actors identify other “territories” they need to access, the next step is to gather login credentials   Cracking and Stealing Passwords   Pass the Hash: involves the use of a hash instead of a plaintext password in order to authenticate and gain higher access   Brute force attack: simply guessing passwords through a predefined set of passwords   Using gathered information, threat actors move to new territories within the network and widen their control Running Mimikatz in memory via powershell Credential Theft   These activities are often unnoticed by IT administrators, since they only check failed logins without tracking the successful ones  
  • 11. © 2017 Sqrrl Data, Inc. All rights reserved. 11   Attackers can now remotely access desktops   Accessing desktops in this manner is not unusual for IT support staff   Remote access will therefore not be readily associated with an ongoing attack   Attackers may also gather domain credentials to log into systems, servers, and switches   Remote control tools enable attackers to access other desktops in the network and perform actions like executing programs, scheduling tasks, and managing data collection on other systems Lateral Movement – Using Stolen Credentials   Tools and techniques used for this purpose include remote desktop tools, PsExec, and Windows Management Instrumentation (WMI)   Note that these tools are not the only mechanisms used by threat actors in lateral movement  
  • 12. © 2017 Sqrrl Data, Inc. All rights reserved. 12 https://xkcd.com/1831/
  • 14. © 2017 Sqrrl Data, Inc. All rights reserved. 14   LM evidence comes from:   Windows Events   Syslog   VPN   Endpoint sensors   Primary fields:   Source   Destination   User   Time   Extra Information: Data
  • 15. © 2017 Sqrrl Data, Inc. All rights reserved. 15 Target Specific Techniques •  e.g. Pass The Hash detection •  Very specific means low false positives •  May miss new techniques Search for General Graph Patterns •  Hard to hide from •  May pick up unrelated similar patterns Specialized Generic Abstraction Spectrum Trade-Off
  • 16. © 2017 Sqrrl Data, Inc. All rights reserved. 16 (3)  Rarely-­‐Seen  Logins   (4)  Fan-­‐outs,  including  failed  logins     (2) Overall Timeframe in expected range (1) Expected Inter-login Time Distribution (5) Not too big, Not too small LM Graph Pattern Characteristics
  • 17. © 2017 Sqrrl Data, Inc. All rights reserved. 17 Lateral Movement Strategy   Rank individual logins   Train: learn common user login patterns from the data   Predict: assign rank (logLikelihoodRatio) to every login. Rank high those that are unusual   Construct time-ordered connected sequences of logins   Predict: find top N sequences of logins with the highest combined rank
  • 18. © 2017 Sqrrl Data, Inc. All rights reserved. 18   Used to determine base risk for logins   Extensible feature vectors mix numerical, categorical, and text features TDigests for numerical   Bag of words for text Vectorized categorical statistics   Learns “normal” in-situ   Priors out-of-the-box   Every network is different   Scalable spark implementations Generalized “Rarity” Classifier
  • 19. © 2017 Sqrrl Data, Inc. All rights reserved. 19 Multi-Hop Predict 192.168.1.101   192.168.1.104   192.168.1.78   192.168.1.83  
  • 20. © 2017 Sqrrl Data, Inc. All rights reserved. 20 Multi-Hop Predict: Combinatorics   General Problem: Subgraph Isomorphism   5 edges è 25 = 32 subgraphs   10 edges è 210 = 1024 subgraphs   20 edges è 220 = 1,048,576 subgraphs   We run with billions of edges...   Solution: grow small subgraphs in parallel   Prune early and often Aglomerative clustering   Message passing 192.168.1.101   192.168.1.104   192.168.1.78   192.168.1.83  
  • 21. © 2017 Sqrrl Data, Inc. All rights reserved. 21 Multi-Hop Predict: Message Passing
  • 22. © 2017 Sqrrl Data, Inc. All rights reserved. 22 Multi-Hop Predict: Message Passing
  • 23. © 2017 Sqrrl Data, Inc. All rights reserved. 23 Multi-Hop Predict: Message Passing
  • 24. © 2017 Sqrrl Data, Inc. All rights reserved. 24 Scalable Implementation   Large scale, parallel implementation   Multiple Independent Variable Bayesian Classifier (MIVB)   Spark extension for graph processing   High performance message passing implementation   Used for agglomerative clustering / detection of LM structures
  • 25. © 2017 Sqrrl Data, Inc. All rights reserved. 25 Processing Workflow Sqrrl Auth/Login Sources Spark / GraphX Classifier Training Single-Hop Predict Multi-Hop Predict Evidence Tables Sqrrl CounterOps Model Trained Classifier
  • 26. © 2017 Sqrrl Data, Inc. All rights reserved. 26 False Positive Reduction 1.  Rank: 2.  Normalize: •  Smooth out discontinuities in ranking function •  Apply historical context to determine probability of seeing a given rank •  Convert to risk score based on likelihood * impact 3.  Threshold: •  Analysts usually care about LMs over risk X Base risk factor Time risk factor Size risk factor
  • 27. © 2017 Sqrrl Data, Inc. All rights reserved. 27 Building the LM Detector TTP Alignment Threat Hunters Behavior and Structural Decomposition High-Risk Classifier (Subgraphs) Data Scientists Log-Likelihood Ranking Normality Classifier (MIVB) Scalable Implementation (Spark, GraphX) Computer Scientists Deployable Workflow with In-Situ Training Rank Statistics Normalization Security Analyst Contextual Exploration and Visualization
  • 28. REAL WORLD THREAT HUNTING FOR LATERAL MOVEMENT
  • 29. © 2017 Sqrrl Data, Inc. All rights reserved. 29 Lateral Movement
  • 30. © 2017 Sqrrl Data, Inc. All rights reserved. 30 Lateral Movement
  • 31. © 2017 Sqrrl Data, Inc. All rights reserved. 31 Lateral Movement
  • 32. © 2017 Sqrrl Data, Inc. All rights reserved. 32 Lateral Movement
  • 33. © 2017 Sqrrl Data, Inc. All rights reserved. 33 Lateral Movement
  • 34. © 2017 Sqrrl Data, Inc. All rights reserved. 34 Lateral Movement
  • 35. © 2017 Sqrrl Data, Inc. All rights reserved. 35 Lateral Movement
  • 36. © 2017 Sqrrl Data, Inc. All rights reserved. 36 Lateral Movement
  • 37. © 2017 Sqrrl Data, Inc. All rights reserved. 37 Lateral Movement
  • 38. © 2017 Sqrrl Data, Inc. All rights reserved. 38 Lateral Movement
  • 39. © 2017 Sqrrl Data, Inc. All rights reserved. 39 Lateral Movement
  • 40. © 2017 Sqrrl Data, Inc. All rights reserved. 40 Lateral Movement
  • 41. © 2017 Sqrrl Data, Inc. All rights reserved. 41 Lateral Movement
  • 42. © 2017 Sqrrl Data, Inc. All rights reserved. 42 Lateral Movement
  • 43. © 2017 Sqrrl Data, Inc. All rights reserved. 43 Lateral Movement
  • 44. © 2017 Sqrrl Data, Inc. All rights reserved. 44 Lateral Movement
  • 45. © 2017 Sqrrl Data, Inc. All rights reserved. 45 Lateral Movement
  • 46. © 2017 Sqrrl Data, Inc. All rights reserved. 46 Lateral Movement
  • 47. © 2017 Sqrrl Data, Inc. All rights reserved. 47 Thank you! threathunting.org For hunting eCourses, papers and other resources & threathunting.net For a repository of hunting techniques
  • 48. Q & A