🔏
RootGuard
HomeSOC OperationsIncident ResponseWindows ForensicsLinux ForensicsKQL Investigations
  • Welcome
    • RootGuard
      • Who Am I?
        • Professional Profile
  • Resources Hub
    • Blogs
      • Articles
        • Safeguarding SMEs: The Strategic Importance of a Security Operations Center (SOC)
      • Posts
        • Roadmap to Becoming a Cybersecurity Specialist
        • Starting a Career in Cybersecurity
        • A Guide to Landing Your First Cybersecurity Analyst Role
        • Moving from Intermediate to Expert Incident Responder
  • SOC Operations
    • Introduction
      • Development Resources
        • SOC Analysts Roadmap
        • Becoming A SOC Analyst
        • SOC Analysts Prep Interview Questions
    • Essential Skills
      • Critical Windows EventIDs to Monitor
    • Junior Analyst Skills
      • Splunk Use Cases
      • KQL Use Cases
        • Reconnaissance (TA0043)
        • Initial Access (TA0001)
        • Execution (TA0002)
        • Persistence (TA0003)
        • Privilege Escalation (TA0004)
        • Defence Evasion (TA0005)
        • Credential Access (TA0006)
        • Discovery (TA0007)
        • Lateral Movement (TA0008)
        • Collection (TA0009)
        • Command and Control (TA0011)
        • Exfiltration (TA0010)
        • Impact (TA0040)
      • Investigating Common Attacks
        • Domain Dominance Attacks - Detection & Analysis
        • Investigating a Suspected AD FS Distributed Key Management (DKM) Attack
        • Authentication From Suspicious DeviceName
        • Identifying Interactive or RemoteInteractive Session From Service Account
        • Identifying Split or Part Archive File Transfers
        • Detect Potential Cleartext Credentials in Command Line
        • Detecting Command Line Interpreters Launched via Scheduled Tasks
        • Detecting Files Containing Potentially Sensitive Data
        • Detecting DeviceNetworkEvents From Windows Processes and Domains by TLD
        • Detecting Silent cmd.exe Execution With Redirected STDERR & STDOUT
        • Detecting Low Prevalence DLL Loaded From Process In User Downloads Directory
        • Detecting Virtual Drive Mounted From Archive
        • Identify Execution of Script From User's Downloads Folder
        • Identify Potential RDP Tunneled Sessions
        • Identify Instances of PowerShell Invoke-WebRequest, IWR or Net.WebClient
        • Identify Processes Launched by PowerShell Remoting (WSMProvHost.exe)
        • Detect DeviceNetworkEvents for LOLBAS with Download or Upload Functions
        • Detect Execution of PSEXESVC via Remote Systems
        • Identify Suspicious String in Service Creation ImagePath
        • Identify File with Double Extensions
        • Detect Potential Cleartext Credentials in Commandline
        • Detect When Large Number of Files Downloaded From OneDrive or SharePoint
        • Identify and Investigate Phishing Attacks with KQL
      • PowerShell for SecOps
        • Powershell Remoting
        • Reconnaissance Discovery
        • Initial Access Discovery
        • Execution Discovery
        • Persistence Discovery
        • Privilege Escalation Discovery
        • Defence Evasion Discovery
        • Credential Access Discovery
        • Discovery
        • Lateral Movement Discovery
        • Collection Discovery
        • Command & Control (C2) Discovery
        • Exfiltration Discovery
        • Impact Discovery
      • Packet Analysis (pcap)
        • Tcpdump
        • Tcpdump (Intermediate)
        • Tshark
        • Ngrep
      • Investigating Suspicious Emails Using KQL
    • Intermediate and Advanced Skills
      • Investigate Using MITRE ATT&CK Methodology
        • Reconnaissance (TA0043) Techniques
        • Resource Development (TA0042) Techniques
        • Initial Access (TA0001) Techniques
        • Command Execution (TA0002) Techniques
        • Persistence (TA0003) Techniques
        • Privilege Escalation (TA0004) Techniques
        • Defence Evasion (TA0005) Techniques
        • Credential Access (TA0006) Techniques
        • Discovery (TA0007) Techniques
        • Lateral Movement (TA0008) Techniques
        • Collection (TA0009) Techniques
        • Command and Control (C2) (TA0011) Techniques
        • Exfiltration (TA0010) Techniques
        • Impact (TA0040) Techniques
    • Vulnerability Management
    • Malware Analysis
  • DFIR
    • Incident Response
      • Incident Triage
        • Triage Types and Processes
        • PowerShell for Detection and Analysis
          • Malware or Compromise Investigation
          • Lateral Movement Discovery
        • Registry Analysis
        • Sysinternals Intrusion Analysis
        • PowerShell Intrusion Analysis
        • Velociraptor Intrusion Analysis
        • Zimmerman Tools Intrusion Analysis
      • KAPE Artifacts Analysis
      • Velociraptor Artifacts Analysis
      • Using The Unified Kill Chain Model to Analyse Individual Cyber Attacks
        • Phase 1 - Gaining an Initial Foothold
          • Gaining Access to the Network
          • Establishing a Foothold
          • Network Discovery
      • Response Strategies
        • Privilege Escalation Assessment
        • Command and Control Assessment
        • Command Execution Assessment
        • Defence Evasion Assessment
        • Detection Assessment
        • Discovery Assessment
        • Exfiltration Assessment
        • Initial Access Assessment
        • Initial Impact Assessment Techniques
        • Lateral Movement Assessment
        • Persistence Assessment
    • Windows Forensics
      • Evidence of Execution
      • Window Artifact Analysis
        • Account Usage
        • User Activity Tracking (Event Logs)
        • Program Execution
        • File and Folder Opening
        • File Download
        • Browser Usage
        • Deleted File or File Knowledge
        • External Device & USB Usage
    • Linux Forensics
      • Linux Commandline Basics
      • Host Compromise Assessment
    • KQL for Defender & Sentinel
      • MDO (Office)
      • MDI (Identity)
      • MDE (Endpoint)
    • Memory Forensics
      • Memory Forensics (Volatility 3)
    • Playbooks
      • First Responder DFIR Playbook
        • Device Isolation
        • Evidence Collection
          • Acquire Triage Image Using KAPE
          • Acquire Triage Data Using Velociraptor
          • Acquire Triage Data Using Powershell
          • Acquire Triage Memory Image
          • Acquire Image Using FTK
          • AXIOM Cyber Data Collection
        • Windows Forensic Artefacts
          • Application Execution
          • File & Folder Knowledge
          • External Device Usage
          • Network Activity
          • Windows Event Logs
        • Initial Analysis
          • Memory Analysis (Vol 3)
          • Axiom Cyber Examiner
  • Detection Engineering
    • AD Attack Detections & Mitigations
      • Kerberoasting
      • Authentication Server Response (AS-REP) Roasting
      • Password Spraying
      • MachineAccountQuota Compromise
      • Unconstrained Delegation
      • Password in Group Policy Preferences (GPP) Compromise
      • Active Directory Certificate Services (AD CS) Compromise
      • Golden Certificate
      • DCSync
      • Dumping ntds.dit
      • Golden Ticket
      • Silver Ticket
      • Golden Security Assertion Markup Language (SAML)
      • Microsoft Entra Connect Compromise
      • One-way Domain Trust Bypass
      • Security Identifier (SID) History Compromise
      • Skeleton Key
      • Active Directory Security Controls
      • Active Directory Events for Detecting Compromise
    • Attack Triage Playbooks (KQL Triage)
      • Windows Malware Detection Playbook
      • Linux Host Intrusion Detection Playbook (CLI)
      • Linux Intrusion Detection Playbook
      • Large-Scale Compromise Detection Playbook
      • Ransomware Detection Playbook
      • Phishing Email Compromise Detection Playbook
      • Scam Detection Playbook
      • Customer Phishing Detection Playbook
      • Insider Abuse Detection Playbook
      • Information Leakage Detection Playbook
      • Social Engineering Detection Playbook
      • Malicious Network Behaviour Detection Playbook
      • Windows Intrusion Detection Playbook
      • Vulnerability Detection Playbook
      • Business Email Compromise Detection Playbook
    • Process Execution (KQL Triage)
    • Threat Hunting
      • Hunting Ransomware Indicators
      • Hunting With KQL
        • Detecting Malware Infection (MITRE ATT&CK: T1566, T1059)
        • Discovery Activities (MITRE ATT&CK: T1016, T1083, T1046)
        • Credential Theft (MITRE ATT&CK: T1003, T1078)
        • Lateral Movement (MITRE ATT&CK: T1076, T1021)
        • Data Theft (MITRE ATT&CK: T1041, T1071)
        • Detecting CommandLine Executions (MITRE ATT&CK: T1059)
        • Windows Security Logs (Identity and Logon Activities)
      • Hunting With Splunk
