Categories: external, intrusive
Checks a DNS server for the predictable-port recursion vulnerability. Predictable source ports can make a DNS server vulnerable to cache poisoning attacks (see CVE-2008-1447).
The script works by querying porttest.dns-oarc.net (see https://www.dns-oarc.net/oarc/services/porttest). Be aware that any targets against which this script is run will be sent to and potentially recorded by one or more DNS servers and the porttest server. In addition your IP address will be sent along with the porttest query to the DNS server running on the target.
unittest.runSee the documentation for the unittest library.
nmap -sU -p 53 --script=dns-random-srcport <target>
PORT STATE SERVICE REASON 53/udp open domain udp-response |_dns-random-srcport: X.X.X.X is GREAT: 26 queries in 1.2 seconds from 26 ports with std dev 17905
Author: Script: Brandon Enright <firstname.lastname@example.org> porttest.dns-oarc.net: Duane Wessels <email@example.com>
License: Same as Nmap--See http://nmap.org/book/man-legal.html