🆕 Introducing HTB CDEP: Certified Detection Engineering Principal Learn More

Windows Disk Forensics

mini-module tag Mini-Module

Windows Disk Forensics is a comprehensive module designed to equip participants with the knowledge and skills necessary to conduct digital investigations and forensic analysis on Windows-based computer systems. This module delves into the intricacies of collecting, preserving, and analyzing digital evidence from Windows disks, ensuring that students are well-prepared to navigate the complex world of digital forensics.

Created by letsdefendio

Hard Defensive

Summary

The Windows Disk Forensics module is designed for digital Forensics Analysts: Experienced and aspiring digital forensics professionals seeking to enhance their skills and stay up-to-date with the latest techniques and tools specific to Windows-based systems and Students and Researchers: College students and researchers pursuing degrees or conducting research in fields related to cybersecurity, computer science, or digital forensics. Throughout this module, students will develop demonstrate a comprehensive understanding of digital forensics principles and their application to Windows-based systems and successfully apply acquired knowledge and skills through hands-on exercises, case studies, and practical simulations.

Recommended prior knowledge:

  • Basic Computer Skills: Participants should have a fundamental understanding of computer hardware, software, and operating systems. Proficiency in using Windows-based systems is essential

  • Cybersecurity Fundamentals: A foundational understanding of cybersecurity concepts, including common threats, vulnerabilities, and security measures, will be helpful

SRUM Database


Windows System Resource Usage Monitor (SRUM) was first introduced in Windows 8. SRUM tracks 30 to 60 days of system resource usage, particularly application's resource usage, energy usage, Windows push notifications and network connectivity, and data usage.

SRUM is considered a gold mine of forensic information, as it contains all the activities that occur on a particular Windows system. SRUM tracks and records program executions, power consumption, network activities, and much more information that can be retrieved even if the source has been deleted. This type of information enables the examiner to gain insights into the previous activities and events on a system.

SRUM artifacts are stored in a file named SRUDB.dat located at

  • C:\Windows\System32\SRU\SRUDB.dat

SRUM artifacts are stored in an Extensible Storage Engine (ESE) database format. This database file contains multiple tables recoding all the activities that occurred on a particular system.

There are multiple categories of data in SRUM db.

1)SRUM Application Resource Usage

2)SRUM Network Usage

3)SRUM Network Connections

4)SRUM Energy Usage

5)SRUM Push Notification Data

6)SRUM Energy Usage (Long Term)

We will discuss only 1 and 2 as these provides the most value. But first, we will discuss how to analyze the data stored in this db. We will be using a tool called srumEcmd by Eric Zimmerman to parse the database and get the results in a CSV.

We first acquire the srum db file. We acquired using kape and placed the acquired data in a folder called srum on desktop. Then we ran SRUMEcmd . we provided the path of the srudb dat file as well as of the software registry hive which kape also acquires alongside srum db. This is because the current entries are not pushed in srum db as srum db gets updated at reboot or every hour.

Command used :

SrumECmd.exe -f "C:\Users\LetsDefend\Desktop\srum\C\Windows\System32\SRU\SRUDB.dat" -r "C:\Users\LetsDefend\Desktop\srum\C\Windows\System32\config\SOFTWARE" --csv "c:\users\letsdefend\desktop\results"

Here switch “f” denotes path of srum db file, “r” switch denotes path to Software hive and –csv tells the tool where to save the results

Here we have multiple results according to categories. Lets quickly discuss these.

Application resource usage:

This one is most important to us as it can serve as evidence of execution. We can determine if any program or malware ran and at what time. This can be chained to prove execution of an application with other artifacts like prefetch.

SRUM Application Resource Usage is one of the most useful, and usually the noisiest, of the categories. That’s because it’s tracking every exe that’s executed on the system whether it still exists on disk or not. If it is executed, it should be logged. SRUM Application Resource Usage stores the full path that the application executed from. This can help us filter down to un-expected application paths

We will use timeline explorer to open these csv files. Lets open the appresourceuse info csv.

We can find many entries in this category, but important for us would be the exe info which is full path of the executed executable, the timestamp of when it was executed, and the username who executed it. This would be very useful in cases where malware was executed on a system. We can find exe executed from odd paths, or files with odd names, the time when they ran.

We also get detailed resource usage info like bytes read, written or cpu cycles used, Read-write operations, etc. These could be useful in cases of miners causing more cpu usage or infostealers which could be detected on basis of the bytes read and written.

For example, we got an alert that an attacker utilized anydesk.

We can see lots of bytes were Received read from memory and also written down (probably for caching)

SRUM Network Usage:

This is the second most useful category after Application usage. The SRUM Network Usage tracks wired and wireless connections and the network SSID (when wireless) the asset was connected to. It also captures bandwidth usage in bytes sent and received by the application. As with other SRUM categories, these results include the full path of the application and the SID that executed it. If you suspect a data exfiltration event, you can utilize these artifacts to see what applications are responsible for the most data on the wire—either sent or received—and correlate to the user behind them.

Lets analyze the artifacts of this category.

We can see the application ID (which can be used across the SRUM data categories to track a certain application), timestamps, the exe full path, the username which executed the application, and most importantly total number of bytes received and sent over the network. These are not to be confused with bytes written and read from the previous category as those were for the Input/Output operations. Here these are the actual network bytes sent and received.

These are really helpful in case of data exfiltration as we can easily spot an application transferring lots of bytes when it shouldn't. For example, if we spot an exe name notepad.exe transferring lots of bytes that is surely suspicious and it could be a case of process injection where malicious shellcode was injected into a legit notepad process.

Note: You can use Timeline Explorer to analyze the artifact results CSV in this and all upcoming sections. It will be placed on the lab for convenience.

Sign Up / Log In to Unlock the Module

Please Sign Up or Log In to unlock the module and access the rest of the sections.