Skip to content

What Is Persistent Bitmap Caching in RDP? How to Disable It

What the Remote Desktop 'Persistent bitmap caching' option does, how to disable it (Experience tab, bitmapcachepersistenable, mstsc /public), and what it leaves on disk for an investigator.

Published on 7 min read

TL;DR. Persistent bitmap caching is the Remote Desktop Connection option that keeps bitmaps of the remote screen on disk between sessions, so a later connection can reuse them instead of downloading them again. It is on by default. Turn it off on the Experience tab (untick Persistent bitmap caching), with bitmapcachepersistenable:i:0 in an .rdp file, or for one connection with mstsc /public. When it is on, the client leaves bcache*.bmc and Cache*.bin files in %LOCALAPPDATA%\Microsoft\Terminal Server Client\Cache\, which can show what the remote screen displayed.

This page is about the setting itself. For what the cache files contain and how to analyze them, see the RDP bitmap cache forensics guide.

What persistent bitmap caching does

Remote Desktop sends the remote screen to the client as bitmaps. To save bandwidth, the protocol lets the client cache bitmaps it has received and lets the server refer to them by a key instead of sending the pixels again. A window frame, a toolbar or an icon is downloaded once and then reused.

There are two levels of caching:

In-memory bitmap cachePersistent (on-disk) bitmap cache
LifetimeThe current sessionSurvives the session and the client process
WhereClient process memoryFiles in the user's local AppData
BenefitLess traffic within a sessionLess traffic at the start of the next session
Controlled byAlways usedPersistent bitmap caching option (default: on)

The persistent cache is what Microsoft's own API documentation describes for the client control's BitmapPersistence property: it "can improve performance but requires additional disk space". In protocol terms, the client announces the keys of the bitmaps it already holds when a connection starts. The classic protocol does this with the Persistent Key List PDU (MS-RDPBCGR), and the RDP 8 graphics pipeline uses a cache import offer (MS-RDPEGFX). The server then skips sending those bitmaps.

The gain is largest when you reconnect often to similar desktops over a slow link. On a fast LAN, users rarely notice a difference either way.

Where the setting lives

PlaceWhat to setScope
Remote Desktop Connection, Show Options > ExperienceUntick Persistent bitmap cachingThat connection; saved to the .rdp file, or to Default.rdp if you save the defaults
An .rdp filebitmapcachepersistenable:i:0 (off) or :i:1 (on)Connections opened with that file
Default.rdpSame line, in the hidden Default.rdp in the user's Documents folderConnections started from the client with its saved defaults
Command linemstsc /publicOne connection: public mode does not cache passwords or bitmaps
Remote Desktop ActiveX controlAdvancedSettings.BitmapPersistence = 0Applications that embed the client control
RDS session collectionSet-RDSessionCollectionConfiguration -CollectionName <name> -CustomRdpProperty "bitmapcachepersistenable:i:0".rdp files that RD Web Access hands out for that collection

The switch is on the client side: mstsc reads it from the .rdp file or from its saved defaults. If you need it off across a fleet, control the .rdp files users connect with (published RemoteApp and desktop connections, files you distribute) and the client defaults.

To see what a given .rdp file does:

Get-Content -Force -LiteralPath "$env:USERPROFILE\Documents\Default.rdp" |
  Select-String 'bitmapcachepersistenable'

Default.rdp is hidden, so -Force is needed to list it. If the user's Documents folder is redirected (for example to OneDrive), the file is in the redirected location.

Should you disable it?

It depends on which side of the screen you are worried about.

Reasons to turn it off

  • Shared or unmanaged clients. The cache holds fragments of whatever the remote session displayed: consoles, file listings, documents, sometimes credentials typed in plain text into a window. On a kiosk, a shared PC or a personal device, that data should not stay on disk. This is what mstsc /public is for.
  • Data-handling rules. If policy says data shown in a remote session must not be stored on the endpoint, the persistent cache is storage on the endpoint.

