MicrosoftStickyNotes

Appsv1.1

Author: Andrew Rathbun

description

Microsoft Sticky Notes

paths

2 paths
paths use Windows environment syntax

collection commands

# PowerShell Artifact Collection Script
# Target: MicrosoftStickyNotes
# 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
        # Microsoft Sticky Notes - Windows 7, 8, and 10 version 1511 and earlier
        $UserPath = "$($_.FullName)\AppData\Roaming\Microsoft\StickyNotes"
        Collect-Artifact -SourceDir $UserPath -FileMask "StickyNotes.snt" -FolderName "Microsoft_Sticky_Notes_Windows_7_8_and_10_version_1511_and_earlier_$UserName"
        # Microsoft Sticky Notes - 1607 and later
        $UserPath = "$($_.FullName)\AppData\Local\Packages\Microsoft.MicrosoftStickyNotes*\LocalState"
        Collect-Artifact -SourceDir $UserPath -FileMask "plum.sqlite*" -FolderName "Microsoft_Sticky_Notes_1607_and_later_$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

Microsoft Sticky Notes is a useful feature in Windows operating systems versions 7+. However, the notes are stored differently depending on the version of Windows.

I have not yet tested the Stickynotes.snt for earlier versions of Windows. When I do, I will update this target with my results.

For Windows 10 version 1607 and later, use your favorite SQL tool to view the .sqlite, .sqlite-wal and .sqlite-shm files. You will notice notes will be stored in the Note database.

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_MicrosoftStickyNotes_NotesDB.smap