private static bool IsRestrictedToken(NtProcess process) { NtToken token = null; try { token = GetToken(process); if (token == null) { return(false); } return(token.Restricted || token.AppContainer || token.IntegrityLevel < TokenIntegrityLevel.Medium); } catch (NtException) { return(false); } finally { if (token != null) { token.Close(); } } }