---
type: Article
title: "Timeless Timing Attacks: Exploiting Concurrency to Leak Secrets over Remote Connections"
resource: "https://www.usenix.org/conference/usenixsecurity20/presentation/van-goethem"
tags: [article, webseclist-reference, en, usenix-org]
generated:
  by: webseclist-refs/1
  at: "2026-08-19T16:42:15+00:00"
status: stable
stale_after: 2027-08-19
sources:
  - id: original
    resource: "https://www.usenix.org/conference/usenixsecurity20/presentation/van-goethem"
    title: "Timeless Timing Attacks: Exploiting Concurrency to Leak Secrets over Remote Connections"
    author: Tom Van Goethem, Christina Pöpper, Wouter Joosen, Mathy Vanhoef
  - id: capture
    resource: "https://web.archive.org/web/20200913175333/https://www.usenix.org/conference/usenixsecurity20/presentation/van-goethem"
also_at:
  - "https://www.usenix.org/system/files/sec20-van_goethem.pdf"
  - "https://www.usenix.org/system/files/sec20_slides_van-goethem.pdf"
authors:
  - Tom Van Goethem
  - Christina Pöpper
  - Wouter Joosen
  - Mathy Vanhoef
canonical_url: ""
cited_by:
  - "2020.md:69"
commit: ""
content_sha256: e3bed00f6edc96ced6b8e7497cba3040b584d801f32b7260e80036e8774152ad
depth: full
depth_reason: default
kind: article
language: en
licence: unknown
original_url: "https://www.usenix.org/conference/usenixsecurity20/presentation/van-goethem"
published: ""
publisher: usenix.org
publisher_english: ""
raw_sha256: 08533523369340e343f1a4f78444930438bd6cf3d61908f036664be5d68cefef
retrieved_from: "https://www.usenix.org/system/files/sec20-van_goethem.pdf"
retrieved_kind: live
retrieved_utc: "2026-08-19T16:42:15+00:00"
slug: usenix-org-timeless-timing-attacks-exploiting-concurrency-leak-connections
snapshot: 20200913175333
title_english: ""
translation_file: ""
translation_of: ""
---

# Timeless Timing Attacks: Exploiting Concurrency to Leak Secrets over Remote Connections

**Timeless Timing Attacks: Exploiting Concurrency to Leak Secrets over Remote Connections** - Tom Van Goethem, Christina Pöpper, Wouter Joosen, Mathy Vanhoef, usenix.org.

- Published: date not stated
- Original: <https://www.usenix.org/conference/usenixsecurity20/presentation/van-goethem>
- Also published at: <https://www.usenix.org/system/files/sec20-van_goethem.pdf>
- Also published at: <https://www.usenix.org/system/files/sec20_slides_van-goethem.pdf>
- Preserved from: https://www.usenix.org/system/files/sec20-van_goethem.pdf (live) on 2026-08-19
- Capture timestamp: 20200913175333
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so the
page going offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

Timeless Timing Attacks: Exploiting Concurrency
   to Leak Secrets over Remote Connections
     Tom Van Goethem, imec-DistriNet, KU Leuven; Christina Pöpper,
 New York University Abu Dhabi; Wouter Joosen, imec-DistriNet, KU Leuven;
             Mathy Vanhoef, New York University Abu Dhabi
   https://www.usenix.org/conference/usenixsecurity20/presentation/van-goethem




      This paper is included in the Proceedings of the
             29th USENIX Security Symposium.
                             August 12–14, 2020
                                978-1-939133-17-5




                                       Open access to the Proceedings of the
                                         29th USENIX Security Symposium
                                             is sponsored by USENIX.
                                 Timeless Timing Attacks:
              Exploiting Concurrency to Leak Secrets over Remote Connections

                     Tom Van Goethem1 , Christina Pöpper2 , Wouter Joosen1 , Mathy Vanhoef2
                                          1 imec-DistriNet, KU Leuven
                          2 Center for Cyber Security, New York University Abu Dhabi




                          Abstract                                  measurements exhibit, the harder it will be to correctly deter-
                                                                    mine the execution time.
 To perform successful remote timing attacks, an adversary
                                                                       In remote timing attacks, i. e., over a network connection,
 typically collects a series of network timing measurements
                                                                    the measurements are affected by many different factors. Pre-
 and subsequently performs statistical analysis to reveal a dif-
                                                                    dominantly, the variations in network transmission time (jitter)
 ference in execution time. The number of measurements that
                                                                    can render a timing attack impractical, or may require the ad-
 must be obtained largely depends on the amount of jitter that
                                                                    versary to collect an extensive number of measurements. On
 the requests and responses are subjected to. In remote tim-
                                                                    Internet connections, packets experience jitter that depends
 ing attacks, a significant source of jitter is the network path
                                                                    on the load of the network connection at any given point in
 between the adversary and the targeted server, making it prac-
                                                                    time, for every hop along the network path. In cases where the
 tically infeasible to successfully exploit timing side-channels
                                                                    timing difference is on the order of 100’s of nanoseconds or a
 that exhibit only a small difference in execution time.
                                                                    few microseconds, this network jitter becomes a prohibitive
    In this paper, we introduce a conceptually novel type of tim-
                                                                    factor for performing an accurate timing attack.
 ing attack that leverages the coalescing of packets by network
 protocols and concurrent handling of requests by applica-             In this paper we introduce a new paradigm for remote
 tions. These concurrency-based timing attacks infer a relative     timing attacks by exploiting multiplexing of network proto-
 timing difference by analyzing the order in which responses        cols and concurrent execution by applications. Our proposed
 are returned, and thus do not rely on any absolute timing in-      concurrency-based timing attacks are completely unaffected
 formation. We show how these attacks result in a 100-fold          by network conditions, regardless of the distance between the
 improvement over typical timing attacks performed over the         adversary and the victim server. In contrast to typical timing
 Internet, and can accurately detect timing differences as small    attacks, where absolute measurements are obtained sequen-
 as 100ns, similar to attacks launched on a local system. We        tially, our novel attacks extract information from the order
 describe how these timing attacks can be successfully de-          in which two concurrent execution tasks are completed, and
 ployed against HTTP/2 webservers, Tor onion services, and          in fact do not use any timing information (we therefore call
 EAP-pwd, a popular Wi-Fi authentication method.                    them timeless). For the attack to be successful, both tasks
                                                                    must start executing immediately after one another, and the
                                                                    delay between starting both tasks should be unaffected by the
 1   Introduction                                                   network. To achieve this, we leverage several techniques that
                                                                    trick various network protocols to coalesce different requests
 When the execution time of an application or algorithm de-         in a single network packet. As a result, both requests arrive
 pends on a secret, it may be possible to leak its contents         simultaneously at the targeted server, and are processed con-
 through a timing attack. Over the last few decades, tim-           currently. We find that the performance of these concurrent
 ing attacks have been applied in various contexts, ranging         timing attacks over a remote connection is comparable to that
 from extracting private keys by abusing SSL/TLS imple-             of a sequential timing attack on the local system.
 mentations [11, 12, 30] to revealing the browsing habits of           Through a formal model, we show how concurrency-based
 users [7, 20, 43]. In a typical timing attack, the adversary ob-   timing attacks are theoretically unaffected by jitter on the
 tains a series of sequential measurements and then performs a      network connection. We then show how these attacks can
 statistical analysis in an attempt to infer the actual execution   be applied in practice in a variety of scenarios: web appli-
 time for varying inputs. The success of such an attack largely     cations served over HTTP/2 or by Tor onion services, and
 depends on the signal-to-noise ratio: the more variation the       Wi-Fi authentication. Based on an extensive evaluation, our




USENIX Association                                                                    29th USENIX Security Symposium            1985
 measurements confirm that concurrency-based timing attacks          tions [7]. They introduced two types of attacks: direct attacks,
 are indeed unaffected by variations in network delay. On web        where the adversary directly makes a connection with the
 servers hosted over HTTP/2, we find that a timing difference        webserver, e. g., to test for the existence of an account on
 as small as 100ns can be accurately inferred from the response      the application, and cross-site timing attacks, where the at-
 order of approximately 40,000 request-pairs. The smallest           tacker tricks a victim to send requests, e. g., upon visiting an
 timing difference that we could observe in a traditional tim-       attacker-controlled website.
 ing attack over the Internet was 10µs, 100 times higher than           In their research, Bortz and Boneh show how cross-site
 our concurrency-based attack. Based on the response order           timing attacks can be used to reveal whether a user is logged
 of concurrent EAP-pwd authentication requests, whose tim-           in, or how many items the user has in their shopping basket.
 ing side-channel was previously deemed infeasible to exploit        More recently, in 2015, Gelernter and Herzberg revisited these
 against a server, it is possible to perform a dictionary attack     cross-site timing attacks and introduced two new techniques
 with a success probability of 86%.                                  to overcome the limitations imposed on the attack by the
    In summary, we make the following contributions:                 potential instability of the victim’s connection [22]. Their
    • We introduce a model for timing attacks and show that,         techniques rely on inflating either the size of the response
       in theory, concurrency-based attacks are unaffected by        or the computation time required by the server. As a result,
       network irregularities. Through various experiments we        the difference in response size or processing times becomes
       confirm that this holds true in practice.                     significantly higher, and therefore the signal-to-noise ratio
    • We show how request and response multiplexing in               of the measurements is increased. This work is orthogonal
       HTTP/2 can be leveraged to perform concurrency-based          to our research: We focus on making it feasible to detect
       timing attacks, both in direct as well as cross-site threat   small timing differences in contrast to increasing these time
       scenarios. Our measurements indicate that concurrency-        differences.
       based timing attacks significantly outperform sequential         Other timing attacks in the web platform aimed to deter-
       attacks over the network and have a similar accuracy as       mine the size of responses, either by abusing side-channel
       when attacks are performed on the local system.               leaks in the browser [51] or by exploiting TCP windows [55].
    • We discuss how network protocols can make applica-             Furthermore, it has been shown that the various high-
       tions susceptible to concurrency-based timing attacks, as     resolution timers that are available in modern browsers [45]
       evidenced by a practical timing attack against Tor onion      can be abused to leak information on which URLs have been
       services despite the high network jitter introduced by the    visited [47], activities of other tabs [56], and even to create
       six relays between the adversary and the server.              unique device fingerprints [44].
    • In addition to the attacks against web services, we de-
       scribe how our novel exploitation techniques can be ap-
       plied in other contexts: We perform a dictionary attack       2.2 Other remote timing attacks
       with high success rate against EAP-pwd, a popular Wi-Fi       Outside of the context of web applications, remote timing
       authentication method.                                        attacks have mainly been demonstrated on crypto protocols,
    • Finally, we propose various defenses that reduce the per-      such as SSL/TLS. It has been shown that the private key of an
       formance to sequential timing attacks performed over the      OpenSSL-based server could be extracted by exploiting tim-
       network, and evaluate their real-world overhead based         ing side channels [37] in the implementation of RSA [1, 12],
       on an extensive dataset.                                      AES [6], or ECDSA [11]. Furthermore, Meyer et al. [38] pre-
                                                                     sented timing-based Bleichenbacher attacks on RSA-based
 2     Background & related work                                     ciphersuites that could be exploited over a local network. An-
                                                                     other timing attack that was shown to be feasible to exploit
 Timing attacks have been known and extensively studied for          over a local network is Lucky Thirteen [2], which leverages
 several decades [30]. They can be used to leak secret informa-      timing differences in TLS and DTLS implementations. Since
 tion by exploiting a measurable difference in execution time.       timing attacks against crypto protocols mostly abuse timing
 As connectivity became more stable over time, it was shown          differences in operations that are sequential, e. g., during the
 that timing attacks can also be launched over the network:          handshake, our concurrency-based timing attacks cannot be
 in 2005, Brumley and Boneh showed that it was possible to           straightforwardly applied. Nevertheless, as we show in Sec-
 extract an SSL private key over a local network by exploiting       tion 5, attacks against crypto implementations can still be
 a timing side-channel in OpenSSL [12].                              applied if there exists an underlying network layer that coa-
                                                                     lesces different packets.
                                                                        In 2020, Kurth et al. introduced NetCAT, which targets
 2.1    Timing attacks against web applications
                                                                     DDIO, a recent Intel feature that provides network devices
 In 2007, Bortz and Boneh showed that timing attacks can be          access to the CPU cache, to perform a PRIME+PROBE
 applied to extract sensitive information from web applica-          attack that can exploit cache side-channels [32]. Remote mi-




