🔏
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. Collection
  • 9. Exfiltration
Edit on GitHub
  1. DFIR
  2. Incident Response
  3. Incident Triage

Sysinternals Intrusion Analysis

1. Initial Access

1.1. Phishing: Spearphishing Attachment (T1566.001)

Objective: Detect and collect evidence of malicious email attachments that may have been used to gain initial access.

Tool: Procmon (Process Monitor)

Instruction: Use Procmon to monitor and filter file system activity related to email clients (e.g., Outlook). - Steps: 1. Launch Procmon. 2. Set a filter: Process Name is OUTLOOK.EXE (or any other email client). 3. Monitor for file writes to directories like Downloads, Temp, or INetCache. 4. Save the capture for detailed analysis.

Tool: Sigcheck (Signature Verification Tool)

Instruction: Verify the digital signatures of executables found in suspicious directories, such as downloads or temporary folders. Command:

sigcheck.exe -e -v C:\Users\%USERNAME%\Downloads\*.exe > C:\Output\sigcheck_results.txt`

Analysis: Review the output for unsigned or suspicious executables.

Tool: Streams (Alternate Data Streams Viewer)

Instruction: Check for Alternate Data Streams (ADS) that might hide malicious attachments. Command:

streams.exe -s C:\Users\%USERNAME%\Downloads\ > C:\Output\streams_output.txt

Analysis: Look for files with unexpected ADS, indicating potential hidden content.

Tool: Autoruns

Instruction: Identify startup programs that might have been introduced by a phishing attack. Steps: 1. Launch Autoruns. 2. Filter by Logon and Startup entries. 3. Review for suspicious entries, especially those with unusual file paths or unsigned binaries.

Tool: Strings (String Extraction Utility)

Instruction: Extract and analyze strings from suspicious files to identify hidden scripts or commands. Command:

strings.exe C:\Users\%USERNAME%\Downloads\suspicious.exe > C:\Output\strings_output.txt

Analysis: Search the extracted strings for URLs, IP addresses, or encoded scripts that may indicate malicious activity.

2. Execution

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

Objective: Detect and analyze PowerShell usage that may indicate the execution of malicious scripts.

Tool: Procmon (Process Monitor)

Instruction: Monitor and filter PowerShell activity to detect suspicious commands. Steps: 1. Launch Procmon. 2. Set a filter: Process Name is powershell.exe. 3. Focus on command-line arguments, especially those containing -enc (indicating encoded scripts). 4. Save the filtered results for analysis.

Tool: Autoruns

Instruction: Check for PowerShell scripts configured to run at startup. Steps: 1. Open Autoruns and navigate to the Logon tab. 2. Look for entries where PowerShell is used in the command line. 3. Investigate any scripts or commands set to run automatically.

Tool: Strings

Instruction: Extract strings from PowerShell script files to identify obfuscated or malicious content. Command:

strings.exe C:\Users\%USERNAME%\Documents\*.ps1 > C:\Output\strings_output.txt`

Analysis: Review the extracted strings for suspicious commands, URLs, or encoded content.

Tool: PsExec (Remote Execution Tool)

Instruction: Use PsExec to remotely execute PowerShell commands and check for running scripts. Command:

psexec.exe \\TARGET -s powershell.exe Get-Process | Where-Object {$_.Name -eq 'powershell'}

Analysis: Identify unauthorized or suspicious PowerShell processes running on remote systems.

Tool: ProcDump (Process Dump Utility)

Instruction: Use ProcDump to capture the memory of a running PowerShell process for further analysis. Command:

procdump.exe -ma powershell.exe C:\Output\powershell_dump.dmp

Analysis: Analyze the memory dump using forensic tools to search for suspicious scripts or commands.

3. Persistence

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

Objective: Detect persistence mechanisms that use registry run keys or startup folders.

Tool: Autoruns

Instruction: Identify programs configured to run at startup through registry keys or startup folders. Steps: 1. Open Autoruns and navigate to the Logon tab. 2. Review all entries, focusing on unknown or unsigned executables. 3. Pay attention to file paths in Temp or non-standard directories.

Tool: Reg (Registry Command Line Tool)

Instruction: Manually query and export registry run keys for offline analysis. Command:

reg query HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run > C:\Output\run_keys.txt reg query HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run >> C:\Output\run_keys.txt

Analysis: Review the output for suspicious entries, particularly those pointing to non-standard executables.

Tool: Procmon

Instruction: Monitor registry changes to detect new or modified persistence mechanisms. Steps: 1. Launch Procmon. 2. Set a filter: Operation is RegSetValue. 3. Monitor changes to keys such as

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
    5. Save the logs for analysis.

Tool: PsExec

Instruction: Remotely query registry run keys on multiple machines to detect persistence. Command:

psexec.exe \\TARGET -s reg query HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Analysis: Collect and analyze registry entries for potential persistence mechanisms across multiple systems.

Tool: Autorunsc (Command-Line Autoruns)

