API Reference
Class
KerberosPreAuthChecker
Finds accounts with the DONT_REQ_PREAUTH userAccountControl flag set.
Inheritance
- Object
- KerberosPreAuthChecker
Remarks
See usage examples in the unit tests for typical scenarios.
Constructors
public KerberosPreAuthChecker(Func<String, IEnumerable<KerberosPreAuthAccountInfo>> fetchAccounts = null, Func<IEnumerable<String>> enumerateDomains = null) #Initializes a new instance of the KerberosPreAuthChecker class.
Parameters
- fetchAccounts System.Func{System.String,System.Collections.Generic.IEnumerable{ADPlayground.KerberosPreAuthAccountInfo}} = null
- Delegate retrieving accounts from a domain.
- enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null
- Delegate returning domain names to query.
Methods
public Void CheckDomain(String domainName = null) #Returns:
VoidLogs a warning for each account with DONT_REQ_PREAUTH set in the specified domain.
Parameters
- domainName System.String = null
- Target domain name or null for the current domain.
public static IEnumerable<String> FilterAccounts(IEnumerable<ValueTuple<String, Int32>> accounts) #Returns:
IEnumerable<String>Filters a provided collection of account data to those with DONT_REQ_PREAUTH set.
Parameters
- accounts System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.Int32}}
- Tuple containing account name and userAccountControl value.
Returns
Collection of SAM account names.
GetAccounts 2 overloads
public IEnumerable<KerberosPreAuthAccountInfo> GetAccounts(String domainName) #Returns:
IEnumerable<KerberosPreAuthAccountInfo>Retrieves accounts with DONT_REQ_PREAUTH set in the specified domain.
Parameters
- domainName System.String
- Target domain name.
Returns
Collection of KerberosPreAuthAccountInfo objects.
public IEnumerable<KerberosPreAuthAccountInfo> GetAccounts() #Returns:
IEnumerable<KerberosPreAuthAccountInfo>Enumerates all domains in the forest and returns accounts with DONT_REQ_PREAUTH set.
Returns
Collection of KerberosPreAuthAccountInfo objects.