1986   29th USENIX Security Symposium                                                                          USENIX Association
 croarchitectural attacks targeting the application layer have         So far, we treated the propagation time as an aggregate over
 been explored by Schwarz et al. [46], who showed that it is        the entire request-response operation. However, this aggregate
 feasible to perform Spectre attacks over a network connection.     operation consists of a number of sub-operations, e. g., the
 They show that with approximately 100,000 measurements             routing operations for every hop encountered on the network
 over a local network it is possible to leak one bit from the       path, encoding the network packets, decrypting the payload,
 memory, resulting in 30 minutes per byte, or 8 minutes when        passing the request to the correct processing unit, etc. As such,
 the covert channel based on AVX instructions is used. On a         we can model the propagation time for a request as the sum
 cloud environment, leaking one byte took approx. 8 hours for       of all sub-operations k 2 {1..K}. The formula then becomes:
 the cache covert channel and 3 hours when leveraging the
                                                                                                      K
 AVX-based channel. Since the NetSpectre attacks target appli-
                                                                                        Rm = tm + Â (bk + Jm,k ) ,                           (2)
 cations above the network layer, an attacker could, in theory,                                       k=1
 leverage our concurrency-based timing attacks to improve the
 timing accuracy. One challenge may be that the concurrent          where the random jitter associated to the processing time tm is
 executions required by our attack introduce (microarchitec-        modeled by Jm,p for some p 2 {1..K} with b p equal to zero .
 tural) noise or side-effects into the NetSpectre measurements,        As an adversary, we have access to the response times for
 making exploitation challenging. As such, we consider ex-          two different requests, and we want to know under which
 ploring concurrency in remote microarchitectural attacks an        conditions this leaks the order of processing times. That is, if
 interesting topic for future research.                             the response time of request x is larger than that of request y,
                                                                    we want to know under which conditions this means that the
                                                                    processing time of x was also higher than that of y. To derive
 3     Concurrency-based timing attacks                             these conditions, we construct the following equivalences:
 In contrast to classical timing attacks, where an adversary                               K                         K
 obtains a number of independent measurements over the net-            Rx > Ry , tx + Â (bk + Jx,k ) > ty + Â bk + Jy,k                      (3)
 work and then uses statistical methods to infer the processing                           k=1                        k=1
 time of the request, the concurrency-based timing attacks we                                    K
 introduce in this paper rely on the relative timing difference                  , tx     ty > Â Jy,k       Jx,k .                           (4)
                                                                                                k=1
 between two requests that are concurrently executed.
                                                                    From this we can see that the order of response times correctly
 3.1    Classical timing attack model                               leaks the order of processing times if their difference is higher
                                                                    than the combined jitter of both requests. The probability of
 Before explaining how concurrency-based timing attacks can         this being the case decreases in function of the sum of jitter
 be executed in practice, we first introduce a theoretical model    variances (assuming the jitter distributions are statistically
 of timing attacks to show how they can benefit from exploiting     independent and normally distributed).1 In practice we can
 concurrency. Inspired by the work of Crosby et al. [15], our       perform multiple measurements to reduce the impact of the
 model splits the measured response time R into the processing      random jitter over the difference in processing times.
 time T and propagation time B, resulting in R = T + B. The
 processing time T is defined as the time required by the server
 to process the request and form a response, and the propaga-       3.2 Model for concurrency timing attacks
 tion time B denotes the latency incurred by transmitting the       We consider two requests to be concurrent when they are
 request and response packets (including, e. g., encryption over-   initiated at the same time, and where the relative difference of
 head). Due to dynamic workloads on the server and variations       the response times, or their order, reveals information on the
 in network conditions, both T and B are random variables.          execution times. As we will show in the following sections,
 Let t = E[T ] and b = E[B], then we can write                      this allows us to significantly reduce the impact of jitter on
                                                                    our measurements. More concretely, in many cases we can
                         R = t + b + J,                      (1)    force the jitter values for a subset of sub-operations to be the
                                                                    same for two concurrent requests, e. g., by aggregating the
 where J represents the sum of the random jitter associated to
                                                                    requests in a single network packet. As such, the jitter for
 both the processing and propagation times. To differentiate
                                                                    the first S sub-operations, i. e., those related to sending the
 between requests to different processing tasks m 2 {1..M}
                                                                    requests from the client to the server, is the same between the
 on the same server we write Rm = tm + b + Jm . Here b is
                                                                    two concurrent requests x and y:
 independent of m because we assume the propagation time
 between a specific client and server is independent of the                               8s 2 {1..S} : Jx,s = Jy,s                          (5)
 task m being executed, and because the arrival time of the first
 byte of the response is independent of the response length.           1 This is because Var[J + J ] = Var[J
                                                                                              y,k x,k       y,k   Jx,k ] = Var[Jy,k ] +Var[Jx,k ].




USENIX Association                                                                      29th USENIX Security Symposium                       1987
 where 1  S < K, and such that the server starts processing                                                     (a) direct timing attack

 the request starting from sub-process S + 1. When we apply
 this optimization to the equivalence defined in (4) we get:
                                                                                                            launch concurrent requests
                                           K                                                                + capture response timing

             Rx > Ry , tx        ty >    Â       Jy,k   Jx,k .        (6)                Attacker server                                   Targeted website

                                        k=S+1
                                                                                                             (b) cross-site timing attack
 As such, by leveraging the aggregation of two concurrent                                                                                             Targeted website

 requests in a single network packet, an adversary can observe                                    (1) visit website

 a difference in processing time if this difference is greater than
 the jitter incurred by the requests after they arrive at the server.                                                                     (3) launch concurrent
 Consequently, the probability that the difference in response                Attacker website
                                                                                                                      Victim browser
                                                                                                                                         authenticated requests

 timing correctly reflects the difference in processing time is                        (2) return malicious payload

 higher for concurrency-based timing attacks, and therefore
 fewer measurements are needed to infer secret timing-based                        Figure 1: Threat models for web-based attacks.
 information. If we assume that the jitter of (certain) operations
 is directly related to the average propagation time, i. e., the
                                                                            between when the server started processing each of the two
 longer an operation takes, the higher the absolute jitter values
                                                                            concurrent requests. Importantly, Equation 8 shows that net-
 will be (our measurements in Section 4 confirm this), our
                                                                            work jitter does not affect concurrency-based timing attacks
 concurrency-based timing attacks provide the most advantage
                                                                            at all, neither on the upstream nor downstream path. However,
 on (relatively) slow network connections.
                                                                            a downside of only considering the order of responses is that
    Most systems and applications do not support complete
                                                                            it may provide less granular information, making statistical
 concurrency: a network card will read a packet byte by byte
                                                                            analysis less efficient. In the following sections we explore
 from the physical layer, encrypted packets need to be de-
                                                                            how this affects attacks in practice.
 crypted sequentially in the correct order, etc. Consequently,
 the processing of the second request will be slightly delayed
 by operations on the first request. We represent this additional           4 Timing attacks on the web
 delay before processing the second request using the random
 variable Dy . Similar to other operations, we define dy = E[Dy ],          Timing attacks on the web have been studied for well over a
 and we let Jy,d represent the random jitter associated to this             decade [7]. To date, researchers have focused on uncovering
 delay. Note that this delay only exists for the second request.            applications that may leak sensitive data by obtaining several
 Considering this additional delay, the equivalence becomes:                timing measurements and then performing a statistical analy-
                             K
                                                                            sis. Crosby et al. found that the Box Test performs best, and
    Rx > Ry = tx     ty >    Â      Jy,k       Jx,k + dy + Jy,d .     (7)   were able to measure a timing difference of 20µs over the In-
                            k=S+1                                           ternet and 100ns over the LAN [15]. In the concurrency-based
                                                                            timing attacks of this section, we show that, regardless of the
 Since many network protocols, for example TCP, include                     network conditions, it is possible to achieve a performance
 monotonically increasing sequence numbers in all transmit-                 similar to traditional timing attacks that are launched from
 ted packets, we can make another improvement to our model                  the local system.
 by leveraging the order of responses instead of their differen-
 tial timing. Specifically, the request that the server finished
 processing first will have a response with a sequence number               4.1 Threat model
 lower than the later response. As a result, jitter incurred after
 a request has been processed will have no effect on the order              For web-based timing attacks, we consider two threat models:
 of the responses. If we let SNy be the sequence number of the              direct and cross-site attacks [7], as depicted in Figure 1. In
 response associated to request y we get:                                   a direct timing attack, the adversary will connect directly to
                                                                            the targeted server and obtain measurements based on the
        SNx > SNy , tx           ty > Jy,p       Jx,p + dy + Jy,d .   (8)   responses that it returns. As the adversary is sending packets
                                                                            directly to the server, this provides them with the advantage
 Recall that we defined Jy,p as the jitter associated with the pro-         that they can craft these packets as needed. In the cross-site
 cessing of request y. From this we can see that the sequence               attack model, the attacker will make the victim’s browser
 numbers of the responses correctly leak the order of process-              initiate requests to a targeted server by executing JavaScript,
 ing times if their difference is higher than the combined jitter           e. g., through a malicious advertisement or tricking the victim
 of processing both requests plus the total delay (average +                into visiting an attacker-controlled web page. Although the
 jitter). Recall that the delay here refers to the time difference          same-origin policy prevents the attacker from extracting any




