During reconnaissance you have confirmed that anonymous LDAP binds are allowed on 10.10.10.5, a domain controller. Before enumerating users, you want to discover the directory's base DN by querying the RootDSE entry for its namingContexts attribute using ldapsearch from your Kali box. Which command will return that information without requiring credentials?
ldapsearch -x -H ldap://10.10.10.5 -b "" -s base namingContexts
ldapsearch -x -H ldap://10.10.10.5 -b "DC=corp,DC=local" -s base namingContexts
ldapsearch -x -H ldap://10.10.10.5 -b "root" -s base namingContexts
ldapsearch -x -H ldap://10.10.10.5 -b "CN=Users,DC=corp,DC=local" -s sub namingContexts
The RootDSE entry is reached by binding to the NULL (empty) distinguished name and using a search scope of "base" so that only the RootDSE object itself is returned. The OpenLDAP client therefore specifies an empty base DN (""), the simple-bind switch (-x), and the base scope (-s base). Once executed, the server responds with the namingContexts values that reveal the correct base DN for later user enumeration. Using a child container such as CN=Users or a full domain DN would skip the RootDSE entry, while a sub-tree search would be unnecessary and slower. Supplying an arbitrary string like "root" as the base DN would simply fail because that DN does not exist.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the RootDSE in LDAP?
Open an interactive chat with Bash
What is the purpose of the namingContexts attribute in LDAP?
Open an interactive chat with Bash
How does ldapsearch work and why is the '-x' flag used?
Open an interactive chat with Bash
What is LDAP and what does it do?
Open an interactive chat with Bash
What is the RootDSE entry in LDAP?
Open an interactive chat with Bash
Why is the `-b ""` parameter used in the correct ldapsearch command?
Open an interactive chat with Bash
Certified Ethical Hacker (CEH)
Reconnaissance Techniques
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .