Latest / CyberPodcast / How Tor Hidden Services Can Be Abused by Botnets | Paper Breakdown #6 | CyberPodcast
Transcript
- 0:00All right, let's jump right in. Welcome to this explainer.
- 0:03Today we are unpacking an absolute cyber medical mystery.
- 0:06We're going back to the day the Tor unanimity network literally
- 0:09almost buckled under its own weight, and we're going to teach
- 0:12you the core technical concepts behind exactly what happened.
- 0:16We'll look at how a massive botnet choked the entire system.
- 0:19And more importantly, we're going to explore the ingenious
- 0:22engineering proposals designed to fix it.
- 0:25OK, let's dive into this. Here is our road map.
- 0:28First, we're going to diagnose the technical illness with a
- 0:312013 Tor crisis and then understand Tor hidden services.
- 0:36After we find the botnet bottleneck, we'll systematically
- 0:39evaluate some treatments covering throttling bots and
- 0:42guard nodes, reusing circuits and traffic isolation before
- 0:45finally looking at the future of Tor security.
- 0:48So Section 1, the 2013 Tor crisis.
- 0:52Picture this It's August 2013, and in a span of just three
- 0:56weeks, the estimated daily Tor clients absolutely skyrocketed.
- 1:00We're talking a jump from under 1,000,000 to nearly 6,000,000
- 1:03users. Now this massive sudden spike
- 1:06wasn't some organic surge in privacy awareness, you know, it
- 1:09was an infection. The culprit was a massive click
- 1:12fraud botnet known as Movado or Cefnet.
- 1:15And here's the real kicker. This botnet was actually running
- 1:18its command and control server directly as a Tor hidden
- 1:21service. That's essentially the master
- 1:24brain issuing instructions, and it forced every single infected
- 1:27machine across the globe to communicate with it entirely
- 1:29through the Tor network. Now, the tangible symptom of
- 1:32this user spike was immediate, and it was painful for regular
- 1:35users. The whole network slowed to an
- 1:38absolute crawl. To put that into perspective,
- 1:40the time it took to download a tiny 50 KB file literally
- 1:44doubled, jumping from 1.5 seconds to 3.0 seconds.
- 1:48But here is the real mystery, and it's a weird one.
- 1:51The actual amount of data traffic moving through the
- 1:53network didn't change all that dramatically.
- 1:55The pipe wasn't full of data, So what was causing the blockage?
- 1:59That brings us to Section 2, understanding Tor hidden
- 2:03services. To understand the disease, we
- 2:06first have to learn the baseline mechanics of how Tor hidden
- 2:09services actually operate. Let's breakdown this complex 5
- 2:12step process. First, the service picks its
- 2:15identity and secret keys. Second, it builds encrypted
- 2:18circuits to at least three Tor relays, asking them to act as
- 2:22introduction points. Third, it publishes A
- 2:25descriptor. You can think of this like a
- 2:26listing in a decentralized anonymous phone book. 4th, a
- 2:30client retrieves this listing and builds 2 circuits, 1 to an
- 2:33introduction point and one to a randomly selected rendezvous
- 2:36point. Finally, Step 5, the hidden
- 2:39service builds its own circuit back to that rendezvous point.
- 2:42It's like 2 spies agreeing to meet at a secure, neutral
- 2:44location to exchange information.
- 2:47The crazy part? Connecting just one single bot
- 2:49to its master requires building up to six separate circuits.
- 2:52Moving right along to Section 3, the botnet bottleneck.
- 2:56So let's define the core issue here, which is something called
- 2:59an onion skin. To build an anonymous encrypted
- 3:02tunnel, Tor uses a key exchange protocol called Diffie Hellman.
- 3:06In simple terms, this is a complex mathematical handshake.
- 3:09It allows 2 strangers to agree on a secret lock and key without
- 3:13anyone who's listening in being able to figure it out.
- 3:16The very first message in this exchange is the onion skin.
- 3:19Decryting these cryptographic layers requires heavy, complex
- 3:22math. Now multiply that math by
- 3:24millions of bots trying to build 6 circuits each.
- 3:27The result? The Tor relays became completely
- 3:29CPU bound, their processors just flat out maxed out.
- 3:33And this brilliantly illustrates the catastrophic chain reaction
- 3:37that followed. Because the relays were CPU
- 3:39bound, incoming onion skins were forced to just sit and wait in
- 3:43decryption queues. Because they waited too long,
- 3:45they naturally began to time out.
- 3:47Because they timed out, the entire partial circuit failed.
- 3:50And because the circuit failed, what did the bot do?
- 3:52It just tried again, injecting more onion skins into the
- 3:55network. It was a vicious, cascading
- 3:57feedback loop. The system was literally choking
- 4:00on its own failed connections. All right, Section 4, throttling
- 4:04bots and guard nodes. Put your network engineer hat on
- 4:08for a second. Your first instinct might be to
- 4:10just charge a cost to build a circuit, right?
- 4:12Just stop the spam. But simple cost throttling tools
- 4:15fail spectacularly in an anonymous network.
- 4:18If you use proof of work. You know, making computers solve
- 4:20math puzzles. Bot Nets actually have massive
- 4:22CPU resources, often way more than regular users.
- 4:27A clever bot master can even use a chain proving attack where a
- 4:30previous bot solves the puzzle for the next bot connecting.
- 4:33OK, well what about captchas to prove you're human?
- 4:36Well, bot Nets are headless, meaning they have no screen or
- 4:38user interface. But actually, so are many
- 4:41legitimate Tor servers. You can't serve a visual capture
- 4:43to a headless server. Plus in an anonymous network you
- 4:46can't easily blacklist an IP address.
- 4:48Bots can just guess captchas endlessly until they eventually
- 4:51slip through. So if we can't throttle the
- 4:53cost, what if we throttle at the entry guard node?
- 4:57This is a really interesting concept called assigned guards.
- 5:01Basically, regular clients get a low rate limit.
- 5:03Say they're only allowed to build 30 circuits per hour.
- 5:06If a legitimate server needs to be busier, they can use a
- 5:09verifiable cryptographic token to get a higher limit without
- 5:12flooding the network. Notice the simulation data we're
- 5:15looking at here. That throttle traffic line in
- 5:18blue successfully isolates the network from that chaotic red
- 5:21spike of botnet traffic. The network stays completely
- 5:24stable. Which brings us to Section 5,
- 5:28reusing circuits and traffic isolation.
- 5:31Take a look at the green light on this graph.
- 5:33Remember how we set a single timeout cause Tor to destroy an
- 5:36entire multi hop circuit and start completely over?
- 5:39Well, researchers asked, what if we just reuse the failed partial
- 5:42circuit if a connection times out on the third hop?
- 5:45Actually, scratch that, just truncate it back to the second
- 5:47hop and try extending again from there.
- 5:50The math shows that this incredibly simple reuse could
- 5:53reduce the overall cryptographic load on the network by a massive
- 5:5610 to 30%. Another proposed treatment is
- 5:59hidden service isolation. This introduces a brand new type
- 6:03of data packet called a No HS Create Cell, which stands for No
- 6:06Hidden Service. The goal here is pure
- 6:09segregation. If a circuit is built with this
- 6:11new cell, the relays will silently drop any hidden service
- 6:14traffic trying to use it. This guarantees that normal
- 6:16everyday users checking their e-mail aren't competing for Hwy.
- 6:19space with millions of bots all trying to reach a hidden
- 6:21service. Finally, Section 6, the future
- 6:25of Tor security. So here's a thought to leave you
- 6:29with. The absolutely crucial take away
- 6:31is that in cybersecurity, there is literally always a trade off.
- 6:35It's a fascinating dilemma, really.
- 6:37If we isolate hidden service traffic to protect the network's
- 6:40overall speed, we inadvertently make that specific traffic stand
- 6:43out. Will these mitigation tools
- 6:45eventually erode anonymity for the legitimate users relying on
- 6:48them? Think about it.
- 6:49If relays can clearly distinguish hidden service
- 6:52traffic from normal traffic, it logically shrinks the crowd that
- 6:54those users can hide within. It's a delegate ongoing balance
- 6:58between keeping the system alive and preserving absolute
- 7:01anonymity. Which side of the scale carries
- 7:03more weight? That is the ever evolving puzzle
- 7:05of network security. Thank you so much for joining me
- 7:08to explore the mechanics behind this incredible event.
- 7:11Until next time, keep learning.