🖥️
Windows DFIR
  • Introduction
  • Windows Artifacts
    • Windows Quick Tips
      • Windows Command Line
      • Workstation File/Folder Locations
      • Server File/Folder Locations
    • Account Usage
      • Authentications SAM Artifacts
        • Last Login
        • Last Failed Login
        • Last Password Change
      • Authentications (Windows Event Log)
        • Logon ID
      • Group Membership
        • Event ID: 4798
        • Event ID: 4799
      • RDP
        • Source System Artifacts - Quick Reference
        • Destination System Artifacts - Quick Reference
      • SSH
      • Rouge Local Accounts
      • CrowdStrike Searches
        • Event Name - UserLogon
        • Event Name - UserLogonFailed
        • Event Name - UserLogonFailed2
        • Event Name - SsoApplicationAccess
    • Browser Usage
      • History & Downloads
        • Viewing History Files - DB Browser
        • Transition Types
      • Auto-Complete Data
      • Bookmarks
      • Browser Preferences
      • Cache
      • Cookies
      • Extensions
      • Super Cookies (HTML5 Web Storage)
      • Media History
      • Private Browsing
      • Session Restore
      • Stored Credentials
      • Suggested/Frequent Sites
      • DB Browser Queries
        • Firefox
        • Chrome
        • Media History
      • PowerShell Scripts
        • Browser Extension Finder
        • Browser History Finder
    • Processes
      • at.exe
      • explorer.exe
      • lsass.exe
      • lsaiso.exe
      • PuTTy.exe
        • X11 Forwarding
      • runtimebroker.exe
      • services.exe
      • smss.exe
      • System
      • svchost.exe
        • Services
      • winlogon.exe
      • wininit.exe
    • Cloud Storage
    • Deleted File or File Knowledge
      • WordWheelQuery (Win 7+)
      • ACMRU (Win XP)
      • Internet Explorer file:///
      • Last Visited MRU
      • Thumbs.db (Win XP)
      • Thumbcache
      • Recycle Bin
      • User Typed Paths
      • Windows Search Database
    • File Download
      • Zone.Identifer
      • Open/Save Most Recently Used (MRU)
      • Email
      • Drive By Downloads
        • Malvertising
      • Web Browsing
        • Cache Files
      • CrowdStrike Searches
        • MoTW
    • Folder/File Opening/Creation
      • Recent Files
      • Office Recent Files
      • Shell Bags
      • .lnk Files
      • Jump Lists
        • AppIDs
      • Prefetch
      • Index.dat file://
      • PowerShell Scripts
        • .lnk Files
    • Persistence
      • Registry
        • NTUSER.DAT & HKU\SID
        • Run and Run Once
        • Shell Folders and UserInit Key
        • Services
        • Logon Scripts
        • Office Add-ins
        • Winlogon Shell
        • Image File Execution Options (IFEO)
        • AppInit_DLLs
        • Scheduled Tasks
      • Scheduled Tasks
        • Scheduled Task Destination System Artifacts
        • Scheduled Task Source System Artifacts
      • Startup
      • Tool: AutoRuns
      • Accounts
      • WMI Event Consumers
        • WMI: Source System Artifacts
        • WMI: Destination System Artifacts
        • WMI: PowerShell Analysis
      • PowerShell Scripts
        • Startup Programs
      • CrowdStrike Searches
        • Files Written to Startup Folder
        • Files Written to Startup Folder from the Internet
        • Local Account Creation/Deletion
        • Azure Account Creation/Deletion
        • Scheduled Tasks
    • Physical Location
      • Time zone
      • Wireless SSID
      • Network History (Vista/Win7–11)
      • Cookies
      • Browser Search Terms
    • Program Execution
      • Prefetch
        • Decoding Prefetch Files with Eric Zimmerman's PECmd Tool
      • BAM/DAM
      • CapabilityAccessManager
      • UserAssist
      • Last Visited MRU
      • RunMRU
      • MUI Cache
      • ShimCache
      • Amcache
      • Jump Lists
    • Shadow Copies
      • VSC Permissions
      • Event ID 8193: Volume Shadow Copy Service Error
    • USB Usage
      • Key Identification
      • Drive Letter and Volume Name
      • Connection Timestamps
      • User
      • Volume Name
      • Plug & Play Event Log
    • Windows Services
      • DoSvc (Delivery Optimization)
    • System Information
    • Event IDs
      • Authentication / Account
        • 4624 - Authentication Success
          • Logon Types
        • 4625 - Authentication Failure
          • SubStatus Codes
        • 4634 - Account Logoff
        • 4648 - Explicit Credentials Success
        • 4672 - Special Privileges
        • 4720 - Account Creation
        • 4722 - Account Enabled
        • 4732 - Addition to Local Group
        • 4738 - Account Changed
        • 4776 - Kerberos Authentication Attempt
          • Substatus Codes
        • 4771 - Kerberos Failure
        • 4768
      • File System
        • 1006
        • 4688 - Process Created
        • 4663
        • 4656
        • 6416
        • 20001
        • 20003
  • Windows DFIR & MITTR
    • Initial Access
      • Content Injection
      • Drive-by Compromise
        • Watering Hole Attack
        • Microsoft Files (Payload Execution)
        • Exploit Delivery
        • Viewing Browser History Files
      • Phishing
    • Execution
    • Persistence
    • Privilege Escalation
    • Defense Evasion
    • Credential Access
      • Logon ID
    • Discovery
    • Lateral Movement
    • Collection
    • Command and Control
    • Exfiltration
    • Impact
  • SOC Related
    • Cached Credentials
    • Domain Controller Password Spraying
