dfirhub

MicrosoftTeams

Author: Matt Dawson and Andrew Rathbun

description

Microsoft Teams

paths

5 paths
AppsMicrosoft Teams IndexedDB Cache
C:\Users\%user%\AppData\Roaming\Microsoft\Teams\IndexedDB\https_teams.microsoft.com_0.indexeddb.leveldb\

LevelDB database which can contain inbound/outbound chat messages, call history and more

AppsMicrosoft Teams Local Storage Cache
C:\Users\%user%\AppData\Roaming\Microsoft\Teams\Local Storage\leveldb\

LevelDB database which can contain meeting history, file transfer logs and more

AppsMicrosoft Teams Cache
C:\Users\%user%\AppData\Roaming\Microsoft\Teams\Cache\

Chromium cache which can be viewed with Nirsoft's ChromeCacheView

AppsMicrosoft Teams Config
C:\Users\%user%\AppData\Roaming\Microsoft\Teams\desktop-config.json

JSON config file for Teams

AppsMicrosoft Teams Logs (Windows 11)
C:\Users\%User%\AppData\Local\Packages\MicrosoftTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs

Lots of log files for MS Teams

paths use Windows environment syntax

collection commands

# PowerShell Artifact Collection Script
# Target: MicrosoftTeams
# 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. Microsoft Teams IndexedDB Cache
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\IndexedDB\https_teams.microsoft.com_0.indexeddb.leveldb\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "Microsoft_Teams_IndexedDB_Cache"

# 2. Microsoft Teams Local Storage Cache
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\Local Storage\leveldb\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "Microsoft_Teams_Local_Storage_Cache"

# 3. Microsoft Teams Cache
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\Cache\"
Collect-Artifact -SourcePath "$UserPath\*" -FolderName "Microsoft_Teams_Cache"

# 4. Microsoft Teams Config
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\Microsoft\Teams\"
Collect-Artifact -SourcePath "$UserPath\desktop-config.json" -FolderName "Microsoft_Teams_Config"

# 5. Microsoft Teams Logs (Windows 11)
Collect-Artifact -SourcePath "C:\Users\%User%\AppData\Local\Packages\MicrosoftTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\Logs\*" -FolderName "Microsoft_Teams_Logs__Windows_11_"

Write-Host "Collection complete!" -ForegroundColor Green

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

references

included in collections