1988   29th USENIX Security Symposium                                                                                                        USENIX Association
 content from the responses, timing is one of the metadata           that servers using HTTP/1.1 are unaffected by concurrency-
 that is still available. More concretely, the adversary could       based timing attacks (in Section 4.4 we show how Tor onion
 leverage the Fetch API to initiate a request to the targeted        services running an HTTP/1.1 server can be attacked), but
 website. This will return a Promise object, which will resolve      rather that the protocol cannot be abused to coalesce multiple
 as soon as the first byte of the response has been received [52].   requests in a single network packet.
     It is important to note that the victim’s cookies will be
 included in the request (assuming the adversary passes the
 {"credentials": "include"} option to the Fetch API).
                                                                     4.3 HTTP/2
 As such, the requests are performed under the identity of the       In this section we show how the request and response multi-
 victim, effectively allowing the adversary to extract sensitive     plexing of HTTP/2 can be leveraged to perform concurrency-
 information that the user has shared with the targeted website.     based timing attacks that allow an adversary to observe a
 In contrast to the direct timing attack, in which the adversary     timing difference as small as 100ns, providing a 100-fold
 can choose from which server to launch the attack, preferably       improvement over classical timing attacks over the Internet.
 one in close vicinity of the targeted server, the network condi-
 tions between the victim and server are out of the control of
 the attacker. For example, the victim could have an unreliable      4.3.1   Background
 wireless connection, or be located in a different country than      A key advantage of HTTP/2 is the removal of the restrictions
 the origin server, thereby introducing a significant amount of      imposed by HOL blocking. To achieve this, HTTP/2 intro-
 jitter to the timing measurements in a classical timing attack.     duces the concept of streams, a bidirectional flow of data with
                                                                     a unique identifier that is typically associated with a request
 4.2    HTTP/1.1                                                     and response pair. Data is sent in the form of frames; the
                                                                     request and response bodies are sent in DATA frames whereas
 The most popular protocol on the web is HTTP; for a long            the headers are sent in HEADERS frames. Headers are com-
 time HTTP/1.1 was the most widely used version. Classical           pressed using the HPACK algorithm [40], which uses a static
 timing attacks presented in prior work [7, 15, 19, 22, 51] ex-      and dynamic table to refer to header keys and values.
 clusively targeted this protocol, since HTTP/2 only recently            Since every frame contains a stream identifier, the web
 became widely adopted. A major limitation of HTTP/1.1 is            server can process different requests concurrently, despite hav-
 its head-of-line (HOL) blocking, causing all requests over the      ing only a single TCP connection. Similarly, responses can be
 same connection to be handled sequentially. Thus the only           sent as soon as they are generated by the server. By default, the
 way to perform a concurrent timing attack is to use multiple        web server will prioritize requests equally, although it is also
 connections.                                                        possible to explicitly define a priority for a specific stream, or
     To evaluate whether concurrency would improve the accu-         by declaring dependencies on other streams. However, at the
 racy of timing attacks, we performed several experiments. We        time of this writing, many web servers and browsers either do
 found that concurrently launching requests over two connec-         not support prioritization at all, or only provide limited func-
 tions increases the jitter on the network path from the attacker    tionality [18, 35]. Moreover, in our concurrency-based tim-
 to the server. Network interfaces can only transmit one packet      ing attacks, the requests will ideally be handled by the same
 at the time; when the attacker sends two concurrent requests        processing resources, such that their execution time solely
 in 2 TCP packets, the second one will be delayed until the first    depends on the secret information that the adversary aims to
 one is sent. As such, the jitter that the packets observe during    infer. The execution of the concurrent requests will typically
 transmission is independent from each other, similarly as with      be performed on different CPU cores/threads; thus the execu-
 a sequential timing attack. There is a possibility that the two     tion of one request will not affect that of the other. Note that
 packets would experience jitter such that at the last network       if the execution of the request makes use of a shared resource
 hop on the path between the attacker and target server, both        that does not support parallelism, there can be an influence in
 packets are buffered and will arrive almost simultaneously at       execution time between the two requests. Depending on the
 the server. However, as this does not happen consistently, the      application, this could reduce the timing side-channel leak,
 attacker has no way of knowing that this in fact occurred.          or it might amplify it, e. g., when the access to the shared
     In Appendix A we report on an experiment where two              resource occurs after the operation that leaks sensitive timing
 HTTP/1.1 requests were sent concurrently over two different         information and the “slowest” request is delayed further by
 connections. We find that this does not improve the perfor-         waiting to access the shared resource.
 mance of timing attacks, validating our assumption that the
 jitter observed on the two connections is independent. As           4.3.2   Direct attacks
 such, we conclude that simply sending HTTP requests at the
 same time over different connections does not improve the           As discussed in our formal model of Section 3, the goal of
 performance of a timing attack. Note that this does not mean        an attacker is to ensure that the server starts processing two




USENIX Association                                                                     29th USENIX Security Symposium              1989
                                                                     Positive values indicate that the order in which the responses
                                                                     were received is the same as the order in which the requests
                                                                     were sent, and negative values indicate a reversed order. We
                                                                     can clearly see that when two identical requests are sent (blue
                                                                     distribution on the graph), these are virtually always returned
                                                                     in the same order. Note that there is a high peak close to 03 ,
                                                                     which represents the cases where both responses were sent
                                                                     back in a single TCP packet, which may happen when the
                                                                     responses are sent in quick succession.
                                                                        To overcome this limitation, the processing of the first re-
                                                                     quest needs to be slightly delayed, i. e., for the duration of
 Figure 2: Distribution of the difference in response time for       decrypting the second request. For this, we leverage the fact
 two concurrently launched requests for the same processing          that the request handler needs to parse the URL to extract
 task, with and without additional URL parameters.                   the parameters and associated values, and make these acces-
                                                                     sible to the processing language. Since the execution time
                                                                     of this parsing is directly related to the number of URL pa-
 requests at exactly the same time, such that the order of the
                                                                     rameters, an adversary could arbitrarily extend this execution
 responses reveals which request finished processing first. One
                                                                     time by including more parameters. In 2007, Wälde and Klink
 request is for a known baseline processing task, and the other
                                                                     showed how this mechanism could be abused by including
 for a task that would either take the same or a different amount
                                                                     many URL parameters that would result in a hash collision in
 of processing time, depending on some secret information.
                                                                     the hashtable that was constructed in PHP, leading to a Denial-
 Thanks to HTTP/2’s request multiplexing, multiple requests
                                                                     of-Service [29]. In contrast to these DoS attacks, which to
 that are sent at the same time will be processed in parallel, and
                                                                     date have largely been mitigated, e. g., by reducing the num-
 in contrast to HTTP/1.1, responses are sent as soon as possi-
                                                                     ber of allowed parameters to 1,000, we only require a short
 ble independent of the request order. To abuse this behavior,
                                                                     execution time. In an attack scenario, the adversary can first
 an attacker can embed two HEADERS frames containing two
                                                                     empirically determine the number of additional URL parame-
 HTTP/2 requests in a single TCP packet to ensure they arrive
                                                                     ters that need be included in the first request such that both
 at the same time. As headers are compressed, their size is
                                                                     requests are processed at the same time. We found that this
 typically on the order of 100-150 bytes, and thus the result-
                                                                     value remains stable over time, and depends on the web server
 ing TCP packet size is significantly lower than all Maximum
                                                                     application that is used; Figure 2 shows the distribution of
 Transmission Units (MTUs) observed on the Internet [17].
                                                                     the difference in response timing for two requests where the
    In our measurements, we made use of the nghttp2 C li-            first one contains 40 additional URL parameters (orange dis-
 brary [50] and used the TCP_CORK option [5, 33] to ensure           tribution). This results in a better balance in the order of the
 that the two concurrent requests are added to the same TCP          responses; adding fewer parameters causes more responses to
 segment2 . As most browsers only allow HTTP/2 connections           be received in the same order as the requests, and when more
 over TLS, all measurements that we performed were over a se-        parameters are included, the second request is more likely to
 cure connection. In summary, a single TCP segment contains          finish first.
 two TLS records that each contain a HTTP/2 HEADERS frame.
                                                                        In our formal model, this means that we introduce another
 As soon as the TCP segment arrives at the server, the two
                                                                     factor, ux (and associated jitter value Jx,u ), that can be sub-
 TLS records are decrypted sequentially, and the server starts
                                                                     tracted from dy :
 processing each immediately after decryption. The dy + Jy,d
 factor from the equivalence defined in (8) reflects the average               tx    ty > Jx,p + Jy,p + (dy      ux ) + Jy,d + Jx,u        (9)
 duration and jitter of the decryption of the TLS record con-
 taining the second request. This forms a problem if we want            To evaluate the performance of concurrency-based timing
 to leverage the order in which responses are returned: For          attacks in HTTP/2, we perform a series of measurements.
 two requests that have the same processing time, the former         In our measurements, we create a set of (baseline, baseline)
 will be returned first if the decryption time is higher than the    request-pairs, where both requests were for a PHP endpoint
 difference in jitter. To measure this impact, we sent one mil-      that would perform time_nanosleep(100000), i. e., idle
 lion request-pairs for the same processing task (idle sleep for     sleep for 100µs. Additionally, we created a set of (baseline,
 100µs) to an HTTP/2-enabled nginx server hosted on Amazon           target) request-pairs, where the target requests are for an end-
 EC2 and captured the difference in response time. In Figure 2,      point that would perform an idle sleep for 100µs+D, for mul-
 we show the distribution of the differences in response time.       tiple values of D, ranging from 75ns to 50µs. All requests
    2 Our custom HTTP/2 client is available at https://github.com/      3 These values are not equal to 0 as we measure the response time after

 DistriNet/timeless-timing-attacks                                   decryption of the response.




