Ldap.Client
Class: Client
ldap.Client
Client is a client for ldap protocol in nuclei
Example
Example
Table of contents
Constructors
Properties
Methods
- AdvancedSearch
- Authenticate
- AuthenticateWithNTLMHash
- Close
- CollectMetadata
- FindADObjects
- GetADActiveUsers
- GetADAdmins
- GetADDCList
- GetADDomainSID
- GetADGroups
- GetADUserKerberoastable
- GetADUserTrustedForDelegation
- GetADUserWithNeverExpiringPasswords
- GetADUserWithPasswordNotRequired
- GetADUsers
- Search
Constructors
constructor
• new Client(ldapUrl
, realm
, config?
): Client
Parameters
Name | Type |
---|---|
ldapUrl | string |
realm | string |
config? | Config |
Returns
Defined in
ldap.ts:198
Properties
BaseDN
• Optional
BaseDN: string
Defined in
ldap.ts:194
Host
• Optional
Host: string
Defined in
ldap.ts:182
Port
• Optional
Port: number
Defined in
ldap.ts:186
Realm
• Optional
Realm: string
Defined in
ldap.ts:190
config
• Optional
config: Config
Defined in
ldap.ts:198
ldapUrl
• ldapUrl: string
Defined in
ldap.ts:198
realm
• realm: string
Defined in
ldap.ts:198
Methods
AdvancedSearch
▸ AdvancedSearch(Scope
, TypesOnly
, Filter
, Attributes
, Controls
): SearchResult
AdvancedSearch accepts all values of search request type and return Ldap Entry its up to user to handle the response
Parameters
Name | Type |
---|---|
Scope | number |
TypesOnly | boolean |
Filter | string |
Attributes | string [] |
Controls | any |
Returns
Example
Defined in
ldap.ts:430
Authenticate
▸ Authenticate(username
): void
Authenticate authenticates with the ldap server using the given username and password performs NTLMBind first and then Bind/UnauthenticatedBind if NTLMBind fails
Parameters
Name | Type |
---|---|
username | string |
Returns
void
Example
Defined in
ldap.ts:386
AuthenticateWithNTLMHash
▸ AuthenticateWithNTLMHash(username
): void
AuthenticateWithNTLMHash authenticates with the ldap server using the given username and NTLM hash
Parameters
Name | Type |
---|---|
username | string |
Returns
void
Example
Defined in
ldap.ts:400
Close
▸ Close(): void
close the ldap connection
Returns
void
Example
Defined in
ldap.ts:459
CollectMetadata
▸ CollectMetadata(): Metadata
CollectLdapMetadata collects metadata from ldap server.
Returns
Example
Defined in
ldap.ts:445
FindADObjects
▸ FindADObjects(filter
): ADObject
[]
FindADObjects finds AD objects based on a filter and returns them as a list of ADObject
Parameters
Name | Type |
---|---|
filter | string |
Returns
ADObject
[]
Example
Defined in
ldap.ts:212
GetADActiveUsers
▸ GetADActiveUsers(): ADObject
[]
GetADActiveUsers returns all AD users using FilterIsPerson and FilterAccountEnabled filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:244
GetADAdmins
▸ GetADAdmins(): ADObject
[]
GetADAdmins returns all AD admins using FilterIsPerson, FilterAccountEnabled and FilterIsAdmin filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:340
GetADDCList
▸ GetADDCList(): ADObject
[]
GetADDCList returns all AD domain controllers using FilterIsComputer, FilterAccountEnabled and FilterServerTrustAccount filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:324
GetADDomainSID
▸ GetADDomainSID(): string
GetADDomainSID returns the SID of the AD domain
Returns
string
Example
Defined in
ldap.ts:371
GetADGroups
▸ GetADGroups(): ADObject
[]
GetADGroups returns all AD groups using FilterIsGroup filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:308
GetADUserKerberoastable
▸ GetADUserKerberoastable(): ADObject
[]
GetADUserKerberoastable returns all AD users that are kerberoastable using FilterIsPerson, FilterAccountEnabled and FilterHasServicePrincipalName filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:356
GetADUserTrustedForDelegation
▸ GetADUserTrustedForDelegation(): ADObject
[]
GetADUserTrustedForDelegation returns all AD users that are trusted for delegation using FilterIsPerson and FilterTrustedForDelegation filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:276
GetADUserWithNeverExpiringPasswords
▸ GetADUserWithNeverExpiringPasswords(): ADObject
[]
GetAdUserWithNeverExpiringPasswords returns all AD users using FilterIsPerson and FilterDontExpirePassword filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:260
GetADUserWithPasswordNotRequired
▸ GetADUserWithPasswordNotRequired(): ADObject
[]
GetADUserWithPasswordNotRequired returns all AD users that do not require a password using FilterIsPerson and FilterPasswordNotRequired filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:292
GetADUsers
▸ GetADUsers(): ADObject
[]
GetADUsers returns all AD users using FilterIsPerson filter query
Returns
ADObject
[]
Example
Defined in
ldap.ts:228
Search
▸ Search(filter
, attributes
): Record
<string
, string
[]>[]
Search accepts whatever filter and returns a list of maps having provided attributes as keys and associated values mirroring the ones returned by ldap
Parameters
Name | Type |
---|---|
filter | string |
attributes | any |
Returns
Record
<string
, string
[]>[]
Example
Defined in
ldap.ts:415
Was this page helpful?