Path: blob/master/Guided Investigation - Solarwinds Post Compromise Activity.ipynb
3249 views
Guided Hunting - Solarwinds Post Compromise
Details...
Notebook Version: 1.0
Python Version: Python 3.10 (including Python 3.10 - SDK v2 - AzureML)
Required Packages: kqlmagic, msticpy, pandas, numpy, matplotlib, networkx, ipywidgets, ipython, scikit_learn, dnspython, ipwhois, folium, holoviews
Data Sources Required:
Log Analytics
Heartbeat
SecurityAlert
SecurityEvent
DeviceProcessEvents
DeviceNetworkEvents
DeviceFileEvents
SigninEvents
AuditLogs
AzureNetworkAnalytics_CL
(Optional)
VirusTotal (with API key)
Alienvault OTX (with API key)
IBM Xforce (with API key)
CommonSecurityLog
This Notebook assists defenders in hunting for Solarwinds Post compromise Tactics , Tools and Procedures (TTPs) across different environments both on-prem and cloud data sources.
You can read more about the attack in below technical blogs
References :
How to use:
Run the cells in this Notebook in order, at various points in the Notebook flow you will be prompted to enter or select options relevant to the scope of your triage.
This Notebook presumes you have Microsoft Sentinel Workspace settings and Threat Intelligence providers configured in a config file. If you do not have this in place please refer https://msticpy.readthedocs.io/en/latest/data_acquisition/TIProviders.html#configuration-file to https://github.com/Azure/Azure-Sentinel-Notebooks/blob/master/ConfiguringNotebookEnvironment.ipynb and to set this up.
Notebook initialization
The next cell:
Checks for the correct Python version
Checks versions and optionally installs required packages
Imports the required packages into the notebook
Sets a number of configuration options.
This should complete without errors. If you encounter errors or warnings look at the following two notebooks:
If you are running in the Microsoft Sentinel Notebooks environment (Azure Notebooks or Azure ML) you can run live versions of these notebooks:
You may also need to do some additional configuration to successfully use functions such as Threat Intelligence service lookup and Geo IP lookup. There are more details about this in the ConfiguringNotebookEnvironment notebook and in these documents:
Setup
Configuration
msticpyconfig.yaml configuration File
You can configure primary and secondary TI providers and any required parameters in the msticpyconfig.yaml file. This is read from the current directory or you can set an environment variable (MSTICPYCONFIG) pointing to its location.
To configure this file see the ConfigureNotebookEnvironment notebook
IOC Hunt
TearDrop Memory Only Dropper
SUNBURST and SUPERNOVA backdoor hashes
SUNBURST network beacons
SUNBURST suspicious SolarWinds child processes
Checking for Solarwinds Servers
To hunt for similar TTPs used in this attack, a good place to start is to build an inventory of the machines that have SolarWinds Orion components. Organizations might already have a software inventory management system to indicate hosts where the SolarWinds application is installed. Alternatively, Microsoft Sentinel could be leveraged to run a simple query to gather similar details. Below query will pull the hosts with SolarWinds process running in last 30 days based on Process execution/Sysmon logs either via host onboarded to Sentinel or onboarded via Microsoft Defender for Endpoints (MDE)
Asset Inventory
Lateral Movement
Hosts with New Logons
Rare RDP Connections
RDP Nesting
Rare application consent
Rare activity by High Value Account
Suspicious Logons
If you have suspicious Netblocks not expected in your organization(e.g.VPS Netblocks or Proxy severs) that you want to monior , define it in IP_Data and run below query using ipv4_lookup kql function
Privilege Escalation
New Account Creation and Addition to Privileged groups
User Added to Azure Active Directory Privileged Groups
ADFS Hunting
Below Queries produces results from all Servers. Its is advisable to filter the results for ADFS servers in scope.
Uncommon processes
Rare processes run by Service Accounts
Fireeye Red Team Tools
Check out KQL queries published by Sentinel Community at
Azure Active Directory Hunting
Domain Federation trust Settings modification
Addition of New Key Credentials to an Application or Service Principal
Suspicious Application Consent
Data Acccess and Exfiltration
Azure Active Directory PowerShell to access non-Active Directory Resources
Anomalous increase in Exchange Mail Items Accesed
Resources
Read the Get Started notebook.
View sample notebooks in the Sample-Notebooks folder
View How-tos and Troubleshooting in the HowTos folder
https://msticpy.readthedocs.io/en/latest/GettingStarted.html
https://msticnb.readthedocs.io/en/latest/notebooklets.html#current-notebooklets
Behavior:Win32/Solorigate.C!dha threat description - Microsoft Security Intelligence
FalconFriday – Fireeye Red Team Tool Countermeasures KQL Queries
Microsoft Sentinel SolarWinds Post Compromise Hunting Workbook
[https://security.microsoft.com/threatanalytics3/2b74f636-146e-48dd-94f6-5cb5132467ca/overview]