# NTP (Network Time Protocol) Pentesting

## NTP (Network Time Protocol) Pentesting <a href="#ntp-network-time-protocol-pentesting" id="ntp-network-time-protocol-pentesting"></a>

NTP is a networking protocol for clock synchronization between computer systems over packet-switched. Default port is 123. It uses UDP.

### Enumeration <a href="#enumeration" id="enumeration"></a>

```shellscript
nmap -sU --script ntp-info -p 123 <target-ip>
nmap -sU --script ntp-monlist -p 123 <target-ip>
nmap -sU --script ntp* -p 123 <target-ip>
nmap -sU --script "ntp* and (discovery or vuln) and not (dos or brute)" -p 123 <target-ip>
```

#### Ntpq <a href="#ntpq" id="ntpq"></a>

```shellscript
ntpq -c readlist <target-ip>
ntpq -c readvar <target-ip>
ntpq -c peers <target-ip>
ntpq -c associations <target-ip>
ntpdc -c monlist <target-ip>
ntpdc -c listpeers <target-ip>
ntpdc -c sysinfo <target-ip>
```
