mirror of
https://github.com/carlospolop/PEASS-ng
synced 2025-03-28 18:33:05 +01:00
- added ISSUE_TEMPLATE.md
- added null reference checks
This commit is contained in:
parent
24884a1d7e
commit
dbfd0be62e
.github
winPEAS/winPEASexe/winPEAS
Checks
Helpers
Info/SystemInfo/SysMon
Wifi/NativeWifiApi
23
.github/ISSUE_TEMPLATE.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#### Issue description
|
||||||
|
|
||||||
|
|
||||||
|
#### Steps to reproduce the issue
|
||||||
|
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
|
||||||
|
#### clean / obfuscated winpeas?
|
||||||
|
|
||||||
|
|
||||||
|
#### AV / Threat protection used
|
||||||
|
|
||||||
|
|
||||||
|
#### Windows version / build
|
||||||
|
|
||||||
|
|
||||||
|
#### Failing Winpeas check
|
||||||
|
|
||||||
|
|
||||||
|
#### Additional details / screenshot
|
||||||
|
|
@ -139,7 +139,7 @@ namespace winPEAS.Checks
|
|||||||
|
|
||||||
// get our properties
|
// get our properties
|
||||||
// ref - https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdatehistoryentry
|
// ref - https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdatehistoryentry
|
||||||
var title = searcherObj.GetType().InvokeMember("Title", BindingFlags.GetProperty, null, item, new object[] { }).ToString();
|
var title = searcherObj.GetType().InvokeMember("Title", BindingFlags.GetProperty, null, item, new object[] { })?.ToString() ?? string.Empty;
|
||||||
var date = searcherObj.GetType().InvokeMember("Date", BindingFlags.GetProperty, null, item, new object[] { });
|
var date = searcherObj.GetType().InvokeMember("Date", BindingFlags.GetProperty, null, item, new object[] { });
|
||||||
var description = searcherObj.GetType().InvokeMember("Description", BindingFlags.GetProperty, null, item, new object[] { });
|
var description = searcherObj.GetType().InvokeMember("Description", BindingFlags.GetProperty, null, item, new object[] { });
|
||||||
var clientApplicationID = searcherObj.GetType().InvokeMember("ClientApplicationID", BindingFlags.GetProperty, null, item, new object[] { });
|
var clientApplicationID = searcherObj.GetType().InvokeMember("ClientApplicationID", BindingFlags.GetProperty, null, item, new object[] { });
|
||||||
|
@ -80,12 +80,15 @@ namespace winPEAS.Helpers.AppLocker
|
|||||||
|
|
||||||
Beaprint.NoColorPrint($" AppLockerPolicy version: {appLockerSettings.Version}\n listing rules:\n\n");
|
Beaprint.NoColorPrint($" AppLockerPolicy version: {appLockerSettings.Version}\n listing rules:\n\n");
|
||||||
|
|
||||||
foreach (var rule in appLockerSettings.RuleCollection)
|
if (appLockerSettings.RuleCollection != null)
|
||||||
{
|
{
|
||||||
PrintFileHashRules(rule);
|
foreach (var rule in appLockerSettings.RuleCollection)
|
||||||
PrintFilePathRules(rule);
|
{
|
||||||
PrintFilePublisherRules(rule);
|
PrintFileHashRules(rule);
|
||||||
}
|
PrintFilePathRules(rule);
|
||||||
|
PrintFilePublisherRules(rule);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (COMException)
|
catch (COMException)
|
||||||
{
|
{
|
||||||
|
@ -143,6 +143,12 @@ namespace winPEAS.Helpers.Registry
|
|||||||
{
|
{
|
||||||
myKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);
|
myKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (myKey == null)
|
||||||
|
{
|
||||||
|
return new string[0];
|
||||||
|
}
|
||||||
|
|
||||||
String[] subkeyNames = myKey.GetSubKeyNames();
|
String[] subkeyNames = myKey.GetSubKeyNames();
|
||||||
return myKey.GetSubKeyNames();
|
return myKey.GetSubKeyNames();
|
||||||
}
|
}
|
||||||
|
@ -92,6 +92,12 @@ namespace winPEAS.Info.SystemInfo.SysMon
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var key = registryKey.OpenSubKey(paramsKey);
|
var key = registryKey.OpenSubKey(paramsKey);
|
||||||
|
|
||||||
|
if (key == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
byte[] result = (byte[])key.GetValue(val);
|
byte[] result = (byte[])key.GetValue(val);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -90,7 +90,10 @@ namespace winPEAS.Wifi.NativeWifiApi
|
|||||||
|
|
||||||
~WlanClient()
|
~WlanClient()
|
||||||
{
|
{
|
||||||
WlanApi.WlanCloseHandle(clientHandle, IntPtr.Zero);
|
if (clientHandle != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
WlanApi.WlanCloseHandle(clientHandle, IntPtr.Zero);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user