WindowsTelemetryDiagnosticsLegacy

Author: Andrew Rathbun and Josh Mitchell

description

Legacy Windows Telemetry and Diagnostics files (*.rbs)

paths

2 paths
paths use Windows environment syntax

collection commands

# PowerShell Artifact Collection Script
# Target: WindowsTelemetryDiagnosticsLegacy
# 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++ }
    }
}

# 1. Legacy .rbs files relating to Windows Telemetry and Diagnostics
Collect-Artifact -SourceDir "C:\ProgramData\Microsoft\Diagnosis" -FileMask "events*.rbs" -FolderName "Legacy_rbs_files_relating_to_Windows_Telemetry_and_Diagnostics"

# 2. Legacy .rbs files relating to Windows Telemetry and Diagnostics
Collect-Artifact -SourceDir "C:\Windows.old\ProgramData\Microsoft\Diagnosis" -FileMask "events*.rbs" -FolderName "Legacy_rbs_files_relating_to_Windows_Telemetry_and_Diagnostics"

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

These .rbs files should simply be opened in a text editor as they are effectively JSON files. These are very similar, if not, identical, to the JSON payloads included in EventTranscript.db

These files were present in Windows 10 between versions 1507 and 1809. 1709 is when EventTranscript.db came into play.

This Target should grab the following files:

events00.rbs

events01.rbs

events10.rbs

events11.rbs

Events_Normal.rbs

Events_NormalCritical.rbs

Events_CostDeferred.rbs

Events_Realtime.rbs