WEBVTT

00:00:00.000 --> 00:00:03.657
<v Josh>One of the first console games I got into growing up was Halo.

00:00:04.249 --> 00:00:08.169
You know, back when the games came in those cool cases with artwork inside,

00:00:08.432 --> 00:00:11.848
and there was no downloadable content you had to pay extra for.

00:00:12.505 --> 00:00:15.528
Just one game, you bought it, and that was it.

00:00:15.528 --> 00:00:21.588
solo or with others on Xbox Live, which was just a dumpster fire of trash talk, or we'd be at

00:00:21.588 --> 00:00:29.068
someone's place huddled around a huge heavy CRT TV playing split screen. Honestly, it was a blast.

00:00:29.608 --> 00:00:34.908
And whenever we got together, there were two snacks that I'll never forget. Orange Cheetos

00:00:34.908 --> 00:00:41.487
and Mountain Dew. I mean, what a combo for feeling sick and not sleeping. Now you might be wondering

00:00:41.487 --> 00:00:45.027
how Cheetos and Mountain Dew could possibly tie into what we're talking about today.

00:00:45.527 --> 00:00:52.267
Well, it works because today's topic is the Code Red Worm, which was actually named after a can of

00:00:52.267 --> 00:01:00.847
Mountain Dew, Code Red. My name is Josh, and welcome to In The Shell. Every other week, I bring you a new

00:01:00.847 --> 00:01:06.687
story from the archives about hackers, malware, and the people who've shaped the tech world as we know

00:01:06.687 --> 00:01:15.027
it. But for now, let's jump back into this week's episode. Let's take a step back to June 18th, 2001.

00:01:15.527 --> 00:01:20.527
That's when the Code Red Worm story really began, and it all started with a vulnerability.

00:01:21.487 --> 00:01:28.687
Riley Hassel, who worked at a company called iDigital Security, spelled E-E-Y-E, was running

00:01:28.687 --> 00:01:36.207
some custom auditing code. His goal? To test i's Microsoft IIS web server for any hidden vulnerabilities.

00:01:36.207 --> 00:01:43.287
And guess what? He found one. A pretty serious one, actually. A buffer overflow vulnerability

00:01:43.287 --> 00:01:50.207
in a section of code that dealt with input parameters. Specifically, it was in the IS API

00:01:50.207 --> 00:01:56.147
extension. This allowed an attacker to launch a buffer overflow attack, basically taking control

00:01:56.147 --> 00:02:13.507
of the server, and running any code they wanted. But before we get deeper into the story, let me

00:02:13.507 --> 00:02:20.927
explain a couple of key concepts so this all makes sense. First, Microsoft IIS is a software used to

00:02:20.927 --> 00:02:26.767
run web servers. It's how a company's public website got hosted. Back then, and even now,

00:02:27.067 --> 00:02:33.267
a lot of companies used Windows Server to manage things like user accounts, email, websites, you name

00:02:33.267 --> 00:02:39.867
it. So if a company had a website, it was likely running on IIS. Another big web server at the time,

00:02:40.107 --> 00:02:46.327
and still today, that you might have heard of was Apache. So now that we know what Microsoft IIS is,

00:02:46.327 --> 00:02:52.787
let's break down what a buffer overflow is. Let's start with a high-tech analogy. Think of a bucket.

00:02:54.607 --> 00:03:01.547
And you're filling it with a hose. At some point, the bucket's full. But if you keep the water running,

00:03:01.827 --> 00:03:07.107
the bucket overflows, and that extra water starts spilling into places where it doesn't belong.

00:03:07.847 --> 00:03:13.847
In the same way, when a program gets more data than it's expecting, that data can spill into other

00:03:13.847 --> 00:03:20.327
parts of memory where it shouldn't be. These parts of memory might hold important instructions or data.

00:03:20.747 --> 00:03:26.247
And if someone controls that overflow, they can change how the program behaves, potentially making

00:03:26.247 --> 00:03:31.807
it do something harmful, like letting an attacker take control of the system. So with that out of the

00:03:31.807 --> 00:03:38.447
way, let's jump back to June 18th, 2001. After discovering this vulnerability, I did