Powered by GitBook
On this page
  • 1. Initial Access
  • 2. Execution
  • 3. Persistence
  • 4. Privilege Escalation
  • 5. Defence Evasion
  • 6. Credential Access
  • 7. Discovery
  • 8. Lateral Movement
  • 9. Collection
  • 10. Command and Control
  • 11. Exfiltration
  • 12. Impact
  • 13. Execution (Continued)
  • 14. Persistence (Continued)
  • 15. Defence Evasion (Continued)
  • 16. Credential Access (Continued)
  • 17. Discovery (Continued)
  • 18. Lateral Movement (Continued)
  • 19. Collection (Continued)
  • 20. Impact (Continued)
Edit on GitHub
  1. DFIR
  2. Incident Response
  3. Incident Triage

Velociraptor Intrusion Analysis

1. Initial Access

1.1. Phishing: Spearphishing Attachment (T1566.001)

Hunt Name: Detect_Malicious_Email_Attachments Query 1: Identify Malicious Executables in INetCache

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\%.exe'

Hunt Name: Find_Recent_Executables_In_User_Directories Query 2: Search for Recently Created Executables in User Directories

SELECT FullPath, CreationTime, Size FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\*.exe' AND CreationTime > now() - 86400

Hunt Name: Identify_Dangerous_File_Extensions Query 3: Detect Suspicious Attachments with Dangerous Extensions

