Browser Site Isolation Risks
Browser Site Isolation Risks
1 Introduction
Attacker Model. We use a weak attacker model, the web
Site Isolation [40] is a security architecture for browsers that attacker model [2, Sec. II B]. According to [2], web attackers
provides strong isolation for websites and thus mitigates risks have no special network privileges – being off-path they can
from JavaScript, in particular, remote code execution by sand- not observe, modify or block traffic between other parties on
box compromises [43] and microarchitectural side-channels the Internet. However, web attackers can set up and control
like Spectre [26]. These benefits are achieved by perform- their own server infrastructure and have “root access” [2] to
ing all rendering and script execution from different sites in these servers. When choosing a provider that allows IP Spoof-
distinct processes, leveraging process security of the OS (Fig- ing, attackers can use utility programs such as iptables to
ure 1). Site Isolation is not without costs. The additional configure spoofed IP addresses (cf. Subsection 6.1). Accord-
processes required to implement Site Isolation obviously con- ing to [33], over a quarter of the ASes investigated allowed
sume system memory and CPU time. This overhead was IP spoofing on egress, and two-thirds on ingress. To start the
attack, the victim only needs to visit a web page hosted on based setup with poor network quality, achieving a success
one of these servers. rate of 37%, and in a lab environment.
In contrast to the (stronger) malware attacker, who can
directly access OS resources through native code, the web Known Attacks. Attacks on the OS in the web attacker
attacker is only allowed to use standard browser APIs. So model are rare, as JavaScript is an interpreted language that
more precisely, we ask the following research question: is strongly contained by the browser sandbox. The arguably
most severe attack is Rowhammer.js, which uses malicious
Is a web attacker able to directly control OS re- JavaScript to inject faults into neighboring system memory
sources when Site Isolation is enabled, thereby by- cells at the hardware level, bypassing all OS and sandbox
passing the current browser sandboxes? memory access restrictions [17]. Another series of attacks
uses side-channels to leak private data from other processes
This research excludes (trivial) attacks on the browser itself.
or the OS, such as memory deduplication [16], keystroke
For example, we are interested in DoS attacks against the OS,
interrupts [31], and memory caches [15, 38, 46]. These tech-
but not in DoS attacks against the browser process alone.
niques have in common that they do not attack the sandbox
mechanism, but instead target the machine hardware directly.
Bypassing Browser Sandboxes. Controlling OS resources More common are attacks against the browser sandbox
is fairly simple in the malware attacker model, but a web itself, such as JIT spraying [14] or fuzzing [49]. After achiev-
attacker is restricted by the intentional security boundaries of ing native code execution within the sandbox process, the
the browser sandbox. This sandbox limits access to resources attacker may escalate the attack to the OS in the malware at-
by consumption quotas (e.g. HTML Web Storage), asserting tacker model. One side-channel attack that leaks data from the
implicit authorization (e.g. by a trusted event), or asking for sandbox is an implementation of Spectre in JavaScript [44].
explicit consent (e.g. through popups). We show how to In 2008, Dan Kaminsky [24] showed that in the web at-
overcome these obstacles for a web attacker in three steps: tacker model, DNS security can be broken by DNS Cache
1. First-Level Resources. We show how to use Site Isola- Poisoning. UDP port randomization was implemented as
tion to implement a fork bomb DoS attack in JavaScript that the only countermeasure against the Kaminski attack. Previ-
circumvents browser watchdogs against simple DoS attacks ous attacks defeating UDP port randomization relied on IP
on CPU and memory. This is a direct consequence of Site Iso- fragmentation and timing side-channels [35, 45, 50]. These
lation since extra processes are spawned for all sites included attacks target intermediate devices like home routers or DNS
in the browser window. However, we show how to optimize servers directly. Client-side DNS Cache Poisoning attacks
this process by using IPv6 addresses as sites (Table 1, 1.). target end-user devices such as desktop computers and lap-
2. Second-Level Resources. Second-level OS resources tops. They have been analyzed by Alharbi et al. [3], but only
are resources that can not be allocated directly through in the stronger malware attacker model.
JavaScript or web objects. In this work, we analyze UDP
network sockets. Single network sockets can be opened eas- Main Insights. The main result of this paper is that with
ily, e.g. by accessing a QUIC-enabled webserver, but through novel browser features, the boundary between the browser
techniques like multiplexing and timeouts, the browser sand- and the OS becomes weaker. Attacks that were previously
box prevents the opening of extra sockets. Moreover, many only known in the malware attacker model may now become
open sockets typically cause noisy network traffic and in- feasible in the web attacker model, allowing remote, off-path
crease the CPU load until the browser becomes unresponsive. web attackers to compromise the OS. Our research only re-
We use novel techniques exploiting WebRTC (Table 1, 2.– veals the tip of the iceberg and future work may show that the
5.) to circumvent these sandbox and performance restrictions. mitigations introduced by browser vendors were insufficient.
Combined with the simplified method to spawn new processes, 1. Fork Bomb and UDP Port Blocking. Despite the opti-
this allows us to block all available UDP source ports on a mization efforts by Google, the site concept is still too fine-
victim system. grained and allows for effective DoS attacks, such as the fork
3. Advanced Attack. We show how to use Site Isolation bomb. With Chrome and Edge, it was possible to use Site Iso-
and the attacks on first- and second-level resources to imple- lation and WebRTC to block all UDP ports in Windows with a
ment DEMONS, a Cache Poisoning attack against the OS single visible browser window. The root cause is that each IP
DNS resolver cache, in the web attacker model. We use the (v4 or v6) address still counts as a separate site. The main dif-
fact that we have blocked all UDP ports, in combination with ference between the tab process isolation introduced in 2009
the techniques from Table 1, 6.–8., to release a pair of UDP and Site Isolation is that tab isolation limits OS resources
ports and learn their port numbers, which must then be used per visible window. At the same time, opening additional
by the OS for DNS. Our off-path attacker is thus able to windows through pop-ups was limited by introducing trusted
circumvent UDP port randomization, a major DNS security events. Thus, users were able to control the resource con-
feature. We evaluate this attack twice: in a realistic Internet- sumption of web applications via the visible components of
Objective Malware Attacker Web Attacker Sec.
1. Create many processes Use standard OS API to fork processes. Creates sites using IPv6, bypassing SI process consolidation. new: 3.1
2. Allocate UDP Ports Use standard OS API to create sockets. Indirectly via WebRTC connections. new: 3.2
3. Keep Connections Alive Control socket lifetime over OS API. Use pending connections and data streams. new: 3.2
4. Avoid Network Traffic n/a Use local WebRTC connections. new: 3.2
5. Avoid DoS on CPU n/a Use stream demultiplexing and munging. new: 3.2
6. Find DNS Query Port Use standard OS API to observe ports. SDP offer analysis, and exhaust & single release. new: 5.1, A.1
7. Leak DNS Query Port Use standard OS API to leak over network. Use standard browser API to leak over network. well-known
8. Trigger DNS Request Use standard OS API to start DNS lookup. Indirectly via XMLHttpRequest. well-known
Table 1: DEMONS combines Site Isolation (SI) with eight additional browser techniques, six of these novel, to bypass the
sandbox. Together these techniques, which are accessible in the web attacker model, replace the local malware attacker in [3].
the browser. With Site Isolation, this is no longer the case. 3. We identify conceptual weaknesses in the Site Isola-
We therefore propose, implement, and evaluate a concept to tion architecture and discuss countermeasures against
limit resource consumption rooted in the visible components. resource exhaustion attacks based on Site Isolation, as
2. DNS Cache Poisoning. We show that a web attacker well as mitigations to the DEMONS attack. Specifi-
can not only block all available UDP ports but also release cally, we develop, implement, and evaluate an efficient
a single pair of known ports, defeating UDP port random- mitigation to resource exhaustion attacks (Section 7).
ization. In response to our findings, Chrome and Edge now
limit the number of UDP ports that can be allocated globally Responsible Disclosure. We reported our findings to
by the browser (i.e. across all windows and tabs) to 6000, Google, Microsoft, and Mozilla. Google assigned CVE-2020-
so that UDP port randomization remains effective at the OS 6557 and now limits the number of allocated UDP sockets
level. While this mitigates the DEMONS attack this may not across all renderer processes. Microsoft also adopted this
be sufficient in the future. When UDP port randomization solution in the Chromium-based Edge browser. Google has
was introduced, the designers considered adding 16 bits of also awarded a bug bounty to the authors for their findings.
randomness for the DNS resolver alone to reduce the suc-
cess probability of a web attacker to one in 232 . However,
Artifacts. All artifacts are available as Open Source.1
Windows only has 214 freely available UDP ports, shared
among all processes, resulting in a success probability of one
in 216+14 = 230 . Our web attacker could control all but two of 2 Background
these ports, with a success probability of one in 216+1 = 217 .
Even with the global limit, we still could control slightly less 2.1 Site Isolation
than 6000 ports, enhancing the success probability to one in
216 · (214 − 6000) ≈ 229.34 . This may still allow for future A decade ago, all major browsers abandoned the single pro-
attacks. As a lasting countermeasure, we think that a critical cess paradigm and used separate processes for the rendering
re-evaluation of the OS socket API is necessary since the of different browser windows and tabs. Content from differ-
current API is not designed to be used as an entropy source. ent sites however was still rendered in the same process, e.g.
when a cross-origin iframe was embedded in the webpage.
Site Isolation [40] improves content isolation based on
Contributions. We make the following contributions:
process separation significantly because a new process is
1. We describe how Site Isolation in browsers can be ex-
created for every site. For example, if a web page contains
ploited for novel resource exhaustion attacks against the
a cross-site iframe, at least two processes are used for ren-
client OS by a web attacker (Section 3). We provide
dering. The site concept is more coarse-grained than the
an evaluation of these attacks and show that they can
better-known web origin concept: To extract the site from a
be used to implement DoS attacks against the operating
web origin, only the protocol and the main domain are consid-
system or the web browser (Section 4).
ered, subdomains and port numbers are omitted. For example,
2. To show that possible attacks go beyond DoS, we im-
https://a.com:4444 and https://b.a.com refer to dif-
plement DEMONS, a DNS Cache Poisoning attack that
ferent web origins but the same site. Sites referenced by IPv4
stealthily poisons the DNS cache of the Windows oper-
or IPv6 addresses instead of a domain name are considered
ating system, in the web attacker model. (Section 5). We
distinct sites rendered in separate processes.
evaluate DEMONS on the Internet and in a lab setting
Since each process induces overhead in the OS, Site Isola-
(Section 6). We show that under real-world conditions,
tion in Chrome has been optimized to reduce the total number
DEMONS has a success rate of 37%. In the lab, we
of processes (Figure 1) with process consolidation. Suppose
compare DEMONS to a malware-based attack, which
has a slightly better success rate. 1 https://git.noc.rub.de/gierlmds/isolated-and-exhausted
two windows (or tabs) are open in the browser, where the doc- IPv4/IPv6. Port numbers are grouped into three distinct use
ument is loaded from the same site a.com. For each of these cases [7]. System ports (0–1023) are associated with well-
windows, a separate process is started. Additional processes known internet services (e.g., 53 for DNS). User ports (1024–
are started for each iframe loaded from a different site; how- 49151) may be statically assigned for custom applications.
ever, if the same site is loaded into iframes in two different Ephemeral ports (49152–65535) are used by clients for a sin-
windows (e.g., site b.org in Figure 1), only a single process gle connection, such as a DNS query. Usually, the OS picks an
is running which renders both iframes. arbitrary unallocated number from the ephemeral port range.
Site Isolation has been implemented by Google Chrome, Once a port number is bound to a socket, it uniquely identifies
which recently also became the base for Microsoft Edge. the socket over its lifetime. Actual port ranges can deviate
Mozilla rolled out their own Site Isolation implementation from the above standards. For example, Linux typically uses
with Firefox 94 [13]. 32768–60999 for ephemeral ports.
WebRTC[u]
WebRTC[m] - - -
swap on[c] 12 10 435 F - - - 9 6 233
Processes
swap off 12 10 446 F - - - 9 6 271
Linux1
WebRTC[p] - - -
Sockets
WebRTC[u] - - -
WebRTC[m] - - - - - -
Allocation over intentional browser limits. Exploitable in a fork bomb or DEMONS attack.
The browser crashes. F The operating system becomes unusable.
Ports blocked: ≤ 10% ≤ 25% ≤ 50% ≈ 100% (at most one open port due to allocation in pairs)
WebRTC objects: [p] with a single data channel, [u] with multiple data channels, [m] with munging.
OS versions: 1 Windows 10 (1909 Build 18363.815), 2 Kubuntu Linux 18.04.5 LTS (Kernel 5.4.0-62)
Swap configuration: [a] automatically managed (240 GB disk), [b] automatically managed (64 GB disk), [c] 1 GB swap partition.
Browser versions: 3 Chrome 83.0.4103.106, 4 Chromium 83.0.4103.0, 5 Edge 83.0.478.45, 6 Firefox Nightly 86.01a
Hardware configuration: Dell Latitude 5280, Intel Core i5 7200U, 8 GiB RAM, 240 GiB M.2 SATA SSD
Table 2: Site Isolation resource allocations in browsers and their adverse consequences. The columns show different browsers,
attack variants (single vs. multiple sites), and Site Isolation configurations (off/on). The rows describe the OS, resource type, and
variant. Table cells for processes show the maximum number of processes we could allocate, and a symbol indicating if crashes
of the browser and/or OS were observed (cf. Appendix C for details). Table cells for sockets describe the percentage of the UDP
sockets that could be allocated. For example, in Windows with a small swap space configuration, we observed that Firefox with
Site Isolation visiting the multi-site attack allocated 457 processes, and then crashed. As another example, in Windows with
Chrome, WebRTC[m] could be used to bypass browser limits for socket allocation even with a single-site attack, but Site Isolation
and a multi-site attack are required to allocate enough sockets for a DEMONS attack.
Firefox. In contrast to Chrome and Edge, Firefox validates source port randomization is disabled through second-level
the munged SDP and rejects our two modifications with an resource exhaustion (3.2, 4.2). During the poisoning phase,
error message. This means we had to exclude WebRTC[m] malicious entries are injected into the DNS resolver cache
objects from our evaluation for Firefox. of the victim’s client OS. Only the first phase is novel, the
As for the total number of WebRTC and UDP port alloca- second phase is similar to other DNS Cache Poisoning attacks,
tions, Firefox globally limits the total number of allocated such as [3, 24, 35]. We only evaluate Windows 10 as a client
UDP ports to 1000 across all browser processes, regardless OS in this work, and refer to [3] for how to treat differences
of Site Isolation. Thus with Firefox, UDP ports in the OS can in Linux and macOS.
not be exhausted ( ).
5 Advanced Attack: DNS-Poisoning by Ex- Architecture. The infrastructure required by the attacker
haustive Misappropriation of Network consists of the following components (see Figure 3):
Sockets (DEMONS) 1. Web Server: The web server hosts the malicious web
page that will be delivered to the victim’s browser.
DEMONS is a novel Cache Poisoning attack against the 2. Poisoner: A system that, upon receiving a signal from
DNS resolver of the client OS, in the web attacker model. the attacker’s web application, sends a large number of
DEMONS disables UDP port randomization by blocking all spoofed DNS responses with randomly chosen TXIDs
client-side UDP ports except two, and by informing the poi- to the victim. Optionally, multiple poisoners can run
soner about these open ports (see Figure 2). Disabling UDP simultaneously.
port randomization was introduced by Alharbi et al. [3] in an 3. Malicious Server: The system whose IP address is in-
unprivileged malware attacker model. Table 1 summarizes serted into the victim’s DNS cache under the target do-
the difference between their work and ours. main. After a successful attack, the malicious server can
DEMONS consists of two phases. In the setup phase, impersonate the benign target server to the victim.
Client OS Default NS Impact. DEMONS allows for the attacker to gain control
call Query(txid, p0)
Browser Resolver Resolver over the network communication of any process in the OS that
return Response(txid, p0)
relies on DNS security. While most web applications today
Cache Cache rely on TLS for security, this is not true for all applications in
...
general. For example, by rerouting the Network Time Proto-
Response(txid1, p0) Response(txidn, p0)
Deliver attack website col (NTP [36]), the attacker can get control over the system
Report unused UDP port p0, trigger DNS Query
DEMONS
time, potentially influencing certificate validation or license
management. Other examples are email protocols such as
Figure 2: Resolution of www.example.com and the off-path SMTP [25], IMAP [9], and POP3 [47], as well as the file
DEMONS attacker sending responses to the victim. transfer protocol FTP [39], used for anything from firmware
updates to transferring sensitive business documents. Al-
Victim DEMONS though these protocols can be protected by TLS, they are often
Browser
used completely unsecured. Also, some software repositories
http://evil.org Webserver use HTTP rather than HTTPS for automatic download [28].
216–1 WebRTC sockets
(www.evil.org)
pQRY In all these cases, client-side DNS Cache Poisoning can give
WebSocket
the attacker access to a wide range of attacks on data privacy
XMLHttpRequest and system integrity.
DNS query for
“bank.com”
Poisoner
DNSResponse1
DNSResponse2
5.1 Setup Phase
DNSResponsei
OS DNS-Resolver ...
(IPM, pQRY, idTX, bank.com)
DNSResponsen
Source port randomization in DNS depends on free ephemeral
UDP ports. With an increasing number of allocated UDP
Cache entry Malicious Server ports, this pool shrinks and eventually runs empty, effectively
for “bank.com” after IPM = 2008::db8:1
successful attack reducing the randomness in DNS queries back to the 16 bits
provided by the TXID. However, at least one UDP port
Figure 3: Architecture of the DEMONS attacker. must remain unallocated, or no DNS query can be sent and
poisoning is not possible. So, the goal of the web attacker
during the setup phase is to force the browser to allocate all
Limitations. DEMONS requires the attacker to imperson- but one or a small number of known UDP ephemeral ports.
ate a benign default name server by spoofing the source IP This requires two steps:
address in forged DNS responses. This is easy for an at- 1. Exhaustion: The attacker allocates (almost) all available
tacker to achieve because many providers do not filter IP ports by creating a sufficient number of port-allocating
spoofing [33]. However, private IP addresses are not internet- browser objects, e.g. WebRTC connections. This pro-
routable, therefore the position of the attacker’s poisoner cess is finished when error messages indicate resource
relative to the victim’s default name server determines the exhaustion, or when so many objects were created that
feasibility of DEMONS. We distinguish three cases: they would surely consume at least the maximum num-
1. The attacker’s poisoner and the victim’s name server are ber of ephemeral ports available in the OS, in the event
located in the same local network. that no error messages are seen (silent failure).
2. The attacker’s poisoner and the victim’s name server are 2. Single release: The attacker destroys a single object,
not located in the same local network. thereby releasing one (or a small number) of ports back
(a) The victim’s name server has a public IP address. into the OS pool. The attacker must be able to determine
(b) The victim’s name server has a private IP address. the port numbers that were associated with the object,
IP spoofing is feasible in cases 1 and 2(a). Case 1 is a typical either directly with JavaScript, or, in the case of a remote
public network scenario; the attacker and victim both use connection, by observing the destruction at the remote
the same public network (e.g. in cafes, airports, libraries, end controlled by the attacker.
schools, etc.). Case 2(a) occurs in large business and cloud At this point, the OS has one or few free UDP source
scenarios or in cases where home users use a public name ports available, and the attacker knows their numbers. In case
server. Case 2(b) is the default for most home users connected the port numbers were read out by the attacker script in the
to the internet via a home router. Home routers typically run victim’s browser, they can now be leaked to the poisoner in
a local name server which is advertised to all attached devices preparation of the poisoning phase, e.g. through a WebSocket
via DHCP. If users choose to change this default behavior, or an HTTP request to the attacker’s webserver. If the port
e.g., to defend against [50], or to bypass provider DNS-level numbers were observed at the remote end of a connection,
filtering, they transition to case 2(a) and become vulnerable the observing service has to leak them to the poisoner instead.
to DEMONS. See Subsection A.1 and Subsection A.2 for details about the
setup phase in our implementation of the DEMONS attack. wise, the DNS resolver embedded in the OS would not be able
We will now describe in detail how the OS resource exhaus- to send any more DNS queries, and the attack would result in
tion attacks based on Site Isolation can be used to implement DoS instead of a successful DNS Cache Poisoning. This is
an efficient setup phase for the DEMONS attack. The attack why the attacker created the RTC0 object before starting the
starts with a victim’s web browser loading the attacker’s web- port exhaustion process. The attacker now determines DTLS0
site and executing the included malicious JavaScript code (see from RTC0 (cf. Subsection A.1 in the appendix) and leaks
Figure 4). This script performs two tasks: the port number to the poisoner via the WebSocket created in
1. Establish a WebSocket for bi-directional communication the setup phase. Finally, the attacker closes RTC0 , releasing
with the poisoner. This is used to leak the possible DNS both STUN0 and DTLS0 back into the OS pool.
query ports at the end of the setup phase. The Case of an Odd Number of Free Ports. If the OS has
2. Allocate almost all ephemeral UDP ports by the “ex- an odd number of free UDP ephemeral ports at the beginning
haustion” and “single release” technique, using a large of the setup phase, the exhaustion phase will be incomplete
number of WebRTC objects (cf. Subsection 3.2). because only an even number of ports can be allocated by the
Reserving UDP Ports for Later Release. To follow the attacker with WebRTC objects. Thus, one more port LAST
“exhaust” and “single release” approach of the setup phase, will be left unallocated in addition to STUN0 and DTLS0 . We
the attacker first creates a local WebRTC object RTC0 with a found experimentally that most of the time this is the port
single data channel. As explained in Subsection 3.2, this will just before STUN0 , likely an artifact of the mostly sequential
allocate two UDP ports (STUN0 , DTLS0 ) and reserve them UDP port allocation strategy in Windows. Usually, the attack
for later release. Note that in Windows almost certainly these starts at a point in time where the port just before STUN0 is
port numbers are allocated consecutively, so we can assume unallocated, which is LAST := STUN0 − 1. Thus, the poi-
that STUN0 = DTLS0 − 1. soner has to consider the three ports LAST, STUN0 , DTLS0
for potential use by the DNS resolver.
Attacker Finding the DNS Query Port. Under ideal conditions,
Victim Poisoner
Webserver
https://evil.com there would only be one free UDP ephemeral port usable
attack.js
ifrm1= addIframe([IPAddr1]:[Port1])
by the OS resolver, known to the attacker. However, due to
the use of WebRTC objects, we are left with either two or
attack.js
three possible source ports after the setup phase, depending
con(1,i) = UDP.connect(
localhost) on the number of free ports (even or odd) before the attack.
i = 0...n
ifrm1
...
To maximize our success rate, we send each spoofed response
in the poisoning phase a total of three times, once to DTLS0 ,
ifrm2 ... ifrmm-1
STUN0 := DTLS0 − 1 and LAST := DTLS0 − 2 each. Be-
attack.js
cause packets sent to the wrong source port are silently dis-
con(m,i) = UDP.connect(
localhost) carded by the OS, the only impact of this change is that we
i = 0...n
ifrmm
...
pQRY= con(m,n).port()
need three times the bandwidth to perform the attack than in
con(m,n).close() the case of a single free port.
WebSocket.send(pQRY)
Response Burst
Malicious DNS
DNSQueryRetransmission
2. Triggering a DNS Request: Once a stream of spoofed DNSQueryRetransmission
DNSQueryRetransmission
responses is established, the attacker forces the victim to DNSQueryRetransmission
Retransmission limit
issue a query matching the target domain in the query section
drop
DNSResponse(“bank.com”)
of the spoofed responses that are already in transit. The
JavaScript that is still running in the victim’s browser as part
of the malicious website generates an XMLHttpRequest to a Figure 5: DNS retransmissions in Windows during the poi-
resource hosted on the chosen target domain, e.g., bank.com. soning phase.
The sole purpose of this request is to trigger a DNS query to
Attack Duration Spoofing Burst
the target domain, which the browser must resolve before the Min Mean Max #Responses Duration
Success Rate
XMLHttpRequest can be sent. DEMONS (Internet) 15 s 214 s 1162 s 2550 695 ms 37%
DEMONS (Lab) 32 s 243 s 517 s 525 63 ms 36%
From the moment this lookup is initiated, all spoofed re- Malware (Lab) 5s 333 s 1586 s 525 50 ms 57%
sponses that are in transit towards the victim become poten-
tially valid because now there exists a query matching the Table 3: Performance of the web-based DEMONS attack in
target domain in the query section of the spoofed DNS re- an Internet setting, in the lab, and in comparison to a malware
sponses. The only remaining property that can prevent the attacker. The number of responses in a spoofing burst was set
victim from accepting a potentially valid response is a mis- in advance.
matching TXID.
3. DNS Query Retransmissions: At this point, it is impor- 6 Evaluation of DEMONS
tant to understand how the victim system deals with TXID
mismatches because the attacker can not expect to guess the We evaluated DEMONS twice: (1) In an internet setting,
correct TXID right away. In accordance with [3], we observed using a hosting service that allowed IP spoofing, but also pro-
during our experiment that incoming spoofed responses with vided an unstable network connection. The results exemplify
mismatching TXIDs trigger an immediate DNS query retrans- the possible success rate of a real-world attacker, who may
mission (see Figure 5). A retransmission is a DNS query also have to cope with such unstable connections. (2) In a
that is sent out repeatedly to a DNS server in an attempt to closed lab environment. Here we had optimal control over the
retry a previously failed DNS lookup. This retransmission is network, and our results can be reproduced. For comparison,
repeated up to four times for a single DNS query before the we also used the lab environment for an unprivileged mal-
resolver aborts the name resolution with an error. Because the ware attacker as described by [3], substituting the setup phase
attacker maintains a steady stream of spoofed responses with of the DEMONS attacker with that of a malware attacker,
the burst technique, every retransmission attempt is almost while preserving all other aspects of the experiment. Table 3
immediately answered with a spoofed response, long before summarizes all three evaluations.
the authentic name server even receives the retransmission.
4. Blocking the Correct DNS Response: After four re- 6.1 Setup of Internet Evaluation
transmissions, the active query is invalidated and responses
Attacker Setup. We deployed the DEMONS infrastructure
will no longer be accepted, even if their TXID would match
(Webserver, Poisoner, Malicious Server, see Figure 3) at an
the ID of the original query. This includes the answer of the
internet hosting provider in Moscow that allowed IP spoofing
benign server, which will also be rejected. Even though the
(April 2021). For these servers, we measured an upstream
retransmission-limit interferes with the attacker’s ability to
bandwidth that fluctuated between 1 and 200 MBit/s, aver-
brute force a large amount of TXIDs in a short time, the net
age latencies of 70 ms (with outliers up to 200 ms), and
effect is advantageous because with a high likelihood it also
intermittent episodes of packet loss of up to 20%. Although
prevents the authentic name server from placing the correct
these conditions were far from ideal, we could implement
record in the client’s cache.
the DEMONS attack in this setting with a significant success
5. Rinse and Repeat: To obtain more guesses, the attacker rate.
only needs to repeat the poisoning phase by sending another We adapted DEMONS to these network conditions as fol-
burst of spoofed DNS responses and triggering another DNS lows: To compensate for the overall latency, we inserted a
query shortly after. Once the TXID of one of the spoofed 65 ms delay between the attack start signal sent to the Poison-
responses matches the ID used in the victim’s DNS query, ers and the first XMLHttpRequest triggered by the malicious
the attacker observes the incoming XMLHttpRequest on the JavaScript. The latency jitter and packet loss were mostly
malicious server and can end the poisoning phase. compensated by distributing the poisoner across three differ-
ent servers. In addition, we increased the burst size from 105 T480s ran the attacker’s web server, poisoner, and a script to
to 850 spoofed DNS responses per poisoner (for a total of monitor and log the experiment results. To simulate realistic
2550 DNS responses per burst). Longer bursts improve the network conditions we used traffic control to set the latency to
success rate at the cost of a large drop in attack performance. 1 ms and limit the attacker’s bandwidth to a maximum of 20
To counteract this performance loss we increased the number Mbit/s. Since the lab setup provides a much more consistent
of XMLHttpRequests per burst from 1 to 24 (for a total of connection than the internet setup, we used only one poisoner
120 DNS queries), with a 3 ms delay in-between. and a smaller burst size of 525 responses.
[36] D. Mills, J. Martin, J. Burbank, and W. Kasch, “Network [45] H. Shulman and M. Waidner, “Fragmentation consid-
Time Protocol Version 4: Protocol and Algorithms ered leaking: Port inference for dns poisoning,” in Ap-
Specification,” RFC 5905 (Proposed Standard), Internet plied Cryptography and Network Security, I. Boureanu,
Engineering Task Force, Jun. 2010. [Online]. Available: P. Owesarski, and S. Vaudenay, Eds. Cham: Springer
http://www.ietf.org/rfc/rfc5905.txt International Publishing, 2014, pp. 531–548.
[37] G. Nakagawa and S. Oikawa, “Fork bomb attack miti- [46] A. Shusterman, A. Agarwal, S. O’Connell, D. Genkin,
gation by process resource quarantine,” in 2016 Fourth Y. Oren, and Y. Yarom, “Prime+probe 1, javascript 0:
International Symposium on Computing and Network- Overcoming browser-based side-channel defenses,” in
ing (CANDAR). IEEE, nov 2016. [Online]. Available: 30th USENIX Security Symposium (USENIX Security
https://doi.org/10.1109%2Fcandar.2016.0124 21). USENIX Association, Aug. 2021, pp. 2863–
2880. [Online]. Available: https://www.usenix.org/
[38] Y. Oren, V. P. Kemerlis, S. Sethumadhavan, and conference/usenixsecurity21/presentation/shusterman
A. D. Keromytis, “The spy in the sandbox: Practical
cache attacks in javascript and their implications,” in [47] R. Siemborski and A. Menon-Sen, “The Post
Proceedings of the 22nd ACM SIGSAC Conference Office Protocol (POP3) Simple Authentication and
on Computer and Communications Security, ser. CCS Security Layer (SASL) Authentication Mechanism,”
’15. New York, NY, USA: Association for Computing RFC 5034 (Proposed Standard), Internet Engineering
Machinery, 2015, p. 1406–1418. [Online]. Available: Task Force, Jul. 2007. [Online]. Available: http:
https://doi.org/10.1145/2810103.2813708 //www.ietf.org/rfc/rfc5034.txt
[39] J. Postel and J. Reynolds, “File Transfer Protocol,” RFC [48] P. Vixie and D. Dagon, “Use of bit 0x20 in dns labels to
959 (INTERNET STANDARD), Internet Engineering improve transaction identity,” Working Draft, IETF Sec-
Task Force, Oct. 1985, updated by RFCs 2228, retariat, Internet-Draft draft-vixie-dnsext-dns0x20-00,
2640, 2773, 3659, 5797, 7151. [Online]. Available: March 2008. [Online]. Available: https://www.ietf.org/
http://www.ietf.org/rfc/rfc959.txt archive/id/draft-vixie-dnsext-dns0x20-00.txt
[40] C. Reis, A. Moshchuk, and N. Oskov, “Site Iso- [49] W. Xu, S. Park, and T. Kim, “Freedom: Engineering
lation: Process Separation for Web Sites within a state-of-the-art dom fuzzer,” in Proceedings of the
the Browser,” in 28th USENIX Security Symposium 2020 ACM SIGSAC Conference on Computer and
(USENIX Security 19). Santa Clara, CA: USENIX Communications Security, ser. CCS ’20. New York,
Association, Aug. 2019, pp. 1661–1678. [On- NY, USA: Association for Computing Machinery,
line]. Available: https://www.usenix.org/conference/ 2020, p. 971–986. [Online]. Available: https:
usenixsecurity19/presentation/reis //doi.org/10.1145/3372297.3423340
[41] E. Rescorla, “Security considerations for webrtc,” [50] X. Zheng, C. Lu, J. Peng, Q. Yang, D. Zhou, B. Liu,
Working Draft, IETF Secretariat, Internet-Draft K. Man, S. Hao, H. Duan, and Z. Qian, “Poison Over
draft-ietf-rtcweb-security-12, July 2019. [Online]. Troubled Forwarders: A Cache Poisoning Attack Target-
Available: http://www.ietf.org/internet-drafts/draft-ietf- ing DNS Forwarding Devices,” in 29th USENIX Security
rtcweb-security-12.txt Symposium (USENIX Security 20), 2020.
function getPort(rtcpc) { 1
sdp = rtcpc.localDescription.sdp.split("\n"); 2
cand = sdp.filter(i => i.startsWith("a=candidate")) 3
,→ ;
return cand[0].split(/\s+/)[5]; 4
} 5
WebRTC[p] 1000/500 1000/500 5996/2998 1000/500 1000/500 5996/2998 0/999 0/998 0/999
Sockets
UDP v4/v6 WebRTC[u] 1000/500 1000/500 5996/2998 1000/500 1000/500 5996/2998 0/998 0/999 1/999
WebRTC[m] 3001/1500 3001/1500 5997/2996 3001/1500 3000/500 5996/2997 - - -
Processes 11 9 460F - - - 6 6 224
WebRTC[p]
Linux
Note: Chrome/Chromium allocate one UDP port in each WebRTC channel in dual-stack mode, causing an extra allocation in IPv6. Firefox allocates all UDP ports
IPv6 only, but in Linux, they are mapped to IPv4 by the OS. Therefore entries like 1000/500 refer to the number of IPv4/IPv6 ports blocked, resp.
Table 4: Re-evaluation of Resource Exhaustion Attacks based on Site Isolation with DEMONS mitigations deployed in
Chrome/Chromium and Edge.
±1 q2
Observed behavior
¹3 º4 ¹5 º4 Î6
The Browser became unresponsive to user interactions. • • • •
The browser window closed without notification. • • •
The browser showed a crash report dialog. • •
Moving the browser window caused artifacts, the desktop was not redrawn properly. •
The browser window became transparent and could not be dragged, shortly after clicking the window the browser
•
automatically closed and restarted without notification.
The screen turned black for a short time, then the browser crashed with a dialog titled „chrome.exe – Application
Error“, message text: „The application was“. After closing the message another error message with the same title
•
appeared, message text: „The exception unknown software exception (0xe0000008) occurred in the application
at location 0x00007FFC8111A799.“
The browser became unresponsive. The OS displayed a dialog titled „WerFault.exe – Application Error“, message
text: „The application was unable to start correctly (0xc000012d). Click OK to close the application. After •
confirming the dialog by pressing the "OK" button the browser window remained open and unresponsive.
The screen turned black for a short time, then the browser crashed with a dialog titled „msedge.exe – Application
Error“, message text: „The exception unknown software exception (0xe0000008) occurred in the application at
•
location 0x00007FF9E242A799.“. After confirming the dialog a white unresponsive browser window stayed
open.
The browser crashed with a dialog titled „firefox.exe – Application Error“, message text: „The excep-
tion Breakpoint A breakpoint has been reached. (0x80000003) occurred in the application at location •
0x00007FF9DB4C0955. Click on OK to terminate the program“.
The OS froze. • • •
F The screen turned black. • •
The screen was no longer redrawn properly. • •
OS versions: 1 Kubuntu Linux 18.04.5 LTS (Kernel 5.4.0-62), 2 Windows 10 (1909 Build 18363.815)
Browser versions: 3 Chromium 83.0.4103.0, 4 Firefox Nightly 86.01a, 5 Chrome 83.0.4103.106, 6 Edge 83.0.478.45
Hardware configuration: Dell Latitude 5280, Intel Core i5 7200U, 8 GiB RAM, 240 GiB M.2 SATA
Table 5: During our evaluation of the fork bomb we observed effects that affected browsers and operating systems. This table
provides a detailed description of behavior we classified as "browser crash ()" and "OS unusable (F)".