Finding domain controllers
DCs are the most critical systems in Microsoft Windows networks using AD technology. They control all the machines in the network and host essential services for the organization's operations, such as DNS resolution. During a black-box penetration test, attackers need to locate these critical systems to examine them for possible vulnerabilities.
This recipe shows how to find the DCs on the network with Nmap.
How to do it...
Open your terminal and enter the following Nmap command to find DCs on your network:
$ nmap -p389 -sV <target>
DCs will show port 389
running the Microsoft Windows AD LDAP service:
PORT STATE SERVICE VERSION 389/tcp open ldap Microsoft Windows AD LDAP (Domain:TESTDOMAIN, Site: TEST)
How it works...
Penetration testers often need to locate the DCs on networks as they are the most important systems that, if vulnerable, will give access to any machine that is...