dos_atacks
dos_atacks
Abstract—Many systems today rely heavily on virtual private protocols contain built-in DoS defenses by design, such as
network (VPN) technology to connect networks and protect source-binding cookies and rate-limiting mechanisms. Wire-
their services on the Internet. While prior studies compare the Guard, a recently developed VPN protocol, claims to offer
performance of different implementations, they do not consider improved DoS resilience thanks to a novel cookie mechanism
adversarial settings. To address this gap, we evaluate the resilience that secures its handshake exchange [3]. However, designing,
arXiv:2110.00407v1 [cs.CR] 1 Oct 2021
2
6) Parallelism: To achieve high performance, some VPNs even using the same IP address as a legitimate VPN peer.
rely on a high degree of parallelism to utilize all available CPU This is possible for stateless attacks, as the adversary does not
resources available on multi-core systems. This principle can need to receive responses from the server. If the VPN setup
also improve DoS resilience by allowing the system to serve a is symmetric, such as in site-to-site setups, obtaining the IP
higher rate of requests. Operating system kernels usually make address of both peers is likely less difficult than in asymmetric
use of receive-side scaling (RSS), a mechanism that distributes setups with peers that use dynamic IP addresses.
received packets among multiple cores for processing, avoiding
We focus on off-path adversaries, who cannot intercept or
a single-core bottleneck in the packet processing. When a
modify traffic between the two endpoints and can only send
packet is received, RSS calculates a hash over some predefined
traffic from locations that are not on the path of the targeted
packet header fields, such as IP addresses and TCP/UDP ports.
VPN tunnel. Active on-path adversaries between the targeted
The hash is then used to determine which core will process the
endpoints are considered out of scope, as such a position would
packet further, and the packet is added to the core’s receiver
allow disruption of the connection through much simpler
queue. Packets originating from different sources, i.e., packets
means, i.e., dropping packets. Moreover, we assume that the
from different flows, are likely to be processed by different
adversary cannot break the cryptographic primitives used by
cores. On the other hand, packets of a single flow are processed
the VPNs.
by the same core throughout. The hash function is configured
using a secret value, such that adversaries cannot know the
mapping between the hash fields and the cores, which could B. Attack Impact Metrics
be abused to deteriorate the performance of a specific flow. While there are various metrics to describe an attack’s
7) Deferred resource allocation: To improve performance, impact on a VPN setup, we focus on the two most important
latency in particular, achieved by protocol implementations or metrics:
to simplify code structure, it can be desirable to compute some Throughput: The maximum rate at which data can be trans-
resources eagerly. For instance, the first data packet over a ferred over an established VPN connection between two
VPN tunnel can be decrypted more quickly by the responder endpoints.
if the session key has already been pre-computed during the Connection setup delay: The time required for two VPN
handshake. However, this could present an attack surface, as endpoints to establish a new connection.
adversaries may be able to consume more of the server’s
resources without fully executing the protocol themselves. For
IV. ATTACK I MPLEMENTATION
this reason, the IPsec standards recommend that the session
key derivation should be deferred until the key is used for the We have implemented a framework that enables efficient
first time [16]. testing of stateless flooding attacks on a high-performance
testbed. Two major challenges were addressed during de-
III. S TATELESS F LOODING ATTACK velopment: (a) generating attack traffic at a high rate, and
(b) systematic analysis through automated exploration of the
To define our problem statement, we introduce a class of attack space.
DoS attacks that will form the basis of our evaluation. In a
stateless flooding attack, an adversary attempts to exhaust a A. Line-Rate Traffic Generation
victim’s resources by flooding it with packets that do not have
a causal relation to one another (stateless). The rate may be In order to carry out flooding attacks, an attack tool must
limited by the adversary’s computational resources, network be able to achieve high packet rates while enabling low-layer
bandwidth, or stealth restrictions (i.e., the maximum rate that packet manipulation (e.g., source address spoofing). For this
is not detected by a network-level DDoS mitigation system). purpose, standard application-layer software sockets are not
flexible enough. Alternatively, raw sockets allow low-layer
packet manipulation, but the kernel networking stack would
A. Threat Model
limit the performance of this approach. To overcome such
In the context of VPNs, an adversary may target an limitations, we use the Dataplane Development Kit (DPDK)
endpoint or a specific connection between two peers (i.e., a framework [5], which offers more efficient packet processing
critical site-to-site tunnel between two corporate locations) by bypassing the Linux networking stack and allowing appli-
with the goal of degrading or denying data transmission, or cations in user space to control the networking devices directly.
denying connection establishment. Our threat model considers Since this low-level control requires a considerable amount of
adversaries located on the public Internet with minimal knowl- base code to set up the development environment, we built our
edge about the targeted infrastructure: we assume that the implementation on libmoon [7]. This library abstracts away
adversary knows the VPN protocol used and the location (i.e., some of the low-level setup steps needed for most applications,
IP address and port) of at least one endpoint. Such information greatly accelerating development. Our framework leverages
can be obtained in various ways: insider knowledge, traffic these advantages to enable the implementation of various
analysis, port scanning, or infiltrating a service (e.g., signing packet flooding attacks with minimal development overhead.
up as a legitimate customer of an SD-WAN service).
B. Automated Attack Exploration Algorithm
Since our evaluation aims to determine the resilience of
VPN peers exposed to the public Internet, it is a realistic The range of possible attacks an adversary can perform to
assumption that certain attackers can spoof their source ad- disrupt a VPN connection is extensive, and manually exploring
dress [13] to remain stealthy and circumvent defenses, possibly the entire attack space is impractical. Therefore, we define an
3
appropriate attack space and devise an automatic process to VPN Client VPN Server
Switch
explore it based on an optimization algorithm. In this process,
we are primarily interested to find the most efficient attacks,
i.e., attacks with a high impact but low cost.
A simple definition for the attack space consists of flooding BW:
attacks in which a single packet is sent repeatedly at a specific MTU:
rate. Given a list of possible packets known by the adversary,
the space could be explored exhaustively by determining the
most effective attack rate for each packet. We extend this
simple definition with attacks that use not just a single type of
packet, but flood the victim with a mix of packets. Such mixed Attacker
packet attacks may be able to circumvent simple threshold-
Fig. 1. The network topology used in our evaluation setup. Three high-
based detection mechanisms [1]. A mixed attack in the space performance servers are connected through a switch over 40 Gb/s links.
defined by n possible packets can be encoded as a vector
x = (x1 , . . . , xn ), where xi is the bit rate at which packet
i is sent to the victim. The attacker knows at least the server’s IP address and attempts
As the attack impact metric, we use the measured through- to disrupt the VPN connection by attacking the server.
put over the VPN connection tp(x). The attack cost is defined The VPN server, which is the the primary device under
as the attack’s total bit rate |x| = x1 +. . .+xn and is bounded test (DUT), and the attacker are commodity server machines
by the attacker’s bandwidth bw . The weighted sum of attack running Ubuntu 18.04.4 LTS2 with two 18-core CPUs3 at
impact and attack cost is used to describe an attack’s effec- 2.10 GHz, offering a total of 72 virtual cores using hyper-
tiveness. This results in the following optimization problem: threading. The machines are equipped with a 40 Gb/s net-
work card.4 RSS is activated with the maximum number of
minimize tp(x) + α · |x| supported queues on this system, i.e., 64 queues. For RSS,
subject to xi ≥ 0 for i = 1, . . . , n both IP addresses and port numbers in a packet are used as
|x| ≤ bw hash fields.
The constant α can be adjusted to control the trade-off between The VPN client is another commodity server machine
attack impact and attack cost. With a larger value of α, running Ubuntu 18.04.4 LTS5 with two 16-core CPUs6 at
the exploration algorithm favors more efficient attacks. If 2.80 GHz (64 virtual cores using hyper-threading) and a net-
α = 0 is chosen, the algorithm selects the attack with the work card7 that supports RSS and traffic up to 100 Gb/s.
highest impact, regardless of the required bandwidth. As the The maximum transmission unit (MTU) on the network
optimization algorithm, we select a differential evolutionary interface is set to 1500 B to simulate real-world limitations of
algorithm [22]. the public Internet. The receive and transmit buffer sizes are
set to 4096 each.
To instantiate and explore the attack space, it is necessary
to provide a list of packets that the attacker could potentially
send. The list might contain only generic protocol packets as B. Attack Impact Measurements
defined by the specification, but it is also possible to provide The client machine is primarily used to measure the attack
the attacker with packets that were intercepted from legitimate impact according to the metrics defined in section III-B.
peers. Initially, the optimal attack rates for the trivial mixes Additionally, we perform profiling on the server to obtain
(i.e., mixes comprised of only one packet) are determined as additional insights into the attacked system.
a starting point for the attack exploration. The results are then
given to the optimization algorithm, which optimizes the attack a) Throughput: iperf over a single TLS connection
mixes and attack rates over multiple cycles by combining them is used to measure the maximum achievable throughput from
and removing the worst-performing candidates. the client over the already established VPN connection. The
measurements are averaged over a duration of 10 seconds,
during which the attack is performed.
V. E VALUATION S ETUP
b) Connection setup delay: The Linux time command
In this section, we describe the high-performance evalua- in combination with ping is used to obtain the connection
tion setup we have applied to evaluate the VPNs. setup delay by measuring the time required by the VPN peers
to connect and transmit the first packet to each other. Attacks
A. Network Topology are performed over the first 25 seconds of a measurement,
which stops after 85 seconds if no connection has been
Figure 1 shows our setup consisting of three machines established.
connected over a 40 Gb/s star topology using a single switch, 2 GNU/Linux 5.10.11-051011-generic x86 64
modeling a VPN connection over the Internet with an off-path 3 Intel® Xeon® CPU E5-2695 v4
adversary. We refer to one endpoint as the server and to the 4 Intel® Ethernet Controller XL710 for 40 GbE QSFP+
other as the client. The server acts as a VPN endpoint with 5 GNU/Linux 5.4.0 x86 64
a static IP address to which the client connects using any IP 6 Intel® Xeon® Gold 6242 CPU
address. Hence, the server cannot apply any IP-based filtering. 7 Mellanox MT27800 ConnectX-5
4
TABLE I. A N OVERVIEW OF THE EVALUATION RESULTS . T HE VALUES RSS Kernel + WG Job List WG Workers
SHOW THE ATTACK BANDWIDTH IN Gb/s REQUIRED TO CROSS THE GIVEN WG Receive
VPN METRIC THRESHOLD .
core 1 core 1
≤ 5% throughput connection delay ≥ 25 s
multi-flow client-flow multi-flow client-flow
NIC
WireGuard 0.7 0.3 20 20
IPsec/strongSwan 15 15 0.1 0.1
OpenVPN 0.1 0.1 0.1 0.1 core N core N
Measurements are taken across five runs. The plots in the Handshake Packet Data Packet
following sections show mean and standard deviation values
across these runs. To eliminate carry-over effects across runs, Fig. 2. WireGuard’s packet processing pipeline. Packets are initially pro-
the VPN applications running on client and server machines cessed on the receiving core, which distributes work among dedicated workers
are always restarted before a run. spawned on all cores. Multiple queues are used for incoming packets: a
handshake list and a list for data packets for each established connection.
c) Server instrumentation: To further analyze an at-
tack’s impact on the DUT, we collect metrics about packets
dropped by the network interface controller (NIC) through
ethtool and instrument the system using perf sampling. VI. W IRE G UARD
5
Initiator Responder single-flow multi-flow client-flow
Initiation
Throughput [Gb/s]
3
optional
Cookie Reply 2
0
Response 0 10 20 30 40
Attack rate [Gb/s]
Transport Data
Fig. 4. WireGuard performance under a basic UDP flood of 190 B packets.
Transport Data
B. Baseline: UDP Flood
As a baseline representing a theoretical upper limit on per-
Fig. 3. WireGuard protocol diagram, including a cookie mechanism that is formance under attack, we evaluate WireGuard’s performance
activated if the responder is under load. while the server is flooded with UDP packets of the same
size as a WireGuard initiation packet, i.e., 190 B, but with a
payload of only zeros. From the results in fig. 4, we observe
A. DoS Defense Mechanisms that a throughput of approximately 2.8 Gb/s is achieved in
WireGuard operates on the principle that memory is al- the absence of attack traffic. If the flood is performed over a
located or modified only for authenticated requests. Hence, single flow, the throughput is not negatively affected up to an
applying a per-peer rate limit is sufficient to mitigate memory attack rate of 30 Gb/s, at which point the network is nearing
exhaustion attacks. However, authentication is computationally saturation. However, if the flood is spread over multiple flows,
expensive and presents an attack surface. we observe that WireGuard’s throughput steadily decreases as
the attack rate increases.
As a first line of defense against CPU exhaustion attacks,
WireGuard leverages the peers’ public keys as pre-shared The connection setup delay is consistently around 4 ms
static keys. Each handshake packet contains a keyed-hash and is not significantly affected by UDP floods up to rates
MAC (HMAC) called mac1, which holds a hash over all of 30 Gb/s. For higher rates, the connection establishment
WireGuard packet fields (up to the mac1 field) using the sometimes requires one retransmission, i.e., succeeds after 5 s.
receiver’s public key as the hash key. The receiver drops any This is most likely due to initiation packets being dropped
incoming handshake packets without a valid mac1, ensuring occasionally by the NIC under high load.
that only handshake packets from senders with knowledge of
the public key are processed. C. Initiation Packet Flood
However, there are multiple possibilities an attacker could For the first attack, we consider a simple flood of ini-
flood the server with handshake packets containing a valid tiation packets from an outside attacker who has minimal
mac1: if the victim’s public key is publicly known or com- information, i.e., does not possess the victim’s public key and
promised, the attacker can generate packets with valid mac1 therefore cannot compute valid mac1 fields. It is expected that
fields. Alternatively, previously captured handshake packets WireGuard drops these packets before performing any CPU-
from legitimate peers could be replayed. intensive operations (only requiring a HMAC computation).
To defend against floods of handshake packets containing The throughput measurements (fig. 5) reveal that the attack
a valid mac1, WireGuard uses a cookie mechanism and IP- does not affect WireGuard’s performance for the single-flow
based rate limiting as a second line of defense. If a server is traffic pattern. However, if the attack traffic is spread over
under load, e.g., through a DoS attack, it requires a second multiple flows, the achievable throughput collapses at
HMAC called mac2, which is computed over the handshake attack bandwidths above 700 Mb/s and drops to zero
packet using a cookie value as the hash key. The cookie value for 1.6 Gb/s. If the client’s source IP and port number are
may be sent only if the responder receives a handshake packet used, the attack is even more effective: with just 600 Mb/s,
with a valid mac1 (but invalid or no mac2), adding a second the attack already stops practically all legitimate traffic through
packet exchange to the handshake (shown in fig. 3). Building the VPN connection.
on its cookie mechanism, WireGuard uses rate limiting based Connection setup delay (fig. 5), on the other hand, is not
on source IP addresses for packets that contain a valid mac2, as drastically impacted by the attack as the throughput. The
i.e., packets that are source-authenticated. attacker requires a bandwidth of at least 20 Gb/s to prevent
connection establishment entirely.
Additionally, the implementation assigns low thread pri-
ority to handshake workers such that a flood of handshake We have also evaluated the impact of initiation request
messages would not monopolize the CPU and prevent previ- floods with valid mac1 and mac2 fields (appendix A). How-
ously established connections from being served. To mitigate ever, these attacks are not significantly more effective
algorithmic complexity attacks, fast hash tables for initiator than the basic flooding, indicating that the processing of the
lookup and secret keys for hash tables are used. requests is not the limiting factor of performance in this case.
6
single-flow multi-flow client-flow
Throughput [Gb/s]
Throughput [Gb/s]
3 3
2 2
1 1
0 0
0 5 10 15 20 25 30 35 40 0 0.5 1 1.5 2
Attack rate [Gb/s] Attack rate [Gb/s]
Connection setup [s]
7
Throughput [Gb/s]
3 multi-flow cookie responses instead of initiation requests seems somewhat
client-flow
counter-intuitive, the resulting mix is useful to guide the
2 process toward a more effective stateless flooding attack on
WireGuard.
1
VII. IP SEC : STRONG S WAN
0
0 0.5 1 1.5 2 Internet Protocol Security (IPsec) is a secure network
Attack rate [Gb/s] protocol suite that is widely used in VPN solutions. The IPsec
standards have continuously been updated and published as
Fig. 6. Performance of WireGuard under an attack using the optimal traffic
mix determined by the optimization algorithm.
RFCs by multiple IETF working groups [6]. The relevant
pieces of the IPsec protocol suite for our analysis are Internet
Key Exchange Version 2 (IKEv2) [11] and Encapsulating
Throughput [Gb/s]
8
RSS Kernel + strongSwan strongSwan
Initiator Responder
XFRM Layer Receiver Workers
NIC
optional
IKE_SA_INIT Cookie
core N core N
IKE_SA_INIT Request with Cookie
IKE_SA_AUTH Request
Fig. 8. strongSwan’s IPsec packet processing pipeline
IKE_SA_AUTH Response
A. Defense Mechanisms Fig. 9. IPsec protocol diagram, including a cookie mechanism that is activated
if the responder is under load.
Numerous RFCs have been published that update the IKE
protocol or recommend best practices for implementation and
configuration to increase DoS resilience. RFC 8019 [16] is In a more sophisticated attack, not only IKE_SA_INIT
particularly relevant, as it summarizes possible DoS attacks requests could be sent to the victim, but also IKE_SA_AUTH
and mitigation mechanisms. The strongSwan implementation requests to provoke the deferred CPU-intensive DH key com-
was created years before this document and has since not been putation. An IKE_SA_AUTH request must therefore contain a
updated to follow all of the recommendations. valid responder SPI. Otherwise, it is directly dropped. How-
Since the peers do not authenticate each other during the ever, for an attacker to obtain a valid responder SPI, an IKE
IKE_SA_INIT exchange, but establish an encrypted connec- SA must have been created before, i.e., an IKE_SA_INIT
tion, which requires processing-intensive operations and mem- exchange must have succeeded. Furthermore, the DH key only
ory, this phase of the protocol presents a considerable attack needs to be computed once for each (half-open) IKE SA.
surface to DoS attacks. By flooding a server with requests, an Hence, limiting half-open IKE SAs as described above also
adversary may attempt to exhaust its computational resources mitigates this attack.
through excessive amounts of DH operations or exhaust its
memory by creating many half-open IKE SAs. B. Setup and Configurations
CPU resources required in the IKE_SA_INIT phase For our IPsec setup with strongSwan (version 5.9.2), we
can be drastically decreased by deferring the key derivation choose IKEv2 as the initiation protocol and a certificate-
into the IKE_SA_AUTH phase. This is possible because the based authentication method. The recommended cipher set10
IKE_SA_INIT response requires only the generation of the is chosen [23], which makes use of the dedicated hardware
DH public key, which can be pre-computed by the responder. accelerators on the machines. Moreover, strongSwan is config-
The symmetric DH keys, on the other hand, are at the earliest ured to spawn a thread for each logical core, i.e., 72 threads
required for the decryption of the payload in the following in total, for IKE packet processing. The cookie threshold is
IKE_SA_AUTH request. However, strongSwan does not cur- set to 32, causing the cookie mechanism to activate if more
rently implement this technique. half-open IKE SAs exist. Additionally, a maximum of 128
concurrent half-open IKE SAs is allowed for a single IP
To mitigate memory exhaustion attacks, rate limits on before the address is blocked. Default values are used for all
initiation requests per source IP, or similarly, limits on the remaining configuration options. Hereinafter, we refer to our
number of half-open IKE SAs for a single initiator IP are IPsec setup with strongSwan simply as “IPsec” setup, unless
recommended. Since such IP-based limits can be circumvented specified differently.
by an attacker capable of spoofing their source address, IKEv2
makes use of a cookie mechanism. If an initiation request is C. Baseline: UDP Flood
received, the responder responds with a cookie, usually a hash
over the IP address and the initiator’s SPI.9 Half-open IKE To see how strongSwan handles a flood of IKE_SA_INIT
SAs are only created for requests with a valid cookie. The requests, we first consider a flood of UDP packets of the
combination of rate limits and cookies prevents adversaries same size, i.e., 306 B, but with only zeroes as payload. As
from exhausting amounts of memory disproportionately to the strongSwan directly drops these packets without much pro-
number of IP addresses they control. cessing, this allows us to determine the limitations introduced
by the system.
9 The IKEv2 specification [11] does not define the construction of the cookie,
but it offers a proposal. 10 aes128gcm16-prfsha256-ecp256
9
single flow multi flow client flow degrades the connection’s throughput only slightly more than
the baseline UDP flood. If the attack is performed over multiple
Throughput [Gb/s]
10
RSS Kernel OpenVPN
the wrapped client key to obtain the initiator’s secret key such
that the received message can be decrypted and authenticated.
core 1 With the wrapped client key, the server does not need to
store a list of client keys. Furthermore, the wrapped client
key can also contain metadata, such as the peer’s identifier
NIC or expiration date, facilitating key management. This method
scales better because it allows the revocation of single keys
using a revocation list.
core N
However, the decryption of the wrapped client key in the
first request requires more CPU resources compared to the
other methods, even if the request is bogus. Therefore, the
tls-crypt-v2 mechanism might also present an attack
Handshake Packet Data Packet
vector for CPU exhaustion attacks.
Fig. 12. The OpenVPN packet processing pipeline, which relies on a single
core for processing both handshake and data packets. B. Setup and Configuration
For our OpenVPN setup, we use the most recent version
available at the time of this writing.11 The peers authenticate
the TLS protocol for its handshake to authenticate peers and
each other using certificates over TLS 1.3 with the ciphers AES
securely derive key material. The back-end mainly relies on the
128 GCM and SHA256. For encryption of the data, AES 128
OpenSSL library for cryptographic algorithms. A wide variety
GCM is used as well.
of cipher suites are offered, such that users can choose them
depending on the given hardware and security requirements. Under normal conditions, the peers achieve a throughput
Supported authentication methods include pre-shared keys, of about 600 Mb/s between the peers. By increasing the
username/password, and certificates. MTU of OpenVPN’s virtual network interface to 60 000 B and
enabling IP fragmentation on the physical network interface,
OpenVPN supports both UDP and TCP as underlying
a throughput of up to 4 Gb/s can be achieved. The likely
transport protocols, although UDP is the recommended choice.
cause of this performance gain is that OpenSSL performs much
Since the TLS handshake assumes a reliable transport underlay,
better on larger packets. However, IP fragmentation also causes
OpenVPN implements a custom reliable transport layer on top
issues, such as low tolerance to packet loss, which could in
of UDP. By default, OpenVPN servers listen on port 1194.
turn reduce DoS resilience. Therefore, we do not consider this
On Linux, OpenVPN runs in user space and only utilizes approach in our evaluation.
a single CPU core (as depicted in fig. 12). Compared to other
VPN implementations, which run in kernel space and use C. Initiation Floods
multiple cores, this approach is expected to achieve weaker
performance. However, it is possible to mitigate this disadvan- In this section, we evaluate the resilience of OpenVPN
tage by running multiple OpenVPN instances in parallel and to a P_CONTROL_HARD_RESET_CLIENT_V2 packet flood.
deploying a load balancer to distribute traffic between them This packet is the first packet sent by a client to establish a new
(as discussed in section IX). connection. It contains a random session identifier, which the
client uses to identify the connection. On reception, the server
responds with a similar packet containing the client’s session
A. Defense mechanisms
identifier and a new session identifier used by the server.
OpenVPN offers three options to protect its TLS handshake Without any of the TLS protection mechanisms activated, any
against flooding attacks: tls-auth, tls-crypt, and tls- adversary can create valid initiation packets.
crypt-v2. These options all provide mechanisms to authen-
The measurements in fig. 13 show that the server is barely
ticate each packet using pre-shared keys.
able to process data packets when flooded with initiation
The tls-auth option relies on a single pre-shared key packets at a rate of 50 Mb/s, which corresponds to slightly
shared between all legitimate peers and uses it to calculate more than 100 000 packets per second. Starting at an attack
a HMAC for each TLS packet. With tls-crypt, the TLS bandwidth of 100 Mb/s, data transmission and connection
packets are also encrypted with the same shared key. This establishment is denied completely. With the client-flow at-
provides improved privacy, e.g., by hiding the used certificates. tack configuration, most of the time, connection establishment
However, none of these options scale well in setups with many does not succeed during the time of our measurements (85 s),
peers: if a single peer is compromised, the single secret key even though the attack stops after 25 s.
must be updated on all peers to restore the security properties.
A solution to this scaling problem is offered by tls- D. TLS Protection Mechanisms
crypt-v2. With this option, each peer receives a unique The TLS protection mechanisms offered by OpenVPN
secret key and a version of its key encrypted by the server’s enable authentication of initiation packets using a secret key
secret key, which is called the wrapped client key. The peer shared between the peers. An adversary without knowledge
uses its secret key for encryption and authentication of the of the key cannot create a valid handshake packet if such a
TLS messages, just like with tls-crypt, but also sends the
wrapped client key in the first packet. The receiver decrypts 11 Version 2.5.1 (git:release/2.5/f186691b32e68362) with OpenSSL 1.1.1
11
single-flow multi-flow client-flow CPU exhaustion attacks than the single-threaded implementa-
800 tion of OpenVPN. Our measurements show that an initiation
Throughput [Mb/s]
12
a single IP address, such a mechanism would not improve the b) DoS attacks on VPN: To the best of our knowledge,
results of our measurements. there exists limited literature about practical DoS attacks on
VPNs. The Deviation attack on IKEv2 is a recent attack [15]
b) Port randomization: We observed that for Wire- that has been implemented against strongSwan. The attack
Guard, client-flow attacks are more impactful than multi- builds on a vulnerability in the IKE handshake, which was
flow attacks when a specific connection between two peers discovered in 1999, but has been considered hard to exploit in
is targeted. However, this requires the adversary to direct its practice [14]. The Deviation attack can only be performed by
attack to traffic to the same RSS queue on the server as an attacker capable of intercepting legitimate packets, which
the targeted client. If the port randomization options offered assumes a much stronger position than our off-path attacker
by the evaluated VPN implementations are used, an off-path model.
adversary is less likely to predict the port used by the client.
c) Software testing: Our framework aims to find worst-
C. Specification and Implementation case traffic patterns that consume resources at the server. This
approach is related to fuzzing, a common software testing
strongSwan implements a highly complex protocol spec- technique that explores a large domain of possible inputs
ified across multiple standards documents. Moreover, many to provoke edge cases and reveal implementation bugs [18].
essential implementation and configuration recommendations This technique has been applied to OpenVPN to find logical
for DoS resilience are described in separate RFCs. Our analysis flaws in the state machine of implementations [2]. Similar
of strongSwan has revealed that the implementation is not com- to our approach, some fuzzing tools also apply evolutionary
pliant with many of the recommendations, e.g., RFC 8019 [16]. algorithms to effectively explore the input space of a given
These types of deviations make it very challenging to deploy black-box application [20]. Fuzzing is designed for a setting
and configure a DoS-resilient VPN, even for a user that has in which candidate inputs can be tested in rapid succession,
a thorough understanding of the specifications. WireGuard whereas in our approach, measuring the impact of a flooding
does not suffer from the same issues as it was designed and attack strategy is significantly more time-consuming.
implemented in conjunction.
XI. C ONCLUSION
D. Adversarial Testing Methodology We present a framework for generating and testing stateless
We envision developers to integrate adversarial tests such flooding attacks on VPN implementations. Our evaluation on
as ours into the development process to evaluate the DoS a real setup shows that state-of-the-art VPN solutions are
resilience of their designs and implementations. A high- vulnerable to well-orchestrated flooding DoS attacks. This
bandwidth testbed is beneficial for such evaluations, but as has important implications for real-world deployments: critical
our results have shown, many attacks clearly show their site-to-site connections commonly make use of several redun-
impact already at traffic rates below 1 Gb/s, which are easily dant VPN tunnels between different endpoints to achieve high
achievable on inexpensive commodity hardware. Moreover, availability. However, our results show that connections over
the attacks are not specific to a network topology and could as many as 10 tunnels could be brought down entirely using a
also be transferred to cloud-based testbeds. Our adversarial few gigabits of bandwidth, if the adversary is able to determine
testing framework can be applied to new protocols and can endpoint locations.
be extended and modified to perform other flooding attacks. These results highlight that rigorous adversarial testing is
Even providing just a simple list of generic protocol packets crucial for creating more DoS-resilient protocol implementa-
to the exploration algorithm can reveal interesting results, as tions. Our framework represents a major step toward making
we have observed in our analysis of WireGuard. this type of testing more accessible, and its source code will
be made available publicly.
X. R ELATED W ORK
In future work, our methodology could be applied to pro-
In this section, we review existing performance studies prietary (closed-source) VPN implementations, as the source
of the VPN implementations we have evaluated. Moreover, code is not required to carry out the adversarial testing.
we provide an overview of the literature on DoS attacks and Moreover, it would be useful to complement the evaluation
defenses on VPNs and relate our approach to standard software with other adversary models such as insider adversaries. Such
testing techniques. an attacker can establish a legitimate connection to the VPN
server, aiming to disrupt other clients connected to the same
a) VPN performance evaluation: In a recent evaluation, server. Finally, the automated attack space exploration could
Pudelko et al. [19] compare the performance of the same benefit from some additional extensions, e.g., by a combination
three open-source VPN implementations that we investigated. with traditional fuzzing techniques that enable a higher degree
Their findings are consistent with our baseline measurements of automation such that the framework can be applied more
(i.e., with no attack traffic) and highlight shortcomings in the easily to new protocols.
parallel implementations that are confirmed by our results. The
original WireGuard paper also includes a performance compar-
E THICAL C ONSIDERATIONS
ison against IPsec and OpenVPN [3], although the developers
state that these measurements are relatively dated [25]. Our We have carefully followed conventions for responsible
results complement these evaluations, which do not consider disclosure. More than a month prior to submission of this draft,
adversarial traffic and therefore provide no indication about we reported our findings according to the respective security
DoS resilience of different implementations. report policies of the studied VPN projects.
13
R EFERENCES single-flow multi-flow client-flow
Throughput [Gb/s]
[1] Azeem Aqil, Ahmed O. F. Atya, Trent Jaeger, Srikanth V. Krishna-
murthy, Karl Levitt, Patrick D. McDaniel, Jeff Rowe, and Ananthram
3
Swami. Detection of stealthy TCP-based DoS attacks. In IEEE Military
Communications Conference (MILCOM), 2015. 2
[2] Lesly-Ann Daniel, Erik Poll, and Joeri de Ruiter. Inferring OpenVPN
state machines using protocol state fuzzing. In IEEE European 1
Symposium on Security and Privacy Workshops (EuroS&PW), 2018.
[3] Jason A. Donenfeld. WireGuard: Next generation kernel network tunnel.
0
0 0.5 1 1.5 2
In Network and Distributed System Security Symposium (NDSS), 2017.
Attack rate [Gb/s]
[4] Anja Feldmann, Oliver Gasser, Franziska Lichtblau, Enric Pujol, Ingmar
14
multi-flow to be the bottleneck, since the process runs at the full capacity
of its core.
Throughput [Gb/s]
3
single-flow multi-flow client-flow
2
15
Client Server Attacker
P ACK V1
TLS Handhsake
Fig. 18. Packet exchange of the forced key renegotiation attack on OpenVPN.
16