1990   29th USENIX Security Symposium                                                                                 USENIX Association
                                                                         Timing difference
                                75ns     100ns     150ns     200ns      500ns       1µs      2µs   5µs      10µs      20µs    50µs

   Client-server connection                                Concurrency-based timing attack (HTTP/2)
   Miscellaneous (Internet)         -   39,342    24,016      9,917     1,610      466       161    52        11          6        6

                                                                      Sequential timing attack
   Europe - Europe                  -         -        -         -          -        -        -      -    23,220     2,926      333
   Europe - East US                 -         -        -         -          -        -        -      -         -    16,820    4,492
   Europe - South-East Asia         -         -        -         -          -        -        -      -         -         -    7,386
   VM - VM (LAN)                    -         -   50,463    40,587     14,755    3,052    2,165    498       126        41       20
   localhost                        -         -   16,031    17,533      3,874      856      220     42        20        16       14

                                                    Concurrency-based timing attack (HTTP/1.1 over Tor)
   Client to onion service          -         -        -       -        - 43,848 3,125 386            96                22         6

 Table 1: The average number of requests or request-pairs required to perform a successful timing attack with at least 95%
 accuracy. If the attack was unsuccessful, or required more than 100k requests, this is indicated with a dash (-).


 were made from our university’s network (located in Belgium,          infeasible to exploit.
 using a 1Gbit connection), and for every D, we obtained 1 mil-           For this experiment, requests were again launched from our
 lion measurements from nine Amazon EC2 servers that ran               university’s network. Additionally, we performed experiments
 an nginx web server. We launched three C5.large instances             from a VM located in the same datacenter as the server (LAN),
 in three geographically distributed datacenters: EU, East US,         as well as a timing attack to localhost. The results of our mea-
 South-East Asia (nine instances in total); the connection of          surements are shown in Table 1; for the concurrency-based
 these instances is 10Gbit. We used a minimal program that             attacks, this table indicates the minimum required number
 only calls a sleep function to minimize the jitter related to         of request-pairs to perform an attack with 95% accuracy (av-
 program execution. It should be noted, however, that even this        eraged over the nine servers). For the classical (sequential)
 minimal program still produces a non-neglibile amount of              timing attack we show the total number of requests. Note
 jitter. In particular, when evaluating the accuracy of the sleep      that the total number of requests that will be launched for
 function on the server itself using a high-resolution timer,          the concurrency-based attack is twice the reported number
 we still needed 411 measurements to correctly distinguish a           of request-pairs. However, because the pairs are sent simulta-
 timing difference of 75ns.                                            neously, it takes approximately the same amount of time to
     To compare concurrency-based attacks to traditional timing        process a request-pair in the concurrency-based timing attack,
 attacks, we also computed the number of requests needed               as to process a single request in the sequential timing attack.
 to perform a classical timing attack, using the Box Test for          If an attack was unsuccessful, i. e., would require more than
 the statistical analysis [15]. The Box Test considers three           100,000 requests, on at least one server, we mark it with a
 distributions of timing measurements: the baseline, that of           dash (-). Note that because our experiments were performed
 a negative result (timing matches baseline), and that of a            in a real-world setting, some of the measurements may be
 positive result (with a different processing time due to a timing     affected by temporal variations of load on the network or on
 side-channel leak). A timing attack is considered successful          the machines that hosted the VMs.
 if a pair of i, j 2 [0, 100] with i < j can be found such that           We find that concurrency-based timing attacks provide a
 the interval determined by the ith and jth percentile of the          significant advantage compared to any sequential timing at-
 distribution of the baseline measurements, overlaps with the          tack over the Internet: Even for the EU-EU connection, which
 interval (determined by the same i and j) of the negative result      had the lowest latency (average: 24.50ms) and jitter (standard
 measurements distribution, while at the same time does not            deviation: 1.03ms), the sequential timing attack can only dis-
 overlap with the interval of the positive result. That is, an         tinguish an execution time of 10µs, whereas our concurrent
 overlap indicates that the measurements come from requests            timing attack can distinguish a difference of 100ns (2 orders of
 with the same processing time, whereas a measurements of              magnitude more precise). Moreover, our concurrency-based
 requests with a different processing time should not have an          attacks even outperform sequential timing attacks over the
 overlapping interval. If no values for the pair i, j can be found     local network, which had an average latency between 0.5ms
 that fulfill these conditions, the timing attack is considered        and 1.5ms, and standard deviation of jitter between 15µs and




USENIX Association                                                                        29th USENIX Security Symposium           1991
 45µs (depending on the datacenter). Finally, we can see that     large POST request to fill the sending TCP window. To over-
 our novel attacks are comparable to executing a sequential       come this limitation, the adversary has two options. First, the
 timing attack on the local system, which confirms that, as we    request-pairs could be padded such that two requests exactly
 determined in our formal model, concurrency-based timing         fit in a single packet. In virtually all cases the exact size of
 attacks are not affected by network conditions.                  the request can be predicted (the browser will always send
    In addition to the measurements on nginx, we performed        the same headers).4 After sending the first bogus POST re-
 a similar set of experiments against an Apache2 web server,      quest to fill the initial TCP window, the attacker launches
 using the same experimental setup. We find that, in general,     several request-pairs, and every pair will be contained in a
 timing attacks targeting web applications served by Apache2      single packet. As such, for every ACK that is received, two
 require more requests compared to nginx, especially in opti-     new request-pairs will be sent. In our experiments, we found
 mal network settings, such as localhost or the local network.    that on low-latency connections, the ACKs would arrive very
 This can be attributed to the request handling mechanism         rapidly, and thus the server would eventually become over-
 of Apache2, which is more computationally expensive com-         loaded with requests, introducing jitter to the measurements.
 pared to that of nginx. Correspondingly, we find that the        As a workaround, the attacker could, instead of the initial large
 concurrency-based attacks are also slightly affected by this,    bogus POST request, instead send 10 (= initial congestion
 as the variation in the computation increases. Nevertheless,     window) smaller requests with a delay of RTT/10 in between
 we find that the concurrency-based attacks still allow the ad-   the requests. As a result, the initial TCP window will still
 versary to distinguish timing differences as small as 500ns.     be filled and ACKs would only arrive at a rate of RTT/10.
 The complete results of these experiments can be found in        Ironically, this means that this technique (and thus the timing
 Appendix B. As web servers need to handle more and more          measurements) works better on slower network connections.
 requests, and become increasingly performant, we believe             An alternative technique to overcome the hurdles imposed
 the accuracy of (concurrent) timing attacks will continue to     by the increasing TCP window, is to force the browser to close
 improve.                                                         the connection. Browser have an upper bound on the number
                                                                  of active concurrent connections; if this limit is reached, it will
                                                                  close the least recently used ones. For instance, in Chrome
 4.3.3    Cross-site attacks                                      this limit is set to 256 [42], and thus an attacker could make
 A key requirement of our concurrency-based timing attacks        the victim’s browser initiate connections to as many IP ad-
 against HTTP/2 is that we can manipulate the TCP socket          dresses, forcing it to close the connection to the targeted
 in such a way that both HTTP requests are sent in a single       server. On Firefox, this limit was increased to 900, except for
 packet. For cross-site attacks, where the requests are sent      the Android-based browser applications, which remained at
 from a victim’s browser, this is no longer possible, as the      256 [34]. We found that it is feasible to use this technique to
 browser handles all connections. To overcome this limita-        close an active connection; other mechanisms may also be
 tion, we introduce another technique that leverages TCP’s        abused to do this (e. g., Firefox imposes a limit of 50 concur-
 congestion control [3] and Nagle’s algorithm [8, §4.2.3.4].      rent idle connections, and will close active connections when
 The congestion control mechanism determines the number of        this limit is reached). It should be noted that this technique
 unacknowledged packets that a host can send, which is ini-       can be used in conjunction with the first one, if it is required
 tially set to 10 on most operating systems and is incremented    to reset the TCP window.
 with every received acknowledgment, as per TCP’s slow start          As the requests are coalesced in a single packet, the perfor-
 mechanism [48]. Furthermore, Nagle’s algorithm ensures that,     mance of these cross-site timing attacks is the same as with
 if there is unacknowledged data smaller than the maximum         the direct attacks. To defend against this type of attack, the
 segment size (MSS), user data is buffered until a full-sized     webserver could set the SameSite attribute on cookies [36],
 segment can be sent. For example, if an application would        preventing it to be sent along in the cross-site requests, al-
 consecutively send two small chucks of data, e. g., 20 bytes,    though certain violations have been discovered [21, 41]. As
 these will be combined and only a single packet of 40 bytes      of February 2020, Google Chrome is gradually rolling out
 will be sent. Consequently, as an attacker we can initiate a     changes that mark cookies as SameSite by default [49].
 bogus POST request with a sufficiently large body that exactly
 fills the congestion window. Immediately after this POST re-     4.3.4    Limitations
 quest the attacker triggers the two concurrent requests, which
 will be buffered and thus coalesced in a single packet when it   According to HTTPArchive’s annual report, which takes into
 is eventually sent to the target website.                        account data obtained from over 3 million regularly vis-
     An important caveat is that the sending TCP window is        ited websites, 37.46% desktop homepages are served over
 incremented with every ACK that is received. Consequently,          4 When the cookie constantly changes in length and content, the HPACK
 when (rapidly) performing multiple concurrency-based timing      algorithm will not be able to refer to it with an entry in the dynamic table,
 measurements, an attacker would need to send an increasingly     and thus the request length varies along with the length of the cookie.




1992     29th USENIX Security Symposium                                                                              USENIX Association
 HTTP/2 [26]. For websites that support HTTPS, a require-            the public web server. In addition to protecting the identity
 ment that browsers impose for using HTTP/2, this is per-            of the user when sending outgoing traffic, Tor also provides
 centage is even higher: 54.04%. Although this makes many            a feature that hides the identity of the server. To connect to
 websites susceptible to our concurrency-based timing attacks,       one of these so-called onion services, the client performs a
 it should be noted that a significant number of websites are        handshake involving the introduction points chosen by the
 using a content delivery network (CDN), such as Cloudflare.         onion service, and a rendezvous point chosen by the client.
 HTTPArchive reports 23.76% of all HTTP/2 enabled websites           Upon a successful handshake, a circuit between the client and
 to be powered by Cloudflare. For most CDNs, the connection          onion service is created, consisting of 6 intermediate relays.
 between the CDN and the origin site is still over HTTP/1.1,            Due to the extended network path that a request has to
 and HTTP/2 may not even be supported (as it does not provide        traverse to reach a hidden service, the jitter renders almost
 performance improvements). Nevertheless concurrency-based           all sequential timing attacks impractical. Based on 100,000
 timing attacks may still outperform classical timing attacks in     measurements, we determined an average RTT of 251.23ms
 this case, as requests are not affected by jitter on the network    to our onion service, with a standard deviation of 32.47ms
 path between the attacker and the CDN. This is especially           (approximately 30 times as high as what we observed over a
 valid for cross-site attacks, where the requests are sent by the    regular Internet connection). If the web server would support
 victim who may have an unreliable Internet connection.              HTTP/2, the concurrency-based timing attacks presented in
                                                                     Section 4.3 can be used straightforwardly (the attacker can
 4.3.5   Use-case                                                    simply construct a packet containing both requests). However,
                                                                     because of how network packets are transported over the Tor
 To demonstrate the impact of our concurrency-based tim-             network, it is also possible to perform attacks against onion
 ing attacks over HTTP/2, we describe how it can be applied          services that only support HTTP/1.1 (or any other type of
 in a cross-site attack scenario. More specifically, we found        service). More specifically, an attacker can create two Tor
 and reported a cross-site timing attack against HackerOne5 , a      connections to the onion service, and then simultaneously
 popular bug-bounty platform where security researchers can          send a request on each of the connections. This will trigger
 report vulnerabilities to a wide range of bug bounty programs.      the attacker’s Tor client to create two Tor cells and send these
 In the dashboard, security researchers and managers of the          over the 6-hop circuit to the onion service. Because a single
 bounty program can search through the reported bugs; this           Tor cell is only 514 bytes (+ 29 bytes of TLS overhead),
 triggered a GET request where the text_query parameter              two cells will fit in a single TCP segment for virtually every
 was set to the searched keyword. We found that requests that        network [17]. Consequently, if the two cells are placed in the
 did not yield any results were processed faster compared to         same packet on the last hop of the circuit, i. e., between the
 requests where at least one result was returned. As such, a XS-     relay and the onion service, the requests will be processed
 Search attack [22] could be launched against this endpoint:         simultaneously by the server.
 by tricking a manager of a bug bounty program in visiting a            Based on our experiments on the live Tor network, we
 malicious web page, the adversary could find out specific key-      found that when the first request of a request-pair is suffi-
 words that were mentioned in the private, ongoing reports, and      ciently large6 , e. g., by adding padding in the headers, and
 potentially reveal information about unfixed vulnerabilities.       requests are sent in relatively quick succession, the TCP buffer
    After reporting our findings, we were told that a timing         between the onion service and the last relay becomes filled.
 attack to this endpoint had been reported a total of eight times.   Consequently, because of Nagle’s algorithm, the last two cells
 However, our report was the only to qualify for a reward, as it     will be joined in a single packet. We found that this would
 was “the first one to demonstrate a feasible attack”. Indeed,       reliably cause an inter-request delay on the order to 10µs, and
 with less than 20 request-pairs we could accurately determine       because the first request was larger, and thus took slightly
 if a search query had at least one result. In the meantime, the     longer to process, no additional URL parameters had to be
 vulnerability has been mitigated by changing it to a POST           added to offset the inter-request delay. Note that the webserver
 request, and requiring a valid CSRF token.                          will only start processing a request when the entire request
                                                                     has been received.
 4.4     Tor onion services                                             We set up several Tor onion services on geographically
                                                                     distributed Amazon EC2 datacenters, these ran an nginx
 Tor is a well-known low-latency anonymity network. When a
                                                                     HTTP/1.1 server. The (unmodified) Tor clients were set up
 client wants to send a request over Tor to a public web server,
                                                                     on virtual machines on our university’s private cloud, using a
 this request is first encoded as a Tor cell, which has a fixed
                                                                     1Gbit connection, and used the real Tor network to connect to
 length of 514 bytes. These cells are then encrypted once for
                                                                     the web servers. The results of our concurrency-based timing
 every relay on the circuit. Most circuits consist of 3 hops,
                                                                     attacks that leverage Tor are shown in Table 1. Again, we
 where the last one is the exit node, which sends the request to
    5 https://hackerone.com/                                            6 In our tests, we found 1500 bytes to be sufficient.




USENIX Association                                                                         29th USENIX Security Symposium        1993
          Supplicant                          Authenticator            Listing 1: Hash-to-Curve (H2C) method for EAP-pwd [24].
                                Wi-Fi                              1 def hash_to_curve(password, id1, id2, token):
       User / Adversary                       Hostapd (AP)         2   for counter in range(1, 256):
                                                                   3     seed = Hash(token, id1, id2, password, counter)
                                                                   4     value = KDF(seed, "EAP-pwd Hunting and Pecking", p)
                                                  RADIUS           5     if value >= p: continue
  Authentication Server                           (UDP)            6     if is_quadratic_residue(value^3 + a * value + b, p):
                                                                   7       y = sqrt(x^3 + a * x + b) mod p
                          RADIUS over                              8       P = (x, y) if LSB(seed) == LSB(y) else (x, p - y)
       FreeRADIUS                             RadSec proxy         9       return P
                           TLS (TCP)

 Figure 3: Illustration of an enterprise Wi-Fi setup. Hostapd
 and the RadSec proxy run on the same device.                          and the supplicant replies using a PWD-Id response. Then
                                                                       Commit frames are exchanged, and finally Confirm frames
                                                                       are exchanged. By default, RADIUS is used to transport all
 find a significant increase in the precision by which a timing        handshake messages between the authenticator and server.
 difference can be distinguished. With 43,848 requests, it is          However, because RADIUS has design flaws [25], it is often
 possible to measure a timing difference of 1µs; this is within        tunneled inside TLS. This tunnel is commonly called RadSec
 the range of what is required to perform attacks against crypto       and its precise operation is defined in RFC 6614 [39, 58].
 protocols (e. g., the Bleichenbacher attack by Meyer et al. ex-       Although FreeRADIUS directly supports RadSec, most APs
 ploited a timing difference ranging from 1-23µs). As such, by         have to use a proxy that forwards all RADIUS messages over
 making a service available as an onion service, it may become         TLS (see Figure 3). In the remainder of this section, we will
 possible to perform timing attacks that would not be feasible         use the notation RadSec(packet) to denote that a packet is
 to exploit over a normal Internet connection.                         encapsulated in a RadSec TLS record.
                                                                          Before sending Commit and Confirm frames, the shared
 5     Wi-Fi attacks                                                   password is converted to an elliptic curve point (x, y) using
                                                                       the Hash-to-Curve (H2C) method in Listing 1. This method
 In this section we present concurrency-based timing attacks           takes as input the identity of the client and server, the pass-
 against the EAP-pwd authentication method of Wi-Fi. By                word, and a token that is randomly generated by the server.
 abusing concurrency, we exploit a timing leak that was previ-         Note that this random token is sent to the client in the PWD-
 ously considered infeasible to exploit. We also demonstrate           Commit response. In the H2C method, all four parameters
 how the leaked information can be abused to launch dictionary         are hashed together with a counter, and the resulting value is
 and password brute-force attacks.                                     treated as a candidate x coordinate. If a corresponding value
                                                                       for y exists on the elliptic curve, the resulting point P is re-
                                                                       turned. Otherwise, the counter is incremented so a new value
 5.1    Background                                                     for x can be calculated. Several flaws were discovered in this
 In enterprise WPA2 and WPA3 networks, the most frequently             algorithm, with the most critical one that the number of itera-
 used authentication methods include EAP-PEAP and EAP-                 tions (i. e., for-loops) needed to find P leaks information about
 TTLS. Unfortunately, both rely on certificates, which in prac-        the password [54]. It was shown how to exploit this timing
 tice causes security issues because clients often fail to vali-       leak against EAP-pwd clients. However, attacking a server
 date server certificates [4, 9]. An authentication method that        is harder and deemed practically infeasible. This is because
 is based on solely on passwords and avoids certificates, and          the jitter over Wi-Fi is too high to determine which of two
 hence is easier to use and configure, is EAP-pwd [24]. Note           (unique) requests had the highest processing time. Moreover,
 that EAP-pwd is almost identical to the Dragonfly handshake           this jitter cannot be averaged out over multiple handshakes
 of WPA3 [57], and both these protocols were recently shown            because the server generates a new random token in every
 to be affected by side-channel leaks [54].                            handshake, resulting in different H2C executions. Using our
    With EAP-pwd, the Dragonfly handshake is executed be-              classical timing model of Section 3, over Wi-Fi the variance
 tween an authentication server (e. g., FreeRADIUS) and a              of the jitter components Jx,k and Jy,k in equivalence (4) are
 supplicant (client). During this authentication the Access            too high to reliably determine whether Rx > Ry holds.
 Point (AP) forwards messages between them. This setup                    Finally, to quickly reconnect to a previously-used Wi-Fi
 is illustrated in Figure 3, where the AP is called the authen-        network, clients can use the Fast Initial Link Setup (FILS)
 ticator. Before initiating the Dragonfly handshake, the AP            handshake. This handshake is mainly supported in enterprise
 first sends an EAP identity request, and the supplicant replies       Wi-Fi networks, and can internally use several authentication
 with an identity response, which in turn is forwarded by the          methods. We will use it with the EAP Reauthentication Pro-
 AP to the authentication server. The server then initiates the        tocol (ERP) [14], which requires that the network contains a
 Dragonfly handshake by sending a PWD-Id identity frame,               central authentication server such as FreeRADIUS.




1994   29th USENIX Security Symposium                                                                             USENIX Association
       Adversary (3 clients)   Authenticator               Server    gle’s TCP algorithm coalesces data if there is unacknowl-
                                                                     edged transmitted data. To do this, we spoof a third client
              Associations                                           that sends a FILS authentication request to the authenticator
             EAP-Id Requests                                         (stage 2 ). The FILS request contains an EAP reauthenti-
   1
            EAP-Id Responses                                         cation payload that is forwarded by the authenticator to the
                                           RadSec frames
             PWD-Id Requests                                         server over RadSec. As a result, there will be unacknowledged
                                          RadSec frames
                                                                     outstanding data in the RadSec TLS/TCP connection. The
   2   AuthReq(FILS/EAP-Reauth)        RadSec(EAP-Reauth)            adversary now continues the EAP-pwd handshake by sending
           Two EAP(PWD-Id)’s                                         two PWD-Id frames (stage 3 ). To assure these packets arrive
                                     Queue TCP Data                  simultaneously at the authenticator, they are encapsulated in
          in one A-MPDU frame
   3                                           TCP ACK               one aggregated Wi-Fi frame (see Section 5.3). Because there
                                      Two RadSec(PWD-Id)’s           is unacknowledged RadSec data due to the FILS request, the
                                        in one TCP packet            two RadSec packets that encapsulate the PWD-Id messages
                                                Two concurrent
                                                                     will be queued until a TCP ACK is received. Once the TCP
                                                H2C executions       ACK arrives, both RadSec(PWD-Id) records are sent in a
   4                                                                 single TCP packet.
           EAP(PWD-Commit)            RadSec(PWD-Commit)
                                                                        When the TCP packet with both PWD-Id’s arrives at the
           EAP(PWD-Commit)            RadSec(PWD-Commit)             server, they are processed immediately after one another. As-
                                                                     suming the server is multi-threaded, this processing is done in
 Figure 4: Attacking EAP-pwd servers. Two clients associate,         separate threads that execute concurrently (stage 4 ). In each
 and concurrently send PWD-Id requests in an A-MPDU. The             thread the server generates a random token and runs the H2C
 third spoofed client injects a FILS frame so both PWD-Id            method. The order or PWD-Commit replies now depends on
 requests are sent in one TCP frame. Double arrows indicate          which H2C execution finishes first. The adversary determines
 two (spoofed) clients both separately send/receive the frame.       this order based on which client receives a PWD-Commit
                                                                     first. In Section 5.5 we show how this information allows an
                                                                     adversary to bruteforce the password.
 5.2    Attacking an EAP-pwd server
 To exploit the unpatched timing leak in EAP-pwd servers, we         5.3 Exploiting frame aggregation
 will trigger two concurrent executions of the hash-to-curve         In our attack, two PWD-Id frames are sent as one aggregated
 method. The order of replies then reveals which execution           Wi-Fi frame (recall stage 3 in Figure 4). This assures both
 was faster, and this information can be used to recover the         frames arrive at the same time at the AP. Otherwise the second
 password (see Section 5.5). Using our concurrency timing            PWD-Id might arrive after the authenticator received the TCP
 model of Section 3, this means we send concurrent requests x        ACK, meaning the two RadSec(PWD-Id) records would not
 and y, eliminating most of the jitter components as shown in        be aggregated in a single TCP packet. To aggregate Wi-Fi
 Equation 8. This enables us to determine which execution            frames one can either use A-MSDU or A-MPDU aggregation.
 took longer based on a single concurrent measurement.
                                                                        An Aggregate MAC Service Data Unit (A-MSDU) aggre-
    Figure 4 illustrates how we trigger two concurrent H2C           gates frames at the MAC layer, where all subframes must have
 executions. This is done by impersonating two clients, let-         the same destination and sender address [27, §9.3.2.2.2]. This
 ting both of them associate to the network, and then replying       makes A-MSDU unsuitable for our purpose, because we want
 to the EAP identity requests of the authenticator (stage 1 ).       to aggregate two frames with different sender addresses. In
 The authenticator forwards the identity information to the          contrast, an Aggregate MAC Protocol Data Unit (A-MPDU)
 authentication server using RADIUS, which we assume is              aggregates frames at the physical layer, where only the re-
 tunneled over RadSec (i. e., over TLS/TCP). In response, the        ceiver address of all subframes must be the same. This means
 server initiates the EAP-pwd handshake by sending PWD-Id            we can use it to aggregate two frames that come from different
 requests. To trigger two concurrent H2C executions, we now          clients. Moreover, all 802.11n-capable devices are required
 send two PWD-Id frames that arrive at the server simultane-         to support the reception of A-MPDU frames.
 ously. This is non-trivial to accomplish, because by default           Because A-MPDU aggregation happens close to the physi-
 every handshake message is encapsulated into separate Rad-          cal layer, and is commonly implemented in hardware, we can-
 Sec packets, and these will arrive at (slightly) different times.   not easily inject A-MPDU frames using traditional tools. In-
 To overcome this, we will induce the authenticator into coa-        stead, we extended the ModWiFi framework [53] and patched
 lescing two RadSec packets in one TCP packet, assuring both         the firmware of Atheros chips to inject A-MPDU frames.7
 PWD-Id requests arrive simultaneously at the server.
    Similar to our previous attacks, we abuse the fact that Na-        7 This code is available at https://github.com/vanhoefm/modwifi




