Skip to content

Commit

Permalink
Get Core Isolation value and limited memory bcd. Added better logging…
Browse files Browse the repository at this point in the history
… to WMI ram info
  • Loading branch information
JimmahDean committed May 24, 2024
1 parent 367323e commit 6ddd8dc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions client/Monolith.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ public class MonolithSystem
public int RecentMinidumps;
public string DumpZip;
public bool? StaticCoreCount;
public bool? LimitedMemory;
public List<IRegistryValue> ChoiceRegistryValues;
public bool? UsernameSpecialCharacters;
public int? OneDriveCommercialPathLength;
Expand Down Expand Up @@ -419,6 +420,7 @@ public MonolithSystem()
RecentMinidumps = Cache.RecentMinidumps;
DumpZip = Cache.DumpZip;
StaticCoreCount = Cache.StaticCoreCount;
LimitedMemory = Cache.LimitedMemory;
ChoiceRegistryValues = Cache.ChoiceRegistryValues;
UsernameSpecialCharacters = Cache.UsernameSpecialCharacters;
OneDriveCommercialPathLength = Cache.OneDriveCommercialPathLength;
Expand Down
1 change: 1 addition & 0 deletions client/data/Cache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public static partial class Cache
public static int RecentMinidumps { get; private set; }
public static string DumpZip { get; private set; }
public static bool? StaticCoreCount { get; private set; }
public static bool? LimitedMemory { get; private set; }
public static List<Monitor> MonitorInfo { get; private set; }
public static List<EdidData> EdidData { get; private set; }
public static bool? UsernameSpecialCharacters { get; private set; }
Expand Down
2 changes: 2 additions & 0 deletions client/data/Methods/Hardware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ private static async Task GetWmiMemoryInfo()
SMBiosRamInfo = false;
List<RamStick> RamInfo = new();
var WmiRamData = GetWmi("Win32_PhysicalMemory");
LogEvent($"Gathering memory information from WMI. {WmiRamData.Count} sticks detected.", Region.Hardware);
foreach (var wmiStick in WmiRamData)
{
RamStick stick = new();
Expand Down Expand Up @@ -206,6 +207,7 @@ private static async Task GetWmiMemoryInfo()
RamInfo.Add(stick);
}
Ram = RamInfo;
LogEvent($"Completed gathering memory information from WMI.", Region.Hardware);
}

//MONITORS
Expand Down
4 changes: 3 additions & 1 deletion client/data/Methods/System.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ private static async Task GetStaticCoreCount()
StaticCoreCount = null;
}
StaticCoreCount = output.Contains("numproc");
LimitedMemory = output.Contains("allowedinmemorysettings");
}
}

Expand Down Expand Up @@ -583,12 +584,13 @@ private static async Task RegistryCheck()
var hwNotificationCache = new RegistryValue<int?>(Registry.CurrentUser, @"Control Panel\UnsupportedHardwareNotificationCache", "SV2");
hwNotificationCache.Name = "UnsupportedHardwareNotificationCache\\SV2";
var prioritySeparation = new RegistryValue<int?>(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\PriorityControl", "Win32PrioritySeparation");
var coreIsolation = new RegistryValue<int?>(Registry.LocalMachine, @"SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios", "HypervisorEnforcedCodeIntegrity");

ChoiceRegistryValues = new List<IRegistryValue>()
{
tdrLevel, nbFLimit, throttlingIndex, superFetch, disableAv, disableAs, puaProtection, passiveMode, disableAvpolicy, disableAspolicy,
puaProtectionpolicy, passiveModepolicy, drii, disableWer,unsupportedTpmOrCpu, hwSchMode, WUServer, noAutoUpdate, fastBoot, auditBoot,
previewBuilds, bypassCpuCheck, bypassStorageCheck, bypassRamCheck, bypassTpmCheck, bypassSecureBootCheck, hwNotificationCache, prioritySeparation
previewBuilds, bypassCpuCheck, bypassStorageCheck, bypassRamCheck, bypassTpmCheck, bypassSecureBootCheck, hwNotificationCache, prioritySeparation, coreIsolation
};
}
catch (Exception ex)
Expand Down

0 comments on commit 6ddd8dc

Please sign in to comment.