dfirhub

RegistryHivesSystem

Author: Eric Zimmerman / Mark Hallman

description

System level/related Registry hives

paths

41 paths
RegistrySAM registry transaction files
C:\Windows\System32\config\SAM.LOG*
RegistrySAM registry transaction files
C:\Windows.old\Windows\System32\config\SAM.LOG*
RegistrySECURITY registry transaction files
C:\Windows\System32\config\SECURITY.LOG*
RegistrySECURITY registry transaction files
C:\Windows.old\Windows\System32\config\SECURITY.LOG*
RegistrySOFTWARE registry transaction files
C:\Windows\System32\config\SOFTWARE.LOG*
RegistrySOFTWARE registry transaction files
C:\Windows.old\Windows\System32\config\SOFTWARE.LOG*
RegistrySYSTEM registry transaction files
C:\Windows\System32\config\SYSTEM.LOG*
RegistrySYSTEM registry transaction files
C:\Windows.old\Windows\System32\config\SYSTEM.LOG*
RegistrySAM registry hive
C:\Windows\System32\config\SAM
RegistrySAM registry hive
C:\Windows.old\Windows\System32\config\SAM
RegistrySECURITY registry hive
C:\Windows\System32\config\SECURITY
RegistrySECURITY registry hive
C:\Windows.old\Windows\System32\config\SECURITY
RegistrySOFTWARE registry hive
C:\Windows\System32\config\SOFTWARE
RegistrySOFTWARE registry hive
C:\Windows.old\Windows\System32\config\SOFTWARE
RegistrySYSTEM registry hive
C:\Windows\System32\config\SYSTEM
RegistrySYSTEM registry hive
C:\Windows.old\Windows\System32\config\SYSTEM
RegistryRegBack registry transaction files
C:\Windows\System32\config\RegBack\*.LOG*
RegistryRegBack registry transaction files
C:\Windows.old\Windows\System32\config\RegBack\*.LOG*
RegistrySAM registry hive (RegBack)
C:\Windows\System32\config\RegBack\SAM
RegistrySAM registry hive (RegBack)
C:\Windows.old\Windows\System32\config\RegBack\SAM
RegistrySECURITY registry hive (RegBack)
C:\Windows\System32\config\RegBack\SECURITY
RegistrySECURITY registry hive (RegBack)
C:\Windows.old\Windows\System32\config\RegBack\SECURITY
RegistrySOFTWARE registry hive (RegBack)
C:\Windows\System32\config\RegBack\SOFTWARE
RegistrySOFTWARE registry hive (RegBack)
C:\Windows.old\Windows\System32\config\RegBack\SOFTWARE
RegistrySYSTEM registry hive (RegBack)
C:\Windows\System32\config\RegBack\SYSTEM
RegistrySYSTEM registry hive (RegBack)
C:\Windows.old\Windows\System32\config\RegBack\SYSTEM
RegistrySYSTEM registry hive (RegBack)
C:\Windows\System32\config\RegBack\SYSTEM1
RegistrySYSTEM registry hive (RegBack)
C:\Windows.old\Windows\System32\config\RegBack\SYSTEM1
RegistrySystem Profile registry hive
C:\Windows\System32\config\systemprofile\NTUSER.DAT
RegistrySystem Profile registry hive
C:\Windows.old\Windows\System32\config\systemprofile\NTUSER.DAT
RegistrySystem Profile registry transaction files
C:\Windows\System32\config\systemprofile\NTUSER.DAT.LOG*
RegistrySystem Profile registry transaction files
C:\Windows.old\Windows\System32\config\systemprofile\NTUSER.DAT.LOG*
RegistryLocal Service registry hive
C:\Windows\ServiceProfiles\LocalService\NTUSER.DAT
RegistryLocal Service registry hive
C:\Windows.old\Windows\ServiceProfiles\LocalService\NTUSER.DAT
RegistryLocal Service registry transaction files
C:\Windows\ServiceProfiles\LocalService\NTUSER.DAT.LOG*
RegistryLocal Service registry transaction files
C:\Windows.old\Windows\ServiceProfiles\LocalService\NTUSER.DAT.LOG*
RegistryNetwork Service registry hive
C:\Windows\ServiceProfiles\NetworkService\NTUSER.DAT
RegistryNetwork Service registry hive
C:\Windows.old\Windows\ServiceProfiles\NetworkService\NTUSER.DAT
RegistryNetwork Service registry transaction files
C:\Windows\ServiceProfiles\NetworkService\NTUSER.DAT.LOG*
RegistryNetwork Service registry transaction files
C:\Windows.old\Windows\ServiceProfiles\NetworkService\NTUSER.DAT.LOG*
RegistrySystem Restore Points Registry Hives (XP)
C:\System Volume Information\_restore*\RP*\snapshot\_REGISTRY_*
paths use Windows environment syntax

