DEV Community

StarkMan
StarkMan

Posted on

NTP: 19,066,332 Service Matches, 3,241,380 of Them in the United States

NTP: 19,066,332 Service Matches, 3,241,380 of Them in the United States

service="ntp" returns 19,066,332 matches and port=123 returns 19,068,570, a difference of about two thousand. The two figures track each other closely because NTP identification is reliable: the protocol has a fixed packet format, a scanner that reaches the socket can confirm it, and almost every host that answers on 123 is genuinely serving time. Adding a country filter, country="US" && service="ntp", returns 3,241,380, or about 17 percent of the total.

Why a stable protocol produces a stable measurement

NTP is one of the few protocols in this measurement set where the port count and the service count agree, and that agreement is a useful signal about measurement quality. Compare it with SOCKS, where the port count is six times the service count, or MariaDB, where the service label is effectively unused. When the two fields converge, the protocol is well defined and the scanner can verify it, so either field can be used and the result will hold.
The country-scoped figure is also unusually meaningful for NTP, because time infrastructure is genuinely distributed across hosting providers and network operators rather than concentrated in one deployment style. The United States share is large but not dominant, which is what a widely replicated service should look like.

Why time infrastructure is a security dependency

Time is an input to almost every control that depends on ordering or freshness.

  • Certificate validation depends on the clock. A host whose time is wrong rejects valid certificates or accepts expired ones.
  • Log correlation depends on consistent time. An investigation that cannot align timestamps across systems loses the ability to reconstruct a sequence.
  • Authentication protocols that use timestamps to limit replay depend on the clocks on both ends being close. A drifted client can fail closed, and an attacker who can shift a clock sometimes can widen a replay window.
  • Scheduled tasks, retention policies and token lifetimes all reference the clock. The exposure question is therefore not whether NTP is reachable, since reachability is the whole point of the protocol. It is whether the time source is authentic and whether the clients accept time from an unauthenticated server.

What to control

  1. Use authenticated time. Network Time Security provides cryptographic authentication for NTP and is the appropriate control where an attacker on the path is in scope.
  2. Do not serve time to the internet from an internal host. An internal system that answers on port 123 becomes a measurement target and an attack surface with no benefit to the organisation.
  3. Keep enough sources and monitor them. Two independent upstream sources plus drift alerting is more useful than a single provider, and a step change in offset is a security event, not only an availability issue.
  4. Pay attention to the client side. The population that matters most is the one running on your own systems, because a client that accepts unauthenticated time has delegated control of its clock.

Method note

The four counts in this article come from a single execution of the dorks in the references. They describe how many addresses answered each query at that moment. They do not state whether authentication was enabled on any of those endpoints, and no claim about a specific service's configuration is made here.

References

Top comments (0)