ADSI, ADSI accelerators, LDAP, and the System.DirectoryServices namespace
Before we dive deeper into enumeration and AD attacks, let’s first look into some of the most important tools that you can use to access and manipulate directory services such as AD.
One of those tools is called Active Directory Service Interfaces (ADSI), which is a COM-based (Component Object Model) interface for accessing directory services such as AD.
When working with ADSI, developers can use Lightweight Directory Access Protocol (LDAP) filters to define search criteria for directory queries. LDAP filters allow developers to construct complex queries that can return specific sets of directory data based on a variety of criteria, including attribute values, object classes, and more.
To get all user accounts, the LDAP filter query would be (sAMAccountType=805306368).
If you combine that with the useraccountcontrol attribute to find all regular accounts that have the “Password...