Quantcast
Channel: Noise
Viewing all articles
Browse latest Browse all 41835

SANS Internet Storm Center, InfoCON: green: DNS Reconnaissance using nmap, (Sun, Nov 8th)

$
0
0

In a penetration test (PenTest) a thorough reconnaissance is critical to the overall success of the project.

DNS information for the target network is often very useful reconnaissance information. DNS information is publicly available information and enumerating it from DNS servers does not require any contact with the target and will not tip off the target company to any activities.

A tool that can be used to assist with DNS information gathering is nmap. Nmap has a parallel reverse DNS resolution engine that is normally employed as part of an nmap scan, but can also be used independently of the scan function to do DNS enumeration.

Lets pretend we were hired to do a pentest against SANS. www.sans.org is 66.35.59.202. According to ARIN whois 66.35.59.202 is part of a /24 range allocated to the SANS (66.35.59.0/24)." />

The nmap command to be used in this case is:

# nmap --dns-servers 8.8.8.8,8.8.4.4 -sL 204.51.94.0/24 66.35.59.0/24

By default nmap will use your systems configured DNS. If you are enumerating a large address space nmap can generate a high volume of queries. While this shouldnt cause an issue for your DNS servers, being paranoid, I use publicly available servers that I know can handle the volume. In this case Googles public DNS at 8.8.8.8 and 8.8.4.4 or OpenDNS. These servers are specified using the dns-servers parameter.

-sL specifies a list scan, which means nmap will only do a DNS resolution, not actually scan the target.

204.51.94.0/24 66.35.59.0/24 is the target networks we want to enumerate. In nmap if multiple address ranges are to be part of the target they are space separated.

The output is one line per IP in the range (heavily edited for space). Notice that every IP with a reverse DNS entry has that entry listed.">">">">">">Nmap done: 512 IP addresses (0 hosts up) scanned in 58.98 seconds

DNS information is publicly available information, so enumerating it is not a crime in any jurisdiction that I am aware of. If you really feel the need to go further than this, please remember that the difference between an attack and a pentest is permission.

-- Rick Wanner MSISE - rwanner at isc dot sans dot edu - http://namedeplume.blogspot.com/ - Twitter:namedeplume (Protected)

(c) SANS Internet Storm Center. https://isc.sans.edu Creative Commons Attribution-Noncommercial 3.0 United States License.

Viewing all articles
Browse latest Browse all 41835

Trending Articles