TestimoX

API Reference

Class

KerberosPreAuthChecker

Namespace ADPlayground
Assembly ADPlayground

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 optionalposition: 0
Delegate retrieving accounts from a domain.
enumerateDomains System.Func{System.Collections.Generic.IEnumerable{System.String}} = null optionalposition: 1
Delegate returning domain names to query.

Methods

public Void Check() #
Returns: Void

Checks all domains returned by the domain enumerator.

public Void CheckDomain(String domainName = null) #
Returns: Void

Logs a warning for each account with DONT_REQ_PREAUTH set in the specified domain.

Parameters

domainName System.String = null optionalposition: 0
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}} requiredposition: 0
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 requiredposition: 0
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.