Shellbags are per-user Windows registry records of folders that were browsed through the Windows shell, and they can show that a user profile viewed a folder on a removable drive or network share even after the drive is gone or the folder is deleted. That makes them one of the most useful artefacts when an investigation needs to show that someone looked inside a location rather than simply that a device was connected or a share existed.
This guide is for forensic analysts and incident responders working on insider cases, data theft investigations and intrusions where an attacker browsed file shares. It explains where shellbag data lives, how it is structured, what its timestamps can and cannot prove, and how to read the shell item types that matter for removable and network locations. The structural detail comes from the libfwsi Windows Shell Item format specification by Joachim Metz, the plaso BagMRU parser and the ForensicArtifacts definitions. Microsoft does not publish a specification for these structures, and the libfwsi document itself describes the item identifier format as undocumented and varying between Windows versions, so every interpretation on this page should be validated against your own Windows builds.
Device connection evidence, such as how to identify a USB device and when it was attached, is covered in the USB Device Forensics Guide. Shellbags complement that work by showing which folders were browsed.
Key takeaways
- Shellbags record folder browsing by a specific user profile, so they attribute activity to an account rather than to the machine.
- The data sits in BagMRU keys under several per-user registry paths, which the plaso parser lists. Collect the user's registry files and their transaction logs.
- Each BagMRU subkey holds shell items, which form a path similar to a file system path with Desktop as the root.
- Volume shell items carry a flag the libfwsi specification describes as "Is removable media", and network location shell items hold UNC paths to servers and shares.
- File entry shell items can embed modification, creation and last access dates stored as FAT date and time values, and on newer versions an NTFS file reference. These describe the folder at the time it was recorded, not the time it was browsed.
- Registry key last written times give approximate timing for when a BagMRU key changed. Corroborate with other artefacts before stating when a folder was opened.
What shellbags are and why they matter
The Windows shell represents things the user can browse, such as drives, folders, network locations and control panel items, as shell items. The libfwsi specification explains that shell items can be identified by a list of identifiers, also called an IDList or PIDL, and that such a list is comparable to a file system path with Desktop as the root item. When a user browses folders through the shell, Windows stores shell item data in the registry under BagMRU keys. The plaso parser describes this data as "BagMRU (or ShellBags) Registry data".
For investigations, shellbags matter because they can answer questions that other artefacts leave open:
- Did this user look inside the removable drive? Device connection records show a device was attached. Shellbags can show folders on it were browsed by a specific profile.
- Which shares did the attacker browse? Network location shell items can show server and share names that a compromised profile explored, which supports scoping of data access.
- Did a folder that no longer exists ever exist? Because shellbags record the folder name and metadata at the time, they can preserve evidence of folders that have since been deleted, renamed or were on media that is no longer available.
- What was inside an archive? The specification includes a compressed folder shell item, which can appear when a user browsed into an archive as if it were a folder.
Shellbags do not prove that files were opened or copied. They show folder level browsing. Pair them with file access artefacts such as those in the Jump Lists and LNK Files Forensics Guide to reach conclusions about files.
Where shellbag data lives
The plaso BagMRU parser filters on the following key paths, all under HKEY_CURRENT_USER:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\BagMRUHKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\BagMRUHKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRUHKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\ShellNoRoam\BagMRUHKEY_CURRENT_USER\Local Settings\Software\Microsoft\Windows\Shell\BagMRUHKEY_CURRENT_USER\Local Settings\Software\Microsoft\Windows\ShellNoRoam\BagMRU
The variety reflects differences between Windows versions and between the views a registry parser presents. Some paths sit under Software\Classes; Microsoft documents HKEY_CURRENT_USER\Software\Classes as the per-user class store that is merged into HKEY_CLASSES_ROOT. In practice, check every path in every profile rather than assuming one location.
For collection, the ForensicArtifacts definition of Windows user registry files lists %%users.userprofile%%\NTUSER.DAT, %%users.userprofile%%\NTUSER.MAN and %%users.localappdata%%\Microsoft\Windows\UsrClass.dat, and a separate definition lists their transaction log files (.LOG, .LOG1 and .LOG2). Collect all of them for every profile of interest. Recent changes may still be in the transaction logs rather than the main hive, so a parser that replays transaction logs can give a more complete picture. Acquisition practice is covered in the Disk Imaging and Forensic Acquisition Guide.
How BagMRU is structured
The BagMRU key forms a tree. The plaso parser's logic shows how to read it:
- Each BagMRU key holds an
MRUListExvalue and numbered values. MRUListEx lists the numbered entries in most recently used order and is terminated with-1(0xffffffff). - Each numbered value contains shell item data for one child item, such as a drive, folder or network location.
- Each numbered value has a matching numbered subkey, which in turn holds the next level of the tree with its own MRUListEx and numbered values.
- Walking from the root through the subkeys and joining the shell item names produces a path. Plaso reports each entry as an index, its MRU value number and the resulting "Shell item path".
Two practical consequences follow. First, the MRU order tells you which child of a given folder was used most recently relative to its siblings, not across the whole tree. Second, plaso records the key's last written time for each BagMRU key, which is the main source of timing for shellbags. Plaso also produces warnings when a numbered subkey is missing or when entries appear after the terminator, which can indicate damage or tampering and should be noted in your analysis.
Reading shell items for removable and network locations
The libfwsi specification identifies shell item types by a class type indicator. Several are directly relevant to removable and network drive investigations.
Volume shell items
A volume shell item is identified by a value of 0x20 after applying a bitmask of 0x70 to the class type indicator. The specification lists flag 0x01 as "Has name" and flag 0x08 as "Is removable media". When the name flag is set, the item holds a volume name such as a drive letter. The removable media flag is useful evidence that a path was browsed through a removable volume, but the specification marks other flags as unknown, so do not infer more from the flag value than it documents.
Drive letters are reused. A path recorded as being on a particular letter only tells you the letter at the time. To link it to a specific device, correlate with device connection evidence and, where present, the volume names and folder names you expect on that device.
MTP storage device shell items
Phones, cameras and other devices connected using the Media Transfer Protocol do not appear as drive letters. The specification includes MTP storage device volume and file entry shell items and notes they have been seen in Windows 7 BagMRU and LNK files. Parts of the structure are still marked as to do in the specification, so treat parsed values with care and confirm them in testing.
Network location shell items
A network location shell item is identified by 0x40 after applying the 0x70 bitmask. The specification lists sub types including "Domain/Workgroup name" (0x01), "Server UNC path" (0x02), "Share UNC path" (0x03), "Microsoft Windows Network" (0x06) and "Entire Network" (0x07). The item's location field contains the network name or UNC path, and flags indicate whether a description or comments are present.
For intrusion and insider work, the server and share UNC paths are the key values. A profile that browsed many shares in a short time window, particularly shares outside the user's normal role, is a strong scoping lead. Correlate with share access events on file servers; the Lateral Movement Artefacts Cheat Sheet lists the file share events to record.
File entry shell items
A file entry shell item, identified by 0x30 after the bitmask, represents a folder or file name in the path. In Windows XP and later, the specification lists a file size, a last modification date and time stored as a FAT date and time in UTC, the lower 16 bits of the file attribute flags and a primary name, which often contains the short name.
A file entry extension block with signature 0xbeef0004 can follow. It contains a creation date and time and a last access date and time, both as FAT date and time in UTC, and the long name. From extension version 7 the block can include a file reference, which the specification describes as an NTFS file reference made up of a 6 byte MFT entry index and a 2 byte sequence number, while noting it is not always a file reference value. The specification lists extension versions 3 for Windows XP or 2003, 7 for Windows Vista, 8 for Windows 2008, 7 and 8.0, and 9 for Windows 8.1 and 10.
The NTFS file reference can link a shellbag entry to a specific MFT record on an NTFS volume, which helps when names have changed. The File System Forensics Guide covers MFT analysis.
Compressed folder shell items
The specification describes a compressed folder shell item, identified by its ancestor in the path, with separate structures for Windows XP and Windows 10. When parsed, these show that a user browsed into an archive through the shell, which can be relevant when data is staged in archives.
What the timestamps can and cannot prove
Shellbag timing is the area most often overstated in reports. There are two kinds of time to keep separate.
Registry key last written time. Each BagMRU key has a last written time, which plaso records. It shows when the key last changed. Because a key holds entries for several children, a change may relate to any of them, and the most recently used child in MRUListEx is the usual candidate. It is reasonable to say "the BagMRU key for folder X was last written at time T, and its most recently used child is Y". It is not safe to say "the user opened Y at time T" without corroboration.
Embedded shell item times. The FAT modification, creation and last access times inside file entry shell items describe the folder's own file system metadata as Windows saw it when the shell item was stored. They are not browsing times. The specification also notes that these date and time values do not always seem to be set. Use them to identify which version of a folder was seen, for example to match a folder on a seized USB drive, not to time user activity.
Good practice is to place shellbag key times in the master timeline as "BagMRU key last written" entries with the child path, then look for corroborating artefacts at or near the same time: device connection records, LNK files, jump lists, file server access events or process execution. The Forensic Timeline Analysis Guide covers how to merge them.
Investigation workflow
- Define the question. For example, "did profile P browse folders on removable media between dates D1 and D2" or "which network shares did the compromised account browse".
- Collect the user registry files and transaction logs for every relevant profile, with hashes.
- Parse with more than one tool. Run at least two parsers, for example plaso's BagMRU parser and a dedicated shellbags tool such as those covered in the EZ Tools Guide, and compare results. Differences often point to unusual shell item types.
- Filter for location types. Separate paths whose root is a removable volume, an MTP device or a network location from local fixed disk paths.
- Build the path list with each entry's key last written time, MRU position and embedded times.
- Correlate removable paths with device connection evidence and network paths with file server and authentication logs.
- Check for anomalies such as parser warnings about missing subkeys or entries after the MRUListEx terminator, and gaps where expected profiles have no shellbag data at all.
- Write findings with explicit wording about what shellbags show (folder browsing by a profile) and what they do not (file opening or copying, exact times).
Shellbags in identity and intrusion investigations
Shellbags belong to a user profile, which makes them an identity artefact as much as a file system one. In intrusions where an attacker uses a compromised account interactively, for example over Remote Desktop, the shellbags in that account's profile on the destination can show which local folders and network shares were explored. The RDP Lateral Movement Forensics Guide explains how to tie interactive sessions to accounts.
Shared and service accounts that log on interactively are a particular risk. If several administrators or an automation account share one profile, shellbags cannot tell you which person did the browsing, only which profile. Record the account type alongside each finding and avoid attributing activity to an individual without independent evidence such as authentication records from a named account.
Common failure patterns
- Collecting only one hive. Shellbag paths span more than one per-user location, so collect all user registry files and their transaction logs.
- Ignoring transaction logs. Recent activity may not be in the main hive.
- Treating embedded times as access times. FAT times in shell items describe the folder, not the user action.
- Stating exact browsing times from key last written times. A key time covers changes to any child entry.
- Assuming a drive letter identifies a device. Letters are reused across devices and sessions.
- Trusting one parser. Shell item formats are undocumented and vary by Windows version; tools differ in coverage.
- Overclaiming file activity. Shellbags show folder browsing, not file opening or copying.
Practitioner checklist
- Collect NTUSER.DAT, UsrClass.dat and their transaction logs for every relevant profile, with hashes.
- Parse all BagMRU paths listed by the plaso parser for each profile.
- Use at least two parsers and investigate disagreements.
- Separate removable volume, MTP and network location paths from local paths.
- Record key last written time, MRU position and embedded FAT times for each entry, labelled correctly.
- Correlate removable paths with device connection evidence and network paths with file server logs.
- Note parser warnings and missing data as possible damage or tampering.
- Validate interpretation on your own Windows builds before testifying to it.
- Word findings as folder browsing by a profile, with stated limits on timing and attribution.
Standards and references
- libyal: Windows Shell Item format specification (libfwsi)
- plaso: BagMRU (ShellBags) Windows Registry plugin
- ForensicArtifacts: artifacts repository
- Microsoft: Merged View of HKEY_CLASSES_ROOT
- NIST: SP 800-86 Guide to Integrating Forensic Techniques into Incident Response
- MITRE ATT&CK: File and Directory Discovery (T1083)
- MITRE ATT&CK: Network Share Discovery (T1135)
Related NHI Mgmt Group resources: USB Device Forensics Guide · Windows Forensic Artefacts Guide · EZ Tools Guide · Forensic Timeline Analysis Guide