> For the complete documentation index, see [llms.txt](https://lanzt.gitbook.io/cheatsheet-pentest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lanzt.gitbook.io/cheatsheet-pentest/port-enumeration/389-636-3268-ldap-s.md).

# 389, 636, 3268 - LDAP(S)

## ldapsearch

```bash
ldapsearch -LLL -x -H ldap://10.10.10.10 -b '' -s base '(objectclass=*)' | grep naming
ldapsearch -x -H ldap://10.10.10.10 -b 'lanz.com'
```

## ldapdomaindump

```bash
python3 ldapdomaindump.py -u 'freed-om-corp.com\carlos.villamizar' -p 'NastAsya4475' 10.10.10.10
```

It will create a lot of `.html` files, we serve them to obtain:

<figure><img src="/files/7AttYarHm58YjY4zgM3f" alt=""><figcaption></figcaption></figure>
