SlideShare a Scribd company logo
HELP!
my browser
is
leaking
byTomVan Goethem
The modern-day browser
Processing and
rendering resources
HTTP/2 or HTTP/1.1
over TLS over TCP
Cache and
local storage
Many, many, many features
https://secure-bank.com
https://secure-bank.com https://cute-kittens.com
https://secure-bank.com https://cute-kittens.com
https://secure-bank.com https://cute-kittens.com
• Leak security information
• CSRF token (may lead to full account compromise)
• Determine the user’s identity
• Spear phishing
• User profiling
• Perform search queries under the victim’s credentials
• Leak secrets that only the victim has access to
• Extract privacy-sensitive content
• Which websites is the user logged in to?
An attacker may try to…
5
• Same-origin policy prevents site-A from accessing contents of site-B
• XSLeaks abuse side-channel information to leak metadata information
• Response timing
• Firing of events (order & time)
• Size of response
• …
• Metadata is dependent on the state of the user
• Search query has results → large response
• No results → small response
XSLeaks
6
• Response status
• Redirect (30x), 404, …
• Cache status
• Cached resources load much faster
• Rendered content & operations
• frames.length
• postMessage()
• …
7
Categories of XSLeaks
• Browser-based timing side-channels
• HEIST
Response size Server processing time
• Timeless timing attacks
In this presentation…
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van Goethem
GET /transactions?to=tomvg
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van Goethem
<h1>no results</h1>
<h1>no results</h1>
<h1>no results</h1>
Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van Goethem
GET /transactions?to=h4x0r
<h1>17 transactions</h1>
<ul>
<li>2017-06-19 $1,337,000 NSA hack</li>
<li>2020-09-04 $31,337 NNC hack</li>
...
<h1>17 transactions</h1>
<ul>
<li>2017-06-19 $1,337,000 NSA hack</li>
<li>2020-09-04 $31,337 NNC hack</li>
...
<h1>17 transactions</h1>
<ul>
<li>2017-06-19 $1,337,000 NSA hack</li>
<li>2020-09-04 $31,337 NNC hack</li>
...
• Measures time download resource
• Accuracy depends on Internet connection of the victim
• Not under control of the attacker
• Jitter may render attack ineffective
• Need attack that is not affected by network conditions…
11
const start = performance.now();
fetch('https://example.com/url').then((response) => {
const end = performance.now();
analyze(end - start);
});
• Timing starts after resource has been downloaded
• Not affected by network condition
• Time to parse resource as video depends on its size
• Has been mitigated
• Error is thrown before response is parsed
• Chrome: CORB - Firefox: MIME-type checking
12
const video = document.createElement('video');
let start;
video.addEventListener('suspend', () => {
start = performance.now();
});
video.addEventListener('error', () => {
const end = performance.now();
analyze(end - start);
});
video.src = 'https://example.com/url';
• Timing starts after resource has been downloaded
• Not affected by network condition
• Time to add/remove resource from cache is related to size
• Mitigated in Chrome: CORB
• Still possible to abuse in Firefox
13
const cache = await caches.open('nnc');
const url = 'https://example.com/url';
const opts = {"credentials": "include", "mode": "no-cors"};
const resp = await fetch(url, opts);
const bogusReq = '/foo' + Math.random();
const start = performance.now();
await cache.put(bogusReq, resp.clone());
await cache.delete(bogusReq);
const end = performance.now();
analyze(end - start);
• Operations performed on resources after they have been
downloaded
• Not affected by network conditions of victim
• Examples:
• Parsing resource in a specific format
• Persisting resource to disk
• Effective countermeasures: discard operations on cross-origin
resources before any operations
Browser-basedTiming Attacks
14
HEIST
fetch('https://example.com/url');
example.com
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
481 bytes
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 9840
<!DOCTYPE html><html>...
481 bytes
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 9840
<!DOCTYPE html><html>...
481 bytes
1448 bytes
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 9840
<!DOCTYPE html><html>...
481 bytes
1448 bytes 1448 bytes
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 9840
<!DOCTYPE html><html>...
481 bytes
1448 bytes 1448 bytes 1448 bytes
example.com
GET /url HTTP/1.1
Origin: example.com
Accept: text/html
TLS
TCP
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 9840
<!DOCTYPE html><html>...
481 bytes
1448 bytes 1448 bytes 1448 bytes
...
example.com
example.com
example.com
example.com
example.com
10 TCP packets
(= 1 TCP window)
example.com
10 TCP packets
(= 1 TCP window)
ACK
example.com
10 TCP packets
(= 1 TCP window)
...
ACK
rest of response
• Response is <= 14480 bytes: everything fits in single TCP window
• Response is > 14480 bytes: multiple TCP windows required
• Server needs to wait for ACK from client
• Additional round-trip
• Detect one or multiple round-trips? => leak information about size
TCP windows
19
const url = 'https://example.com/url';
fetch(url).then((response) => {
// first byte of response received
const firstByte = performance.now();
});
const entry = performance.getEntriesByName(url)[0];
// last byte of response received
const lastByte = entry.responseEnd;
if (lastByte - firstByte < 5) {
// 1 TCP window
} else {
// multiple TCP windows
}
• GZIP uses backreferences to compress content
GZIP compression
21
<html>
<h1>Welcome {{username}}</h1>
...
secret=NoNameCon
...
<html>
<h1>Welcome Tom</h1>
...
secret=NoNameCon
...
<html>
<h1>Welcome secret=</h1>
...
@-17,7NoNameCon
...
<html>
<h1>Welcome {{username}}</h1>
...
secret=NoNameCon
...
<html>
<h1>Welcome secret=a</h1>
...
@-17,7NoNameCon
...
<html>
<h1>Welcome secret=N</h1>
...
@-17,8oNameCon
...
8900 bytes 8899 bytes
• Correct character guess: 1 byte less
• Pad resource to one TCP window
• Reflecting URL parameters
• HTTP/2: using other resources
• Correct guess: one TCP window = one RTT
• vs. Incorrect guess: two TCP windows = multiple RTT
• Leak secrets byte by byte
HEIST
23
• Browser-based timing side-channel
• Estimate of size
• HEIST
• Exact size (after padding)
• After compression (=> leak secrets)
24
Response size Server processing time
• Timeless timing attacks
• HTTP/2
• Concurrency
Timeless
Timing
Attacks
• Typical timing attack
• Heavily affected by network jitter
• Can we do better?
26
const start = performance.now();
fetch('https://example.com/url').then((response) => {
const end = performance.now();
analyze(end - start);
});
fetch('https://example.com/url1');
fetch('https://example.com/url2');
• IF two requests arrive at the same time
• And are processed in parallel
• We know which one took longer to process
• By simply looking at the response order
TimelessTiming Attacks
28
• Major improvement in HTTP/2: concurrency
• We can execute multiple requests in parallel over a single connection
• TCP congestion windows also apply to the client
• Sending large request (or multiple): need to wait for ACK from server before
sending more than one TCP window
• While waiting for ACK, following requests are added to same TCP
packet
HTTP/2
29
example.com
example.com
POST /large
example.com
POST /large
example.com
POST /large
example.com
POST /large
example.com
POST /large
example.com
10 TCP packets
(= 1 TCP window)
POST /large
example.com
10 TCP packets
(= 1 TCP window)
POST /largeGET /url1
example.com
10 TCP packets
(= 1 TCP window)
POST /largeGET /url1
example.com
10 TCP packets
(= 1 TCP window)
POST /largeGET /url1
GET /url2
example.com
10 TCP packets
(= 1 TCP window)
POST /largeGET /url1
GET /url2
example.com
10 TCP packets
(= 1 TCP window)
ACK
POST /largeGET /url1
GET /url2
fetch('https://example.com/large', {
"method": "POST",
"body": largeString
});
let first;
fetch('https://example.com/url1').then(() => {
first = first || 'url1';
});
fetch('https://example.com/url2').then(() => {
first = first || 'url2';
});
• Can distinguish timing differences up to 100 times smaller
• In certain cases as small as 150ns
• Possible to exploit timing attacks that were previously not possible
to exploit
• Generic technique, CDNs can pose some limitations
TimelessTiming Attacks
32
• Many relatively new security features that aim to “fix” the Web
• CORB, CORP, COEP, COOP, SameSite cookies, SecFetch-*
• Aim to limit “bad” functionality that has been pestering the Web
• Cookies should not be included in cross-site requests
• It should not be possible to “play with” cross-site responses
• Attacker shouldn’t be able to endlessly interfere with cross-origin windows
• …
• Most effective when enabled by default
• Finding balance between breaking functionality and guaranteeing security
Defenses
33
• Browsers leak metadata about cross-origin resources
• Can be used to extract sensitive content from users
• In this presentation:
• Leaking the size: estimate/exact
• Leaking server processing time: 100x more accurate
• Independent of network conditions
• Defenses aim to remove the bad legacy features from the Web
• Intervention from websites still required
Conclusion
34
Questions?
@tomvangoethem
tom.vangoethem@cs.kuleuven.be

