Encryption Is Futile: Delay Attacks on High-Precision Clock Synchronization 1
Total Page:16
File Type:pdf, Size:1020Kb
R. ANNESSI, J. FABINI, F.IGLESIAS, AND T. ZSEBY: ENCRYPTION IS FUTILE: DELAY ATTACKS ON HIGH-PRECISION CLOCK SYNCHRONIZATION 1 Encryption is Futile: Delay Attacks on High-Precision Clock Synchronization Robert Annessi, Joachim Fabini, Felix Iglesias, and Tanja Zseby Institute of Telecommunications TU Wien, Austria Email: fi[email protected] Abstract—Clock synchronization has become essential to mod- endanger control decisions, and adversely affect the overall ern societies since many critical infrastructures depend on a functionality of a wide range of (critical) services that depend precise notion of time. This paper analyzes security aspects on accurate time. of high-precision clock synchronization protocols, particularly their alleged protection against delay attacks when clock syn- In recent years, security of clock synchronization received chronization traffic is encrypted using standard network security increased attention as various attacks on clock synchronization protocols such as IPsec, MACsec, or TLS. We use the Precision protocols (and countermeasures) were proposed. For this Time Protocol (PTP), the most widely used protocol for high- reason, clock synchronization protocols need to be secured precision clock synchronization, to demonstrate that statistical whenever used outside of fully trusted network environments. traffic analysis can identify properties that support selective message delay attacks even for encrypted traffic. We furthermore Clock synchronization protocols are specifically susceptible to identify a fundamental conflict in secure clock synchronization delay attacks since the times when messages are sent and between the need of deterministic traffic to improve precision and received have an actual effect on the receiver’s notion of the need to obfuscate traffic in order to mitigate delay attacks. time. Delay attacks specifically can degrade the precision of A theoretical analysis of clock synchronization protocols iso- clock synchronization such that applications depending on it lates the characteristics that make these protocols vulnerable to delay attacks and argues that such attacks cannot be prevented may malfunction. Such malfunctioning is endangering critical entirely but only be mitigated. Knowledge of the underlying com- infrastructures that increasingly depend on a precise notion of munication network in terms of one-way delays and knowledge time. on physical constraints of these networks can help to compute Encrypting and signing clock synchronization messages guaranteed maximum bounds for slave clock offsets. These (with IPsec [7], MACsec [8], or TLS [9]) is commonly bounds are essential for detecting delay attacks and minimizing their impact. In the general case, however, the precision that recommended in order to provide security against a wealth of can be guaranteed in adversarial settings is orders of magnitude network-based attacks. In this paper, we show that encryption lower than required for high-precision clock synchronization in alone cannot provide sufficient security against delay attacks critical infrastructures, which, therefore, must not rely on a on high-precision clock synchronization, which highlights precise notion of time when using untrusted networks. the insecurity of numerous applications (including critical infrastructures) that depend on a precise notion of time. We present a fundamental limitation of clock synchronization over I. INTRODUCTION untrusted networks that is independent of the actual clock LOCK synchronization protocols have become an es- synchronization protocol and communication network and even C sential building block of numerous applications that holds when the communication is (supposedly) secured. rely on a precise notion of time. The deployment of clock arXiv:1811.08569v1 [cs.CR] 21 Nov 2018 synchronization for controlling system clocks of critical appli- A. Contributions cations in telecommunication, industrial automation, financial markets, avionics, or energy distribution has increased the The main contributions of this paper are the following: dependency of critical infrastructures on clocks synchronized • Precision Time Protocol (PTP) traffic detection by with increasingly high precision. Many processes, especially statistical analysis: We present a method for statistical in measurement, control, telecommunications, industrial and traffic analysis of PTP’s 2-step mode that allows to identify financial applications are not only sensitive to errors in the value PTP traffic even if it is encrypted and transmitted together domain but also to errors in the time domain. Examples for strict with other traffic. We show that some statistical properties dependencies on precise time are safety-critical applications (length, timing, and direction) are sufficient to identify in the Smart Grid, which require an accuracy of 1 to 100 µs PTP traffic and the particular PTP message types with very (10 µs in case of current differential line protection with high high probability — even when the traffic is encrypted. fault current sensitivity [1, 2]) or MiFID II in the financial • Selective message delay attacks on encrypted traffic: sector, requiring an accuracy of up to 100 µs [3, 4, 5]. Cellular Using the properties identified in the traffic analysis, we networks also have strong requirements for synchronized clocks design and implement selective message delay attacks on (≤ 1 µs) [6]. Errors in clock synchronization can lead to wrong encrypted traffic. This shows that delay attacks can be timings and may therefore originate faulty sensor reports, conducted on PTP even when it is (supposedly) secured R. ANNESSI, J. FABINI, F.IGLESIAS, AND T. ZSEBY: ENCRYPTION IS FUTILE: DELAY ATTACKS ON HIGH-PRECISION CLOCK SYNCHRONIZATION 2 with state-of-the-art network encryption schemes such as to eliminate software uncertainty. PTP assumes trustworthy IPsec, MACsec, or TLS. and somewhat deterministic networks with low latency that • Countermeasures: We discuss countermeasures against are entirely under control of the operator. It can be run over a traffic analysis (length padding, timing randomization), Local Area Network (LAN) via Ethernet or over a Wide Area selective message delay attacks (strict replay protection), Network (WAN) via UDP. and asymmetric link delay attacks (One-Way Delay New applications that require increasingly precise clock (OWD) limits). synchronization lead to PTP being deployed also in critical • General clock synchronization limitations in adversar- infrastructures and other areas that PTP has not been designed ial settings: We analyze the theoretical foundations that for specifically. Base stations in mobile networks that depend make clock synchronization protocols susceptible to delay on highly accurate time are a prominent example. Originally, attacks and identify the main vulnerability to be the delay manufacturers used GPS PPS to synchronize clocks. Nowadays compensation mechanism, which is necessary to achieve manufacturers also offer PTP as an alternative that is widely high precision. This leads us to asymmetric link delay used. Given the fact that base stations typically use WANs attacks that cannot be prevented by encryption. While to connect to their core network, employing PTP contradicts additional knowledge of the underlying communication the original assumptions of being used within LANs. In this network can bound the maximum impact of delay attacks, way, new attack vectors are created such as the delay attacks we argue that clock synchronization protocols cannot be presented in this paper. More examples include but are not designed in a way that prevents asymmetric link delay limited to areas such as Smart Grids or financial applications. attacks entirely. The resulting bounds, which we found based on our analysis, A. The Two Phases in Clock Synchronization do not satisfy requirements with respect to high-precision Clock synchronization algorithms aim at synchronizing a clock synchronization. Therefore, high precision can only be slave clock to a master clock by exchanging timestamped guaranteed on trusted networks. messages over packet-switched networks. In this paper we assume that the master’s clock is accurate and reliable. Details on how the master implements and accesses such a reliable II. BACKGROUND clock are out of scope of this paper. Network-based clock Each clock has a natural drift caused by the non-ideality of synchronization protocols depend on two distinct phases that physical oscillators such an oscillator’s frequency affected by will be discussed below: (a) clock offset measurement and (b) temperature. The aim of clock synchronization is to keep clocks delay measurement. within acceptable boundaries. Currently, there are two widely a) Clock Offset Measurement Phase: The goal of the used technologies for high-precision clock synchronization: clock offset measurement phase is to calculate the relative (1) the satellite-based Global Positioning System (GPS) for difference between the slave and master clocks. Clock offset Pulses per Second (PPS) synchronization to global Universal can either be measured in a single message (1-step mode) Time Coordinated (UTC), and PTP targeted for network-based supported by both NTP and PTP or in two messages (2-step clock synchronization to a local clock. The main disadvantages mode) supported by PTP. In any case, the master sends a SYNC of GPS PPS are that it is operated by a single entity (the message to the slaves, and the slave records the transmitting US Air Force) and that it