SELECT FullPath FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Microsoft\\Windows\\INetCache\\IE\\%.exe'

Hunt Name: Monitor_Temp_Directory_For_PDFs Query 4: Search for PDF Files in Temp Directory

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.pdf'

Hunt Name: Check_Temp_Folder_For_Office_Docs Query 5: Detect Office Documents in Temp Folders

SELECT FullPath, CreationTime, Size FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.docx'

2. Execution

2.1. Command and Scripting Interpreter: PowerShell (T1059.001)

Hunt Name: Detect_PowerShell_Execution Query 6: Identify PowerShell Executions

SELECT * FROM pslist()  WHERE name = 'powershell.exe' OR name = 'pwsh.exe'

Hunt Name: Find_Encoded_PowerShell_Commands Query 7: Detect PowerShell Commands with Encoded Scripts

SELECT * FROM pslist()  WHERE name = 'powershell.exe' AND command_line LIKE '%-enc%'

Hunt Name: Monitor_PowerShell_Scripts_In_Temp Query 8: Monitor PowerShell Scripts in Temp Directory

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.ps1

Hunt Name: Search_For_Suspicious_PowerShell_Modules Query 9: Search for Suspicious PowerShell Modules

SELECT * FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\WindowsPowerShell\\Modules\\%'

Hunt Name: Detect_Recent_PowerShell_Executions Query 10: Identify Recent PowerShell Executions

SELECT * FROM pslist()  WHERE name = 'powershell.exe' AND CreationTime > now() - 86400

3. Persistence

3.1. Registry Run Keys / Startup Folder (T1547.001)

Hunt Name: Enumerate_Registry_Run_Keys Query 11: Enumerate Run Keys in Registry

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run%'

Hunt Name: Detect_Suspicious_Startup_Items Query 12: Detect Startup Items in User Profiles

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\%'

Hunt Name: Search_For_Unusual_RunOnce_Keys Query 13: Search for Unusual RunOnce Keys

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce%'

Hunt Name: Monitor_Run_Key_Modifications Query 14: Monitor Run Key Modifications

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run%'

Hunt Name: Identify_Suspicious_Startup_Folder_Entries Query 15: Identify Suspicious Startup Folder Entries

