Skip to content

Threat Hunting Wiki

paladin316 edited this page Mar 21, 2022 · 21 revisions

ThreatHunting

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:

  1. Win10 Guest VM configured with Olaf Hartong's sysmon-modular (https://github.com/olafhartong/sysmon-modular)
  2. Splunk Enterpirse Evaluation https://www.splunk.com/en_us/download/splunk-enterprise.html installed on Host Linux System
  3. 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:

  1. 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: image https://user-images.githubusercontent.com/15706462/146420453-7faa56cb-bb63-4cb5-8420-84faab6f272d.png Example_Data-splunk_sysmon_lolbins_hunt_base_score.csv

  2. 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: image 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

  3. 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: image https://user-images.githubusercontent.com/15706462/146421587-1bcb993d-2676-4ce8-9214-275eece26eed.png Example_Data-splunk_sysmon_lolbins_hunt_with_threat-count.csv

  4. 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: image 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

  5. 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: image 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

  6. Filename: splunk_sysmon_malicious_powershell_hunt.txt

    Description: Splunk query designed to identify malicious PowerShell activity

    Examples: image https://user-images.githubusercontent.com/15706462/146610200-d10a94b0-c59b-4ecd-be85-9ee2693b593e.png Example_Data-splunk_sysmon_malicious_powershell_hunt.csv

  7. Filename: splunk_sysmon_T1098_net_user_add.txt

    Description: Splunk query designed to identify "net user /add" activity

    Examples: image https://user-images.githubusercontent.com/15706462/158027852-a518ced6-654b-425a-8f33-60420d818d3a.png

  8. Filename: splunk_sysmon_T1170_mshta.txt

    Description: Splunk query designed to identify MSHTA activity using protocol handlers

    Examples: image https://user-images.githubusercontent.com/15706462/158031914-489d4a56-2621-4a06-98de-170149f2272b.png

  9. Filename: splunk_sysmon_T1098_net_user_add.txt

    Description: Splunk query designed to identify MSHTA activity using protocol handlers and assoicated network activity indicators

    Examples: image https://user-images.githubusercontent.com/15706462/158031927-689a09b0-69da-426b-a829-450266770de8.png

  10. Filename: splunk_sysmon_T1212_SilverTicket.txt

    Description: Splunk query designed to identify indicators that are prelude to a possible Silver Ticket attack

    Examples: image https://user-images.githubusercontent.com/15706462/158032291-1ee06f71-7ab1-4994-be57-b116a55e947f.png

  11. Filename: splunk_sysmon_T1218.013_mavinject.txt

    Description: Splunk query designed to identify mavinject activity

    Examples: image https://user-images.githubusercontent.com/15706462/158065732-2bb71f3f-0190-465b-9cbe-f801d30e9a58.png

  12. 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

    Examples: image https://user-images.githubusercontent.com/15706462/158066276-d5b0ddfb-a805-48fb-9f5f-e6273f2b4620.png

  13. Filename: splunk_sysmon_T1053_SchTasks.txt

    Description: Splunk query designed to find scheduled tasks creation or change of existing tasks

    Examples: image https://user-images.githubusercontent.com/15706462/158067339-4adfb7bb-f4a8-482e-8fd9-538ae24ad407.png

  14. Filename: splunk_sysmon_T1076_Potential_RDP_Hijacking.txt

    Description: Splunk query designed to find potential RDP hijacking

    Examples: image https://user-images.githubusercontent.com/15706462/158392669-41ef7fb7-e644-4ee3-82e7-53d3bea74c0c.png

  15. 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

    Examples: image https://user-images.githubusercontent.com/15706462/158398521-f4fd3c75-dc5f-44e6-bfcc-d6a1fb6f5c75.png

  16. Filename: splunk_sysmon_T1218_pcalua.txt

    Description: Splunk query designed to find indirect command execution via program compatibility assistant (pcalua.exe)

    Examples: image https://user-images.githubusercontent.com/15706462/158402568-938a885f-5b34-4f47-8e12-2b62cc4d2330.png

  17. Filename: splunk_sysmon_T1218_pcalua.txt

    Description: Splunk query designed to find trusted developer utilities for proxy execution of malicious payloads

    Examples: image https://user-images.githubusercontent.com/15706462/158408605-e9dc6ce2-41ad-4973-995c-96efd4bc5457.png

  18. 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.

    Examples: image https://user-images.githubusercontent.com/15706462/158411458-4d6b49c1-6dc7-413a-96c1-0e00b5dccd4c.png

  19. Filename: splunk_sysmon_T1218_odbcconf.txt

    Description: Splunk query designed to find signed binary proxy execution odbcconf to execute malicious payload.

    Examples: image https://user-images.githubusercontent.com/15706462/158415770-5df2a42a-f084-4863-ab8c-ffcddd496026.png

  20. Filename: splunk_sysmon_T1218_msiexec.txt

    Description: Splunk query designed to find signed binary proxy execution msiexec to execute malicious payload.

    Examples: image https://user-images.githubusercontent.com/15706462/158420482-981f1975-84bb-4c09-a4d1-e436783761a6.png

  21. 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.

    Examples: image https://user-images.githubusercontent.com/15706462/158422630-c1a83f76-f65a-46fb-86e1-c3f4e3e3c46a.png

  22. Filename: splunk_sysmon_T1191_cmstp.txt

    Description: Splunk query designed to find signed binary proxy execution cmstp to execute malicious payload.

    Examples: image https://user-images.githubusercontent.com/15706462/158441050-08b79258-2fa1-4259-994c-c89436fc0de6.png

  23. Filename: splunk_sysmon_T1197_bitsadmin.txt

    Description: Splunk query designed to find bitsadmin activity to execute malicious payload.

    Examples: image https://user-images.githubusercontent.com/15706462/158446588-c7f218dd-bf71-4e0c-b326-8d59de26c6da.png

  24. 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.

    Examples: image https://user-images.githubusercontent.com/15706462/158465178-d6a15504-e5b2-4f08-8891-78a3e45bca37.png

  25. 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

    Examples: image https://user-images.githubusercontent.com/15706462/158470627-f576d59b-8331-4785-9ece-b5773eeb1e72.png

  26. 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.

    Examples: image https://user-images.githubusercontent.com/15706462/158472110-94e1fe60-c2b0-43fc-b66e-0de49ba93c91.png

  27. 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.

    Examples: image https://user-images.githubusercontent.com/15706462/158486025-10ebb69e-bd0e-4ac7-a290-baba71ea4d8e.png

  28. Filename: splunk_sysmon_T1096_esentutl.txt

    Description: Splunk query designed to find esentutl for defense evasion to perform credential dumping.

    Examples: image https://user-images.githubusercontent.com/15706462/158486987-2375b51f-c328-4ed8-a019-ce45b057858a.png

  29. Filename: splunk_sysmon_T1218_Register_cimprovider.txt

    Description: Splunk query designed to find Register_cimprovider activity loading a malicious DLL.

    Examples: image https://user-images.githubusercontent.com/15706462/158487802-5ea16f14-d6b0-4d3c-903c-92b399cc4f78.png

  30. 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.

    Examples: image https://user-images.githubusercontent.com/15706462/159347842-a1391ecd-1eba-4e6b-acaa-01a4545184f6.png

Clone this wiki locally