There is a bug in the function GetTokenIntegrityLevel function which will never returns a SYSTEM IL for a token.
While this should be never problematic due to the fact logon with explicit credentials can returns only Medium or High IL tokens, it's better to fix the bug for avoiding any unwanted behaviors in the future.
Bug lies here:
|
else if (dwIntegrityLevel >= SECURITY_MANDATORY_HIGH_RID) |
|
{ |
|
// High Integrity |
|
return IntegrityLevel.High; |
|
} |
So when a SYSTEM IL level is found, the High IL condition satisfied and the value is returned from the function.
There is a bug in the function GetTokenIntegrityLevel function which will never returns a SYSTEM IL for a token.
While this should be never problematic due to the fact logon with explicit credentials can returns only Medium or High IL tokens, it's better to fix the bug for avoiding any unwanted behaviors in the future.
Bug lies here:
RunasCs/RunasCs.cs
Lines 1624 to 1628 in a1e47b5
So when a SYSTEM IL level is found, the High IL condition satisfied and the value is returned from the function.