FailedShack/USBHelperLauncher

GetRSA() call causes exception

github-man opened this issue · 2 comments

Hello FailedShack. Below is the output - Windows 10 1803 with latest Nov patches. Running v0.12b

usbhelperlauncher.exe -showconsole
Made by FailedShack
Injected module initializer.

Unhandled Exception: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters)
at USBHelperLauncher.Program.GetRSA()
at USBHelperLauncher.Program.Main(String[] args)

the solution for this:
Open C:\Users\%username%\AppData\Roaming\Microsoft\Crypto\RSA then the S-xxxxx sub folder
With a text editor, open each file within this folder. You are looking for the one containing the string "USBhelper" on the first line. Once you have found it, delete it.

Re-run usbhelperlauncher.exe again

This has been a known issue for some time now and it appears to be a Windows bug.
Fixed in 5087062 by avoiding the usage of a key container.