Este recurso pode ser muito útil durante um PenTest pois informações sensíveis como Senhas, URLs, IPs entre outras..., podem ser encontradas ao extrair o Cache das Sessões RDP.
Execute o PowerShell como Administrador e crie uma pasta para armazenar o Cache.
Windowsmd RDP-Cache cd .\RDP-Cache\

Para verificar a existência do Cache basta acessar o caminho a seguir na pasta do Usuário :
C:\Users\Administrador\AppData\Local\Microsoft\Terminal Server Client\Cache

Copie o conteúdo abaixo e crie o arquivo rdp-cache.ps1 dentro da pasta RDP-Cache.
PowerShell
Add-Type -Assembly System.Drawing
$workingDir = "C:\100SECURITY\RDP-Cache"
md $workingDir
$file=(dir Env:\LOCALAPPDATA).Value+"\Microsoft\Terminal Server Client\Cache\Cache0001.bin"
$tileSize = 64
$tilesPerGraphW=8
$tilesPerGraphH=8
$bpp = 4
$bufSize = $bpp * $tileSize * $tileSize * $tilesPerGraphW * $tilesPerGraphH
$bytesRead=$bufSize
$imgNo=0
$imgNamePrefix=(get-date).Ticks
$tileSize2 = $tileSize * $tileSize
$buf = new-object byte[] $bufSize
$fs = new-object IO.FileStream($file, [IO.FileMode]::Open)
$reader = new-object IO.BinaryReader($fs)
$bmBM = New-Object System.Drawing.Bitmap (($tileSize * $tilesPerGraphW),($tileSize * $tilesPerGraphH))
while ($bytesRead -eq $bufSize)
{
$offset = $imgNo*$bufSize
$imgNo++
$dum=$reader.BaseStream.Seek($offset,"Begin")
$bytesRead=$reader.Read($buf, 0, $bufSize)
for ($it=0; $it -lt $tilesPerGraphH; $it++)
{
Write-Progress -Activity "Analyzing cache" -Status "Row $it of $tilesPerGraphH" -PercentComplete (($it/$tilesPerGraphH)*100) -id 0
for ($jt=0; $jt -lt $tilesPerGraphW; $jt++)
{
Write-Progress -Activity "Completing row" -Status "Column $jt" -PercentComplete (($jt/$tilesPerGraphW)*100) -ParentId 0 -Id 1
for ($is=0; $is -lt $tileSize; $is++)
{
for ($js=0; $js -lt $tileSize; $js++)
{
$bufPos = $bpp * (($it*$tilesPerGraphW+$jt)*$tileSize2+$is*$tileSize+$js)
$red = $buf[$bufPos]
$green = $buf[$bufPos + 1]
$blue = $buf[$bufPos + 2]
$bmBM.SetPixel($jt*$tileSize+$js,$it*$tileSize+$is,[System.Drawing.Color]::FromArgb($red, $green, $blue))
}
}
}
}
$imgNoText=($imgNo).ToString("0000")
$bmBM.Save("$workingDir\$imgNamePrefix.$imgNoText.png")
}
Liste o conteúdo da pasta RDP-Cache, em seguida execute o script rdp-cache.ps1.
Windowsdir ./rdp-cache.ps1

Aguarde...

Serão extraídas várias imagens contendo Prints de Tela (misturados) das Sessões RDP.

Em algumas imagens é possível encontrar URLs, IPs e Senhas, veja o exemplo :
