Skip to content
Crypto Advisory Advanced CVE-2015-8140

Network Time Protocol ntpq Control Protocol Replay Vulnerability

The ntpq control protocol includes a sequence number inside the signed part of authenticated messages, but this does not stop replay attacks because unauthenticated commands can advance the sequence and the server does not enforce which sequence value is used. An attacker who has recorded an authenticated configuration command could replay it later to reset a server address, for example back to a malicious time source.

Matthew Street Follow

Originally disclosed on Cisco Talos

The ntpq protocol is vulnerable to replay attacks. The sequence number being included under the signature fails to prevent replay attacks for two reasons.

Matthew Street, 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 signed sequence number is not bound to a server-generated session value and the server does not reject values that are not greater than the last one seen, so a captured signed message stays valid indefinitely.

Impact

An attacker who previously observed an authenticated ntpq configuration command could replay it to point the server back at an old or malicious time source, though the attack requires being on the adjacent network and is rated as high complexity.

What the attacker needed

Attacker on the adjacent network; previously captured a signed ntpq command; server address later changed

The fix

The client should request a large random nonce from the server at session start, include an incrementing sequence derived from it in signed messages, and the server should reject values outside a small window; alternatively a secure channel such as TLS should be used.

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 accurate, and ntpq is a management tool for telling an NTP server how to behave. The messages that change settings are signed, but the design lets an old signed message be sent again later and still be accepted. That means someone who captured a legitimate command once can make the server apply it again at a time of their choosing.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.