Windows Forensics
Goals
- Understand the workings of the Windows operating system
- Gather evidence from the Registry
- Retrieve evidence from logs
- Examine directories for evidence
- Check the index.dat file for evidence
Windows Details
Volatile Data
Windows Swap File
Volume Shadow Copy
Windows Logs
- different ways to get to logs based on Windows version
- Windows 7 and Server 2008
- Start button > Control Panel > Administrative Tools > Event Viewer
- Windows 7 and Server 2008
- Logs
- Security logs
- contains successful and unsuccessful login events
- Application logs
- contains various events logged by applications
- System logs
- contains events logged by Windows system components
- includes driver failures
- ForwardedEvents log
- used to store events forwarded from remote computers
- Applications and Services log
- used to store events from a single application or component rather than events that might have systemwide impact
- Security logs
Windows Directories
- directories that are more likely to contain evidence:
C:\Windows documents and settings- default location to save documents
C:\users- contains user profile information, documents, pictures, and more for all users
- not just the one currently logged on
C:\Program Files- By default, programs are installed in subdirectories of this directory
C:\Program Files (x86)- In 64-bit systems, 32-bit programs are installed here
C:\Users\username\Documents- current user’s Documents folder
UserAssist
UserAssist is a Windows feature that helps programs launch faster.
- it maintains a record of programs that have been launched
- can view all the programs that have been executed on a machine
- by examining appropriate Registry keys
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\UserAssist- encrypted
- need a UserAssist tool to read
- by examining appropriate Registry keys
Unallocated/Slack Space
- search unallocated space for keywords
- can use FTK to find documents in unallocated space
- can build a full-text index
- allows you to build a binary tree-based dictionary of all words that exist in an image
Alternate Data Streams
Alternate data streams are a method of attaching one file to another file, using NTFS.
- was developed to support Mac HFS on NTFS
- e.g., criminal can attach a script to a text file
- can use Alternate Data Streams View to detect
Index.dat
- browsers often store search history in a separate file
- Internet Explorer stores in
index.dat - Firefox stores in
history.dat
Windows Files and Permissions
- file permissions can change when moving a file
- can depend on whether file is
- copy-and-pasted
- cut-and-pasted
- whether in same partition or not
- in same partition, files will retain original permissions
- in different partition, files will inherit destination permissions
- can depend on whether file is
MAC
- refers to Modified, Accessed, Created file properties
- file created
- is the date file was created on the volume
- file accessed
- date the file was last accessed
- file modified
- date file was last modified
Registry
The Registry is a repository of all the information on a Windows system.
A Registry hive is a group of keys, subkeys, and values in the Registry that has a set of supporting files that contain backups of its data.
- supporting files for hives are found in
%SystemRoot%\System32\Config- except for
HKEY_CURRENT_USER- these are in
%SystemRoot%\Profile\Username
- these are in
- except for
- registry is organized into 5 sections called hives
HKEY_CLASSES_ROOT(HKCR)- stores information about drag-and-drop rules, program shortcuts, the user interface, and related items
HKEY_CURRENT_USER(HKCU)- very important to any forensic investigation
- stores information about the currently logged-on user, including desktop settings, user folders, and so forth
HKEY_LOCAL_MACHINE(HKLM)- contains settings common to the entire machine, regardless of the individual user
HKEY_USERS(HKU)- has profiles for all the users, including their settings
HKEY_CURRENT_CONFIG(HCU)- contains the current system configuration
- all Registry keys contain a value called LastWriteTime
- tells when key was last changed
- stored in FILETIME structure
- represents the number of 100-nanosecond intervals since January 1, 1601
- Auto-run locations are Registry keys that launch automatically at startup
USB Information
- Registry key
HKEY_LOCAL_MACHINES\System\ControlSet\Enum\USBSTORlists USB devices that have been connected to the machine SYSTEM\MountedDevicesshows serial numbers for a given drive letter or volume that was mounted when the USB was inserted- Registry key
\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2indicates what user was logged onto the system when the USB device was connected
Wireless Networks
- when a computer connects to a wireless network, the SSID is logged as a preferred network connection
- info is stored in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WZCSVC\Parameters\Interfaces
- info is stored in
HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkList\Profiles\gives a list of all Wi-Fi networks the interface has connected to- SSID is contained in the Description key
- Time first connected is stored in the DateCreated field
HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\NetworkList\Signatures\Ur\{ProfileGUID}stores the MAC address of the wireless access point to which it was connected
Tracking Word Documents in the Registry
- Many versions of Word store a PID_GUID value in the Registry
- e.g.,
{ 1 2 3 A 8 B 2 2 - 6 2 2 B - 1 4 C 4 - 8 4 A D - 0 0 D 1 B 6 1 B 0 3 A 4 }0 0 D 1 B 6 1 B 0 3 A 4is the MAC address of the machine on which the document was created
- e.g.,
- useful for IP theft, espionage, etc. cases
Malware in the Registry
HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogoncontains a value named Shell with default data Explorer.exe- tells Windows to launch IE after logon
- malware can append itself to this to start after logon
HKLM\SYSTEM\CurrentControlSet\Services\lists system services- can find malware installed as a service here
Uninstalled Software
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstallshows software that has been uninstalled on the machine
ShellBag
HKCU\Software\Microsoft\Shell\Bagsindicate a given folder was accessed- not a specific file
- useful to prove a user accessed a folder intentionally
- OSForensics tool shows many Registry values in a single dashboard as User Activity
Shimcache
- aka AppCompatCache
HKLM\System\CurrentControlSet\Control\SessionManager\AppCompatCache\AppCompa- Windows Shimcache was created to track compatibility issues with executed programs
- stores various file metadata:
- file full path
- file size
- last modified time
- Shimcache last updated time
- process execution flag
- oldest data is replaced by new entries
- two actions can cause Shimcache to record an entry:
- file is executed
- on Windows 8, 10, server 2012, and Server 2016, the Application Experience Lookup Service may record Shimcache entries for files in a directory that a user interactively browses
Amcache
Amcache is a Registry key that stores information about executed applications.
- records a hash of the file
- can use to search on Virus Total
- found in
C:\Windows\appcompat\Programs - cannot open on a running system bc it is being used
Prefetch
Prefetch contains the name of the executable, a Unicode list of DLLs used by the executable, a count of how many times it has been run, and a time stamp indicating the last time it was run.
- found at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Memory Management\PrefetchParameter - designed to speed up application startup process
- has been renamed multiple times: SuperFetch, ReadyBoot
SRUM
System Resource Usage Monitor (SRUM) database collects data on executables.
- data stored in Microsoft’s database format Extensible Storage Engine (ESE)
- allows one to trace resource utilization and network activity
- tracks the network interface, network profile, time connection established, and length of connection
- normally found at
\Windows\system32\sru\SRUDB.dat - tools can be used to see this info
BAM and DAM
- Background Activity Monitor (BAM) provides the full path of the executable file that was run on the system and the last execution date/time
- located
HKLM\SYSTEM\CurrentControlSet\Services\bam\UserSettings\{SID}
- located
- Desktop Activity Monitor (DAM) also shows application usage
- located
HKLM\SYSTEM\CurrentControlSet\Services\dam
- located
The $I30 Attribute
- NTFS maintains an index of all files/directories that belong to a directory
- called the $I30 attribute
- every directory contains an $I30 attribute
- when files or folders are removed, the $I30 index records are rearranged accordingly
- may leave remnants of deleted file/folder entry within the slack space
- $I30 is the file name given to NTFS MFT attributes containing filename indexes for directories
- NTFS stores filename contents in several places