Instruction: Use Autorunsc to script the collection of autorun entries across multiple systems. Command:

autorunsc.exe -a * > C:\Output\autoruns_output.txt

Analysis: Review the output for suspicious autorun entries, focusing on unknown or unsigned executables.

4. Privilege Escalation

4.1. Scheduled Task/Job (T1053.005)

Objective: Detect and analyze scheduled tasks that may have been created for privilege escalation.

Tool: Autoruns

Instruction: Identify and analyze scheduled tasks configured to run with elevated privileges. - Steps: 1. Open Autoruns and navigate to the Scheduled Tasks tab. 2. Review tasks for unusual or unknown executables. 3. Investigate tasks set to run with high privileges or under the SYSTEM account.

Tool: Tasklist (Task List Utility)

Instruction: List all scheduled tasks running on the system and check their privilege levels. Command:

tasklist /v > C:\Output\tasklist_output.txt

Analysis: Review the output for tasks running under SYSTEM or other high-privilege accounts.

Tool: Procmon

Instruction: Monitor the creation and execution of scheduled tasks. - Steps: 1. Set filters in Procmon: Process Name is taskeng.exe and Operation is Process Create. 2. Capture task creation and execution events. 3. Save the log for further analysis.

Tool: Schtasks (Scheduled Task Command Line Utility)

Instruction: Use Schtasks to query and manage scheduled tasks on the local or remote systems. Command:

schtasks /query /fo LIST /v > C:\Output\scheduled_tasks.txt

Analysis: Review the list of scheduled tasks for suspicious entries, especially those running with elevated privileges.

Tool: PsExec

Instruction: Remotely check for scheduled tasks on multiple systems. Command:

psexec.exe \\TARGET -s schtasks /query /FO LIST > C:\Output\scheduled_tasks_output.txt

Analysis: Collect and analyze scheduled task configurations from remote systems for signs of privilege escalation.

5. Defence Evasion

5.1. Obfuscated Files or Information (T1027)

Objective: Detect and analyze obfuscated files and scripts used to evade detection.

Tool: Strings

Instruction: Analyze files for hidden or obfuscated commands by extracting readable strings. Command:

strings.exe C:\Path\To\SuspiciousFile.exe > C:\Output\strings_output.txt

Analysis: Look for encoded scripts, obfuscated URLs, or suspicious commands within the file.

Tool: Sigcheck

Instruction: Identify files that may have been modified or obfuscated to evade detection. Command:

sigcheck.exe -e -v C:\Path\To\SuspiciousFile.exe > C:\Output\sigcheck_results.txt

Analysis: Focus on files with invalid or missing digital signatures.

Tool: Procmon

Instruction: Monitor processes for the execution of obfuscated or encoded scripts. Steps: 1. Set a filter: Process Name is powershell.exe or Process Name is cmd.exe. 2. Capture command-line arguments involving -enc or obfuscated scripts. 3. Save the logs for further analysis.

Tool: Autoruns

Instruction: Identify obfuscated scripts or executables set to run at startup. Steps: 1. Filter by Logon or Scheduled Tasks. 2. Look for suspicious entries with unusual file paths or encoded commands. 3. Investigate any unknown or unsigned entries.

Tool: Streams

Instruction: Use Streams to detect hidden data within files using Alternate Data Streams (ADS). Command:

streams.exe -s C:\Path\To\Directory > C:\Output\streams_output.txt

Analysis: Look for files with unexpected ADS, which could indicate hidden malicious content.

6. Credential Access

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

Objective: Detect and analyse attempts to dump credentials from the LSASS process.

Tool: Procmon

Instruction: Monitor for processes that attempt to access LSASS memory. Steps: 1. Set a filter: Process Name is lsass.exe and Operation is Process Create. 2. Monitor for suspicious processes like procdump.exe or mimikatz.exe. 3. Save the logs for detailed analysis.

Tool: Autoruns

Instruction: Check for credential dumping tools configured to run at startup. Steps: 1. Filter by Logon or Scheduled Tasks. 2. Look for entries related to known tools like mimikatz. 3. Investigate any unknown or unsigned entries.

Tool: Sigcheck

Instruction: Verify the integrity of system binaries, particularly LSASS, to ensure they haven’t been tampered with. Command:

sigcheck.exe -e -v C:\Windows\System32\lsass.exe > C:\Output\sigcheck_lsass.txt

Analysis: Ensure that LSASS and other critical system binaries have valid signatures

Tool: PsExec

Instruction: Remotely check for running processes that may be attempting credential dumping on other systems. Command:

psexec.exe \\TARGET -s tasklist /svc | findstr /i "lsass procdump mimikatz"

Analysis: Identify any unauthorized processes interacting with LSASS.

Tool: ProcDump

Instruction: Use ProcDump to safely capture the LSASS process memory for offline analysis. Command:

procdump.exe -ma lsass.exe C:\Output\lsass_dump.dmp

