EventLogs
Windowsv1
Author: Eric Zimmerman
description
Event logs
paths
3 paths
EventLogsEvent logs XP
C:\Windows\System32\config\*.evtEventLogsEvent logs Win7+
C:\Windows\System32\winevt\logs\*.evtxEventLogsEvent logs Win7+
C:\Windows.old\Windows\System32\winevt\logs\*.evtx› paths use Windows environment syntax
collection commands
# PowerShell Artifact Collection Script
# Target: EventLogs
# 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. Event logs XP
Collect-Artifact -SourcePath "C:\Windows\System32\config\\*.evt" -FolderName "Event_logs_XP"
# 2. Event logs Win7+
Collect-Artifact -SourcePath "C:\Windows\System32\winevt\logs\\*.evtx" -FolderName "Event_logs_Win7_"
# 3. Event logs Win7+
Collect-Artifact -SourcePath "C:\Windows.old\Windows\System32\winevt\logs\\*.evtx" -FolderName "Event_logs_Win7_"
Write-Host "Collection complete!" -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1