Anti-forensics & deletion
Recycle Bin
Recycle Bin cheat sheet: $Recycle.Bin $I and $R files, $I version 1 vs 2, XP INFO2, deletion time, original path and size, emptying and Shift+Delete traces.
- Location
- C:\$Recycle.Bin\<SID>\$I*
- Proves
- Which user deleted which file, from which path, when, and its size
- Timestamps
- Deletion time in $I or INFO2 as FILETIME, UTC; $I creation matches it; $R keeps the original file's $SI times, UTC
- Retention
- Kept until restored, deleted, emptied or purged past MaxCapacity; NukeOnDelete bypasses it; remnants in $MFT, USN and VSS
- Access
- Administrator: hidden, protected folder on each volume; not locked, copy elevated with robocopy /B or KAPE RecycleBin
- Type
- File / file system
- Windows
- XPVista / 78 / 8.11011
- KAPE target
- RecycleBinRecycleBin_InfoFilesRecycleBin_DataFiles
- Velociraptor
- Windows.Triage.Targets:RecycleBinRecycleBin_InfoFilesRecycleBin_DataFiles
Tools
Compare all toolsWhat it is
When a user deletes a file through Explorer (or any program using the shell delete API), Windows does not erase it: it moves it into a hidden per-volume, per-user folder and records where it came from and when it was deleted. Since Windows Vista each deleted item produces a pair of files: a $R file holding the original data and a $I file holding the metadata. Windows XP used a single INFO2 index. The Recycle Bin is the first place to answer "who deleted what, and when", and deliberate emptying is a classic anti-forensics indicator.
Location
| Windows version | Path | Content |
|---|---|---|
| XP / 2000 (NTFS) | C:\RECYCLER\<SID>\INFO2 and Dc<n>.<ext> | One INFO2 index per user; recycled files renamed D + drive letter + index number + original extension |
| XP (FAT volumes) | C:\RECYCLED\INFO2 | Shared, not per user |
| Vista / 7 / 8 / 10 / 11 | C:\$Recycle.Bin\<SID>\$I<random>.<ext> | Metadata file, one per deleted item |
| Vista / 7 / 8 / 10 / 11 | C:\$Recycle.Bin\<SID>\$R<random>.<ext> | Original content; a folder if a folder was deleted |
$I and $R share the same six random characters and the original extension. Each fixed volume has its own $Recycle.Bin at its root; the <SID> subfolder ties items to a user (security identifier). Removable flash drives generally have no Recycle Bin, so deletions there are immediate.
What it proves
- Deletion by a specific user: the SID folder attributes the action to an account.
- When: the deletion time stored in the
$Ifile or INFO2 record. - What and where: the original full path and file size, even after the
$Rcontent has been purged. - Content: while the
$Rfile exists, the full original data can be recovered. - It does not record files deleted with Shift+Delete,
del/Remove-Itemon the command line, or most programmatic deletions, which bypass the bin. - An empty Recycle Bin does not by itself prove anti-forensics: users empty it routinely.
Key fields
| Field | Meaning |
|---|---|
$I version | 1 on Vista to 8.1 (fixed-size path field), 2 on Windows 10/11 (path length field + variable-length path) |
| Original file size | Size in bytes of the deleted file or folder |
| Deletion time | FILETIME of the move to the Recycle Bin |
| Original path | Full UTF-16 path of the item before deletion |
$R file | Deleted content, keeping its data and most metadata |
| INFO2 record (XP) | Index number, drive number, deletion time, file size, original path (ANSI and Unicode) |
Timestamps
| Timestamp | Set when | Format | Pitfalls |
|---|---|---|---|
Deletion time ($I / INFO2) | Item moved to the Recycle Bin | FILETIME, UTC | The key time; relies on the system clock at deletion |
$I file creation ($SI) | $I written at deletion | NTFS, UTC | Should match the embedded deletion time; a mismatch deserves a look |
$R file times ($SI) | Kept from the original file, since deletion is a rename within the volume | NTFS, UTC | Describe the original file, not the deletion; $FN times reflect the move |
$Recycle.Bin\<SID> folder modification | Last item added or removed | NTFS, UTC | Emptying or restoring updates it |
Retention and clearing
- Items stay until the user restores them, deletes them from the bin, empties it, or the bin exceeds its maximum size and the oldest items are purged.
- Per-volume settings live under
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\<GUID>:MaxCapacity(size) andNukeOnDelete(set to 1, files are deleted immediately without going to the bin). - Emptying deletes both
$Iand$Rfiles. Traces remain:$I/$Rentries and names in the $MFT and $I30 indexes, deletion records in the USN journal, and file content in unallocated space until overwritten. - Volume shadow copies often preserve an earlier state of
$Recycle.Bin.
Collection
- KAPE target:
RecycleBin(compound ofRecycleBin_InfoFilesfor$I*/INFO2 andRecycleBin_DataFilesfor$R*/D*). Collect info files only when content volume is a concern. - Velociraptor (
Windows.Triage.Targets):RecycleBin,RecycleBin_InfoFilesorRecycleBin_DataFiles.Windows.Forensics.RecycleBinparses$Ifiles live (Vista and later, not INFO2). - Built-in: the folder is hidden and protected; list and copy it from an elevated prompt and map SIDs to users:
Get-ChildItem 'C:\$Recycle.Bin' -Force -Recurse | Select-Object FullName, Length, CreationTimeUtc, LastWriteTimeUtc
robocopy 'C:\$Recycle.Bin' E:\case\RecycleBin_C /E /B /COPY:DAT /DCOPY:T
Get-CimInstance Win32_UserProfile | Select-Object SID, LocalPath
Repeat for every volume (D:\$Recycle.Bin, etc.).
Parsing tools
- RBCmd (Eric Zimmerman, free):
RBCmd.exe -d E:\case\RecycleBin_C --csv E:\outparses$Iversions 1 and 2 and XP INFO2 files. - Rifiuti2 (open source): parses INFO2 and
$Ifiles, with tab-separated or XML output. - Velociraptor:
Windows.Forensics.RecycleBin. - Plaso:
recycle_bin($I) andrecycle_bin_info2(INFO2) parsers for super timelines.
Investigation tips
- Sort by deletion time and look for bursts: mass deletion just before a device return, a dismissal or an incident response is a strong anti-forensics indicator.
- Deleted attacker tools and archives (
.zip,.7z,.rar) often sit in the bin with their original path inDownloads,Tempor a staging folder. - If the bin is empty, look for orphan
$I/$Rnames in the $MFT andFILE_DELETErecords for them in the USN journal to date the emptying. - Compare the original path with LNK files and Jump Lists to show the file was opened before being deleted.
- For deleted pictures whose
$Ris gone, check the thumbcache. - Check
NukeOnDeletebefore concluding that nothing was ever recycled.
Related artifacts
- Master File Table ($MFT)$MFT cheat sheet: FILE records, $SI vs $FN timestamps, resident data, deleted records, sequence numbers, timestomping checks and MFTECmd parsing.
- USN Journal ($UsnJrnl:$J)USN journal cheat sheet: $UsnJrnl:$J and $Max, record fields, reason flags, parent references, default size, rollover, fsutil and MFTECmd parsing.
- LNK shortcut filesLNK cheat sheet: Recent folder shortcuts, first and last open times, embedded target timestamps, volume serial, network share and TrackerDataBlock MAC.
- ThumbcacheThumbcache cheat sheet: thumbcache_*.db files per Windows version, cache IDs, mapping to the Search index, legacy Thumbs.db and thumbnails of deleted 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.
Glossary terms
- Security Identifier (SID)The unique value Windows uses to identify users, groups and computers, such as S-1-5-21-…-1001, found throughout registry, logs and file paths.
- FILETIMEThe 64-bit Windows timestamp format counting 100-nanosecond intervals since 1 January 1601 UTC, used by NTFS, the registry and many artifacts.
- Anti-forensicsTechniques used to destroy, hide or falsify evidence, such as log clearing, timestomping, wiping and deleting shadow copies or the USN journal.
- Unallocated spaceClusters a file system currently marks as free; they often still contain data from deleted files until new data overwrites them.