Powered by GitBook
On this page
  • Key Insights
  • Analyzing BAM/DAM for Program Execution

Was this helpful?

  1. Windows Artifacts
  2. Program Execution

BAM/DAM

The Background Activity Moderator (BAM) and Desktop Activity Moderator (DAM) are artifacts within the Windows operating system, specifically introduced in Windows 10 (version 1809 and above), as part of the Windows power management subsystem. These artifacts are designed to moderate background and desktop activities based on power usage and performance, but they also provide valuable data for digital forensics, especially in terms of program execution history.

BAM and DAM are located in the Windows Registry and store information about executable files that have been run on the system, including both background (BAM) and desktop (DAM) applications. This information is crucial for forensic analysts because it includes the full paths of executed files and the last execution date and time, offering insights into user behavior and potential malicious activity.

Key Insights

  • Registry Location:

    • BAM: HKLM\SYSTEM\CurrentControlSet\Services\bam\State\UserSettings\{SID}

    • DAM: HKLM\SYSTEM\CurrentControlSet\Services\dam\State\UserSettings\{SID}

Here, {SID} refers to the Security Identifier of the user accounts on the machine. This means that BAM/DAM data is specific to each user, allowing for a granular analysis of program execution per user account.

  • Data Stored:

    • The full path of the executed file.

    • The last execution date and time.

The data is typically available for up to one week, making BAM/DAM a timely source for recent activity investigation. The "State" key, used in Windows 10 version 1809 and above, is where this information is stored, indicating a shift from previous versions of Windows in how execution data is logged.

Analyzing BAM/DAM for Program Execution

To analyze BAM/DAM data for program execution, forensic analysts need to access the aforementioned registry paths. This can be achieved through the Windows Registry Editor or command-line tools like reg.exe. However, for a forensic analysis, it is recommended to use specialized forensic tools that can safely and efficiently extract registry data without altering the state of the live system.

Example Command to Query BAM/DAM:

reg query HKLM\SYSTEM\CurrentControlSet\Services\bam\State\UserSettings
reg query HKLM\SYSTEM\CurrentControlSet\Services\dam\State\UserSettings

This command lists all user SIDs that have data stored in BAM and DAM. Analysts would then iterate through each SID to examine the execution data for each user.

  • Understanding the Outputs:

    • Full Path of Executed File: Helps identify not only common applications but also potentially malicious executables or scripts run by the user or by malware.

    • Last Execution Date and Time: Critical for establishing a timeline of user activity or for correlating with other forensic artifacts to build a comprehensive view of events leading up to an incident.

PreviousDecoding Prefetch Files with Eric Zimmerman's PECmd ToolNextCapabilityAccessManager

Last updated 1 year ago

Was this helpful?