Although NTP is regarded worldwide as the time synchronization standard, it is not flawless, especially in terms of security. For example, because it is based on the connectionless UDP protocol, a hacker could send packets to an NTP server with fake sender addresses through IP-spoofing. The address of the targeted system is selected as the sender address. The server sends its response, which is considerably larger than the request sent by the attacker, back to the alleged sender – the targeted system. If the attacker now does this on a large scale by sending a large number of such manipulated requests, he can overload the target system – more on this can be found in the following article: DoS und DDoS.
As a result, several projects have focused on developing alternative, more secure solutions that can be used in place of the NTP:
- tlsdate: tlsdate was coded by Jacob Appelbaum in 2012, and published on GitHub. Instead of UDP, tlsdate uses the TCP protocol for data transport. The service encrypts the connection establishment via TLS to prevent manipulation of the data packets. In addition, tlsdate uses the TLS functions “ServerHello” and “ClientHello” to synchronize the time. However, the NTP alternative only works with TLS 1.1 and 1.2.
- Ntimed: Ntimed is focused specifically on security and performance. For this purpose, the ntpd’s program code, on which Ntimed is based, was optimized. The software package, which consists of client, server, and master files, is available for free on the official Ntimed GitHub directory.
- NTPsec: NTPsec is also a variant of the classic ntpd service. However, over 175,000 lines of code have been stored compared to the original. In addition, the development team has replaced a number of unsafe string functions such as “strcpy,” “sprint,” or “gets” with secure counterparts. These and other differences can be seen in detail on the official website of the open source project.
Apart from the software alternatives, the precision time protocol (PTP) also offers an alternative. Unlike the network time protocol, the focus of this network protocol for Linux systems is particularly high synchronization accuracy. The synchronization rate with PTP is also down to the nanosecond, which even beats the accuracy of NTP. In addition, the protocol requires minimal processor power and network bandwidth, making it ideal for simple, cost-effective devices.