collection commands

# PowerShell Artifact Collection Script
# Target: RegistryHivesSystem
# Run as Administrator

#Requires -RunAsAdministrator

$ErrorActionPreference = "SilentlyContinue"
$DestBase = "D:\Evidence"

# Function to handle directory creation and copying
function Collect-Artifact {
    param (
        [string]$SourcePath,
        [string]$FolderName
    )
    $FullDest = Join-Path -Path $DestBase -ChildPath $FolderName
    if (-not (Test-Path -Path $FullDest)) {
        New-Item -ItemType Directory -Path $FullDest -Force | Out-Null
    }
    Copy-Item -Path $SourcePath -Destination $FullDest -Recurse -Force
}

# 1. SAM registry transaction files
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SAM.LOG*" -FolderName "SAM_registry_transaction_files"

# 2. SAM registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SAM.LOG*" -FolderName "SAM_registry_transaction_files"

# 3. SECURITY registry transaction files
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SECURITY.LOG*" -FolderName "SECURITY_registry_transaction_files"

# 4. SECURITY registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SECURITY.LOG*" -FolderName "SECURITY_registry_transaction_files"

# 5. SOFTWARE registry transaction files
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SOFTWARE.LOG*" -FolderName "SOFTWARE_registry_transaction_files"

# 6. SOFTWARE registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SOFTWARE.LOG*" -FolderName "SOFTWARE_registry_transaction_files"

# 7. SYSTEM registry transaction files
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SYSTEM.LOG*" -FolderName "SYSTEM_registry_transaction_files"

# 8. SYSTEM registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SYSTEM.LOG*" -FolderName "SYSTEM_registry_transaction_files"

# 9. SAM registry hive
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SAM" -FolderName "SAM_registry_hive"

# 10. SAM registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SAM" -FolderName "SAM_registry_hive"

# 11. SECURITY registry hive
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SECURITY" -FolderName "SECURITY_registry_hive"

# 12. SECURITY registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SECURITY" -FolderName "SECURITY_registry_hive"

# 13. SOFTWARE registry hive
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SOFTWARE" -FolderName "SOFTWARE_registry_hive"

# 14. SOFTWARE registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SOFTWARE" -FolderName "SOFTWARE_registry_hive"

# 15. SYSTEM registry hive
Collect-Artifact -SourcePath "C:\Windows\System32\config\\SYSTEM" -FolderName "SYSTEM_registry_hive"

# 16. SYSTEM registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\\SYSTEM" -FolderName "SYSTEM_registry_hive"

# 17. RegBack registry transaction files
Collect-Artifact -SourcePath "C:\Windows\System32\config\RegBack\\*.LOG*" -FolderName "RegBack_registry_transaction_files"

# 18. RegBack registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\RegBack\\*.LOG*" -FolderName "RegBack_registry_transaction_files"

# 19. SAM registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows\System32\config\RegBack\\SAM" -FolderName "SAM_registry_hive__RegBack_"

