Vulnerability6 min read

NTP monlist: how time servers amplified DDoS attacks

From December 2013, attackers abused a diagnostic command in NTP time servers to multiply their attack traffic. How it worked, and how the internet cleaned up.

Illustration: a ring showing the CVSS score 5.0, with the title NTP monlist

What to do now

  1. Update ntpd to the latest 4.2.8 release: since development version 4.2.7p26, ntpd no longer answers monlist requests.
  2. If you cannot update, add noquery to the restrict default lines for IPv4 and IPv6 in ntp.conf to block all status queries. Otherwise, at least add disable monitor to switch off monlist.
  3. Test your public time servers from outside your network, for example with the Nmap script ntp-monlist: a safe server returns an error or no reply.
  4. Check routers, firewalls and other devices with a built-in time server too. Block NTP requests from the internet where no outside client needs them.
  5. If you run a network, drop packets with forged sender addresses at its edge, as described in BCP 38. That way, nobody in your network can launch such attacks.
Year
2014
CVSS 2.0 score
5.0 medium
different addresses of vulnerable NTP servers in 15 weeks of scans
2,166,097
addresses hit by attacks within 15 weeks, in 184 countries
437,000
Why it is on the list
  • Reach met

    Weekly scans of the whole internet found 1,405,186 vulnerable NTP servers on January 10, 2014, and 2,166,097 different addresses over 15 weeks (Taming the 800 Pound Gorilla, 2014).

  • Mass exploitation met

    Within 15 weeks, attacks hit 437,000 addresses in 11,558 networks and 184 countries with 2.92 trillion packets (Taming the 800 Pound Gorilla, 2014).

  • Damage not met

    No total of the damage exists, and the sources document no outage of critical services. At a regional network in Michigan, the attacks added more than 2 % to its traffic and raised the fees it paid for its own internet connection (Taming the 800 Pound Gorilla, 2014).

  • Extraordinary response met

    Researchers, CERTs and network operators joined the cleanup across countries. Weekly internet-wide scans and notifications, through CERTs and directly to operators, accompanied a 92 % drop in vulnerable servers within about three months. Every region of the world saw a decline of 63–97 % (Taming the 800 Pound Gorilla, 2014). US-CERT and CERT/CC issued warnings (US-CERT, CERT/CC).

How a vulnerability gets on this list

The record
Affectedntpd, the time server software of the NTP project, and devices that use it
CVECVE-2013-5211
CVSS vectorAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness (CWE)CWE-20
Fixed inntpd 4.2.7p26, a development version (April 24, 2010); the first stable version without monlist is ntp 4.2.8 (December 19, 2014)
Found byNot named in the NTP project's notice; the flaw drew wide attention only through the attacks of December 2013
Timeline
  1. 1Fix available
  2. 2Amid a wave of DDoS attacks, the flaw receives the number CVE-2013-5211+1346 days
  3. 3The first weekly scan of the internet finds 1,405,186 vulnerable servers+1357 days
  4. 4US-CERT warns of NTP amplification attacks+1360 days
  5. 5An attack of almost 400 Gbps from 4,529 NTP servers hits a target in Cloudflare's network+1388 days
  6. 6NTP traffic peaks at about 1 % of all internet traffic+1389 days
  7. 7106,445 vulnerable servers are left, 92 % fewer than in January+1455 days
  8. 8ntp 4.2.8 is the first stable version without monlist+1700 days

In December 2013, attackers began to misuse ordinary time servers for distributed denial-of-service (DDoS) attacks. These knock a target offline by flooding it with more traffic than its connection can carry. The attackers used monlist, a diagnostic command in ntpd, the server software of the NTP project. NTP, the Network Time Protocol, keeps the clocks of computers and network devices in sync. A measurement study found vulnerable servers at 2.2 million internet addresses and counted 437,000 attacked addresses in 15 weeks.

How it worked

Time servers answer short requests from devices that want to set their clocks. For diagnostics, ntpd also kept a list of the clients that had contacted it most recently. The monlist command returned this list, up to 600 entries, to anyone who asked. According to US-CERT, the US government’s computer emergency team, older devices with NTP had the command switched on by default.

NTP uses UDP, a way of sending single data packets without first setting up a connection. So the server cannot check who really sent a request. An attacker writes the victim’s address into the request as the sender, and the server sends its answer there. A monlist answer can be far larger than the request. This amplifies the attack: the attacker sends a little data, and the victim receives a lot.

US-CERT gives NTP an amplification factor of 556.9: the answer carries 556.9 times the data of the request. It counts only the content of the packets. For DNS, the internet’s address system, it gives 28 to 54. The study described below counted whole packets. It found that a typical vulnerable server returned about 4 times the data of the request, and a quarter at least 15 times. A few “mega amplifiers” answered a single packet with gigabytes. The largest sent more than 136 gigabytes in one day, probably because of a network loop.