USENIX Association                                                                     29th USENIX Security Symposium             1995
                                                                    identifier CVE-2019-17185 and has meanwhile been patched.


                                                                    5.5 Bruteforcing passwords
                                                                    We now perform a dictionary attack by filtering passwords
                                                                    based on the leaked information. Recall that for a single con-
                                                                    current measurement, the server executes two H2C methods
                                                                    that each use a different random token. For every password,
                                                                    we simulate both H2C methods locally, and reject the pass-
                                                                    word if the difference in executed iterations does not match
                                                                    our concurrent measurement. Based on simulations with el-
 Figure 5: Results of 5 000 concurrent requests against our
                                                                    liptic curve P-256 and P-521, on average one concurrent mea-
 EAP-pwd server. The x-axis shows the difference in the num-
                                                                    surement can be used to filter 33% of passwords. To further
 ber of executed H2C iterations, the y-axis the number of time
                                                                    filter the remaining passwords we can perform the same filter-
 this occurred, and the color indicates the order of responses.
                                                                    ing using another concurrent measurement. This is because
                                                                    the server will use new random tokens in both H2C methods,
 Our firmware modifications force the Atheros radio to ag-          effectively leaking new information about the password. This
 gregate selected Wi-Fi frames into a single A-MPDU. Note           means we can perform multiple concurrent measurements,
 that the adversary has full control over their own hardware,       such that in a dictionary of size d, all wrong passwords will
 meaning these firmware changes do not limit the applicability      eventually be filtered.
 of the attack. Moreover, we conjecture that the built-in rate          We implemented a proof-of-concept of our brute-force algo-
 control algorithm of Wi-Fi devices can also be abused to force     rithm. Since on average a concurrent measurement filters 33%
 the aggregation of frames into a single A-MPDU.                    of passwords, we need roughly n = log1.51 (d) concurrent mea-
                                                                    surements to uniquely identify the password in a dictionary
                                                                    of size d. Taking the RockYou password dump as a refer-
 5.4    Concurrency experiments                                     ence [16], which contains roughly 1.4 · 107 passwords, on av-
 To perform the attack, we wrote a Python script that controls      erage 40 measurements must be made to uniquely recover the
 two modified wpa_supplicant instances. These two instances         password. Since the probability of a concurrent measurement
 associate to the AP and execute the EAP-pwd handshake              being wrong is 0.0038, the success probability of this attack
 until they have to send the PWD-Id message. When both              against the RockYou dictionary equals (1 0.0038)40 ⇡ 86%.
 instances are ready to send the PWD-Id message, the script             We now estimate the computational cost of our dictionary
 first injects the FILS authentication request, and then sends      attack. First observe that filtering a wrong password requires
 both PWD-Id messages in a single A-MPDU. We used a                 on average 1/0.33 ⇡ 3 concurrent measurements. For each
 TP-Link TL-WN722N to inject this A-MPDU frame.                     measurement we need to simulate two H2C executions, where
    We tested the attack against an OpenWRT AP and an Ama-          each execution on average performs 2 iterations. Since we
 zon EC2 c5.xlarge instance running FreeRADIUS 3.0.16. The          can expect the first candidate password to be found halfway
 OpenWRT AP was running RadSec 1.6.8 and Hostapd v2.7-              throughout the search, in total 6 · d iterations have to be simu-
 devel. Figure 5 shows the results of 5 000 concurrent requests     lated until a candidate password is found. The computational
 against this setup when using EAP-pwd with curve P-256. We         cost of simulating each iteration is dominated by SHA256
 let i1 and i2 denote the number of for-loops executed in the       operations, since the quadratic residue check can be done
 H2C method corresponding to the first and second request,          efficiently using the Jacobi symbol and the law of quadratic
 respectively. We can see that if the order of the responses        reciprocity. In total three SHA256 operations are executed in
 matches the order of the requests, then i1  i2 , or in other      every iteration, and based on Hashcat benchmarks we can eval-
 words then the H2C execution in the second request executed        uate 7.48 · 109 hashes per second on an NVIDIA V100 GPU.
 at least as many iterations as the H2C execution in the first      This means that 2.49 · 109 passwords can be checked per
 request. Otherwise, if the order of responses is reversed and      second, and that the estimated cost for various dictionaries
 we first receive a response to the second request, then we learn   matches that of the MODP attack against WPA3’s Dragonfly
 that i1 i2 . All combined, we learn which request needed the       handshake [54, §7.4]. For instance, brute-forcing even the
 most number of iterations. In our experiments the probability      largest public dictionaries costs less than one dollar.
 that this deduction is incorrect, was below 0.38%.
    During our tests we encountered a denial-of-service vul-        5.6 Countermeasures
 nerability in FreeRADIUS caused by unsynchronized access
 to a global variable. This can lead to a crash when perform-       A backward compatible defense against the timing leak in
 ing concurrent EAP-pwd handshakes. The flaw was assigned           EAP-pwd is always performing 40 iterations in the H2C




1996   29th USENIX Security Symposium                                                                          USENIX Association
 method, and returning the first valid password element P. The       need to be used, as we did in case of Tor.
 probability of needing more iterations equals 2 40 , which is       3. Response order An adversary launching concurrency-
 considered acceptable in practice [28]. However, this change        based timing attacks will leverage the order in which the
 is non-trivial to implement without introducing other side-         responses are returned. As such, the order needs to correctly
 channels [54]. As a result, only the development version of         reflect the difference in execution time: if the first request
 FreeRADIUS adopted this defense, and at the time of writing         takes longer to process than the second, its response should
 the stable version was still vulnerable to our attack.              be generated last. Furthermore, this implies that the difference
    A more secure but backward incompatible defense is us-           in execution time of a request-pair reveals information about a
 ing a constant-time hash-to-curve method such as Simplified         secret. Throughout this paper we leveraged a baseline request,
 Shallue-Woestijne-Ulas [10]. A specification of this for EAP-       which has a known execution time (e. g., a search query for
 pwd has been worked out by Harkins [23].                            a bogus term); by determining the difference (or similarity)
                                                                     in execution time, we can directly infer information about a
                                                                     secret.
 6     Discussion
                                                                        We consider it an interesting avenue for future work to per-
 Throughout this paper we have shown that our concurrency-           form a comprehensive survey of network protocols to evaluate
 based timing attacks are not affected by network jitter and         whether they provide or enable these prerequisites, and thus
 therefore perform significantly better than sequential timing       make applications susceptible to concurrency-based timing
 attacks. For the attacks leveraging HTTP/2, we found that the       attacks.
 performance is comparable to running them locally from the
 system the web server is hosted on. Moreover, for the attack        6.2 Limitations
 on the EAP-pwd authentication method, the concurrency-
 based timing attacks allow us to abuse a timing leak that was       In the concurrency-based timing attacks, the adversary relies
 considered infeasible to exploit. Motivated by these impactful      solely on the order in which responses are returned. This re-
 findings, in this section we discuss the prerequisites that, when   duces the granularity of timing information that is obtained,
 present, can make applications susceptible to concurrency-          compared to sequential timing attacks where absolute tim-
 based timing attacks. Finally, we propose and evaluate various      ing is used, and thus could pose certain restrictions on the
 generic defenses.                                                   attacks that can be executed. For instance, consider the attack
                                                                     scenario where the timing of a search query is related to the
                                                                     number of returned results. In a sequential timing attack, the
 6.1    Attack prerequisites                                         adversary would observe higher measurements (barring jitter)
                                                                     for queries returning more results, and from this may be able
 Based on our evaluations that were presented throughout this
                                                                     to estimate the number of search results. Achieving the same
 paper, we determine three factors that indicate whether an
                                                                     with concurrency-based timing attacks is more complicated:
 application may be susceptible to concurrent timing attacks.
                                                                     instead of inferring the number of search results directly from
 1. Simultaneous arrival The first prerequisite is that there        the timing measurements, the adversary would need to lever-
 needs to be a mechanism available that can be leveraged to          age several baseline queries that return a known number of
 ensure that two requests arrive simultaneously at the server.       results. When the (target, baseline) request-pair is returned
 Typically, this will require both requests to be coalesced into     in an equally distributed order, i. e. the target response is re-
 a single network packet either directly, e. g. two requests in a    ceived as many times before the baseline response as it is
 single TCP packet for HTTP/2, or by means of an intermediate        received after, this indicates that the target query returns the
 carrier, such as Tor. We believe that several other network pro-    same number of results as for the specific baseline request
 tocols can enable this prerequisite: for instance, HTTP/3 also      that was used. Note that if the adversary is unable to construct
 supports multiplexing of requests and responses, but works          baseline requests that return a given number of search results,
 over UDP instead of TCP (we did not evaluate this protocol as       it would be infeasible to perform the timing attack by levering
 it is not yet widely deployed or implemented). Furthermore,         concurrency.
 network tunnels such as VPN and SOCKS may encapsulate                  For operations that need to be performed sequentially, e. g.
 packets, allowing packets on two different connections to be        the different steps of a cryptographic handshake or the deci-
 coalesced into a single packet on a single connection, similar      phering of a block that depends on the outcome of the previous
 to the technique we applied to Tor onion services.                  block, there is no concurrency at the protocol level. In such
 2. Concurrent execution As soon as two requests arrive at           cases, the adversary would need to leverage the coalescence
 the target server, they need to be processed concurrently, ide-     of packets at the transport layer. For example, for TLS it is
 ally with as little time in between them as possible. For the       not possible to initiate multiple concurrent handshakes over
 protocols, this means that either multiplexing needs to be sup-     a single TCP connection. As such, to exploit a (hypotheti-
 ported, as is the case with HTTP/2, or multiple connections         cal) timing side-channel leak in the TLS handshake using




