nmap--scriptldap-brute--script-argsldap.base='"cn=users,dc=cqure,dc=net"'-p389<target-ip>nmap--scriptldap-search-p389<target-ip>nmap--scriptldap-*-p389<target-ip>nmap--script"ldap* and not brute"-p389<target-ip>Copied!
If we cannot connect back in local machine by netcat, we need to create a rogue LDAP server.
Install the dependencies at first.
Configure your own rogue LDAP server by executing the following command.
We need to make your rogue LDAP server to be vulnerable by downgrading the supported authentication mechanism.
Create the config file named "config.ldif".
Now we can use the config file to patch the LDAP server.
We can verify that the rogue LDAP server’s configuration has been applied:
For capturing the credentials, run the following command.
sudo dpkg-reconfigure -p low slapd
# ---------------------------------------------------
# in configuration dialog
1. Omit OpenLDAP server configuration: No
2. DNS domain name: <target-domain>
3. Organization name: <target-domain>
4. Administrator password: <arbitrary-password>
5. Database backend to use: MDB
6. Do you want the database to be removed when slapd is purged?: No
7. Move old database?: Yes
Copied!