antonioCoco/RunasCs

IsLimitedUserLogon function improvements

Opened this issue · 0 comments

The IsLimitedUserLogon function is a useful feature that suggests if other more powerful logon are available to the user.
The current logic first check some token properties like TokenElevation and TokenElevationType and then checks mismatch in token IL.

This logic should be inverted and the check for the token IL mismatch should be called before than the below if:

RunasCs/RunasCs.cs

Lines 434 to 438 in a1e47b5

if (isTokenUACFiltered)
{
logonTypeNotFiltered = LOGON32_LOGON_NETWORK_CLEARTEXT;
isLimitedUserLogon = true;
}