More Related Content

PPTX
Proxy Presentation
PPTX
Reflective and Stored XSS- Cross Site Scripting
PPT
Computer Worms
PDF
Cross Site Scripting Going Beyond the Alert Box
PPTX
Web security landscape Unit 3 part 2
PPTX
Database Programming
PPTX
VolgaCTF 2018 - Neatly bypassing CSP
PPTX
DATABASE CONSTRAINTS
Proxy Presentation
Reflective and Stored XSS- Cross Site Scripting
Computer Worms
Cross Site Scripting Going Beyond the Alert Box
Web security landscape Unit 3 part 2
Database Programming
VolgaCTF 2018 - Neatly bypassing CSP
DATABASE CONSTRAINTS

What's hot (20)

PPTX
Os Command Injection Attack
PPT
Protocol for Secure Communication
PPTX
Cyber threats
PPT
Virus and Malicious Code Chapter 5
PPTX
Cryptography
PPTX
Buffer overflow attacks
PDF
Btpsec Sample Penetration Test Report
PPTX
Computer virus
KEY
Cross Site Scripting - Mozilla Security Learning Center
DOC
rdbms-notes
PPTX
cyber security presentation.pptx
PPTX
wireless communication security PPT, presentation
PPTX
Calender in asp.net
PPTX
Types of attacks
PDF
Secure coding-guidelines
PPTX
Tools and methods used in cyber crime
PPTX
Cross site scripting
PPTX
VB Function and procedure
PDF
sqlmap internals
Os Command Injection Attack
Protocol for Secure Communication
Cyber threats
Virus and Malicious Code Chapter 5
Cryptography
Buffer overflow attacks
Btpsec Sample Penetration Test Report
Computer virus
Cross Site Scripting - Mozilla Security Learning Center
rdbms-notes
cyber security presentation.pptx
wireless communication security PPT, presentation
Calender in asp.net
Types of attacks
Secure coding-guidelines
Tools and methods used in cyber crime
Cross site scripting
VB Function and procedure
sqlmap internals
Ad

