reg save HKLM\SAM [LOCATION]\SAM
reg save HKLM\SYSTEM [LOCATION]\SYSTEM
reg save HKLM\SECURITY [LOCATION]\SECURITY
reg save HKLM\SOFTWARE [LOCATION]\SOFTWARE
System and User information
get-computerinfo
echo %DATE% %TIME%
date /t
time /t
reg query "HKLM\System\CurrentControlSet\Control\TimeZoneInformation"
systeminfo
wmic computersystem list full
wmic /node:localhost product list full /format:csv
wmic softwarefeature get name,version /format:csv
wmic softwareelement get name,version /format:csv
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /s
echo %PATH%
(gci env:path|Select -exp Value).split(';')
SET
wmic bootconfig get /all /format:List
wmic computersystem get name, domain, manufacturer, model, numberofprocessors,primaryownername,username,roles,totalphysicalmemory /format:list
wmic timezone get Caption, Bias, DaylightBias, DaylightName, StandardName
wmic recoveros get /all /format:List
wmic os get /all /format:list
wmic partition get /all /format:list
wmic logicaldisk get /all /format:list
wmic diskdrive get /all /format:list
fsutil fsinfo drives
(psinfo requires sysinternals psinfo.exe):
Model of motherboard and hardware information:
Installed Updates
(WMI Quick Fix Engineering)
Installed Software/Packages
Powershell: Full List for all users using uninstall keys in registry
User and admin information
User accounts and logon information
Logon information
NT Domain/Network Client Information
Group and access information
(Accesschk requires accesschk64.exe or accesschk.exe from sysinternals):
Hosts file and service>port mapping
cmd history
Linux Subsystem for Windows 10 may have history in a location such as:
User Registry (NTUSER.DAT HIVE) - Commonly located at:
*Note: These are setup for querying the current users registry only (HKCU), to query others you will need to load them from the relevant NTUSER.DAT file and then query them.
Local Machine (SOFTWARE HIVE)
Don’t be afraid to use “findstr” or ‘/f’ to find entries of interest, for example file extensions which may also invoke malicious executables when run, or otherwise.
Local Machine (SYSTEM HIVE)
Note: This not only contains services, but also malicious drivers which may run at startup (these are in the form of “.sys” files and are generally loaded from here: \SystemRoot\System32\drivers)
Note: Some useful commands to show relevant service information
Registry
Powershell: Query Registry Keys
Review Hivelist
Locate all user registry keys
Load all users registry keys from their ntuser.dat file (perform above first)
Query all users run key
Network Connections
Network connections
(tcpvcon requires sysintenals tcpvcon.exe):
Routing table and ARP cache
Obtain hash and established network connections for running executables with dns cache
Obtain hash and listening network connections for running executables
Obtain hash and possible tunneled network connections for running executables
Obtain workstation name for tunneled authentication
Contents of DNS resolver
(useful for recent web history)
Currently connected Access Point name (WiFi)
Previously connected Access Point names (WiFi)
Current surrounding Access Point names (WiFi)
Extended network adapter configuration information
RDP
RDP Cache images
This can be used to display some fragments of images which a user could see when operating on a server using the Windows RDP. The cache files are located: %USERPROFILE%\AppData\Local\Microsoft\Terminal Server Client\Cache\
Extract Module (DLL, SYS and EXE) information from WDAC Audit Events
Obtain unsigned DLL information loaded by processes
Obtain DLLs in use by processes
Determine handles on a file
DNS
Obtain TXT records from recently resolved domains
Active Directory
Active Directory Investigation
Note: Live information can be found using DSQuery or Netdom.
NT Directory Services Directory Information Tree File (ntds.dit)
Active Directory Database file containing all schema, domain, configuration information (e.g. users, IP, computers, domain trusts etc)
%SystemRoot%\NTDS\ntds.dit
%SystemRoot%\System32\ntds.dit
File created only when promoting certain OS to a DC, and seldom used.
Edb.log
10MB transaction log used to store temporary data before it is sent to the ntds.dit database.
%SystemRoot%\NTDS\Edb.log
Edbxxxxx.log
Additional transaction log files if the main edb.log file gets larger than 10MB without being flushed to ntds.dit.
%SystemRoot%\NTDS\edbxxxxx.log
Edb.chk
Checkpoint file used to determine how much of the transaction logs have been sent to the ntdis.dit database.
%SystemRoot%\NTDS\edb.chk
Resx.log/Resx.jrs
Reserved log files in case the hard drive fills up, at which point these files will be used (ideally they should never be used).
%SystemRoot%\NTDS\res1.log
%SystemRoot%\NTDS\res2.log
Temp.edb
Temporary file to store information during in progress transactions.
%SystemRoot%\NTDS\temp.edb
Schema.ini
Initialises the ntds.dit file when the domain controller is created, and is then never used again.
%SystemRoot%\NTDS\schema.ini
Investigation of ntds.dit
Obtaining this file can be done using any of the following and also requires the SYSTEM hive to decrypt (note: ntdsutil may not work on older AD servers).
wmic baseboard get product,manufacturer
wmic desktopmonitor get /all /format:list
wmic baseboard get /all /format:list
wmic bios get /all /format:list
wmic cpu get /all /format:list
whoami
whoami /user
net users
net localgroup administrators
net group /domain [groupname]
net user /domain [username]
wmic sysaccount
wmic useraccount get name,SID
wmic useraccount list
Get-WmiObject Win32_UserProfile
wmic netlogin list /format:List
Get-WmiObject Win32_LoggedOnUser
Get-WmiObject win32_logonsession
query user
qwinsta
klist sessions
klist -li
wmic ntdomain get /all /format:List
wmic netclient get /all /format:List
nltest /trusted_domains
net localgroup
accesschk64 -a *
type %SystemRoot%\System32\drivers\etc\hosts
type %SystemRoot%\System32\drivers\etc\services