Kaseya
Appsv1.1
Author: Drew Ervin and Andrew Rathbun
description
Kaseya Data
paths
9 paths
› paths use Windows environment syntax
collection commands
# PowerShell Artifact Collection Script
# Target: Kaseya
# Run as Administrator
#Requires -RunAsAdministrator
$ErrorActionPreference = "SilentlyContinue"
$DestBase = "D:\Evidence"
# Function to handle artifact collection with robocopy
function Collect-Artifact {
param (
[string]$SourceDir,
[string]$FolderName,
[string]$FileMask = "*"
)
$FullDest = Join-Path -Path $DestBase -ChildPath $FolderName
robocopy "$SourceDir" "$FullDest" "$FileMask" /E /COPY:DAT /R:0 /W:0 /NP /NFL /NDL /NJH /NJS | Out-Null
}
# 1. Kaseya Live Connect Logs (XP)
$UserPath = Join-Path $env:USERPROFILE "Application Data\Kaseya\Log\"
Collect-Artifact -SourceDir "$UserPath" -FolderName "Kaseya_Live_Connect_Logs__XP_"
# 2. Kaseya Live Connect Logs
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Kaseya\Log\KaseyaLiveConnect\"
Collect-Artifact -SourceDir "$UserPath" -FolderName "Kaseya_Live_Connect_Logs"
# 3. Kaseya Agent Endpoint Service Logs (XP)
Collect-Artifact -SourceDir "C:\Documents and Settings\All Users\Application Data\Kaseya\Log\Endpoint\" -FolderName "Kaseya_Agent_Endpoint_Service_Logs__XP_"
# 4. Kaseya Agent Endpoint Service Logs
Collect-Artifact -SourceDir "C:\ProgramData\Kaseya\Log\Endpoint\" -FolderName "Kaseya_Agent_Endpoint_Service_Logs"
# 5. Kaseya Agent Service Log
Collect-Artifact -SourceDir "C:\Program Files*\Kaseya\*\" -FileMask "agentmon.log*" -FolderName "Kaseya_Agent_Service_Log"
# 6. Kaseya Setup Log
$UserPath = Join-Path $env:USERPROFILE "AppData\Local\Temp\"
Collect-Artifact -SourceDir "$UserPath" -FileMask "KASetup.log" -FolderName "Kaseya_Setup_Log"
# 7. Kaseya Setup Log
Collect-Artifact -SourceDir "C:\Windows\Temp\" -FileMask "KASetup.log" -FolderName "Kaseya_Setup_Log"
# 8. Kaseya Setup Log
Collect-Artifact -SourceDir "C:\Windows.old\Windows\Temp\" -FileMask "KASetup.log" -FolderName "Kaseya_Setup_Log"
# 9. Kaseya Agent Edge Service Logs
Collect-Artifact -SourceDir "C:\ProgramData\Kaseya\Log\KaseyaEdgeServices\" -FolderName "Kaseya_Agent_Edge_Service_Logs"
Write-Host "Collection complete!" -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1