top of page

Lateral Movement: User Access Logging (UAL) Artifact

Lateral movement is a crucial part of many cyberattacks, where attackers move from one system to another within a network, aiming to expand their foothold or escalate privileges. Detecting such activities requires in-depth monitoring and analysis of various network protocols and artifacts. Some common methods attackers use include SMB, RDP, WMI, PSEXEC, and Impacket Exec. One lesser-known but powerful artifact for mapping lateral movement in Windows environments is User Access Logging (UAL).


In this article, we'll dive into UAL, where it's stored, how to collect and parse the data, and why it's critical in detecting lateral movement in forensic investigations.


1. Introduction to User Access Logging (UAL)

User Access Logging (UAL) is a Windows feature, enabled by default on Windows Server versions prior to 2012. UAL aggregates client usage data on local servers by role and product, allowing administrators to quantify requests from client computers for different roles and services. By analyzing UAL data, you can map which accounts accessed which systems, providing insights into lateral movement.


Why it’s important in forensic analysis:

  • Track endpoint interactions: UAL logs detailed information about client interactions with server roles, helping investigators map out who accessed what.

  • Detect lateral movement: UAL helps identify which user accounts or IP addresses interacted with specific endpoints, crucial for identifying an attacker's path.



2. Location of UAL Artifacts

The UAL logs can be found on Windows systems in the following path:

C:\Windows\System32\Logfiles\sum

This directory contains multiple files that store data on client interactions, system roles, and services.


3. Collecting UAL Data with KAPE

To collect UAL data from an endpoint, you can use KAPE (Kroll Artifact Parser and Extractor). This tool is designed to collect forensic artifacts quickly, making it a preferred choice for investigators.


Here’s a quick command to collect UAL data using KAPE:


Kape.exe --tsource C: --tdest C:\Users\akash\Desktop\tout --target SUM

  • --tsource C: Specifies the source drive (C:).

  • --tdest: Defines the destination where the extracted data will be stored (in this case, C:\Users\akash\Desktop\tout).

  • --target SUM: Tells KAPE to specifically collect the SUM folder, which contains the UAL data.


4. Parsing UAL Data with SumECmd

Once the UAL data has been collected, the next step is parsing it. This can be done using SumECmd, a tool by Eric Zimmerman, known for its efficiency in processing UAL logs.

Here’s how you can use SumECmd to parse the UAL data:


SumECmd.exe -d C:\users\akash\desktop\tout\SUM --csv C:\Users\akash\desktop\sum.csv

  • -d: Specifies the directory containing the UAL data (in this case, C:\users\akash\desktop\tout\SUM).

  • --csv: Tells the tool to output the results in CSV format (which can be stored on the desktop).


The CSV output will provide detailed information about the client interactions.


5. Handling Errors with Esentutl.exe

During parsing, you may encounter an error stating “error processing file.” This error is often caused by corruption in the UAL database. To fix this, use the esentutl.exe tool to repair the corrupted database:


Esentutl.exe /p <name.mdb>

  • Replace <name.mdb> with the actual name of the corrupted .mdb file.

  • Run the above command for all .mdb files located in the SUM folder.



6. Re-Parsing UAL Data

Once the database is repaired, re-run the SumECmd tool to parse the data:


SumECmd.exe -d C:\users\akash\desktop\tout\SUM --csv C:\Users\akash\desktop\sum.csv

This command will generate a new CSV output that you can analyze for lateral movement detection.



7. Understanding the Output

The CSV file generated by SumECmd provides various details that are critical in detecting lateral movement. Here are some of the key data points:

  • Authenticated Username and IP Addresses: This helps identify which user accounts and IP addresses interacted with specific endpoints.

  • Detailed Client Output: This includes comprehensive data on client-server interactions, role access, and system identity.

  • DNS Information: UAL logs also capture DNS interactions, useful for tracking the network activity.

  • Role Access Output: This identifies the roles accessed by different clients, which can highlight unusual activity patterns.

  • System Identity Information: UAL logs provide system identity details, helping to track systems that may have been compromised.



8. The Importance of UAL Data in Lateral Movement Detection

The data captured by UAL plays a pivotal role in identifying and mapping out an attacker's movement across a network. Here’s how UAL data can aid in forensic investigations:


  • Mapping Lateral Movement: By analyzing authenticated usernames and IP addresses, UAL logs can help identify potential attackers moving through the network and interacting with various endpoints.

  • Detailed Analysis: UAL provides detailed logs of user interactions, which can be cross-referenced with other forensic artifacts (like event logs) to build a comprehensive timeline of an attack.

  • Investigating Network Traffic: The inclusion of DNS and role access data allows investigators to better understand how attackers are interacting with various roles and services within the network.



Conclusion

User Access Logging (UAL) is a powerful tool for identifying lateral movement in a Windows environment. With tools like KAPE for collecting UAL data and SumECmd for parsing it, forensic investigators can gain deep insights into how attackers are navigating through the network. Understanding and leveraging UAL data in your investigations can significantly enhance your ability to detect and mitigate cyber threats.


Akash Patel

35 views0 comments

Comments


bottom of page