Thunderbird
Appsv1
Author: Matt Dawson
description
Mozilla Thunderbird Email Client
paths
11 paths
› paths use Windows environment syntax
collection commands
# PowerShell Artifact Collection Script
# Target: Thunderbird
# Run as Administrator
#Requires -RunAsAdministrator
$ErrorActionPreference = "Continue"
$SourceRoot = "C:"
$DestBase = "D:\Evidence"
$Summary = @{ Copied = 0; Missed = 0; Errors = 0 }
function Collect-Artifact {
param(
[Parameter(Mandatory)][string]$SourceDir,
[Parameter(Mandatory)][string]$FolderName,
[string]$FileMask = "*"
)
# Expand wildcards in any path segment (e.g. 'Program Files*',
# 'ScreenConnect Client*'). robocopy itself does not glob the source.
$sources = @(Get-Item -Path $SourceDir -ErrorAction SilentlyContinue |
Where-Object { $_.PSIsContainer })
if ($sources.Count -eq 0) {
$Summary.Missed++
return
}
$FullDest = Join-Path -Path $DestBase -ChildPath $FolderName
$null = New-Item -ItemType Directory -Force -Path $FullDest -ErrorAction SilentlyContinue
foreach ($src in $sources) {
robocopy $src.FullName "$FullDest" "$FileMask" /E /COPY:DAT /R:0 /W:0 /NP /NFL /NDL /NJH /NJS 2>$null | Out-Null
if ($LASTEXITCODE -le 7) { $Summary.Copied++ } else { $Summary.Errors++ }
}
}
# Iterate every user profile under the source drive
Get-ChildItem "$SourceRoot\Users" -Directory -ErrorAction SilentlyContinue |
Where-Object { $_.Name -notin @('All Users', 'Default', 'Default User', 'Public') } |
ForEach-Object {
$UserName = $_.Name
# Mozilla Thunderbird Install Date
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Crash Reports"
Collect-Artifact -SourceDir $UserPath -FileMask "InstallTime*" -FolderName "Mozilla_Thunderbird_Install_Date_$UserName"
# Mozilla Thunderbird Profiles.ini
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird"
Collect-Artifact -SourceDir $UserPath -FileMask "profiles.ini" -FolderName "Mozilla_Thunderbird_Profiles_ini_$UserName"
# Mozilla Thunderbird prefs.js
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*"
Collect-Artifact -SourceDir $UserPath -FileMask "prefs.js" -FolderName "Mozilla_Thunderbird_prefs_js_$UserName"
# Mozilla Thunderbird Global Messages Database
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*"
Collect-Artifact -SourceDir $UserPath -FileMask "global-messages-db.sqlite" -FolderName "Mozilla_Thunderbird_Global_Messages_Database_$UserName"
# Mozilla Thunderbird logins.json
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*"
Collect-Artifact -SourceDir $UserPath -FileMask "logins.json" -FolderName "Mozilla_Thunderbird_logins_json_$UserName"
# Mozilla Thunderbird places.sqlite
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*"
Collect-Artifact -SourceDir $UserPath -FileMask "places.sqlite" -FolderName "Mozilla_Thunderbird_places_sqlite_$UserName"
# Mozilla Thunderbird ImapMail INBOX
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*\ImapMail"
Collect-Artifact -SourceDir $UserPath -FileMask "INBOX" -FolderName "Mozilla_Thunderbird_ImapMail_INBOX_$UserName"
# Mozilla Thunderbird Mail INBOX
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*\Mail"
Collect-Artifact -SourceDir $UserPath -FileMask "INBOX" -FolderName "Mozilla_Thunderbird_Mail_INBOX_$UserName"
# Mozilla Thunderbird Calendar Data
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*\calendar-data"
Collect-Artifact -SourceDir $UserPath -FileMask "local.sqlite" -FolderName "Mozilla_Thunderbird_Calendar_Data_$UserName"
# Mozilla Thunderbird Attachments
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*\Attachments"
Collect-Artifact -SourceDir $UserPath -FolderName "Mozilla_Thunderbird_Attachments_$UserName"
# Mozilla Thunderbird Address Book
$UserPath = "$($_.FullName)\AppData\Roaming\Thunderbird\Profiles\*"
Collect-Artifact -SourceDir $UserPath -FileMask "abook.sqlite" -FolderName "Mozilla_Thunderbird_Address_Book_$UserName"
}
Write-Host ("Collection complete. Copied: {0} Missed: {1} Errors: {2}" -f $Summary.Copied, $Summary.Missed, $Summary.Errors) -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1
references
notes
Thunderbird is a free, open-source, cross-platform application for managing email, news feeds, chat, and news groups. It is a local (rather than browser or web-based) email application that is powerful yet easy-to-use.