User activity
Notepad TabState (Windows 11)
Notepad TabState cheat sheet: Windows 11 Notepad .bin tab files, unsaved text never written to disk, saved file paths, hashes, WindowState and parsing.
- Location
- C:\Users\<user>\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState\*.bin
- Proves
- Text a user typed or pasted into Notepad, including content that was never saved, and which files were open
- Timestamps
- Saved-file tabs embed the file's last write time (FILETIME, UTC, stored in a variable-length encoding per community research); .bin NTFS times in UTC
- Retention
- Until the tab is closed or Notepad session restore is turned off; closed tab files are deleted but may be carved or found in shadow copies
- Access
- User or admin; plain files in the user profile, collect as a folder while Notepad is closed when possible
- Evidence of
- User activityFile & folder access
- Type
- File / file system
- Windows
- 11
- KAPE target
- No dedicated target
- Velociraptor
- No dedicated target
Tools
Compare all tools- 010 EditorGUI · commercial
- Community TabState parsers
- KAPECLI
- VelociraptorPlatform · open source
What it is
The Store version of Notepad shipped with Windows 11 added tabs and, from 2023, session restore: when Notepad closes, open tabs (saved or not) come back on the next launch. To do that it continuously writes each tab to a binary file under TabState. For investigators this is unusual evidence: text the user typed or pasted without ever saving it is sitting on disk, together with the path of files that were open.
The feature appeared in Notepad app versions released through the Windows 11 Store during 2023 (version numbers in the 11.23xx range are commonly cited). Windows 10's classic notepad.exe does not have it.
Location
| Item | Path (under %LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\) |
|---|---|
| Tab files | TabState\<GUID>.bin |
| Tab auxiliary state | TabState\<GUID>.0.bin, <GUID>.1.bin (settings and pending edits, per community research) |
| Window layout | WindowState\*.bin (tab order, active tab, window geometry) |
| App settings | ..\Settings\settings.dat (package root, registry-format hive) |
What it proves
- Proves the content of each open tab at the last write, including unsaved "Untitled" tabs: pasted credentials, draft messages, command lists, ransom notes being edited.
- Proves a file was open in Notepad (full path) and, via the embedded hash and timestamp, what version of that file was loaded.
- Shows unsaved edits made on top of a saved file, which may differ from the file on disk.
- It does not give a typing timeline: there is no per-keystroke time, only file-level times.
- It does not prove the text was authored by the user; it could have been pasted from elsewhere. Correlate with clipboard history.
Key fields
The format is undocumented and was reverse-engineered by the community; field order and types can change between Notepad versions.
| Field | Meaning |
|---|---|
Magic NP | File signature |
| Saved / unsaved flag | Whether the tab is backed by a file on disk |
| File path | Full path of the saved file (UTF-16LE, length-prefixed) |
| File size, encoding, line-ending type | Properties of the saved file |
| Last write time | Timestamp of the saved file when loaded |
| SHA-256 | Hash of the file content as loaded |
| Selection start / end | Cursor or selection position |
| Content | Tab text (UTF-16LE) |
| Unsaved chunks | Appended insert/delete operations with CRC32 checksums |
Lengths and several numeric fields are stored as variable-length unsigned LEB128 integers, which is why naive string searches only give partial results.
Timestamps
| Timestamp | Format | Notes |
|---|---|---|
| Embedded file last write time | FILETIME, UTC (LEB128-encoded per community write-ups) | Describes the file on disk, not the typing |
.bin $SI creation | NTFS, UTC | Approximately when the tab was opened |
.bin $SI modification | NTFS, UTC | Last time Notepad flushed the tab, close to the last edit |
WindowState files | NTFS, UTC | Last change of the tab layout |
Retention and clearing
- Tab files persist across reboots until the tab is closed. Closing a tab (and choosing not to save) deletes its
.binfiles. - Users can disable restore in Notepad settings (When Notepad starts: start a new session); tab files are then no longer kept after Notepad closes (exact behaviour may vary by version).
- Deleted tab files can be recovered from shadow copies or carved from unallocated space using the
NPsignature and UTF-16 text. - Uninstalling or resetting the Notepad app wipes the whole
LocalStatefolder.
Collection
$np = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState"
robocopy "$np" E:\case\notepad /E /COPY:DAT /DCOPY:T
Get-AppxPackage Microsoft.WindowsNotepad | Select-Object Name, Version
Record the Notepad package version: it tells you which format variant to expect. For all profiles, collect C:\Users\*\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\ with your triage tool.
Parsing tools
- Community parsers: several open-source Python, Rust and C# TabState parsers exist on GitHub. Check which Notepad versions each supports before trusting its output.
- 010 Editor / hex editor: for a first look, the UTF-16LE text is readable directly; templates from community research help decode fields.
- Strings:
strings -elon the.binfiles quickly surfaces unsaved text. - Plaso / commercial suites: support is recent and uneven; verify against manual parsing.
Investigation tips
- Always check unsaved tabs first: users paste passwords, API keys, IP lists and chat drafts into "Untitled" tabs and never save them.
- Compare the embedded SHA-256 with the current file on disk: a mismatch means the file changed after it was opened in Notepad.
- In ransomware cases, attackers staging notes or command lists in Notepad on a compromised host leave them here.
- Correlate paths with jump lists and RecentDocs for when files were opened.
- The same principle applies to other apps with session restore; compare with Sticky Notes.
Related artifacts
- Sticky Notes (plum.sqlite and StickyNotes.snt)Sticky Notes cheat sheet: plum.sqlite Note table and .NET tick timestamps on Windows 10/11, legacy StickyNotes.snt, WAL recovery, collection and parsing.
- Clipboard historyClipboard history cheat sheet: what Windows 10/11 keeps in memory, pinned items on disk, cloud clipboard text in ActivitiesCache.db and the registry settings.
- Jump ListsJump Lists cheat sheet: AutomaticDestinations and CustomDestinations, AppIDs, DestList entries with last access, access count and pin status, and JLECmd.
- RecentDocsRecentDocs cheat sheet: NTUSER.DAT key and per-extension subkeys, MRUListEx order, what the LastWrite time means and how to link entries to LNK files.
- Volume Shadow Copies (VSS)Volume Shadow Copies cheat sheet: store files in System Volume Information, copy-on-write blocks, deletion by ransomware, mounting and parsing.
- Windows Timeline (ActivitiesCache.db)Windows Timeline cheat sheet: ActivitiesCache.db and WAL, Activity tables, ActivityType values, focus duration, clipboard, 30-day expiry and Windows 11 status.
Glossary terms
- FILETIMEThe 64-bit Windows timestamp format counting 100-nanosecond intervals since 1 January 1601 UTC, used by NTFS, the registry and many artifacts.
- File carvingRecovering files from raw disk data using content signatures such as headers and footers, without relying on file system metadata.
- UTC vs local time in Windows artifactsWhy some Windows artifacts record UTC and others local time, and how the TimeZoneInformation registry key helps normalize a forensic timeline.
- Unallocated spaceClusters a file system currently marks as free; they often still contain data from deleted files until new data overwrites them.