Repository navigation
Threat Hunting Wiki
Welcome to the ThreatHunting wiki!
This repo is where I store my Threat Hunting ideas/content
Below are the use cases and file descriptions for the items in this repo:
Before going into what the files are, I will describe my lab setup:
Lab Ingredients:
- Win10 Guest VM configured with Olaf Hartong's sysmon-modular (https://github.com/olafhartong/sysmon-modular)
- Splunk Enterpirse Evaluation https://www.splunk.com/en_us/download/splunk-enterprise.html installed on Host Linux System
- Atomic Red Team script to generate the data (https://github.com/redcanaryco/invoke-atomicredteam)
Use Cases:
Splunk queries are designed to score LOLBINs activity using a scoring method that bubbles up the most egregious activity to the top of the list based on MITRE techniques. The Scoring model uses four numbers (1,4,7,10) to represent the level of seriousness of the activity seen. The sum of all of the activity is added together to create a total score for each of the MITRE techniques, then added together to create an overall score for each system. Before implementing the scoring system its a good idea to perform some frequency analysis on LOLBINs usage within your environment. Build out the scoring model according to what you know about your environment (Priciple: Know You Environment). This scoring model will be unique to your environment since no two companies are the same.
The primary goal here is to identify areas where security products can't alert on due to the high rate of false positives. Basically searching between data elements to pick up on malicious behaviors.
Scoring Model (Base):
Base score + Each MITRE Technique Score = Overal Score
1 = (Low) LOLBINs activity that is frequent in your environment and may be used by some of your Server and Workdstation Support Teams
4 = (Med) LOLBINs activity that is less frequent in your environment and may be used by some of your Server and Workdstation Support Teams
7 = (High) LOLBINs activity is not frequent in your environment and may be used by some of your Server and Workdstation Support Teams
10 = (Critical) LOLBINs activity should never be seen in your environment and is not used by your Server and Workdstation Support Teams
Scoring Model with Threat Count:
Base score + Each MITRE Technique Score X The number of occurences for each event = Overal Score
Filename & Descriptions:
-
Filename: splunk_sysmon_lolbins_hunt_base_score.txt
Description: Splunk query designed to use the Base Scoring Model to identify suspicious acitivty and diplays details of activity
Examples:
https://user-images.githubusercontent.com/15706462/146420453-7faa56cb-bb63-4cb5-8420-84faab6f272d.png
Example_Data-splunk_sysmon_lolbins_hunt_base_score.csv -
Filename: splunk_sysmon_lolbins_hunt_base_score_stats_by_computername.txt
Description: Splunk query using the Base Scoring Model to identify suspicious acitivty; stats only by ComputerName
Examples:
https://user-images.githubusercontent.com/15706462/146420981-c8a69bca-7fa1-489d-a2c8-3c1bd93c9840.png
Example_Data-splunk_sysmon_lolbins_hunt_base_score_stats_by_computername.csv -
Filename: splunk_sysmon_lolbins_hunt_with_threat-count.txt
Description: Splunk query designed to use the Threat Count Scoring Model to identify suspicious acitivty and diplays details of activity
Examples:
https://user-images.githubusercontent.com/15706462/146421587-1bcb993d-2676-4ce8-9214-275eece26eed.png
Example_Data-splunk_sysmon_lolbins_hunt_with_threat-count.csv -
Filename: splunk_sysmon_lolbins_hunt_with_threat-count_stats_by_computername.txt
Description: Splunk query using the Threat Count Scoring Model to identify suspicious acitivty; stats only by ComputerName
Examples:
https://user-images.githubusercontent.com/15706462/146422029-1f16a1f0-cb6b-428d-8795-a87f5edfdf49.png
Example_Data-splunk_sysmon_lolbins_hunt_with_threat-count_stats_by_computername.csv -
Filename: splunk_sysmon_lolbins_hunt_with_threat-count_renamed_binaries.txt
Description: Splunk query designed to identify renamed binaries and score the activity using the Threat Count Scoring Model
Examples:
https://user-images.githubusercontent.com/15706462/146422780-0dfd0833-bbab-4726-9627-cba696dc86e5.png
Example_Data-splunk_sysmon_lolbins_hunt_with_threat-count_renamed_binaries.csv -
Filename: splunk_sysmon_malicious_powershell_hunt.txt
Description: Splunk query designed to identify malicious PowerShell activity
Examples:
https://user-images.githubusercontent.com/15706462/146610200-d10a94b0-c59b-4ecd-be85-9ee2693b593e.png
Example_Data-splunk_sysmon_malicious_powershell_hunt.csv -
Filename: splunk_sysmon_T1098_net_user_add.txt
Description: Splunk query designed to identify "net user /add" activity
-
Filename: splunk_sysmon_T1170_mshta.txt
Description: Splunk query designed to identify MSHTA activity using protocol handlers
-
Filename: splunk_sysmon_T1098_net_user_add.txt
Description: Splunk query designed to identify MSHTA activity using protocol handlers and assoicated network activity indicators
-
Filename: splunk_sysmon_T1212_SilverTicket.txt
Description: Splunk query designed to identify indicators that are prelude to a possible Silver Ticket attack
-
Filename: splunk_sysmon_T1218.013_mavinject.txt
Description: Splunk query designed to identify mavinject activity
-
Filename: splunk_sysmon_T1003.003_ntda.dit.txt
Description: Splunk query designed to credential dumping via ntds.dit with command execution to copy/save credential information
-
Filename: splunk_sysmon_T1053_SchTasks.txt
Description: Splunk query designed to find scheduled tasks creation or change of existing tasks
-
Filename: splunk_sysmon_T1076_Potential_RDP_Hijacking.txt
Description: Splunk query designed to find potential RDP hijacking
-
Filename: splunk_sysmon_T1034_Findstr.txt
Description: Splunk query designed to identify where command findstr is used to search for files names containing password or admin
-
Filename: splunk_sysmon_T1218_pcalua.txt
Description: Splunk query designed to find indirect command execution via program compatibility assistant (pcalua.exe)
-
Filename: splunk_sysmon_T1218_pcalua.txt
Description: Splunk query designed to find trusted developer utilities for proxy execution of malicious payloads
-
Filename: splunk_sysmon_T1117_regsvr32.txt
Description: Splunk query designed to find signed binary proxy execution with Squiblydoo to load a COM scriptlet to execute a malicious payload.
-
Filename: splunk_sysmon_T1218_odbcconf.txt
Description: Splunk query designed to find signed binary proxy execution odbcconf to execute malicious payload.
-
Filename: splunk_sysmon_T1218_msiexec.txt
Description: Splunk query designed to find signed binary proxy execution msiexec to execute malicious payload.
-
Filename: splunk_sysmon_T1098_net_user_add.txt
Description: Splunk query designed to find net user add activity to create persistence via account creation to maintain access.
-
Filename: splunk_sysmon_T1191_cmstp.txt
Description: Splunk query designed to find signed binary proxy execution cmstp to execute malicious payload.
-
Filename: splunk_sysmon_T1197_bitsadmin.txt
Description: Splunk query designed to find bitsadmin activity to execute malicious payload.
-
Filename: splunk_sysmon_T1196_control.txt
Description: Splunk query designed to find signed binary proxy execution control.exe which handles execution of Control Panel items to execute malicious payload.
-
Filename: splunk_sysmon_T1140_certutil.txt
Description: Splunk query designed to find certutil activity used to decode/deobfuscate or to download an encoded malicious payload from a remote server
-
Filename: splunk_sysmon_T1223_htmlhelp.txt
Description: Splunk query designed to find signed binary proxy execution hh.exe for HTML Help files containing embedded payloads for malicious execution.
-
Filename: splunk_sysmon_T1218_InfDefaultInstall.txt
Description: Splunk query designed to find signed binary proxy execution InfDefaultInstall for INF files containing embedded payloads for malicious execution.
-
Filename: splunk_sysmon_T1096_esentutl.txt
Description: Splunk query designed to find esentutl for defense evasion to perform credential dumping.
-
Filename: splunk_sysmon_T1218_Register_cimprovider.txt
Description: Splunk query designed to find Register_cimprovider activity loading a malicious DLL.
-
Filename: splunk_sysmon_Possible_Conti_Ransomware_Activity.txt
Description: Splunk query designed to find possible Conti activity. The TTPs used to build this query were pulled from @DISREL github page https://github.com/DISREL/Conti-Leaked-Playbook-TTPs/blob/main/Conti-Leaked-Playbook-TTPs.pdf. The goal for this hunt is to run it over a period of time (1hr, 3hrs, 12hrs, 24hrs,1 day,7days, etc...) to monitor host scores that bubble up to the top. The higher the score and the number of TTPs hit can be a good indication its Conti Ransomware Group, but since these are LOLBINs it could be another threat actor/group. Filtering out known good and understanding your environment will ensure higher confidence in identifying badness within your environment.