Old Miraheze Wiki Pages:KB701794: Difference between revisions
Save edits; article still unfinished. *REMARKS: A DNS zone which serves the Internet domain liao.media on Azure DNS constituted to the successful submission of this version of the page. |
m 2 revisions imported: Import the dump of the "LI AO's Wiki (Miraheze)" wiki. |
(No difference)
|
Latest revision as of 18:14, 28 September 2024
Introduction
This article documents a way to recover virtual smart card devices which are simulated smart cards that uses the Trusted Platform Module (TPM) to perform cryptographic operations. It has been observed that created virtual smart card readers which operates virtual smart cards can be uninstalled by user, i.e. from the Device Manager by choosing Uninstall device, and the uninstalled devices will never being searched by Windows which reinstates from the uninstall. Because of this irreversible action, manual installation of virtual smart card readers is required in order to reinstate the use of virtual smart cards that have their card readers uninstalled.
Symptoms
A virtual smart card reader is uninstalled from Device Manager by choosing the Uninstall device operation. While actual smart card is not destroyed, the virtual smart card is no longer readable because the respective card reader device is missing. Using the Scan for hardware changes option cannot reinstall the smart card device.
To preserve the card, the system administrator does not run the "tpmvscmgr destroy" command against the virtual smart card that has had its reader uninstalled from Windows.
Solution
On a system that has a virtual smart card reader installed, backup the registry for a random installed reader device, or use the template below.<syntaxhighlight lang="registry" line="1"> Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\SMARTCARDREADER\FFFF] "HardwareID"=hex(7):56,00,69,00,72,00,74,00,75,00,61,00,6c,00,53,00,6d,00,61,\
00,72,00,74,00,63,00,61,00,72,00,64,00,52,00,65,00,61,00,64,00,65,00,72,00,\ 5c,00,72,00,65,00,61,00,64,00,65,00,72,00,00,00,00,00
"Migrated"=dword:00000001 "ConfigFlags"=dword:00000000 "Capabilities"=dword:00000000 "ContainerID"="{00000000-0000-0000-FFFF-FFFFFFFFFFFF}" "ClassGUID"="{50dd5230-ba8a-11d1-bf5d-0000f805f530}" "ParentIdPrefix"="Virtual SC Registry Entry Prefix" "Service"="WUDFRd" "DeviceDesc"="@tpmvsc.inf,%smartcardsimulatordevicename%;Microsoft Virtual Smart Card (WUDF)" "Driver"="{50dd5230-ba8a-11d1-bf5d-0000f805f530}\\FFFF" "Mfg"="@tpmvsc.inf,%msft%;Microsoft" "FriendlyName"="VirtualSC1"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\SMARTCARDREADER\FFFF\Device Parameters]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\SMARTCARDREADER\FFFF\Device Parameters\SmartcardSimulator]
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\ROOT\SMARTCARDREADER\FFFF\Device Parameters\WUDF] "Exclusive"=dword:00000001 "DriverList"=hex(7):53,00,6d,00,61,00,72,00,74,00,63,00,61,00,72,00,64,00,53,\
00,69,00,6d,00,75,00,6c,00,61,00,74,00,6f,00,72,00,00,00,00,00
"KernelModeClientPolicy"=dword:00000001 </syntaxhighlight>For the above example code, replace the FFFF with the desired ID for the card reader device instance ID and the card ID. In most cases, the two IDs are kept identical.
Then, replace the ParentIdPrefix value with the name of the registry entry before the "and" sign which follows the name of the virtual smart card for the desired virtual smart card. After editing all the necessary information, save the file and import the registry into Windows.