Update Putty.cs
Updated Putty's stored session enumeration functionality, now also showing the \\Software\\SimonTatham\\PuTTY\\Sessions registry keys itself
This commit is contained in:
parent
5356d3f2ec
commit
fad2771dfb
@ -129,6 +129,24 @@ namespace winPEAS.KnownFileCreds
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
string[] subKeys = RegistryHelper.GetRegSubkeys("HKCU", "Software\\SimonTatham\\PuTTY\\Sessions\\");
|
string[] subKeys = RegistryHelper.GetRegSubkeys("HKCU", "Software\\SimonTatham\\PuTTY\\Sessions\\");
|
||||||
|
RegistryKey selfKey = Registry.CurrentUser.OpenSubKey(@"Software\\SimonTatham\\PuTTY\\Sessions"); // extract own Sessions registry keys
|
||||||
|
|
||||||
|
if (selfKey != null)
|
||||||
|
{
|
||||||
|
string[] subKeyNames = selfKey.GetValueNames();
|
||||||
|
foreach (string name in subKeyNames)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> putty_sess_key = new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "RegKey Name", name },
|
||||||
|
{ "RegKey Value", (string)selfKey.GetValue(name) },
|
||||||
|
};
|
||||||
|
|
||||||
|
results.Add(putty_sess_key);
|
||||||
|
}
|
||||||
|
selfKey.Close();
|
||||||
|
}
|
||||||
|
|
||||||
foreach (string sessionName in subKeys)
|
foreach (string sessionName in subKeys)
|
||||||
{
|
{
|
||||||
Dictionary<string, string> putty_sess = new Dictionary<string, string>()
|
Dictionary<string, string> putty_sess = new Dictionary<string, string>()
|
||||||
|
Loading…
Reference in New Issue
Block a user