SELECT FullPath FROM FileSystem  WHERE FullPath LIKE 'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\%'

4. Privilege Escalation

4.1. Process Injection (T1055)

Hunt Name: Detect_Remote_Thread_Creation Query 16: Detect Remote Thread Creation

SELECT * FROM Windows.Handles()  WHERE Type = 'Thread' AND GrantedAccess = 'CREATE_THREAD'

Hunt Name: Identify_Processes_With_Injected_Code Query 17: Identify Processes with Injected Code

SELECT * FROM Windows.Processes()  WHERE Injected = true

Hunt Name: Monitor_Suspicious_Memory_Regions Query 18: Monitor Processes with Suspicious Memory Regions

SELECT * FROM Windows.MemoryMap()  WHERE PrivateMemory = true AND Writable = true

Hunt Name: Detect_DLL_Injection_In_Processes Query 19: Search for Processes with DLL Injections

SELECT * FROM Windows.Processes()  WHERE DllInjected = true

Hunt Name: Monitor_Process_Handle_Operations Query 20: Identify Suspicious Process Handle Operations

 SELECT * FROM Windows.Handles()  WHERE Type = 'Process' AND GrantedAccess = 'ALL_ACCESS'

5. Defence Evasion

5.1. Obfuscated Files or Information (T1027)

Hunt Name: Detect_Base64_Encoded_PowerShell Query 21: Detect Base64 Encoded PowerShell Commands

SELECT * FROM pslist()  WHERE name = 'powershell.exe' AND command_line LIKE '%-encodedcommand%'

Hunt Name: Identify_Obfuscated_Scripts_In_Temp Query 22: Identify Suspicious Scripts in Temp Directory

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.vbs'

Hunt Name: Search_For_Encrypted_Scripts Query 23: Search for Encrypted Scripts

SELECT FullPath FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%.vbe'

Hunt Name: Monitor_Batch_Files_In_Temp Query 24: Monitor Obfuscated Batch Files

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.bat'

Hunt Name: Identify_XOR_Encrypted_Files Query 25: Identify XOR Encrypted Files

SELECT FullPath FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%.xor'

6. Credential Access

6.1. Credential Dumping: LSASS Memory (T1003.001)

Hunt Name: Search_For_LSASS_Memory_Dumps Query 26: Search for LSASS Memory Dumps

SELECT * FROM Windows.EventLogs.Application  WHERE ProviderName = 'Sysmon' AND EventID = 10 AND Image = 'lsass.exe'

Hunt Name: Monitor_LSASS_Process_Access Query 27: Monitor Access to LSASS Process

SELECT * FROM Windows.Handles()  WHERE ProcessName = 'lsass.exe' AND GrantedAccess = 'ALL_ACCESS'

Hunt Name: Identify_LSASS_Handle_Operations Query 28: Identify Processes with LSASS Handles

SELECT * FROM Windows.Processes()  WHERE name = 'lsass.exe' AND HasInjectedCode = true

Hunt Name: Detect_Tools_For_LSASS_Dumps Query 29: Detect Tools Known for LSASS Dumps

SELECT * FROM pslist()  WHERE name LIKE 'procdump%' OR name LIKE 'taskmanager%'

Hunt Name: Monitor_LSASS_Memory_Reads Query 30: Monitor Memory Reads from LSASS

  SELECT * FROM Windows.MemoryMap()  WHERE ProcessName = 'lsass.exe' AND Readable = true

7. Discovery

7.1. System Information Discovery (T1082)

Hunt Name: Identify_System_Info_Commands Query 31: Search for System Information Enumeration

SELECT * FROM pslist()  WHERE name = 'systeminfo.exe' OR name = 'hostname.exe'

Hunt Name: Monitor_Host_Information_Commands Query 32: Monitor Commands Gathering Host Information

SELECT * FROM pslist()  WHERE command_line LIKE '%hostname%' OR command_line LIKE '%whoami%'

Hunt Name: Identify_WMI_System_Info_Queries Query 33: Identify System Information Queries via WMI

SELECT * FROM Windows.WMI.Query  WHERE QueryText LIKE '%Win32_ComputerSystem%'

Hunt Name: Detect_AD_Enumeration Query 34: Detect Active Directory Enumeration

