dfirhub

Discord

Author: Christian Johansen and Matt Dawson

description

Discord Cache and LevelDB Files

paths

2 paths
CommunicationsDiscord Cache Files
C:\Users\%user%\AppData\Roaming\discord\cache\

Gets cached data from Discord app

CommunicationsDiscord Local Storage LevelDB Files
C:\Users\%user%\AppData\Roaming\discord\local storage\leveldb\

Gets LevelDB database from Discord app

paths use Windows environment syntax

collection commands

# PowerShell Artifact Collection Script
# Target: Discord
# 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. Discord Cache Files
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\discord\cache\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "Discord_Cache_Files"

# 2. Discord Local Storage LevelDB Files
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\discord\local storage\leveldb\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "Discord_Local_Storage_LevelDB_Files"

Write-Host "Collection complete!" -ForegroundColor Green

Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1

references

included in collections