USENIX Association                                                                     29th USENIX Security Symposium             1997
 concurrency-based attacks, an adversary would need to start                  padding to 69.81%. By further exploring the requests, we
 two separate TCP connections. Additionally, to ensure that                   find that most requests with a similar processing time are to
 these arrive simultaneously, the requests with the payload                   static resources.We determined a resource to be static based
 should be encapsulated and coalesced at the network layer,                   on the Cache-Control and Expires headers. With these
 e. g. as we showed with the attacks against Tor hidden services              three improvements, we found that in our simulation in total
 and over Wi-Fi.                                                              20.86% of the requests require padding. Note that this should
                                                                              be considered an upper bound, as not all requests that we
                                                                              considered as concurrent will actually be coalesced in a single
 6.3     Defenses
                                                                              packet. When all improvements were applied, we find that
 The most effective counter-measure against timing attacks                    67.53% of the hosts had to apply padding on at most 5% of
 is to ensure constant time execution. However, this can be                   their requests. For completeness, in Appendix C we show a
 very difficult to implement, or virtually impossible, especially             CDF with the percentage of requests that need to be padded.
 for complex applications that rely on third-party components.
                                                                                 Finally, to defend browser users against concurrency-based
 In this section we propose various defenses that focus on re-
                                                                              timing attacks, e. g., in a cross-site attack scenario, a possible
 ducing the performance of concurrency-based timing attacks
                                                                              defense is to ensure that different requests are not coalesced
 to the that of sequential timing attacks. The defenses that
                                                                              in a single packet. In a practical setting, this would mean that
 we describe are generic, and can be applied regardless of the
                                                                              although the TCP sending window may cause the network
 application domain.
                                                                              stack to buffer data sent by the application, the packets that
    A straightforward defense is adding a random delay on
                                                                              are sent out never contain more data than what was sent by
 incoming requests. To mimic network conditions where the
                                                                              the application. Essentially, this comes down to disabling
 standard deviation of the jitter is 1ms (comparable to what
                                                                              Nagle’s algorithm. As a result, every request would be sent
 we found on a EU-EU network connection), this delay   p     can
                                                                              in a separate TCP packet. Alternatively, packets containing
 be sampled uniformly at random from the range [0, 12]ms8 ,
                                                                              a single request could be padded to the MTU to prevent the
 resulting in an average delay of ⇡1.73ms for every request.
                                                                              network stack and any intermediaries on the path between the
    However, only requests that arrive simultaneously at the
                                                                              client and the server from coalescing two requests in a single
 server need to be padded because all others are subjected to
                                                                              packet. Another option is to ensure that the order in which the
 network jitter. To evaluate what percentage of requests would
                                                                              responses are received, is not observable by the attacker code
 thus need to be delayed in a real-world setting, we performed
                                                                              in the browser, e. g., by leveraging deterministic timing, as
 a simulation based on the crawling data of HTTPArchive. This
                                                                              proposed by Cao et al. [13]. Note that approaches that limit
 dataset contains detailed information on 403 million requests
                                                                              the accuracy of timers available in the browser [31, 45], are
 that were made while visiting over 4 million web pages with
                                                                              ineffective in defending against concurrency-based timing
 the Chrome browser. For our simulation, we only considered
                                                                              attacks.
 HTTP/2 requests, in total 237 million (58.82%), made to over
 2 million different hosts. We considered two requests to be
 concurrent if they were made within 10ms. Note that this is
 an overestimation, as we wanted to account for requests that
 may be coalesced on the network layer. If the server has more
 knowledge on how the request was transported, the length of                  7 Conclusion
 the timeframe in which requests are considered concurrent
 can be significantly reduced. With this improvement, a ran-                  With classical timing attacks, an adversary sequentially col-
 dom padding would still need to be added to 90.95% of the                    lects a series of measurements and then applies statistical
 incoming requests according to our simulation. This means                    analysis to try to infer secret information. In this paper, we in-
 that websites are making extensive use of the multiplexing                   troduce a new paradigm of performing remote timing attacks
 capabilities of HTTP/2.                                                      that infers secrets based on the order in which two concur-
    A further improvement that can be made is to only add                     rently executed tasks finish. By using a combination of request
 padding to concurrent requests to the same endpoint, or to                   multiplexing and coalescing of packets, we show how it is pos-
 endpoints that have a similar processing time. To estimate                   sible to ensure that two requests arrive simultaneously at the
 the percentage of requests that would be affected by this, we                targeted server. As a direct result, the difference in time when
 first compute the average processing time for all endpoints                  the requests are processed is completely unaffected by net-
 on every host by determining the timing difference between                   work conditions. As we describe in our theoretical model and
 sending the request and the arrival of the first byte of the                 later show through practical measurements, our concurrency-
 response. This reduces the number of requests that require                   based remote timing attacks are not subjected to network jitter
                                                                       p
    8 The standard deviation of a uniform distribution [a, b] is (b a)/ 12.   and thus have a performance comparable to that of an attacker
                                                                      p
 So to simulate a jitter of 1ms we can uniformly pick a delay from [0, 12].   on the local system.




1998    29th USENIX Security Symposium                                                                                    USENIX Association
 Acknowledgments                                                  [14] Zhen Cao, Baohong He, Yang Shi, Qin Wu, and Glen
                                                                       Zorn. EAP extensions for the EAP re-authentication
 We would like to thank our shepherd, Yossi Oren, and the              protocol (ERP). RFC 6696, 2012.
 anonymous reviewers for their valuable feedback. This work
 was partially supported by the Center for Cyber Security at      [15] Scott A Crosby, Dan S Wallach, and Rudolf H Riedi.
 New York University Abu Dhabi (NYUAD) and an NYUAD                    Opportunities and limits of remote timing attacks. ACM
 REF-2018 award. Mathy Vanhoef holds a Postdoctoral fel-               TISSEC, 12(3):17, 2009.
 lowship from the Research Foundation Flanders (FWO).
                                                                  [16] Nik Cubrilovic. RockYou hack: From bad to worse.
                                                                       https://techcrunch.com/2009/12/14/rockyou-
 References                                                            hack-security-myspace-facebook-passwords/,
                                                                       2009.
  [1] Onur Aciiçmez, Werner Schindler, and Çetin K Koç. Im-
      proving brumley and boneh timing attack on unprotected      [17] Ana Custura, Gorry Fairhurst, and Iain Learmonth. Ex-
      SSL implementations. In CCS, 2005.                               ploring usable path MTU in the internet. In 2018
                                                                       Network Traffic Measurement and Analysis Conference
  [2] Nadhem J Al Fardan and Kenneth G Paterson. Lucky                 (TMA), pages 1–8. IEEE, 2018.
      thirteen: Breaking the TLS and DTLS record protocols.
      In IEEE S&P, pages 526–540. IEEE, 2013.                     [18] Andy Davies. Tracking HTTP/2 prioritization is-
                                                                       sues. https://github.com/andydavies/http2-
  [3] Mark Allman, Vern Paxson, and Ethan Blanton. Re-                 prioritization-issues, 2019.
      quirements for Internet Hosts - Communication Layers.
      RFC 5681, September 2009.                                   [19] Chris Evans.     Cross-domain search timing.
                                                                       https://scarybeastsecurity.blogspot.com/
  [4] Alberto Bartoli, Eric Medvet, and Filippo Onesti. Evil           2009/12/cross-domain-search-timing.html,
      twins and WPA2 enterprise. Comput. Secur., May 2018.             December 2009.

  [5] Christopher Baus. TCP_CORK: More than you ever              [20] Edward W Felten and Michael A Schneider. Timing
      wanted to know. https://baus.net/on-tcp_cork/,                   attacks on web privacy. In CCS, pages 25–32, 2000.
      April 2005.
                                                                  [21] Gertjan Franken, Tom Van Goethem, and Wouter Joosen.
  [6] Daniel J Bernstein. Cache-timing attacks on AES. 2005.           Who left open the cookie jar? A comprehensive evalua-
                                                                       tion of third-party cookie policies. In USENIX Security,
  [7] Andrew Bortz and Dan Boneh. Exposing private infor-              pages 151–168, 2018.
      mation by timing web applications. In WWW, 2007.
                                                                  [22] Nethanel Gelernter and Amir Herzberg. Cross-site
  [8] Robert T. Braden. Requirements for Internet Hosts -              search attacks. In CCS, pages 1394–1405, 2015.
      Communication Layers. RFC 1122, October 1989.
                                                                  [23] Dan Harkins. Improved Extensible Authentication Pro-
  [9] Sebastian Brenza, Andre Pawlowski, and Christina Pöp-            tocol Using Only a Password. Internet-Draft draft-
      per. A practical investigation of identity theft vulnera-        harkins-eap-pwd-prime-00, Internet Engineering Task
      bilities in eduroam. In WiSec, 2015.                             Force, July 2019. Work in Progress.

 [10] Eric Brier, Jean-Sébastien Coron, Thomas Icart, David       [24] Dan Harkins and G. Zorn. Extensible authentication
      Madore, Hugues Randriam, and Mehdi Tibouchi. Ef-                 protocol (EAP) authentication using only a password.
      ficient indifferentiable hashing into ordinary elliptic          RFC 5931, August 2010.
      curves. In Advances in Cryptology (CRYPTO), 2010.
                                                                  [25] Joshua Hill. An analysis of the RADIUS authentica-
 [11] Billy Bob Brumley and Nicola Tuveri. Remote timing               tion protocol. https://www.untruth.org/~josh/
      attacks are still practical. In European Symposium on            security/radius/radius-auth.html0, 2001.
      Research in Computer Security. Springer, 2011.
                                                                  [26] HTTPArchive. Web almanac: HTTP/2. https:
 [12] David Brumley and Dan Boneh. Remote timing attacks               //almanac.httparchive.org/en/2019/http2,
      are practical. Computer Networks, 48(5):701–716, 2005.           2019.

 [13] Yinzhi Cao, Zhanhao Chen, Song Li, and Shujiang Wu.         [27] IEEE Std 802.11. Wireless LAN Medium Access Control
      Deterministic browser. In CCS, pages 163–178, 2017.              (MAC) and Physical Layer (PHY) Spec, 2016.