Reasons to leave it on

  • Performance on slow or metered links, which is the reason it exists.
  • Investigations. On admin workstations and jump hosts, the cache is one of the few artifacts that show what was on screen during an RDP session. If one of those machines is used for lateral movement, its cache can document activity on targets whose logs were later cleared. Turning it off fleet-wide removes that evidence for defenders, and attackers can delete the folder or use /public anyway.

A reasonable middle ground is to keep it on for managed admin endpoints you would investigate, and turn it off for shared and unmanaged ones.

Turning the option off does not clear what is already there. To remove existing cache files for the current user, close every Remote Desktop session and run:

Remove-Item "$env:LOCALAPPDATA\Microsoft\Terminal Server Client\Cache\*" -Force

What it leaves on disk

With the option on, mstsc writes the cache into the local (non-roaming) AppData of the user who ran it, on the machine the connection was made from:

C:\Users\<user>\AppData\Local\Microsoft\Terminal Server Client\Cache\
FilesFormat
bcache2.bmc, bcache22.bmc, bcache24.bmcLegacy BMC cache: fixed slots, 8, 16 or 32 bpp
Cache0000.bin, Cache0001.bin, ...RDP 8 persistent cache: uncompressed 32-bit tiles

Each file holds many small tiles, usually 64×64 pixels, with a cache key and their size, but no timestamp and no screen position. Microsoft does not document these file layouts; what is known comes from reverse engineering, chiefly ANSSI's bmc-tools. The byte-level structure is in the bcache*.bmc and Cache*.bin file format, and older Windows paths and collection methods (KAPE, Velociraptor, PowerShell) are in RDP bitmap cache location and acquisition.

Checking it during an investigation

On a suspected source host, the setting tells you whether a cache should exist, and the files tell you whether one does.

  1. Read the setting. Check bitmapcachepersistenable in the user's Default.rdp and in any other .rdp files in their profile (Documents, Desktop, Downloads). A value of 1 means sessions started with those settings were expected to write a cache.
  2. Check the Cache folder for every profile, including C:\Windows.old\Users\... after an upgrade. Note the files' NTFS timestamps from $MFT: the tiles carry no time, but the files do.
  3. Line it up with the connections. The Terminal Server Client registry keys (Servers\<host>, the Default MRU list) and the Microsoft-Windows-TerminalServices-RDPClient/Operational log (event 1024) say which targets the user contacted. RDP lateral movement: source host artifacts covers how to date and attribute the session.
  4. Decode the tiles with bmc-tools or RDP Bitmap Cache Parser (in the browser; files are not uploaded) and read them for consoles, window titles and file names.

An empty or missing cache is not proof that no RDP session happened. The option may have been off for that connection, the session may have used /public or a different client, or the folder may have been deleted. Treat it as a gap and lean on the event log, registry and target-side logs.

FAQ

What is persistent bitmap caching in RDP?

An option of the Remote Desktop Connection client (mstsc) that keeps the bitmaps received from the remote screen on disk between sessions, instead of only in memory. On the next connection the client tells the server which bitmaps it already has, so the server does not resend them. It is on by default and stored in .rdp files as bitmapcachepersistenable:i:1.

Should I turn off persistent bitmap caching?

Turn it off where pieces of the remote screen must not be stored on the client, such as shared or unmanaged machines. On managed admin workstations and jump hosts, leaving it on costs little and keeps one of the few artifacts that show what was displayed in a session if that workstation is ever used for lateral movement.

Does turning it off delete the existing cache?

No. Unticking the option stops new cache files being written for connections that use that setting. Files already in %LOCALAPPDATA%\Microsoft\Terminal Server Client\Cache stay until you delete them.

Does mstsc /public write a bitmap cache?

No. Microsoft documents /public as public mode, in which Remote Desktop does not cache passwords and bitmaps. A session started that way is not expected to leave a bitmap cache, whatever the .rdp file says.

Related articles

What the RDP bitmap cache is, where it lives, what its tiles can show about a remote session, how to date it, and how to parse bcache*.bmc and Cache*.bin files.
Step-by-step: load bcache*.bmc and Cache*.bin files into a free in-browser parser, triage tiles, build a collage, rebuild a screen and export the evidence.
Which artifacts on the RDP source host show where a user connected and when, and how to use them to date and attribute what the bitmap cache shows.