Because the floods came from thousands of legitimate servers, they were hard to block. The servers were not broken into; they were used as tools against others.

  1. Attackersends a tiny monlist request with the victim's address as sender
  2. NTP serveranswers with its list of up to 600 recent clients
  3. Replymany packets, far larger than the request
  4. Victimis flooded with traffic it never asked for
The attacker sends the same request to many servers at once, so their replies add up at the victim.

Reach and damage

The most detailed measurements come from “Taming the 800 Pound Gorilla”, a 2014 study. Researchers at the University of Michigan, Merit Network, Colorado State University and the University of Illinois wrote it. It combines traffic data from the security firm Arbor Networks with weekly scans of the internet and data from two regional networks. Arbor’s data covers a third to a half of all internet traffic.

In November 2013, NTP made up about 0.001 % of the traffic in Arbor’s data. By mid-February 2014 it had reached about 1 %, more than DNS, and it peaked on February 11. In February and March, most attacks of more than 2 Gbps (gigabits per second) used NTP. Three months earlier, only 0.07 % of all attacks had involved it.

The Open NTP Project began to scan the whole internet every week on January 10, 2014. Its first scan found 1,405,186 servers that answered monlist requests. Over 15 weeks, the scans saw 2,166,097 different addresses. One reason: 13–35 % of the servers were end-user computers, such as home PCs, whose addresses can change.

NTP servers that answered monlist requests
January 10, 20141,405,186
January 24, 2014677,112
February 14, 2014235,370
March 21, 2014110,565
April 18, 2014106,445

Selected weekly scans of the whole internet by the Open NTP Project. Source: Taming the 800 Pound Gorilla (2014).

The monlist lists also record the forged sender addresses, that is, the victims. In 15 weeks, the researchers found 437,000 attacked addresses in 184 countries, hit with 2.92 trillion packets, about 1.2 petabytes of data. Because a list typically covered only the last two days before a scan, they estimate the real numbers at about 3.8 times higher. About half of the victims were end-user computers. Many attacks targeted the network ports, a kind of numbered door, that online games use. The authors conclude that a large share of the attacks was aimed at gamers.

On February 10, 2014, an attack on a target in Cloudflare’s network set a record for NTP at the time. Cloudflare protects websites against such attacks. It reported that the attack peaked just under 400 Gbps and came from 4,529 NTP servers in 1,298 networks.

No total of the damage exists. The sources document no outages of critical services such as hospitals or power supply. Networks that carried the floods paid too. At Merit, a regional network in Michigan, the attacks added more than 2 % to its total traffic. This raised the fees Merit paid for its own internet connection.

The fix and the response

The NTP developers had removed monlist from ntpd long before, in development version 4.2.7p26 of April 24, 2010. They replaced it with a newer command, mrulist. But the stable series, version 4.2.6, kept monlist. The first stable version without it, ntp 4.2.8, appeared only on December 19, 2014. On December 30, 2013, a request on a public security mailing list pointed to “a recent rash of DDoS involving the monlist functionality”. The flaw received the number CVE-2013-5211 the same day.

In January 2014, CERT/CC at Carnegie Mellon University published a vulnerability note, and US-CERT an alert. Their advice: update ntpd, or switch off the queries with one setting in the configuration file. ICS-CERT, the US team for industrial control systems, warned as well.

The vulnerable servers disappeared quickly. Two weeks after the first scan, fewer than half were left. By March 21, about 110,000 remained. After that, the number hardly moved: on April 18, it stood at 106,445, 92 % fewer than in January. The study praises the “community response”. The Open NTP Project published its counts every week. Researchers notified operators through CERTs (computer emergency response teams) and directly. Many networks also felt the attacks in their own traffic. The authors consider it likely that the notifications helped, but say that cause and effect cannot be proven.

Decline in vulnerable NTP servers by continent
North America97 %
Oceania93 %
Europe89 %
Asia84 %
Africa77 %
South America63 %

Decline in the number of servers that answered monlist requests, from January to April 18, 2014. Source: Taming the 800 Pound Gorilla (2014).

The cleanup was far faster than for open DNS resolvers. These servers look up addresses for anyone and can be abused in the same way. But the cleanup was not complete. About 4 million NTP servers still answered another query, version. This query can also be abused, though rarely with such large replies. That group shrank by only 19 %.

The National Vulnerability Database rates the flaw 5.0 out of 10 on the older CVSS version 2, “medium”. It gives no score on version 3. The score is not higher because an attacker can neither read nor change data on the server. The flaw only affects availability, mostly that of others.