Skip to content
Info disclosure Advisory Intermediate CVE-2015-8139

Network Time Protocol ntpq and ntpdc Origin Timestamp Disclosure Vulnerability

The ntpq and ntpdc query tools in ntpd disclose the expected origin timestamp for the next peer response to any client authorised to make queries. An unauthenticated off-path attacker who can spoof a peer's source address can use this value to forge responses from that peer.

Matthew Van Gundy Follow

Originally disclosed on Cisco Talos

To prevent off-path attackers from impersonating legitimate peers, clients require that the origin timestamp in a received response packet match the transmit timestamp from its last request to a given peer. Under assumption that only the recipient of the request packet will know the value of the transmit timestamp…

Matthew Van Gundy, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the ntpq and ntpdc query interfaces expose the peer origin variable without requiring authentication, even though that value is meant to be secret for anti-spoofing.

Impact

An unauthenticated off-path attacker who can spoof a peer's source address could forge responses from that peer, and this is made easier when combined with the zero-origin vulnerability (CVE-2015-8138).

What the attacker needed

Network access to ntpd query port; ability to spoof source addresses; target association uses no authentication

The fix

The vulnerability should be fixed by adding the noquery option to all restrict entries, including localhost, because notrust does not affect ntpq and ntpdc requests.

How it was found

  1. Connect to the ntpd query interface using ntpq or ntpdc.
  2. Use the peer or showpeer command to list associations and obtain an association id.
  3. Use the rv command with the org variable (ntpq) or the PEER_INFO request (ntpdc) to read the expected origin timestamp.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

NTP is the protocol computers use to keep their clocks in sync. To stop fake time servers from tricking a client, the client checks that a reply contains a secret number (the origin timestamp) that only the real server should know. This report shows that the built-in query tools will tell anyone who asks what that secret number is, so an attacker can pretend to be a real server.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Matthew Van Gundy

View all

8 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.