Kim
Kim

Reputation: 1081

Get RSA custom container key list using aspnet_regiis

Is there anyway to get custom key container list that I already made?

Example: I make Machine key "MyKeys1", "MyKeys2", "MyKeys3" ect. In case I forgot any key that I have made, can I retrieve it using aspnet_regiis?

flag

I already tried this:

  1. aspnet_regiis -pc "MyKeys" -exp

  2. aspnet_regiis -pc "MachineKeys2" -exp

Can I retrieve those key container using aspnet_regiis? because in Crypto/RSA/MachineKeys, the files name just only random number. In case I forgot, what keys that I have ever made. Is it possible to retrieve it using aspnet_regiis?

Upvotes: 5

Views: 10515

Answers (2)

Maaark
Maaark

Reputation: 337

Building on ShaneC's mention of Derek W's short c# program, you can save some time by just opening the files within %ProgramData%\Microsoft\Crypto\RSA\MachineKeys in a text editor. The key container name will be the only readable part.

Upvotes: 5

Shane Callanan
Shane Callanan

Reputation: 2305

I'm looking for a similar solution, I came across this blog post recommending KeyPal:

It’s a simple open source app called KeyPal. Download it, open up a command prompt and run it. At start up it gives you a list of user keys, a list of commands and a blank prompt (with no “>” or anything to indicate it’s a prompt). To list machine level key containers just type “LM”, press Enter and there they are!

Derek W's answer on security stackexchange also recommends KeyPal, his answer includes a short C# program that lists all key container names that currently exist on the server

Upvotes: 1

Related Questions