PEASS-ng/winPEAS/winPEASexe/winPEAS/Native/Structs/LUID.cs
makikvues fb17429f67 - refactoring / cleanup - moved all native external methods to /Native folder/classes
- added new event checks - Explicit Logon Events, Logon Events, PowerShell Events, Process Creation Events
- added PrintSecurityPackagesCredentials check
- added Windows Defender enumeration
2021-02-03 21:54:20 +01:00

20 lines
504 B
C#

using System.Runtime.InteropServices;
namespace winPEAS.Native.Structs
{
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LUID
{
public uint LowPart;
public int HighPart;
public static LUID FromName(string name, string systemName = null)
{
LUID val;
if (!Advapi32.LookupPrivilegeValue(systemName, name, out val))
throw new System.ComponentModel.Win32Exception();
return val;
}
}
}