# 20. SAM registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\RegBack\\SAM" -FolderName "SAM_registry_hive__RegBack_"

# 21. SECURITY registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows\System32\config\RegBack\\SECURITY" -FolderName "SECURITY_registry_hive__RegBack_"

# 22. SECURITY registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\RegBack\\SECURITY" -FolderName "SECURITY_registry_hive__RegBack_"

# 23. SOFTWARE registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows\System32\config\RegBack\\SOFTWARE" -FolderName "SOFTWARE_registry_hive__RegBack_"

# 24. SOFTWARE registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\RegBack\\SOFTWARE" -FolderName "SOFTWARE_registry_hive__RegBack_"

# 25. SYSTEM registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows\System32\config\RegBack\\SYSTEM" -FolderName "SYSTEM_registry_hive__RegBack_"

# 26. SYSTEM registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\RegBack\\SYSTEM" -FolderName "SYSTEM_registry_hive__RegBack_"

# 27. SYSTEM registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows\System32\config\RegBack\\SYSTEM1" -FolderName "SYSTEM_registry_hive__RegBack_"

# 28. SYSTEM registry hive (RegBack)
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\RegBack\\SYSTEM1" -FolderName "SYSTEM_registry_hive__RegBack_"

# 29. System Profile registry hive
Collect-Artifact -SourcePath "C:\Windows\System32\config\systemprofile\\NTUSER.DAT" -FolderName "System_Profile_registry_hive"

# 30. System Profile registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\systemprofile\\NTUSER.DAT" -FolderName "System_Profile_registry_hive"

# 31. System Profile registry transaction files
Collect-Artifact -SourcePath "C:\Windows\System32\config\systemprofile\\NTUSER.DAT.LOG*" -FolderName "System_Profile_registry_transaction_files"

# 32. System Profile registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\config\systemprofile\\NTUSER.DAT.LOG*" -FolderName "System_Profile_registry_transaction_files"

# 33. Local Service registry hive
Collect-Artifact -SourcePath "C:\Windows\ServiceProfiles\LocalService\\NTUSER.DAT" -FolderName "Local_Service_registry_hive"

# 34. Local Service registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\ServiceProfiles\LocalService\\NTUSER.DAT" -FolderName "Local_Service_registry_hive"

# 35. Local Service registry transaction files
Collect-Artifact -SourcePath "C:\Windows\ServiceProfiles\LocalService\\NTUSER.DAT.LOG*" -FolderName "Local_Service_registry_transaction_files"

# 36. Local Service registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\ServiceProfiles\LocalService\\NTUSER.DAT.LOG*" -FolderName "Local_Service_registry_transaction_files"

# 37. Network Service registry hive
Collect-Artifact -SourcePath "C:\Windows\ServiceProfiles\NetworkService\\NTUSER.DAT" -FolderName "Network_Service_registry_hive"

# 38. Network Service registry hive
Collect-Artifact -SourcePath "C:\Windows.old\Windows\ServiceProfiles\NetworkService\\NTUSER.DAT" -FolderName "Network_Service_registry_hive"

# 39. Network Service registry transaction files
Collect-Artifact -SourcePath "C:\Windows\ServiceProfiles\NetworkService\\NTUSER.DAT.LOG*" -FolderName "Network_Service_registry_transaction_files"

# 40. Network Service registry transaction files
Collect-Artifact -SourcePath "C:\Windows.old\Windows\ServiceProfiles\NetworkService\\NTUSER.DAT.LOG*" -FolderName "Network_Service_registry_transaction_files"

# 41. System Restore Points Registry Hives (XP)
Collect-Artifact -SourcePath "C:\System Volume Information\_restore*\RP*\snapshot\\_REGISTRY_*" -FolderName "System_Restore_Points_Registry_Hives__XP_"

Write-Host "Collection complete!" -ForegroundColor Green

Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1

references

included in collections