mirror of
https://github.com/carlospolop/PEASS-ng
synced 2025-03-25 05:46:23 +01:00
Add try-except for PrintCachedCreds
This commit is contained in:
parent
b4b8afa169
commit
b430fc80bd
@ -387,21 +387,28 @@ namespace winPEAS.Checks
|
|||||||
|
|
||||||
static void PrintCachedCreds()
|
static void PrintCachedCreds()
|
||||||
{
|
{
|
||||||
Beaprint.MainPrint("Cached Creds");
|
try
|
||||||
Beaprint.LinkPrint("https://book.hacktricks.xyz/windows-hardening/stealing-credentials/credentials-protections#cached-credentials", "If > 0, credentials will be cached in the registry and accessible by SYSTEM user");
|
|
||||||
string cachedlogonscount = RegistryHelper.GetRegValue("HKLM", @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "CACHEDLOGONSCOUNT");
|
|
||||||
if (!string.IsNullOrEmpty(cachedlogonscount))
|
|
||||||
{
|
{
|
||||||
int clc = Int16.Parse(cachedlogonscount);
|
Beaprint.MainPrint("Cached Creds");
|
||||||
if (clc > 0)
|
Beaprint.LinkPrint("https://book.hacktricks.xyz/windows-hardening/stealing-credentials/credentials-protections#cached-credentials", "If > 0, credentials will be cached in the registry and accessible by SYSTEM user");
|
||||||
|
string cachedlogonscount = RegistryHelper.GetRegValue("HKLM", @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", "CACHEDLOGONSCOUNT");
|
||||||
|
if (!string.IsNullOrEmpty(cachedlogonscount))
|
||||||
{
|
{
|
||||||
Beaprint.BadPrint(" cachedlogonscount is " + cachedlogonscount);
|
int clc = Int16.Parse(cachedlogonscount);
|
||||||
}
|
if (clc > 0)
|
||||||
else
|
{
|
||||||
{
|
Beaprint.BadPrint(" cachedlogonscount is " + cachedlogonscount);
|
||||||
Beaprint.BadPrint(" cachedlogonscount is " + cachedlogonscount);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Beaprint.BadPrint(" cachedlogonscount is " + cachedlogonscount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Beaprint.PrintException(ex.Message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PrintUserEV()
|
static void PrintUserEV()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user