SELECT * FROM pslist()  WHERE name = 'dsquery.exe' OR name = 'net.exe'

Hunt Name: Monitor_WMIC_System_Commands Query 35: Monitor WMIC Commands for System Information

SELECT * FROM pslist()  WHERE name = 'wmic.exe' AND command_line LIKE '%computersystem%'

8. Lateral Movement

8.1. Remote Services: Remote Desktop Protocol (RDP) (T1021.001)

Hunt Name: Monitor_RDP_Logons Query 36: Monitor RDP Logons

SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4624 AND LogonType = 10

Hunt Name: Identify_RDP_Network_Sessions Query 37: Identify RDP Sessions Established via Network

SELECT * FROM Windows.Network.Connection  WHERE RemotePort = 3389 AND State = 'ESTABLISHED'

Hunt Name: Search_For_RDP_Config_Changes Query 38: Search for RDP Configuration Changes

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKLM\\System\\CurrentControlSet\\Control\\Terminal Server\\%'

Hunt Name: Detect_RDP_Client_Use Query 39: Detect Use of RDP Client

SELECT * FROM pslist()  WHERE name = 'mstsc.exe'

Hunt Name: Monitor_Suspicious_RDP_File_Transfers Query 40: Monitor Suspicious RDP File Transfers

SELECT * FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\RDP\\%'

9. Collection

9.1. Data from Local System (T1005)

Hunt Name: Identify_Access_To_Sensitive_Files Query 41: Identify Access to Sensitive Files

SELECT FullPath, Size, LastAccessTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%' AND LastAccessTime > now() - 86400

Hunt Name: Monitor_Copy_Operations_Of_Sensitive_Files Query 42: Monitor Copy Operations of Sensitive Files

SELECT * FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%' AND Operation = 'COPY'

Hunt Name: Detect_Archive_Files_With_Sensitive_Data Query 43: Detect Archive Files Containing Sensitive Data

SELECT FullPath, Size FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%.zip'

Hunt Name: Search_For_Encrypted_Archives Query 44: Search for Encrypted Archives

SELECT FullPath FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%.7z'

Hunt Name: Identify_Unauthorized_Data_Access Query 45: Identify Unauthorized Data Access Attempts

SELECT FullPath FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%' AND PermissionDenied = true

10. Command and Control

10.1. Command and Control: Web Protocols (T1071.001)

Hunt Name: Monitor_DNS_Queries_For_C2_Domains Query 46: Monitor DNS Queries for Known Malicious Domains

SELECT QueryName, QueryType FROM Windows.DNS.Queries  WHERE QueryName LIKE '%maliciousdomain.com%'

Hunt Name: Search_For_HTTP_S_Connections_To_C2 Query 47: Search for HTTP/S Connections to C2 Servers

SELECT * FROM Windows.Network.Connection  WHERE RemotePort = 80 OR RemotePort = 443

Hunt Name: Detect_Suspicious_HTTP_POST_Requests Query 48: Identify Suspicious HTTP POST Requests

SELECT * FROM Windows.Network.Connection  WHERE RemotePort = 80 AND Protocol = 'HTTP' AND Method = 'POST'

Hunt Name: Identify_Non_Standard_HTTP_Methods Query 49: Detect Non-Standard HTTP Methods

SELECT * FROM Windows.Network.Connection  WHERE RemotePort = 80 AND Method NOT IN ('GET', 'POST')

Hunt Name: Monitor_DNS_For_Known_C2_Patterns Query 50: Monitor DNS Traffic for Known C2 Patterns

SELECT QueryName, QueryType FROM Windows.DNS.Queries  WHERE QueryName LIKE '%cnc%'

11. Exfiltration

11.1. Exfiltration Over C2 Channel (T1041)

Hunt Name: Monitor_Large_Data_Transfers_To_External_IPs Query 51: Monitor Large Data Transfers to External IPs

SELECT * FROM Windows.Network.Connection  WHERE BytesSent > 10485760 AND RemoteAddress NOT LIKE '192.168.%'

Hunt Name: Search_For_Encrypted_Data_Exfiltration Query 52: Search for Encrypted Data Exfiltration

