Skip to content

Commit c1c1577

Browse files
committed
Added some additional protection levels.
1 parent 3f5f60b commit c1c1577

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

NtApiDotNet/Win32/Win32Process.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ struct SECURITY_CAPABILITIES
207207
/// </summary>
208208
public enum ProtectionLevel
209209
{
210+
/// <summary>
211+
/// None
212+
/// </summary>
213+
None = -2,
210214
/// <summary>
211215
/// Safe level as parent.
212216
/// </summary>
@@ -242,7 +246,11 @@ public enum ProtectionLevel
242246
/// <summary>
243247
/// Authenticode PP
244248
/// </summary>
245-
AuthenticodePP = 7
249+
AuthenticodePP = 7,
250+
/// <summary>
251+
/// App PPL
252+
/// </summary>
253+
AppPPL = 8
246254
}
247255

248256
class ProcessAttributes
@@ -733,7 +741,7 @@ private SafeHGlobalBuffer GetAttributes(DisposableList<IDisposable> resources)
733741
attr_list.AddAttributeBuffer(ProcessAttributes.ProcThreadAttributeWin32kFilter, resources.AddResource(filter.ToBuffer()));
734742
}
735743

736-
if ((CreationFlags & CreateProcessFlags.ProtectedProcess) != 0)
744+
if ((CreationFlags & CreateProcessFlags.ProtectedProcess) != 0 && ProtectionLevel != ProtectionLevel.None)
737745
{
738746
attr_list.AddAttribute(ProcessAttributes.ProcThreadAttributeProtectionLevel, (int)ProtectionLevel);
739747
}

0 commit comments

Comments
 (0)