Latest / CyberPodcast / Unmasking the Tor Network with an HTTP Attack | Paper Breakdown #4 | CyberPodcast
Transcript
- 0:00Imagine locking yourself inside a windowless, completely
- 0:03impenetrable vault. You feel entirely hidden from
- 0:05the outside world for years. You know that's exactly how we
- 0:09viewed our digital privacy when using advanced anonymizing tools
- 0:12on the Internet. But what if the very
- 0:13architecture of that vault could somehow be turned against you?
- 0:16Welcome to this explainer. Today we're breaking down a
- 0:19truly fascinating 2011 research paper by Xiao Gang, Wang Jinjo,
- 0:24Loo, Ming Yang, and Jin Ling. They outlined an ingenious,
- 0:27totally theoretical, but incredibly potent application
- 0:30level attack against the internet's most famous privacy
- 0:32shield, the Tor network. This brings us to the core
- 0:36question that this entire research paper fundamentally
- 0:39challenges. Is true online anonymity
- 0:41actually possible now? For a long time, the security
- 0:44community thought that if you just encrypted the data well
- 0:46enough, the answer was yes, absolutely.
- 0:49But these researchers, they discover that you don't always
- 0:51need to break the lock to see what's inside the vault.
- 0:53Sometimes you just need to watch the footrints leading U to the
- 0:56door. We're going to look at exactly
- 0:58how this brilliant digital investigative work is done.
- 1:01OK, let's dive into this. Here's our blueprint for the
- 1:04explainer today. We'll start with the promise of
- 1:06privacy, move into how Tor hides traffic, uncover the invisible
- 1:10tracker attack, map out how this digital heist is executed, weigh
- 1:14accuracy versus stealth, and finally, look at defending the
- 1:18Tor network. Part 1, The promise of privacy.
- 1:21The impenetrable fortress. To really appreciate the
- 1:25brilliance of this attack, we first have to understand the
- 1:27sheer strength of the fortress we're dealing with.
- 1:30The Tor network is widely considered the absolute gold
- 1:33standard for Internet privacy. As the paper defines it, it's a
- 1:37circuit based, low latency, anonymous communication system.
- 1:41But what does that mean in plain English?
- 1:42Basically, it's a network built to anonymize your web traffic in
- 1:45real time. It allows you to browse the web,
- 1:48send instant messages, use location services, all without
- 1:51anyone knowing who you are or where you're connecting from.
- 1:55Conventional encryption by itself just isn't enough to hide
- 1:57your identity, right? But Tor uses incredibly strong
- 2:00layered cryptography distributed across a massive volunteer
- 2:03network to completely mask your digital footprint.
- 2:06Moving right along to Part 2, how Tor hides traffic mapping
- 2:10the terrain. Now, what's really interesting
- 2:12about this architecture is the cast of characters involved.
- 2:16On one end we have Alice. That's the client.
- 2:18Basically you sitting at your computer running a local onion
- 2:21proxy. On the far opposite end is Bob.
- 2:24He's the server Alice wants to talk to, like a website.
- 2:27Now, to get from Alice to Bob, the data doesn't just travel in
- 2:29a straight predictable line. Instead, it bounces through
- 2:32exactly 3 specialized Roxy servers called Onion routers, an
- 2:36entry router, a middle router, and an exit router.
- 2:39The way this circuit is built is actually where the Onion and Tor
- 2:42gets its name. First, Alice's software picks 3
- 2:45routers from a massive directory.
- 2:47Then she establishes a secure connection to the entry router.
- 2:51And here's the incredibly clever part.
- 2:53She then extends that circuit. Layer by layer.
- 2:55She negotiates secret encryption keys with the entry router.
- 2:58Then through that, she negotiates keys with the middle
- 3:01router, and finally through that, negotiates keys with the
- 3:04exit router. So the data is wrapped in
- 3:06multiple thick layers of encryption.
- 3:08Think about it. The entry router knows exactly
- 3:11who Alice is, but has no clue what she's saying or who she's
- 3:14talking to. The exit router knows who Bob is
- 3:16and what the message says, but has absolutely no idea that
- 3:19Alice sent it. And the middle router?
- 3:21It just blindly shuffles encrypted data back and forth.
- 3:24It's an elegant, highly compartmentalized system.
- 3:27Which brings us to Part 3, the invisible tracker attack and
- 3:31inside job. So the narrative shifts
- 3:35dramatically right here. What the researchers realized is
- 3:37that you literally do not need to break the encryption from the
- 3:40outside if you can just get malicious actors on the inside.
- 3:44Listen to this quote directly from the study.
- 3:46The anonymity of Tor clients is threatened by potential HTTP
- 3:49based application level attack against Tor, which exploits both
- 3:53Tord's design features and HTT. PS vulnerability to man in the
- 3:56middle attacks. Why is this so utterly
- 3:58terrifying? Well, previously to Unmaskator,
- 4:00user attackers had to trick them into downloading invasive clunky
- 4:03plug insurance like Java or Flash just to leak their true IP
- 4:06address. This attack, it doesn't need any
- 4:08of that zero plug insurance. Even if you completely disable
- 4:11all active content in your browser, this attack is still
- 4:13going to find you. It exploits the fundamental way
- 4:15the web itself functions. So what is the fundamental
- 4:19prerequisite for this heist? The adversary has to control
- 4:22both the entry router and the exit router for a user specific
- 4:26circuit. Now remember how Tor is run by
- 4:29everyday volunteers? Literally anyone can set up a
- 4:32router. If an attacker sets up a few
- 4:34high bandwidth, highly reliable servers, the Tor network
- 4:37naturally prefers them because they're fast.
- 4:39The attacker doesn't have to compromise the entire network,
- 4:42they just need Alice to randomly pick their malicious router as
- 4:45her entry point and their other malicious router as her exit
- 4:48point. Once they hold both ends of the
- 4:50tunnel, the trap is completely set.
- 4:52Part 4 Executing the digital heist, The invisible tripwire.
- 4:57And this brilliantly illustrates the exact mechanic of Scheme 1.
- 5:01Alice thinks she is talking securely to Bob, the server.
- 5:04She requests a web page. Her request travels through the
- 5:06network and hits the malicious exit router.
- 5:09Because the exit router is the one that actually fetches the
- 5:11raw data from Bob, it gets to see the unencrypted request.
- 5:14But instead of just passing Bob's real web page back to
- 5:17Alice like it's supposed to, the malicious exit router intercepts
- 5:20it. It acts as a man in the middle
- 5:22and injects a completely forged web page straight back down the
- 5:24tunnel to Alice. At the code level, it's devious.
- 5:28The malicious exit router injects a series of links for
- 5:31tiny 35 byte empty GIF files into the HTML.
- 5:35But the real kicker is right at the end of those lines, style
- 5:39equals display none. This tiny snippet of code forces
- 5:43Alice's web browser to fetch these images, but strictly tells
- 5:46it not to display them on the screen.
- 5:49Alice is completely oblivious. She's just staring at a blank
- 5:52page or a loading screen, but in the background, her browser is
- 5:55secretly and frantically requesting these invisible
- 5:58images. So why go through all this
- 6:01trouble to force Alice's browser to fetch invisible images?
- 6:04Well, it all comes down to math. Specifically, this formula.
- 6:08Let's say the attacker injected M number of invisible images.
- 6:12To fetch those, Alice's computer has to send specific data
- 6:15packets, called relay cells, back through the network.
- 6:18It's exactly 2 cells forward and three cells backward for every
- 6:21single image. This creates a highly specific,
- 6:24totally unnatural burst of traffic.
- 6:26Exactly 5 * M relay cells. Now remember our malicious entry
- 6:30router? It can't read Alice's encrypted
- 6:32data, but it can count the cells passing through.
- 6:35It's just sitting there, watching the traffic flow.
- 6:37Suddenly, boom, it sees that exact 5 M burst of traffic
- 6:41coming directly from Alice's IP address in mere milliseconds.
- 6:44The entry router syncs its timestamps with the exit router.
- 6:47The trap Snap shut. The entry router knows exactly
- 6:49who Alice is, and the exit router knows exactly what
- 6:52website she is visiting. Her anonymity is completely
- 6:55destroyed. Part 5 Accuracy versus stealth
- 6:59choosing the weapon. So that's one way to pull it
- 7:02off. But attackers actually have
- 7:04options. The researchers laid out two
- 7:06distinct approaches here. Scheme one, which we just walked
- 7:09through, is the forged web page injection.
- 7:11It completely hijacks the session, injects a totally fake
- 7:14page with those invisible images, forces that traffic
- 7:17spike, and then seamlessly redirects Alice back to her real
- 7:20page. It is incredibly aggressive,
- 7:22fast, and remarkably accurate. But Alice might notice a slight
- 7:25split second delay. Then you have Scheme 2 target
- 7:29web page modification. Instead of using a totally fake
- 7:32page, the exit router grabs the real web page Alice asked for,
- 7:36stealthily slips the invisible image tags right into the
- 7:39existing code, and sends it to her.
- 7:40This is much stealthier. Alice sees exactly what she
- 7:43expected to see with 0 redirect delay.
- 7:46However, it's inherently less accurate.
- 7:48Why? Because the real web page has
- 7:50its own text, its own real images and links, which creates
- 7:53a bunch of traffic noise that can actually obscure that
- 7:55perfect five M burst of relay cells.
- 7:57So the crucial point is how these two strategies stack up in
- 8:01the real world. The researchers actually built a
- 8:03prototype and tested it on the live Tor network.
- 8:07For Scheme 1, the detection delay was less than 4 seconds
- 8:10and the correlation accuracy was near 100%.
- 8:13It honestly didn't matter what the rest of the Internet was
- 8:15doing, the signal was loud and clear.
- 8:18For Scheme 2, the delay jumped to over 5 seconds, and more
- 8:21importantly, its effectiveness decreased the more complex the
- 8:24original web page was. If a page had lots of existing
- 8:27links, that invisible tracker just got lost in the noise.
- 8:30Therefore, an attacker looking for an absolute sure thing is
- 8:33almost definitely going to accept the slight delay of
- 8:35scheme one to guarantee they unmask their target.
- 8:38Finally, Part 6. Defending the Tor network
- 8:42securing the perimeter. Now, before we conclude that
- 8:45privacy is completely dead and buried, the researchers did
- 8:48provide the blueprint for how to secure the perimeter against
- 8:51this exact type of digital heist.
- 8:53Here are the countermeasures they proposed.
- 8:55First, simply deploy more normal, trusted routers.
- 8:58If there are thousands of good routers out there, the
- 9:00statistical odds of Alice accidentally picking an
- 9:02attacker's malicious entry and exit router drops significantly.
- 9:05Second, implements strict authentication.
- 9:07Don't just let anyone with a fast server automatically become
- 9:10a highly trusted node. Third, build browser plug in
- 9:13specifically designed to monitor for these unnatural traffic
- 9:16bursts. You know, like a browser
- 9:17suddenly requesting dozens of tiny invisible files all at the
- 9:20same time. But the absolute, undisputed,
- 9:22most critical defense here is the last one.
- 9:24Utilize HTTPS. You see, this entire attack
- 9:27relies heavily on the exit router being able to read and
- 9:30alter raw unencrypted HTTPHTML code.
- 9:33But if you use HTTPS, the traffic between you and the
- 9:36final web server is encrypted end to end.
- 9:39Sure, the Tor network still shuffles the data around, but
- 9:41the exit router just sees an unreadable block of ciphertext.
- 9:44It literally cannot inject those invisible image tags because it
- 9:47can't interact with the web pages code in the 1st place.
- 9:49And that brings us to our final thought.
- 9:51The massive, widespread adoption of HTTPS across the web today
- 9:55has largely blunted the specific, incredibly brilliant
- 9:58HTTP attack. But it leaves us with a massive,
- 10:01provocative question. As long as the Internet relies
- 10:04on incredibly complex, interconnected layers, will the
- 10:07cat and mouse game of digital privacy ever truly end?
- 10:11Every single time a flawless fortress is built, someone
- 10:14somewhere is figuring out how to analyze the footprints right
- 10:17outside the door. Thank you so much for joining me
- 10:19for this explainer. Keep your eyes open, stay
- 10:22curious, and keep learning.