Script ntp-info

Script types: portrule
Categories: default, discovery, safe
Download: https://svn.nmap.org/nmap/scripts/ntp-info.nse

Script Summary

Gets the time and configuration variables from an NTP server. We send two requests: a time request and a "read variables" (opcode 2) control message. Without verbosity, the script shows the time and the value of the version, processor, system, refid, and stratum variables. With verbosity, all variables are shown.

See RFC 1035 and the Network Time Protocol Version 4 Reference and Implementation Guide (http://www.eecis.udel.edu/~mills/database/reports/ntp4/ntp4.pdf) for documentation of the protocol.

Example Usage

nmap -sU -p 123 --script ntp-info <target>

Script Output

PORT    STATE SERVICE VERSION
123/udp open  ntp     NTP v4.2.4p4@1.1520-o
| ntp-info:
|   receive time stamp: Sat Dec 12 16:22:41 2009
|   version: ntpd 4.2.4p4@1.1520-o Wed May 13 21:06:31 UTC 2009 (1)
|   processor: x86_64
|   system: Linux/2.6.24-24-server
|   stratum: 2
|_  refid: 195.145.119.188

Requires


Author:

  • Richard Sammet

License: Same as Nmap--See https://nmap.org/book/man-legal.html