Analysis: Analyse the dump file with a forensic tool to detect signs of credential dumping.

7. Discovery

7.1. System Information Discovery (T1082)

Objective: Detect and collect evidence of system information discovery commands executed by an attacker.

Tool: Procmon

Instruction: Monitor for system information discovery commands. Steps: 1. Set filters: Process Name is cmd.exe and Operation is Process Create. 2. Capture commands like systeminfo, ipconfig, or hostname. 3. Save the logs for further analysis.

Tool: PsExec

Instruction: Use PsExec to remotely execute and check for system information discovery commands. Command:

psexec.exe \\TARGET cmd.exe /c "systeminfo & ipconfig & netstat -an" > C:\Output\sysinfo_output.txt

Analysis: Compare the output with expected system configurations to detect unauthorized commands.

Tool: Autoruns

Instruction: Check for scripts or executables configured to run at startup that may perform system discovery. Steps: 1. Filter by Logon or Scheduled Tasks. 2. Look for suspicious entries that run discovery commands. 3. Investigate any unknown or unsigned entries.

Tool: Strings

Instruction: Extract and analyze strings from scripts or batch files for system discovery commands. Command:

strings.exe C:\Path\To\SuspiciousFile.bat > C:\Output\strings_sysinfo.txt

Analysis: Look for common system discovery commands, such as systeminfo, ipconfig, and tasklist.

Tool: Tasklist

Instruction: Use Tasklist to list all running tasks and check for system discovery tools. Command:

tasklist /v > C:\Output\tasklist_output.txt

Analysis: Review the list of running processes for known discovery tools or suspicious activity.

8. Collection

8.1. Data from Local System (T1005)

Objective: Detect and collect artefacts related to data collection from the local system.

Tool: Procmon

Instruction: Monitor file system access, especially in sensitive directories such as Documents or Downloads. Steps: 1. Set filters: Operation is ReadFile or WriteFile targeting sensitive directories. 2. Capture events where files are accessed or copied. 3. Save the logs for further analysis.

Tool: PsExec

Instruction: Use PsExec to remotely check for recently accessed files on other systems. Command:

psexec.exe \\TARGET cmd.exe /c "dir /s /od C:\Users\%USERNAME%\Documents\ > C:\Output\recent_docs.txt"
- **Analysis:** Review the list of recently accessed files for sensitive documents or unauthorized access.

Tool: Autoruns

Instruction: Check for programs or scripts configured to collect data at startup. Steps: 1. Filter by Logon or Scheduled Tasks. 2. Look for suspicious entries that access or move files. 3. Investigate any unknown or unsigned entries.

Tool: Strings

Instruction: Analyse scripts or executables for commands related to data collection. Command:

strings.exe C:\Path\To\SuspiciousFile.exe > C:\Output\strings_collection.txt

Analysis: Look for commands or paths related to copying or exfiltrating data, especially to external drives or network shares.

Tool: Streams

Instruction: Use Streams to detect hidden data within files using Alternate Data Streams (ADS). Command:

streams.exe -s C:\Users\%USERNAME%\Documents\ > C:\Output\streams_output.txt

Analysis: Check for files with unexpected ADS, indicating potential data hiding or exfiltration.

9. Exfiltration

9.1. Exfiltration Over C2 Channel (T1041)

Objective: Detect and analyse data exfiltration attempts over command-and-control (C2) channels.

Tool: Procmon

Instruction: Monitor network activity, especially outbound connections that may be used for exfiltration. Steps: 1. Set filters: Operation is TCP Connect and monitor outbound traffic. 2. Focus on connections to unusual or suspicious IP addresses. 3. Save the logs for further analysis.

Tool: PsExec

Instruction: Remotely check for network activity on multiple systems. Command:

psexec.exe \\TARGET netstat -an > C:\Output\netstat_output.txt

Analysis: Review the output for unexpected or suspicious connections, particularly outbound traffic to external IP addresses.

Tool: Strings

Instruction: Analyse scripts or executables for embedded network commands used for exfiltration. Command:

strings.exe C:\Path\To\SuspiciousFile.exe > C:\Output\strings_exfiltration.txt

Analysis: Look for URLs, IP addresses, or FTP commands that may be used to exfiltrate data.

Tool: Autoruns

Instruction: Identify programs or scripts set to run at startup that may be used for data exfiltration. Steps: 1. Filter by Logon or Scheduled Tasks. 2. Look for suspicious entries that establish network connections or move files to external locations. 3. Investigate any unknown or unsigned entries.

Tool: ProcDump

Instruction: Use ProcDump to capture the memory of processes suspected of data exfiltration for further analysis. Command:

procdump.exe -ma C:\Path\To\SuspiciousProcess.exe C:\Output\exfiltration_dump.dmp

Analysis: Analyse the memory dump for signs of data transfer or communication with C2 servers.

PreviousRegistry AnalysisNextPowerShell Intrusion Analysis

Last updated 3 months ago