Similar to Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van Goethem (20)

PDF
Side-Channels on the Web: Attacks and Defenses
PPTX
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
PDF
HEIST: HTTP encrypted information can be stolen through TCP windows
PDF
HTTP cookie hijacking in the wild: security and privacy implications
PDF
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)
PDF
Securing your web application through HTTP headers
PPT
HTML5 hacking
PDF
Lec 7(HTTP Protocol)
PPTX
Html5 security
PDF
Why Traditional Web Security Technologies no Longer Suffice to Keep You Safe
PDF
Covert Timing Channels using HTTP Cache Headers
PPT
Browser Security
PDF
CommTech Talks: Lightstreamer (A. Alinone)
PDF
DefCamp 2013 - Http header analysis
PDF
Covert Timing Channels using HTTP Cache Headers
PPT
Dmk bo2 k7_web
PPTX
Covert timing channels using HTTP cache headers
PPTX
Covert timing channels using HTTP cache headers
PDF
Http2 protocol changes
PDF
Building Client-Side Attacks with HTML5 Features
Side-Channels on the Web: Attacks and Defenses
[OPD 2019] Side-Channels on the Web:
Attacks and Defenses
HEIST: HTTP encrypted information can be stolen through TCP windows
HTTP cookie hijacking in the wild: security and privacy implications
CNIT 129S: 13: Attacking Users: Other Techniques (Part 2 of 2)
Securing your web application through HTTP headers
HTML5 hacking
Lec 7(HTTP Protocol)
Html5 security
Why Traditional Web Security Technologies no Longer Suffice to Keep You Safe
Covert Timing Channels using HTTP Cache Headers
Browser Security
CommTech Talks: Lightstreamer (A. Alinone)
DefCamp 2013 - Http header analysis
Covert Timing Channels using HTTP Cache Headers
Dmk bo2 k7_web
Covert timing channels using HTTP cache headers
Covert timing channels using HTTP cache headers
Http2 protocol changes
Building Client-Side Attacks with HTML5 Features
Ad