00:03:38.447 --> 00:03:45.482
digital security released an advisory. They warned users that there was a buffer overflow issue in

00:03:45.482 --> 00:03:53.380
Microsoft IIS, and if exploited, it could allow an attacker to take control of the server just by

00:03:53.380 --> 00:03:59.378
sending a specially crafted request. Basically, someone could type in the right string in the

00:03:59.378 --> 00:04:05.895
URL bar, and they'd have full access to the system. This meant the attacker could do anything,

00:04:06.265 --> 00:04:13.695
run programs, mess the web server's database, change files, or even alter web pages.

00:04:14.633 --> 00:04:19.717
I advised everyone to download a patch from Microsoft that would fix the issue,

00:04:20.063 --> 00:04:22.136
but of course they did not.

00:04:22.136 --> 00:04:28.057
after. I think we really need to deal with these problems before they happen and not think we can

00:04:28.057 --> 00:04:32.813
throw insecure software out there, patch it, and magically make it better, because that's not

00:04:32.813 --> 00:04:38.593
working. Just over three weeks later, on July 12th, after the advisory was announced, the Code

00:04:38.593 --> 00:04:45.516
Red Worm version 1, and yes, there were multiple versions, started infecting Microsoft IIS web

00:04:45.516 --> 00:04:52.661
servers. The worm was first discovered by two other employees at iDigital Security, Mark Myfre and

00:04:52.661 --> 00:04:58.481
Ryan Permay. They noticed that Code Red version 1 was exploiting the vulnerability their colleague

00:04:58.481 --> 00:05:05.826
Ryle Hassel had found. And the name? Well, it just so happened they were drinking Mountain Dew Code Red

00:05:05.826 --> 00:05:11.120
the time. Plus, when the worm defaced certain websites, it displayed the message,

00:05:11.325 --> 00:05:16.907
hacked by Chinese, so the name stuck. Let's dive into how version 1 worked.

00:05:17.420 --> 00:05:22.489
Once the worm found and exploited a vulnerable server, it would first check the server's date

00:05:22.489 --> 00:05:28.912
and see if it was between the 1st and the 19th of the month. If so, it used a static seed to

00:05:28.912 --> 00:05:34.720
generate a random list of IP addresses to probe and infect. And that's where the worm part comes

00:05:34.720 --> 00:05:41.553
in. Every infected host would then try to infect other hosts. The odd thing about version 1 is that

00:05:41.553 --> 00:05:47.053
it used a static seed to generate the list of random IPs, meaning every infected host generated

00:05:47.053 --> 00:05:49.515
the exact same list of IP addresses to target.

00:05:49.515 --> 00:05:53.316
You can think of a seed like giving 10 different people the same cookie recipe.

00:05:53.915 --> 00:05:57.014
You're going to end up with 10 batches of identical cookies.

00:05:57.819 --> 00:06:02.219
Normally, you would use a random seed, so you get a different list each time,

00:06:02.343 --> 00:06:04.326
but they did not do that for some reason.

00:06:05.111 --> 00:06:09.036
So that's what happened between the 1st and 19th day of the month.

00:06:09.656 --> 00:06:14.345
On the 20th of the month, version 1 stopped spreading to new machines.

00:06:15.068 --> 00:06:18.249
Instead, it was programmed to launch a DDoS attack,

00:06:18.993 --> 00:06:22.690
a distributed denial of service, against the White House website,

00:06:23.413 --> 00:06:27.503
and this was supposed to happen between the 20th and 28th day of each month.

00:06:28.309 --> 00:06:33.205
After that, they would pause and start the cycle all over again on the 1st of the next month.

00:06:33.205 --> 00:06:40.801
Red is the latest in a series of worms used to attack computer systems in order to launch

00:06:40.801 --> 00:06:42.609
distributed denial-of-service attacks.

00:06:42.995 --> 00:06:49.535
In such attacks, the victim computers are being used without the operator's knowledge

00:06:49.535 --> 00:06:52.196
to flood a website and overload it.

00:06:52.399 --> 00:06:56.928
But the White House managed to dodge the attack by simply changing the website's IP address

