Nmap ntp-info NSE Script


This page contains detailed information about how to use the ntp-info NSE script. For list of all NSE scripts, visit the Nmap NSE Library.

Script Overview


Script source code: https://github.com/nmap/nmap/tree/master/scripts/ntp-info.nse
Script categories: default, discovery, safe
Target service / protocol: ntp, udp, tcp
Target network port(s): 123
List of CVEs: -

Script Description


The ntp-info.nse script 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.

Ntp-info NSE Script Arguments


The ntp-info.nse script does not have any arguments.

Ntp-info NSE Script Example Usage


Here's an example of how to use the ntp-info.nse script:

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

Ntp-info NSE Script Example Output


Here's a sample output from the ntp-info.nse script:

PORT    STATE SERVICE VERSION
123/udp open  ntp     NTP [email protected]
| ntp-info:
|   receive time stamp: Sat Dec 12 16:22:41 2009
|   version: ntpd [email protected] 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

Ntp-info NSE Script Example XML Output


Here's a sample XML output from the ntp-info.nse script produced by providing the -oX <file> Nmap option:

 <elem key="receive time stamp">2013-10-18T18:03:05</elem>
 <elem key="version">ntpd [email protected] Tue Jun  5 20:12:11 UTC 2012 (1)</elem>
 <elem key="processor">i686</elem>
 <elem key="system">Linux/3.9.3-24</elem>
 <elem key="leap">3</elem>
 <elem key="stratum">16</elem>
 <elem key="precision">-20</elem>
 <elem key="rootdelay">0.000</elem>
 <elem key="rootdisp">2502.720</elem>
 <elem key="refid">INIT</elem>
 <elem key="reftime">0x00000000.00000000</elem>
 <elem key="clock">0xd60bf655.4cc0ba51</elem>
 <elem key="peer">0</elem>
 <elem key="tc">3</elem>
 <elem key="mintc">3</elem>
 <elem key="offset">0.000</elem>
 <elem key="frequency">-46.015</elem>
 <elem key="jitter">0.001</elem>
 <elem key="wander">0.000</elem>

Author


  • Richard Sammet

References


See Also


Related NSE scripts to the ntp-info.nse script:

Visit Nmap NSE Library for more scripts.

Version


This page has been created based on Nmap version 7.92.