SELECT * FROM Windows.Network.Connection  WHERE Protocol = 'HTTPS' AND BytesSent > 10485760

Hunt Name: Detect_FTP_Uploads_To_External_Servers Query 53: Detect FTP Uploads to External Servers

SELECT * FROM Windows.Network.Connection  WHERE RemotePort = 21 AND State = 'ESTABLISHED'

Hunt Name: Identify_ICMP_Tunneling_Attempts Query 54: Identify ICMP Tunneling Attempts

SELECT * FROM Windows.Network.Icmp  WHERE MessageType = 8 AND MessageCode = 0

Hunt Name: Monitor_SFTP_Transfers_To_Untrusted_Servers Query 55: Monitor SFTP Transfers to Untrusted Servers

SELECT * FROM Windows.Network.Connection  WHERE RemotePort = 22 AND State = 'ESTABLISHED'

12. Impact

12.1. Inhibit System Recovery: Disable or Modify Tools (T1490)

Hunt Name: Monitor_Volume_Shadow_Copy_Deletion Query 56: Monitor Volume Shadow Copy Deletion

SELECT * FROM Windows.EventLogs.Application  WHERE ProviderName = 'VSS' AND EventID = 8194

Hunt Name: Search_For_Commands_Disabling_Recovery Query 57: Search for Commands Disabling System Recovery

SELECT * FROM pslist()  WHERE command_line LIKE '%vssadmin delete shadows%'

Hunt Name: Detect_System_Restore_Point_Deletion Query 58: Detect System Restore Point Deletion

SELECT * FROM Windows.EventLogs.System  WHERE EventID = 103 AND SourceName = 'System Restore'

Hunt Name: Monitor_Registry_Changes_Disabling_Backups Query 59: Monitor Registry Changes Disabling Backup Features

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKLM\\System\\CurrentControlSet\\Services\\VSS\\Start'

Hunt Name: Search_For_Disabled_Windows_Recovery Query 60: Search for Disabling Windows Recovery Options

SELECT * FROM Windows.Registry.KeyValue  WHERE KeyPath = 'HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\BootExecute'  AND Data != 'autocheck autochk *'

13. Execution (Continued)

13.1. User Execution: Malicious File (T1204.002)

Hunt Name: Identify_Unsigned_Executable_Execution Query 61: Identify Execution of Unsigned Executables

SELECT * FROM pslist()  WHERE name LIKE '%.exe' AND Signed = false

Hunt Name: Search_For_Execution_Of_Recent_Downloads Query 62: Search for Execution of Recently Downloaded Files

SELECT * FROM pslist()  WHERE name LIKE '%.exe' AND CreationTime > now() - 86400

Hunt Name: Monitor_Script_Execution_From_User_Folders Query 63: Monitor Execution of Scripts from User Folders

SELECT * FROM pslist()  WHERE name LIKE '%.vbs' OR name LIKE '%.js'

Hunt Name: Detect_Execution_Of_Suspicious_Extensions Query 64: Detect Execution of Files with Suspicious Extensions

SELECT * FROM pslist()  WHERE name LIKE '%.scr' OR name LIKE '%.cpl'

Hunt Name: Identify_Execution_From_Temp_Directories Query 65: Identify Execution of Files from Temp Directories

SELECT * FROM pslist()  WHERE command_line LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%'

14. Persistence (Continued)

14.1. Boot or Logon Autostart Execution: Registry Run Keys (T1547.001)

Hunt Name: Identify_Registry_Autostart_Entries Query 66: Identify Autostart Entries in Registry

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run%'

Hunt Name: Monitor_RunOnce_Key_Changes Query 67: Monitor Changes to RunOnce Keys

SELECT Key, Value, Data FROM registry()  WHERE Key LIKE 'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce%'

Hunt Name: Detect_New_Startup_Registry_Entries Query 68: Detect New Startup Items in Registry

SELECT * FROM registry()  WHERE Key LIKE 'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run%'  AND Value NOT IN (SELECT Value FROM registry_previous)

Hunt Name: Search_For_Persistence_Via_Winlogon_Keys Query 69: Search for Persistence via Winlogon Keys

SELECT * FROM registry()  WHERE Key LIKE 'HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\%'