00:06:56.928 --> 00:06:58.228
for the domain being targeted.

00:06:58.797 --> 00:07:02.961
Since the worm was coded to check for a valid connection before launching the attack,

00:07:02.961 --> 00:07:06.413
this move made the DDoS attempt completely ineffective.

00:07:07.429 --> 00:07:11.776
Along with the infection, version 1 also defaced some webpages with a text

00:07:11.776 --> 00:07:16.894
Welcome to HTTP colon forward slash forward slash www.

00:07:16.894 --> 00:07:23.398
Worm.com, exclamation point, new line, hacked by the Chinese, exclamation point.

00:07:23.679 --> 00:07:26.961
But in the end, version 1 didn't do much damage.

00:07:27.381 --> 00:07:27.921
Why?

00:07:28.362 --> 00:07:34.446
Because infected systems kept trying to reinfect each other due to the worm using a static seed,

00:07:34.666 --> 00:07:37.968
which stopped the worm from spreading as far as it could have.

00:07:38.509 --> 00:07:41.571
Plus, version 1 only lived in the computer's memory.

00:07:41.831 --> 00:07:46.374
It didn't write itself to the hard disk, so just rebooting the machine could get rid of the worm.

00:07:46.914 --> 00:07:52.538
So, Jim, if someone's computer or their server is hit by this code red worm, what can they do?

00:07:52.858 --> 00:07:58.122
Well, code red deactivates as soon as you reboot the machine, but of course it could get reinfected.

00:07:58.262 --> 00:08:00.583
There is a patch available at Microsoft's web.

00:08:00.583 --> 00:08:04.478
website that takes code red off and prevents that vulnerability from being exploited.

00:08:05.104 --> 00:08:12.005
This brings us to version 2. It was discovered at 10 a.m. on July 19th, and it made one key change.

00:08:12.308 --> 00:08:17.797
Instead of using the static seed like version 1, version 2 used a random number for the seed.

00:08:18.281 --> 00:08:23.790
Now that might sound like a minor tweak, but it made a huge difference. With a random seed,

00:08:24.214 --> 00:08:29.219
each infected machine generated a different list of IP addresses to target, which dramatically

00:08:29.219 --> 00:08:36.826
sped up its spread. In just 14 hours, version 2 infected more than 359,000 machines.

00:08:37.755 --> 00:08:44.273
The first attack July 19th infected about 300,000 systems in nine hours. At its peak,

00:08:44.273 --> 00:08:50.937
was infecting 2,000 new hosts every minute. And it didn't just hit IIS servers. Devices like DSL

00:08:50.937 --> 00:08:56.641
modems, printers, switches, and routers were also affected. While these devices weren't actually

00:08:56.641 --> 00:09:01.384
infected, they crashed when they received a copy of the worm from an infected machine,

00:09:01.725 --> 00:09:07.208
causing a denial of service. Even though version 2 was more effective than version 1,

00:09:07.208 --> 00:09:14.333
it still had the same weakness. A simple reboot could remove it. Now let's talk about Code Red 2.

00:09:14.613 --> 00:09:22.679
Not version 2, but Code Red Roman numeral 2. Less than two weeks after version 2, on August 4th,

00:09:22.819 --> 00:09:27.962
2001, Code Red 2 appeared, exploiting the same IIS vulnerability.

00:09:28.780 --> 00:09:33.648
It was different from the original version, but it still carried the CodeRed name because the

00:09:33.648 --> 00:09:39.437
source code had the string CodeRed2 in it. Unlike the earlier versions, CodeRed2 didn't

00:09:39.437 --> 00:09:46.493
deface webpages or launch a DDoS attack. Instead, it was far more dangerous. Here's what made it so

00:09:46.493 --> 00:09:52.200
menacing. First, it checked if the host had already been infected and whether the system

00:09:52.200 --> 00:09:59.461
language was set to Chinese. If the system was in Chinese, it would spread for 48 hours using 600

00:09:59.461 --> 00:10:07.152
threads to do so. If it wasn't set to Chinese, it spread for 24 hours using 300 threads. Now a thread