USENIX Association                                                                 29th USENIX Security Symposium          1999
 [28] Kevin M. Igoe.    Re: [Cfrg] status of Dragon-            [42] Stephen Röttger.     Issue 843157: Security: leak
      Fly. https://www.ietf.org/mail-archive/web/                    cross-window request timing by exhausting connection
      cfrg/current/msg03264.html, December 2012.                     pool. https://bugs.chromium.org/p/chromium/
                                                                     issues/detail?id=843157, May 2016.
 [29] Alexander Klink and Julian Wälde. Effective DoS
      attacks against web application plattforms. https:        [43] Iskander Sanchez-Rola, Davide Balzarotti, and Igor San-
      //fahrplan.events.ccc.de/congress/2011/                        tos. Bakingtimer: privacy analysis of server-side request
      Fahrplan/attachments/2007_28C3_Effective_                      processing time. In ACSAC, pages 478–488, 2019.
      DoS_on_web_application_platforms.pdf, 2007.
                                                                [44] Iskander Sanchez-Rola, Igor Santos, and Davide
 [30] Paul C Kocher. Timing attacks on implementations               Balzarotti. Clock around the clock: time-based device
      of Diffie-Hellman, RSA, DSS, and other systems. In             fingerprinting. In CCS, pages 1502–1514, 2018.
      CRYPTO, pages 104–113. Springer, 1996.
                                                                [45] Michael Schwarz, Clémentine Maurice, Daniel Gruss,
 [31] David Kohlbrenner and Hovav Shacham. Trusted                   and Stefan Mangard. Fantastic timers and where to
      browsers for uncertain times. In USENIX Security, 2016.        find them: high-resolution microarchitectural attacks
                                                                     in JavaScript. In International Conference on Finan-
 [32] Michael Kurth, Ben Gras, Dennis Andriesse, Cristiano
                                                                     cial Cryptography and Data Security, pages 247–267.
      Giuffrida, Herbert Bos, and Kaveh Razavi. NetCAT:
                                                                     Springer, 2017.
      Practical cache attacks from the network. In IEEE S&P,
      2020.                                                     [46] Michael Schwarz, Martin Schwarzl, Moritz Lipp, Jon
                                                                     Masters, and Daniel Gruss. Netspectre: Read arbitrary
 [33] Linux. tcp(7) - Linux man page. https://linux.die.
                                                                     memory over network. In European Symposium on
      net/man/7/tcp, 2007.
                                                                     Research in Computer Security. Springer, 2019.
 [34] Patrick McManus. Sockettransportservice socket lim-
                                                                [47] Michael Smith, Craig Disselkoen, Shravan Narayan,
      its. https://bugzilla.mozilla.org/show_bug.
                                                                     Fraser Brown, and Deian Stefan. Browser history re:
      cgi?id=1260218, March 2016.
                                                                     visited. In USENIX WOOT, 2018.
 [35] Patrick Meenan.    Better HTTP/2 prioritization
                                                                [48] Wright Stevens. Tcp slow start, congestion avoidance,
      for a faster web.   https://blog.cloudflare.
                                                                     fast retransmit, and fast recovery algorithms. 1997.
      com/better-http-2-prioritization-for-a-
      faster-web/, May 2019.                                    [49] The Chromium Projects. SameSite updates. https:
                                                                     //www.chromium.org/updates/same-site, 2020.
 [36] Rowan Merewood. SameSite cookies explained. https:
      //web.dev/samesite-cookies-explained, 2019.               [50] Tatsuhiro Tsujikawa. Nghttp2: HTTP/2 C library.
                                                                     https://nghttp2.org/, February 2015.
 [37] Christopher Meyer and Jörg Schwenk. Lessons learned
      from previous SSL/TLS attacks-a brief chronology of at-   [51] Tom Van Goethem, Wouter Joosen, and Nick Niki-
      tacks and weaknesses. IACR Cryptology ePrint Archive,          forakis. The clock is still ticking: Timing attacks in
      2013:49, 2013.                                                 the modern web. In CCS, pages 1382–1393, 2015.
 [38] Christopher Meyer, Juraj Somorovsky, Eugen Weiss,         [52] Anne van Kesteren. Fetch - living standard. https:
      Jörg Schwenk, Sebastian Schinzel, and Erik Tews. Revis-        //fetch.spec.whatwg.org/, January 2020.
      iting SSL/TLS implementations: New bleichenbacher
      side channels and attacks. In USENIX Security, 2014.      [53] Mathy Vanhoef and Frank Piessens. Advanced Wi-Fi
                                                                     attacks using commodity hardware. In ACSAC, 2014.
 [39] Open System Consultants. RadSec: a secure, reli-
      able RADIUS protocol. http://www.open.com.au/             [54] Mathy Vanhoef and Eyal Ronen. Dragonblood: Analyz-
      radiator/radsec-whitepaper.pdf, 2012.                          ing the Dragonfly handshake of WPA3 and EAP-pwd.
                                                                     In IEEE S&P. IEEE, 2020.
 [40] Roberto Peon and Herve Ruellan. HPACK: Header com-
      pression for HTTP/2. Internet Requests for Comments,      [55] Mathy Vanhoef and Tom Van Goethem. HEIST: HTTP
      RFC Editor, RFC, 7541, 2015.                                   encrypted information can be stolen through TCP-
                                                                     windows. In Black Hat US Briefings, 2016.
 [41] Renwa. Bypass SameSite cookies default to Lax and
      get CSRF. https://medium.com/@renwa/bypass-               [56] Pepe Vila and Boris Köpf. Loophole: Timing attacks
      samesite-cookies-default-to-lax-and-get-                       on shared event loops in chrome. In USENIX Security,
      csrf-343ba09b9f2b, January 2020.                               pages 849–864, 2017.




2000   29th USENIX Security Symposium                                                                    USENIX Association
 Figure 6: Distribution of how the timing of requests differs      Figure 7: Distribution of response times of baseline (100µs)
 from the mean, observed from our university’s network.            and target (150µs) requests to the EU server.

 [57] Wi-Fi Alliance. WPA3 specification version 1.0.
      https://wi-fi.org/file/wpa3-specification,                   (average RTT: 118.11ms, standard deviation: 1.71ms), com-
      April 2018.                                                  pared to the requests to the EU server (average RTT: 24.50ms,
                                                                   standard deviation: 1.03ms).
 [58] Klaas Wierenga, Mike McCauley, Stefan Winter, and               To evaluate how this variance of response times affects the
      Stig Venaas. Transport Layer Security (TLS) Encryption       capabilities of an adversary to infer secret information based
      for RADIUS. RFC 6614, May 2012.                              on the execution time of a request, we made requests to a
                                                                   PHP file, which would idle for a defined period before return-
 A    Negative result: concurrent timing attacks                   ing a response, using the time_nanosleep() function. We
      against HTTP/1.1                                             used a baseline of 100µs, and then obtained measurements
                                                                   for increments of the baseline ranging from 50ns to 50µs,
 The most popular communication protocol used on the web           using the Python aiohttp library; we measured the elapsed
 is HTTP. Over the several decades that it has existed, many       timing using time.time_ns, which has nanosecond resolu-
 improvements have been made, for instance keeping connec-         tion. We altered between a baseline request and a request with
 tion alive since HTTP/1.1, allowing multiple requests to be       an increased timing. For each increment value, we obtained
 made over the same connection. However, version 1.1 still         160,000 measurements. Next we applied the box test [15],
 suffered from a significant performance drawback, namely          to determine the number of requests an attacker would need
 head-of-line (HOL) blocking, which prevented user agents          to distinguish a difference in execution time for the varying
 from sending multiple concurrent requests over the same TCP       increments compared to the baseline, with an accuracy of at
 connection. As a result, the sequence of responses will always    least 95%. We found that for the EU server, a timing differ-
 be the same sequence as those of the associated requests. The     ence of 20µs could be determined with 4,333 requests; for the
 primary way to overcome the consequences of HOL blocking          US-based server,the attack was unsuccessful (based on the
 is to initiate multiple TCP connections to the server. Although   10,000 upper bound we imposed). A timing difference of 50µs
 this allows multiple requests to be processed concurrently,       required at least 1,580 requests for the EU-server, and 3,198
 there is no guarantee that when the requests are sent at the      measurements for the server based in the US. Figure 7 shows
 same time, i. e., in very rapid succession, these will also ar-   the distribution of the requests with a 50µs timing difference
 rive at the server at the same time. The jitter values incurred   to the EU server, indicating a large overlap with the baseline
 when sending the different requests are largely independent       request, but still an observable shift.
 from each other, and thus both affect the time at which the          Finally, we evaluated whether concurrency using multiple
 server starts processing them, which in turn affects the order    connections in HTTP/1.1 could be used to improve the mea-
 in which they are returned.                                       surements. For this, we set up two concurrent connections to
    To evaluate the impact of network-based jitter and the po-     the targeted server, again using the Python aiohttp package,
 tential improvements of measuring the timing of two con-          and sent two requests at the same time, one to the baseline
 current requests, we performed several measurements. We           endpoint, and one alternating between the baseline and the
 set up two HTTP/1.1 web servers on two Amazon EC2 C5              endpoint with increased processing time. We then subtracted
 instances, one in central Europe, and one on the US east coast.   the timing of each pair of concurrent requests. Interestingly,
 In Figure 6, we show the distribution of how much the timing      we found that this differential timing technique leveraging
 of each request to the same endpoint differs from the mean,       concurrency performed worse than the basic attack: for the
 for both instances, based on two million measurements per         EU server, it was no longer possible to distinguish a timing
 instance. This clearly shows that the variance is significantly   difference of 20µs. Moreover, a timing difference of 50µs re-
 higher for the requests targeting the web server in the US        quired at least 4,752 measurements to this server, consisting of




USENIX Association                                                                   29th USENIX Security Symposium            2001
                                                                                     Timing difference
       Attack type      Connection                    200ns         500ns      1µs        2µs      5µs   10µs    20µs       50µs

       Concurrent       Misc. (Internet)                    -   45,192      33,394     20,022    2,382    980     313         34
                        Europe - Europe                     -        -           -          -        -       -       -     2,711
                        Europe - East US                    -        -           -          -        -       -       -    12,588
       Sequential       Europe - South-East Asia            -        -           -          -        -       -       -          -
                        VM-VM (LAN)                         -        -      29,935      2,333       93      39      33        23
                        localhost                           -   26,104       6,500      1,087      158      35      22        17

 Table 2: The average number of requests or request-pairs required to perform a successful timing attack with at least 95%
 accuracy against an Apache webserver.


                                                                        handle requests in Apache2 (as compared to nginx), result-
                                                                        ing in higher jitter values. Presumably, this is amplified for
                                                                        concurrency-based attacks because here two requests arrive
                                                                        (instead of just one with the sequential attacks).


                                                                        C    Overhead of defenses per host


 Figure 8: Distribution of the difference in response time for
 concurrently launched requests to the baseline (100µs) and
 target (150µs) endpoints hosted on the EU server.


 two requests each, a six-fold increase compared to the typical
 attack. The distribution of these measurements is displayed in
 Figure 8, showing that the two distributions are more difficult
 to distinguish, compared to the distributions shown in Fig-
 ure 7. For the US server, the attack only achieved an accuracy
 of 82.14% for the imposed upper limit of 10,000 requests. We
 believe that the reason for this degraded performance is that
 the jitter values are no longer independent, but are affected
 by the concurrent request. More precisely, requests can not
 be sent completely concurrently on the network along the               Figure 9: CDF of the percentage of requests that had to be
 same path: only a single request can be put on the wire at             padded for the three defenses discussed in Section 6.3.
 once. Consequently, the request that is sent last will also be
 subjected to the jitter incurred when sending the first request.         In Figure 9, we show the cumulative distribution function
                                                                        (CDF) for the three variations of defenses that were intro-
 B     HTTP/2 measurements for Apache                                   duced in Section 6.3: 1) padding all requests that arrived
                                                                        concurrently at the server, 2) only padding requests when
 In Table 2, we show the number of requests or request-pairs            within the set of concurrent requests, there is a request with a
 that are needed to perform a timing attack against an Apache2          similar processing time, and 3) using the same optimization
 web server with at least 95% accuracy. For smaller timing dif-         but not adding padding to requests for static resources. The
 ferences (500ns - 1µs), we can see that the concurrency-based          CDF shows that for the third defense, more than half of the
 timing attacks perform similarly to a sequential attack on the         hosts would not incur any overhead from the defense. The
 local network. For timing differences between 2µs and 20µs,            other two defenses perform significantly worse: for half of the
 the concurrency-based attacks require more requests. This              hosts random padding needs to be added to at least 90.91%
 can be attributed to the increased processing time required to         and 62.16% of the requests, respectively.




2002   29th USENIX Security Symposium                                                                             USENIX Association
