---
title: "LDAP"
date: 2024-07-10
draft: false
---

## enumerating users etc

### ldapsearch
```bash
ldapsearch -H ldap://monitored.htb -x -s base namingcontexts
```
[[HTB - Monitored]]
[[HTB(W) - Cascade]]
### windapsearch 
Can enumerate users with anonymous bind enabled. 
https://github.com/ropnop/windapsearch
```bash
┌──(root㉿kali)-[~/git/windapsearch]
└─# ./windapsearch.py -U --full --dc-ip 10.10.10.182 
```

### Impacket's GetAdUsers.py
```bash
GetADUsers.py egotistical-bank.local/ -dc-ip 10.10.10.175 -debug
```

---

### ldapdomaindump 
```bash
ldapdomaindump -u management.htb\\operator -p 'operator' 10.10.11.236 -o ldap/
```
ldapsearch will output a ton of ldap to terminal, ldapdomaindump makes it more viewable 
