OutlookPSTOST
Appsv1.1
Author: Eric Zimmerman and Chad Tilbury
description
Outlook PST and OST files
paths
8 paths
CommunicationsPST XP
C:\Documents and Settings\%user%\Local Settings\Application Data\Microsoft\Outlook\*.pstCommunicationsOST XP
C:\Documents and Settings\%user%\Local Settings\Application Data\Microsoft\Outlook\*.ostCommunicationsPST (2013 or 2016)
C:\Users\%user%\Documents\Outlook Files\*.pstCommunicationsOST (2013 or 2016)
C:\Users\%user%\Documents\Outlook Files\*.ostCommunicationsPST
C:\Users\%user%\AppData\Local\Microsoft\Outlook\*.pstOutlook Data File: POP accounts, archives, older installations
CommunicationsOST
C:\Users\%user%\AppData\Local\Microsoft\Outlook\*.ostOffline Outlook Data File: M365, Exchange, IMAP
CommunicationsNST
C:\Users\%user%\AppData\Local\Microsoft\Outlook\*.nstOutlook Group Storage File: Group conversations and calendar
CommunicationsOutlook Attachment Temporary Storage
C:\Users\%user%\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\Outlook temporary storage folder for user attachments
› paths use Windows environment syntax
collection commands
# PowerShell Artifact Collection Script
# Target: OutlookPSTOST
# 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. PST XP
$UserPath = Join-Path $env:USERPROFILE "Local Settings\Application Data\Microsoft\Outlook\"
Collect-Artifact -SourcePath "$UserPath\*.pst" -FolderName "PST_XP"
# 2. OST XP
$UserPath = Join-Path $env:USERPROFILE "Local Settings\Application Data\Microsoft\Outlook\"
Collect-Artifact -SourcePath "$UserPath\*.ost" -FolderName "OST_XP"
# 3. PST (2013 or 2016)
$UserPath = Join-Path $env:USERPROFILE "Documents\Outlook Files\"
Collect-Artifact -SourcePath "$UserPath\*.pst" -FolderName "PST__2013_or_2016_"
# 4. OST (2013 or 2016)
$UserPath = Join-Path $env:USERPROFILE "Documents\Outlook Files\"
Collect-Artifact -SourcePath "$UserPath\*.ost" -FolderName "OST__2013_or_2016_"
# 5. PST
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\Outlook\"
Collect-Artifact -SourcePath "$UserPath\*.pst" -FolderName "PST"
# 6. OST
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\Outlook\"
Collect-Artifact -SourcePath "$UserPath\*.ost" -FolderName "OST"
# 7. NST
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\Outlook\"
Collect-Artifact -SourcePath "$UserPath\*.nst" -FolderName "NST"
# 8. Outlook Attachment Temporary Storage
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "Outlook_Attachment_Temporary_Storage"
Write-Host "Collection complete!" -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1