More from NoNameCon (20)

PDF
Anastasiia Vixentael – Encryption basics [NoName CyberKids]
PDF
Ihor Malchenyuk – What is privacy and how to protect it [NoName CyberKids]
PDF
Olha Pasko - Hunting fileless malware [workshop]
PDF
Nazar Tymoshyk - Automation in modern Incident Detection & Response (IDR) pro...
PDF
Ruslan Kiyanchuk - Калина, Купина, та інша флора вітчизняної криптографії
PDF
Artem Storozhuk - Search over encrypted records: from academic dreams to prod...
PDF
Stephanie Vanroelen - Mobile Anti-Virus apps exposed
PDF
Oksana Safronova - Will you detect it or not? How to check if security team i...
PDF
Bert Heitink - 10 major steps for Cybersecurity
PDF
Ievgen Kulyk - Advanced reverse engineering techniques in unpacking
PDF
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
PDF
Pavlo Zhavoronkov - What is autumn like in prison camps?
PDF
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
PDF
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
PDF
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
PDF
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
PDF
Stas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
PDF
Serhii Korolenko - Passing Security By
PDF
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
PDF
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...
Anastasiia Vixentael – Encryption basics [NoName CyberKids]
Ihor Malchenyuk – What is privacy and how to protect it [NoName CyberKids]
Olha Pasko - Hunting fileless malware [workshop]
Nazar Tymoshyk - Automation in modern Incident Detection & Response (IDR) pro...
Ruslan Kiyanchuk - Калина, Купина, та інша флора вітчизняної криптографії
Artem Storozhuk - Search over encrypted records: from academic dreams to prod...
Stephanie Vanroelen - Mobile Anti-Virus apps exposed
Oksana Safronova - Will you detect it or not? How to check if security team i...
Bert Heitink - 10 major steps for Cybersecurity
Ievgen Kulyk - Advanced reverse engineering techniques in unpacking
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
Pavlo Zhavoronkov - What is autumn like in prison camps?
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
Stas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
Serhii Korolenko - Passing Security By
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
1. Introduction to Computer Programming.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Machine Learning_overview_presentation.pptx
PPT
Teaching material agriculture food technology
PDF
August Patch Tuesday
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Mushroom cultivation and it's methods.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
A Presentation on Artificial Intelligence
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
Assigned Numbers - 2025 - Bluetooth® Document
Unlocking AI with Model Context Protocol (MCP)
1. Introduction to Computer Programming.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Machine Learning_overview_presentation.pptx
Teaching material agriculture food technology
August Patch Tuesday
cloud_computing_Infrastucture_as_cloud_p
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Mushroom cultivation and it's methods.pdf
Empathic Computing: Creating Shared Understanding
A Presentation on Artificial Intelligence
Heart disease approach using modified random forest and particle swarm optimi...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks

Help, my browser is leaking! Exploring XSLeaks attacks and defenses - Tom Van Goethem