Hunt Name: Monitor_Registry_Entries_For_Suspicious_Executables Query 70: Monitor Registry Entries for Suspicious Executables

SELECT Key, Value, Data FROM registry()  WHERE Data LIKE '%.exe' AND (Key LIKE 'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run%'  OR Key LIKE 'HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run%')

15. Defence Evasion (Continued)

15.1. Process Injection: Process Hollowing (T1055.012)

Hunt Name: Detect_Process_Hollowing_Indicators Query 71: Monitor for Suspicious Process Hollowing Indicators

SELECT * FROM Windows.Processes()  WHERE CommandLine LIKE '%svchost.exe%' AND ParentProcessName != 'services.exe'`

Hunt Name: Search_For_Inconsistencies_In_Memory_Allocation Query 72: Search for Inconsistencies in Memory Allocation

SELECT * FROM Windows.MemoryMap()  WHERE ProcessName = 'svchost.exe' AND (MemoryMapped = false OR Writable = true)

Hunt Name: Detect_Unusual_Parent_Child_Process_Relationships Query 73: Detect Unusual Parent-Child Process Relationships

SELECT * FROM Windows.Processes()  WHERE ParentProcessName NOT IN ('explorer.exe', 'services.exe')  AND ProcessName LIKE '%svchost.exe%'

Hunt Name: Monitor_Process_Creation_With_Suspicious_Flags Query 74: Monitor for Process Creation with Suspicious Flags

SELECT * FROM Windows.Processes()  WHERE CreationFlags & 0x00000004 != 0

Hunt Name: Search_For_Hollowed_Process_Memory_Regions Query 75: Search for Processes with Hollowed Memory Regions

SELECT * FROM Windows.MemoryMap()  WHERE PrivateMemory = true AND Writable = true AND Executable = true

16. Credential Access (Continued)

16.1. OS Credential Dumping: NTDS (T1003.003)

Hunt Name: Search_For_NTDS_dit_Access_Attempts Query 76: Search for NTDS.dit Access Attempts

SELECT * FROM FileSystem  WHERE FullPath LIKE 'C:\\Windows\\NTDS\\ntds.dit'

Hunt Name: Monitor_NTDS_dit_Copy_Operations Query 77: Monitor for NTDS.dit Copy Operations

SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4663 AND ObjectName LIKE 'C:\\Windows\\NTDS\\ntds.dit'

Hunt Name: Detect_NTDS_dit_Access_Via_VSSAdmin Query 78: Detect NTDS.dit Access via VSSAdmin

SELECT * FROM pslist()  WHERE name = 'vssadmin.exe' AND command_line LIKE '%create shadow%'

Hunt Name: Search_For_NTDS_dit_In_VSS_Snapshots Query 79: Search for NTDS.dit in VSS Snapshots

SELECT * FROM FileSystem  WHERE FullPath LIKE 'C:\\Windows\\NTDS\\ntds.dit' AND IsInShadowCopy = true

Hunt Name: Monitor_NTDS_dit_Access_By_Non_System_Processes Query 80: Monitor NTDS.dit Access by Non-System Processes

SELECT * FROM Windows.Processes()  WHERE name = 'ntds.dit' AND ParentProcessName NOT IN ('lsass.exe', 'services.exe')

17. Discovery (Continued)

17.1. File and Directory Discovery (T1083)

Hunt Name: Identify_File_And_Directory_Enumeration_Commands Query 81: Identify Commands Enumerating Files or Directories

SELECT * FROM pslist()  WHERE command_line LIKE '%dir%' OR command_line LIKE '%ls%'

Hunt Name: Monitor_File_Listings_In_User_Folders Query 82: Monitor File Listing Commands in User Folders

SELECT * FROM pslist()  WHERE command_line LIKE '%dir%' AND command_line LIKE 'C:\\Users\\%'

Hunt Name: Search_For_Commands_Accessing_Hidden_Directories Query 83: Search for Commands Accessing Hidden Directories

SELECT * FROM pslist()  WHERE command_line LIKE '%dir%' AND command_line LIKE '%/A:H%'

Hunt Name: Detect_Listing_Of_System_Files Query 84: Detect Listing of System Files

SELECT * FROM pslist()  WHERE command_line LIKE '%dir%' AND command_line LIKE 'C:\\Windows\\%'

Hunt Name: Monitor_Recursive_File_Listings Query 85: Monitor Recursive File Listings

SELECT * FROM pslist()  WHERE command_line LIKE '%dir /S%'

18. Lateral Movement (Continued)

18.1. Pass the Hash (T1550.002)

Hunt Name: Monitor_LSASS_For_Credential_Extraction Query 86: Monitor LSASS for Credential Extraction

SELECT * FROM pslist()  WHERE name = 'mimikatz.exe' OR command_line LIKE '%sekurlsa::pth%'

Hunt Name: Search_For_Suspicious_Logon_Attempts_Using_Hashes Query 87: Search for Suspicious Logon Attempts Using Hashes

 SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4624 AND LogonType = 9

Hunt Name: Detect_Abnormal_SMB_Logon_Attempts Query 88: Detect Abnormal SMB Logon Attempts

SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4624 AND LogonType = 3 AND AccountName NOT IN (SELECT AccountName FROM UserAccounts)

Hunt Name: Search_For_Lateral_Movement_Using_Cached_Credentials Query 89: Search for Lateral Movement Using Cached Credentials

SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4624 AND LogonType = 5

Hunt Name: Monitor_Logon_Sessions_From_Unusual_Sources Query 90: Monitor Logon Sessions Originating from Unusual Sources

SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4624 AND LogonType = 2 AND SourceAddress NOT LIKE '192.168.%'

19. Collection (Continued)

19.1. Screen Capture (T1113)

Hunt Name: Search_For_Screen_Capture_Tools Query 91: Search for Screen Capture Tools

SELECT * FROM pslist()  WHERE name LIKE '%snippingtool%' OR name LIKE '%screenshot%'

Hunt Name: Monitor_Output_Files_From_Screen_Capture_Tools Query 92: Monitor Output Files from Screen Capture Tools

SELECT FullPath, Size FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Pictures\\Screenshots\\%'

Hunt Name: Detect_Use_Of_Built_In_Screenshot_Tools Query 93: Detect Use of Built-in Screenshot Tools

SELECT * FROM pslist()  WHERE name LIKE '%Snip%'

Hunt Name: Identify_Screen_Capture_Commands Query 94: Identify Screen Capture Commands

SELECT * FROM pslist()  WHERE command_line LIKE '%screencapture%' OR command_line LIKE '%scrot%'

Hunt Name: Monitor_Image_Files_Created_In_Temp_Folders Query 95: Monitor Creation of Image Files in Temp Folders

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.png'  OR FullPath LIKE 'C:\\Users\\%\\AppData\\Local\\Temp\\%.jpg'

20. Impact (Continued)

20.1. Data Encrypted for Impact (T1486)

Hunt Name: Monitor_Unusual_File_Modifications Query 96: Monitor Unusual File Modifications Indicating Encryption

SELECT FullPath, Size, LastWriteTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\%' AND Extension IN ('.encrypted', '.locked')

Hunt Name: Search_For_Known_Ransomware_Signatures Query 97: Search for Known Ransomware Signatures

SELECT * FROM Windows.EventLogs.Application  WHERE ProviderName = 'Symantec' AND Message LIKE '%Ransomware%'

Hunt Name: Detect_Sudden_Increase_In_File_Modifications Query 98: Detect Sudden Increase in File Modifications

SELECT * FROM Windows.EventLogs.Security  WHERE EventID = 4663 AND ObjectName LIKE 'C:\\Users\\%\\Documents\\%'  AND ObjectType = 'File' AND AccessMask = 'WRITE'

Hunt Name: Monitor_Creation_Of_Ransom_Notes Query 99: Monitor Creation of Ransom Notes

SELECT FullPath, Size, CreationTime FROM FileSystem  WHERE FullPath LIKE 'C:\\Users\\%\\Documents\\RansomwareNote.txt'

Hunt Name: Identify_Ransomware_Processes Query 100: Identify Ransomware Processes

SELECT * FROM pslist()  WHERE name LIKE 'ransomware%'
PreviousPowerShell Intrusion AnalysisNextZimmerman Tools Intrusion Analysis

Last updated 3 months ago