00:10:07.152 --> 00:10:12.470
is basically a worker in a computer that carries out a task, so the worm was sending out either

00:10:11.652 --> 00:10:19.295
300 or 600 workers to spread itself. But it didn't stop there. CodeRed 2 was designed to

00:10:19.295 --> 00:10:25.595
disable file system protections, exposing the C and D drives, the C drive being the main storage

00:10:25.595 --> 00:10:31.152
and the D drive often used for extra storage on Windows computers, and it made those drives

00:10:31.152 --> 00:10:36.832
accessible as public webpages, meaning anyone could view sensitive files through a browser.

00:10:37.535 --> 00:10:42.906
On top of that, it installed the Trojan, a malicious program that opened a security hole

00:10:42.906 --> 00:10:49.185
in the system, allowing an attacker to access it remotely, and it would run whenever File Explorer

00:10:49.185 --> 00:10:55.341
was used, making the system a sitting duck for future attacks or any malicious code execution.

00:10:55.341 --> 00:11:08.756
Although the worm has only been used for denial-of-service attacks, an attacker can exploit the vulnerability to gain control over web server or alter or steal critical corporate and private data.

00:11:08.956 --> 00:11:14.583
Since Code Red didn't just live in memory like earlier versions, removing it was a bit more involved.

00:11:15.224 --> 00:11:25.255
You had to patch the machine and manually remove the worm, which made Code Red 2 much more serious and long-lasting compared to version 1 and version 2.

00:11:26.156 --> 00:11:35.907
In response to the growing threat, representatives from Microsoft and U.S. security agencies held a press conference urging users to download the patch from Microsoft.

00:11:36.327 --> 00:11:39.030
They even went so far as to call it a civic...

00:11:39.030 --> 00:11:45.321
duty cnn and other news outlets picked up the message strongly advising users to patch their

00:11:45.321 --> 00:11:50.946
systems the last time it surfaced around mid-july it affected hundreds of thousands of computers

00:11:50.946 --> 00:11:56.369
around the world resulting in a slight slowdown of traffic on the internet it also tried to deface

00:11:56.369 --> 00:12:01.813
the white house webpage this time experts say it could infect just as many if not more computers

00:12:01.813 --> 00:12:07.357
but a last-minute campaign to get companies to install the security software fix may slow its

00:12:07.357 --> 00:12:13.426
spread but despite all the attention a lot of system administrators waited until the worm was

00:12:13.426 --> 00:12:19.393
already wreaking havoc before they finally patched their servers even though the fix had already been

00:12:19.393 --> 00:12:22.720
available for five weeks before code red even started

00:12:22.720 --> 00:12:29.409
In total, the worldwide cost of Code Red was estimated at $2.6 billion for July and August.

00:12:30.112 --> 00:12:36.962
Over 1 million out of the 5.9 million Microsoft IIS web servers in existence were infected by

00:12:36.962 --> 00:12:43.851
some version of Code Red. As for who was behind it, that's still unclear. Some suspect China

00:12:43.851 --> 00:12:48.351
because of the hacked by Chinese message, while others think it might have been launched by

00:12:48.351 --> 00:12:54.739
someone who attended the DEF CON Hacker Conference in Las Vegas. While Code Red caused a lot of chaos

00:12:54.739 --> 00:12:59.539
for systems administrators and organizations, it also served as a wake-up call about the

00:12:59.539 --> 00:13:06.409
importance of securing web servers and applying patches on time. And honestly, even two decades

00:13:06.409 --> 00:13:11.684
Later, patching servers in a timely manner is still a huge issue, kind of like Cheetos

00:13:11.684 --> 00:13:12.270
and Mountain Dew.

00:13:13.300 --> 00:13:15.321
And that's the story of Code Red.

00:13:16.089 --> 00:13:21.323
Until next time, in case you never heard it, I'll leave you with a clip of the epic original

00:13:21.323 --> 00:13:24.596
Halo theme song, which is cemented in my childhood.

00:13:49.998 --> 00:13:50.099
I'll see you next time.

00:13:50.099 --> 00:13:50.760
Thank you.

