Windows DFIR Check by MITRE Tactic
T1015 Accessibility Features
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\sethc.exe" /v "Debugger"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\utilman.exe" /v "Debugger"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\AtBroker.exe" /v "Debugger"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Narrator.exe" /v "Debugger"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Magnify.exe" /v "Debugger"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\DisplaySwitch.exe" /v "Debugger"
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\osk.exe" /v "Debugger"
sfc /VERIFYFILE=C:\Windows\System32\sethc.exe
sfc /VERIFYFILE=C:\Windows\System32\utilman.exe
sfc /VERIFYFILE=C:\Windows\System32\AtBroker.exe
sfc /VERIFYFILE=C:\Windows\System32\Narrator.exe
sfc /VERIFYFILE=C:\Windows\System32\Magnify.exe
sfc /VERIFYFILE=C:\Windows\System32\DisplaySwitch.exe
sfc /VERIFYFILE=C:\Windows\System32\osk.exeT1098 Account Manipulation
T1182 AppCert DLLs
reg query "HKLM\System\CurrentControlSet\Control\Session Manager" /v AppCertDllsT1103 AppInit DLLs
T1138 Application Shimming
Note: Some other similar methods exist such as abusing the ‘Command’ value of Windows Telemetry Controller - Special Thanks to TrustedSec.
Hint: Look for a Command not pointing to “CompatTelRunner.exe” or which has ‘-cv’, ‘-oobe’, or ‘-fullsync’ in the command line.
T1197 BITS Jobs
T1067 Bootkit
Note: This exists below the OS in the Master Boot Record or Volume Boot Record. The system must be booted through Advanced Startup Options with a Command Prompt, or through a recovery cd.
Extra: If your boot configuration data is missing or contains errors the below can fix this.
If you’re thinking of a bootkit more as a rootkit (malicious system drivers) you can go with the below.
General Driver Enumeration
Unsigned Drivers
Previous Unusual Loaded Filter Drivers (Often used by rootkits)
Note: This will likely have false positives, particularly relating to filter drivers which are used by AV products, EDR solutions, or otherwise.
Unusual Loaded Filter Drivers (No longer present or filtering registry keys)
Safe Boot registry keys
Special Thanks - Didier Stevens, multiple times
Note: These keys specify what services are run in Safe Mode. Sometimes they’ll be modified by malware to ensure rootkits can still function in Safe Mode.
Unload malicious filter driver
Note: Common legitimate filter drivers include
WdFilter – Windows Defender Filter
storqosflt - Storage QoS Filter
wcifs - Windows Container Isolation File System Filter
CldFlt - Windows Cloud Files Filter
FileCrypt - Windows Sandboxing and Encryption Filter
luafv – LUA File Virtualization Filter (UAC)
npsvctrig – Named Pipe Service Trigger Provider Filter
Wof – Windows Overlay Filter
FileInfo – FileInfo Filter (SuperFetch)
bindflt - Windows Bind Filter system driver
FsDepends - File System Dependency Minifilter
PROCMON24 - Procmon Process Monitor Driver
T1176 Browser Extensions
Chrome
Firefox
Edge
Internet Explorer
T1109 Component Firmware
Note: This is incredibly rare, and doesn’t have an easy detection/remediation mechanism. Using the Windows CheckDisk utility, System File Checker, or Deployment Image Servicing and Management may assist but isn’t guaranteed.
T1122 Component Object Model (COM) Hijacking
Note: This involves replacing legitimate components with malicious ones, and as such the legitimate components will likely no longer function. If you have a detection based on DLLHost.exe with /Processid:{xyz}, you can match xyz with the CLSID (COM Class Object) or AppID mentioned below to check for any malicious EXE or DLL.
Example analysis:
Queries:
Get list of all COM Objects
T1136 Create Account
T1574.001 - Hijack Execution Flow: DLL Search Order Hijacking
Note: A legitimate clean executable can be used to run malicious DLLs based on how the software searches for them.
More information on Microsoft Docs
Search order for desktop applications:
If SafeDllSearchMode is enabled (is by default), the search order is as follows:
The same directory from which the executable is run.
The System Directory (Usually C:\Windows\System32).
The 16-bit System Directory.
The Windows Directory (Usually C:\Windows).
The Current Directory (From the process which executed the executable).
The directories that are listed in the PATH environment variable.
If SafeDllSearchMode is disabled (SafeDllSearchMode has a reg value of 0), the search order is as follows:
The same directory from which the executable is run.
The Current Directory (From the process which executed the executable).
The System Directory (Usually C:\Windows\System32).
The 16-bit System Directory.
The Windows Directory (Usually C:\Windows).
The directories that are listed in the PATH environment variable.
T1133 External Remote Services
T1044 File System Permissions Weakness
T1158 Hidden Files and Directories
T1179 Hooking
Finding EasyHook Injection
More Material:
T1062 Hypervisor
T1183 Image File Execution Options Injection
T1037 Logon Scripts
T1177 LSASS Driver
T1031 Modify Existing Service
T1128 Netsh Helper DLL
T1050 New Service
Note: If not examining the registry directly and looking at services in a ‘live’ capacity you may encounter ‘hidden services’ which aren’t shown due to a SDDL applied to them. You can find solely these services using the following (Special thanks - Josh Wright)
Some common legitimate hidden services are:
T1137 Office Application Startup
T1034 Path Interception
T1013 Port Monitors
T1504 PowerShell Profile
T1108 Redundant Access
T1060 Registry Run Keys / Startup Folder
T1053 Scheduled Task
Note: thanks to Markus Piéton for the WptsExtensions.dll one.
T1180 Screensaver
T1101 Security Support Provider
T1505 Server Software Component
T1058 Service Registry Permissions Weakness
T1023 Shortcut Modification
T1198 SIP and Trust Provider Hijacking
T1019 System Firmware
T1209 Time Providers
T1078 Valid Accounts
T1100 Web Shell
Note: The presence of files with these values isn’t necessarily indicative of a webshell, review output.
ProxyShell - May reveal evidence of mailbox exfil or Web Shell being dropped:
T1084 Windows Management Instrumentation Event Subscription
Get WMI Namespaces
Query WMI Persistence
T1004 Winlogon Helper DLL
T1574.002 Hijack Execution Flow: DLL Side-Loading
Note: A legitimate clean executable can be used to run malicious DLLs based on issues with a manifest file used by the application to load DLLs.
By placing a malicious DLL in the below locations legitimate binaries may have been used to sideload these malicious DLLs.
C:\Windows\WinSxS
C:\Windows\SXS