Dropbox_Metadata
Author: Chad Tilbury and Andrew Rathbun
description
Dropbox Cloud Storage Metadata
paths
collection commands
# PowerShell Artifact Collection Script
# Target: Dropbox_Metadata
# 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
# Dropbox Metadata
$UserPath = "$($_.FullName)\AppData\Local\Dropbox"
Collect-Artifact -SourceDir $UserPath -FileMask "info.json" -FolderName "Dropbox_Metadata_$UserName"
# Dropbox Metadata
$UserPath = "$($_.FullName)\AppData\Local\Dropbox"
Collect-Artifact -SourceDir $UserPath -FileMask "host.db" -FolderName "Dropbox_Metadata_$UserName"
# Dropbox Metadata
$UserPath = "$($_.FullName)\AppData\Local\Dropbox\machine_storage"
Collect-Artifact -SourceDir $UserPath -FileMask "tray-thumbnails.db" -FolderName "Dropbox_Metadata_$UserName"
# Dropbox Metadata
$UserPath = "$($_.FullName)\AppData\Local\Dropbox"
Collect-Artifact -SourceDir $UserPath -FileMask "host.dbx" -FolderName "Dropbox_Metadata_$UserName"
# Windows Protect Folder
$UserPath = "$($_.FullName)\AppData\Roaming\Microsoft\Protect\*"
Collect-Artifact -SourceDir $UserPath -FolderName "Windows_Protect_Folder_$UserName"
# Dropbox Metadata
$UserPath = "$($_.FullName)\AppData\Local\Dropbox\instance*"
Collect-Artifact -SourceDir $UserPath -FolderName "Dropbox_Metadata_$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
home.db: SQlite database tracking some of a user's recent Dropbox activity
icon.db: SQLite database tracking of icons in the user's Dropbox sync history which can give an indication as to which files and folders are present
sync_history.db: SQLite database containing recent synchronization events including usage activity
nucleus.sqlite3: SQLite database tracking names of local and cloud-only files
aggregation.dbx: SQLite database that can contain a snapshot table of the user's Dropbox contents in JSON with timestamps in UNIX Epoch
avatarcache.db: SQLite database which appears to contain the ID's of account(s) on the user's system where Dropbox is installed
tray-thumbnails.db: SQLite database containing references to image files at one time present in a user’s Dropbox instance. Can include references to deleted files no longer present in Dropbox.
The SQLite database(s) this Target collects can be parsed with SQLECmd using the following map(s): https://github.com/EricZimmerman/SQLECmd/blob/master/SQLMap/Maps/Windows_Dropbox_Configurations.smap, https://github.com/EricZimmerman/SQLECmd/blob/master/SQLMap/Maps/Windows_Dropbox_FileCache.smap, and https://github.com/EricZimmerman/SQLECmd/blob/master/SQLMap/Maps/Windows_Dropbox_InstanceDB.smap