WEBVTT
Kind: captions
Language: en

00:00:00.250 --> 00:00:01.668
(suspenseful music)

00:00:01.668 --> 00:00:04.796
- [Derek] In 2021, a hacker
uncovered a fatal weakness

00:00:04.796 --> 00:00:07.507
in the world's most
important operating system.

00:00:07.507 --> 00:00:09.009
- What would you do with a key

00:00:09.009 --> 00:00:12.303
that gets you into any
server on the internet?

00:00:12.303 --> 00:00:14.139
- Is this live to the public right now?

00:00:14.139 --> 00:00:15.724
- Yeah, it's live on the server.

00:00:15.724 --> 00:00:16.933
- Look, I'm not pleased.

00:00:16.933 --> 00:00:19.310
I would like you to change it back.

00:00:19.310 --> 00:00:21.104
- [Narrator] At the time,
just about everyone believed

00:00:21.104 --> 00:00:23.565
that hacking this system was impossible,

00:00:23.565 --> 00:00:24.691
but they were wrong.

00:00:24.691 --> 00:00:26.026
- Well, I can tell you how many systems

00:00:26.026 --> 00:00:27.318
would have been compromised,

00:00:27.318 --> 00:00:28.653
which would have been millions.

00:00:28.653 --> 00:00:31.948
Actually, I'm still surprised
the mainstream news outlets

00:00:31.948 --> 00:00:33.616
haven't really covered this very much.

00:00:33.616 --> 00:00:34.659
- How close did we come?

00:00:34.659 --> 00:00:38.705
- We were weeks away from
millions of internet servers

00:00:38.705 --> 00:00:41.624
being accessible to whoever
crafted the backdoor.

00:00:41.624 --> 00:00:44.878
Anything from spying, to ransom,

00:00:44.878 --> 00:00:47.839
to taking down entire countries,

00:00:47.839 --> 00:00:49.758
you could have done it with this backdoor.

00:00:49.758 --> 00:00:51.384
- This hacker had realized

00:00:51.384 --> 00:00:54.846
the entire operating system
rested on a single part,

00:00:54.846 --> 00:00:56.931
maintained by a single person,

00:00:56.931 --> 00:00:58.892
and that by compromising that one part,

00:00:58.892 --> 00:01:02.145
they could infect almost
any server on the internet.

00:01:02.145 --> 00:01:05.482
So, how could we ever let
ourselves get this vulnerable?

00:01:07.317 --> 00:01:11.237
Well, the story begins
with a jammed printer.

00:01:11.237 --> 00:01:14.240
(suspenseful music)

00:01:16.076 --> 00:01:19.329
(upbeat music)

00:01:19.329 --> 00:01:21.289
- [Narrator] The AI lab was buzzing.

00:01:21.289 --> 00:01:24.501
They had just installed the Xerox 9700.

00:01:24.501 --> 00:01:27.670
It was one of the first ever
commercial laser printers.

00:01:27.670 --> 00:01:29.714
It was a pretty big deal.

00:01:29.714 --> 00:01:32.342
The only problem was it kept jamming.

00:01:34.135 --> 00:01:35.512
- [Stallman] You'd wait an hour figuring,

00:01:35.512 --> 00:01:36.763
I know it's gonna be jammed,

00:01:36.763 --> 00:01:39.390
I'll wait an hour and
go collect my printout,

00:01:39.390 --> 00:01:42.936
and then you'd see that it'd
been jammed the whole time.

00:01:42.936 --> 00:01:45.146
Frustration up the wazoo.

00:01:46.106 --> 00:01:48.149
- Richard Stallman, a
researcher at the lab,

00:01:48.149 --> 00:01:50.110
thought that he had a solution.

00:01:50.110 --> 00:01:52.070
Years earlier, he had
solved a similar problem

00:01:52.070 --> 00:01:54.280
by coding a simple
program that sent an alert

00:01:54.280 --> 00:01:55.782
whenever there was a jam.

00:01:55.782 --> 00:01:57.575
Now, it didn't fix the
problem mechanically,

00:01:57.575 --> 00:02:00.495
but it did make sure that a
jam wouldn't go unnoticed.

00:02:00.495 --> 00:02:02.622
He thought he could do
a similar thing now.

00:02:02.622 --> 00:02:05.083
The only problem was that
Xerox hadn't provided them

00:02:05.083 --> 00:02:06.501
the source code for the printer,

00:02:06.501 --> 00:02:08.920
and without it, Stallman
couldn't write his code.

00:02:08.920 --> 00:02:11.256
So he tracked down the original developer.

00:02:11.256 --> 00:02:12.757
- [Stallman] And I
said, "Hi, I'm from MIT.

00:02:12.757 --> 00:02:16.386
Could I have a copy of
the printer source code?"

00:02:16.386 --> 00:02:20.014
And he said, "No, I promised
not to give you a copy."

00:02:20.014 --> 00:02:21.432
I was stunned.

00:02:21.432 --> 00:02:23.309
I was angry.

00:02:23.309 --> 00:02:26.146
All I could think of was
to turn around on my heel

00:02:26.146 --> 00:02:27.397
and walk out of his room.

00:02:30.066 --> 00:02:31.484
Maybe I slammed the door.

00:02:33.069 --> 00:02:35.280
And I thought about it later on

00:02:35.280 --> 00:02:37.448
because I realized that I was seeing

00:02:37.448 --> 00:02:39.826
not just an isolated jerk

00:02:39.826 --> 00:02:42.203
but a social phenomenon that was important

00:02:42.203 --> 00:02:43.830
and affected a lot of people.

00:02:45.874 --> 00:02:47.500
- [Henry] This social phenomenon

00:02:47.500 --> 00:02:50.503
had slowly invaded the
world of computer research.

00:02:50.503 --> 00:02:51.421
In the late 60s,

00:02:51.421 --> 00:02:53.631
engineers at AT&amp;T's Bell Labs

00:02:53.631 --> 00:02:56.176
invented an operating system called Unix,

00:02:56.176 --> 00:02:58.261
which they shared widely
across universities

00:02:58.261 --> 00:02:59.679
and research labs.

00:02:59.679 --> 00:03:01.639
This was a time of freedom.

00:03:01.639 --> 00:03:03.266
But by the 80s,

00:03:03.266 --> 00:03:05.518
AT&amp;T started going after
Unix clone developers

00:03:05.518 --> 00:03:07.270
for copyright infringement.

00:03:07.270 --> 00:03:08.313
Later, they even sued

00:03:08.313 --> 00:03:10.857
the University of California at Berkeley.

00:03:10.857 --> 00:03:12.650
The tech landscape had shifted.

00:03:12.650 --> 00:03:15.028
They wanted to close off
software development.

00:03:15.028 --> 00:03:16.696
Companies were now making their employees

00:03:16.696 --> 00:03:18.364
sign non-disclosure agreements,

00:03:18.364 --> 00:03:20.200
prohibiting them from
ever sharing their code

00:03:20.200 --> 00:03:21.367
with other programmers.

00:03:22.869 --> 00:03:25.288
- [Stallman] See, this
was my first encounter

00:03:25.288 --> 00:03:26.706
with a non-disclosure agreement,

00:03:26.706 --> 00:03:28.833
and I was the victim.

00:03:28.833 --> 00:03:30.376
And the lesson it taught me was

00:03:30.376 --> 00:03:32.962
that non-disclosure
agreements have victims.

00:03:32.962 --> 00:03:36.132
They're not innocent,
they're not harmless.

00:03:36.132 --> 00:03:37.300
- [Henry] Stallman wondered,

00:03:37.300 --> 00:03:39.928
maybe he could adapt to this new world.

00:03:39.928 --> 00:03:40.762
- [Stallman] But I realized

00:03:40.762 --> 00:03:42.513
that that way I could have fun coding

00:03:42.513 --> 00:03:43.765
and I could make money.

00:03:44.807 --> 00:03:48.645
But at the end, I'd have to look
back at my career and say,

00:03:48.645 --> 00:03:52.357
"I have spent my life building
walls to divide people."

00:03:53.233 --> 00:03:55.568
and I would've been ashamed of my life.

00:03:56.736 --> 00:03:58.529
- So Stallman chose a different path.

00:03:58.529 --> 00:03:59.781
He quit his job at MIT

00:03:59.781 --> 00:04:03.368
and in 1985 established the
Free Software Foundation,

00:04:03.368 --> 00:04:06.246
and it worked to promote
four basic freedoms.

00:04:06.246 --> 00:04:08.790
You should be free to run
software for any purpose,

00:04:08.790 --> 00:04:12.293
free to study it, free to
change it, and free to share it.

00:04:12.293 --> 00:04:13.628
Now, to ensure those freedoms,

00:04:13.628 --> 00:04:15.046
he created a legal license

00:04:15.046 --> 00:04:17.173
that developers could attach to their code

00:04:17.173 --> 00:04:19.259
called the General Public License.

00:04:19.259 --> 00:04:20.551
And to stick it to AT&amp;T,

00:04:20.551 --> 00:04:23.346
he started to work on
a project based on Unix

00:04:23.346 --> 00:04:24.847
but built from the ground up,

00:04:24.847 --> 00:04:27.350
so AT&amp;T couldn't sue.

00:04:27.350 --> 00:04:28.851
He called the project GNU,

00:04:28.851 --> 00:04:31.646
a recursive acronym for GNU is Not Unix.

00:04:33.147 --> 00:04:34.983
Now, to replicate a Unix system,

00:04:34.983 --> 00:04:36.526
the GNU Project had to recreate

00:04:36.526 --> 00:04:38.319
three layers of functionality.

00:04:38.319 --> 00:04:39.862
They needed the utilities,

00:04:39.862 --> 00:04:42.031
which were the everyday
tools and commands,

00:04:42.031 --> 00:04:43.491
the shell, which is the terminal

00:04:43.491 --> 00:04:45.702
that people use to
interact with the machine,

00:04:45.702 --> 00:04:46.911
and finally, the kernel,

00:04:46.911 --> 00:04:48.997
which is the core that
talks to the hardware

00:04:48.997 --> 00:04:50.498
and manages memory.

00:04:50.498 --> 00:04:52.000
Now, over the next seven years,

00:04:52.000 --> 00:04:54.585
the GNU Project made much
of that from scratch.

00:04:54.585 --> 00:04:57.547
They created the GCC code
compiler, the Bash shell,

00:04:57.547 --> 00:04:59.299
and a host of other core utilities.

00:04:59.299 --> 00:05:02.885
But they were always
missing one key component.

00:05:02.885 --> 00:05:03.720
The kernel.

00:05:05.763 --> 00:05:07.807
That changed in the fall of 1991

00:05:07.807 --> 00:05:10.143
when Stallman visited the
University of Helsinki

00:05:10.143 --> 00:05:11.978
to give a talk promoting the project.

00:05:12.937 --> 00:05:15.481
In the audience was a young
computer science student

00:05:15.481 --> 00:05:17.066
who just happened to be building

00:05:17.066 --> 00:05:19.235
his own kernel from scratch.

00:05:19.235 --> 00:05:21.112
His version wasn't free,

00:05:21.112 --> 00:05:23.281
but after hearing Stallman speak,

00:05:23.281 --> 00:05:24.866
the student changed his mind

00:05:24.866 --> 00:05:27.535
and adopted the General Public License.

00:05:27.535 --> 00:05:31.331
At first, he wanted to call
it Free Unix, or Freax,

00:05:31.331 --> 00:05:34.000
but his friend thought
that sounded terrible,

00:05:34.000 --> 00:05:37.837
so he renamed it after the
student himself, Linus Torvalds.

00:05:37.837 --> 00:05:39.255
Linus, Unix.

00:05:39.255 --> 00:05:41.174
Well, that's how he got Linux.

00:05:43.092 --> 00:05:45.053
That kernel, combined
with the other components

00:05:45.053 --> 00:05:46.054
from the GNU Project,

00:05:46.054 --> 00:05:48.348
became a full operating system.

00:05:48.348 --> 00:05:51.726
Now, technically, Linux
only refers to that kernel,

00:05:51.726 --> 00:05:53.019
but a lot of people use it

00:05:53.019 --> 00:05:54.729
to refer to the whole operating system,

00:05:54.729 --> 00:05:57.607
so GNU and Linux and whatever else.

00:05:57.607 --> 00:05:59.567
Because the code was open and free

00:05:59.567 --> 00:06:01.319
and the projects built on it were too,

00:06:01.319 --> 00:06:03.821
a new model of software
development took hold.

00:06:03.821 --> 00:06:07.241
Anyone could inspect the
code, improve it, fix flaws,

00:06:07.241 --> 00:06:09.827
and generally just push
development forward for everyone.

00:06:09.827 --> 00:06:13.164
So, software split into
two competing ideologies.

00:06:13.164 --> 00:06:16.667
Proprietary closed source
systems controlled by companies,

00:06:16.667 --> 00:06:19.754
and open source projects
where the code was free.

00:06:19.754 --> 00:06:21.214
- It's free in two ways.

00:06:21.214 --> 00:06:23.216
It's free as in you
don't have to pay for it,

00:06:23.216 --> 00:06:26.260
but it's all free to change
it in any way you want,

00:06:26.260 --> 00:06:29.138
and that seems to be the
much more important aspect.

00:06:29.138 --> 00:06:31.349
People are happy to pay for technology,

00:06:31.349 --> 00:06:34.602
but so often do they run
into some roadblocks

00:06:34.602 --> 00:06:36.729
where you have to file a support ticket

00:06:36.729 --> 00:06:38.439
with some large company,

00:06:38.439 --> 00:06:40.608
they may or may not
get the help they need,

00:06:40.608 --> 00:06:45.405
and engineers are just itching
to just fix it themselves.

00:06:45.405 --> 00:06:47.115
- Developers could take that basic code

00:06:47.115 --> 00:06:48.533
which was freely available

00:06:48.533 --> 00:06:50.076
and then add on their own features

00:06:50.076 --> 00:06:52.453
relevant to their specific device.

00:06:52.453 --> 00:06:55.206
They didn't have to reinvent
the wheel every time.

00:06:55.206 --> 00:06:56.499
So that's why Linux spread

00:06:56.499 --> 00:06:58.876
into all sorts of different applications.

00:06:58.876 --> 00:07:00.128
- Hello, I'm a Mac.

00:07:00.128 --> 00:07:01.087
- And I'm a PC.

00:07:01.087 --> 00:07:02.213
No one else.

00:07:02.213 --> 00:07:03.673
- No one.
(woman clears throat)

00:07:03.673 --> 00:07:05.925
- Hi, I'm Linux.

00:07:05.925 --> 00:07:08.803
There are an estimated 30
million Linux users out there.

00:07:08.803 --> 00:07:10.596
- How long you been standing there?

00:07:10.596 --> 00:07:11.431
- A long time.

00:07:12.598 --> 00:07:15.351
- And it's not even just
limited to computers.

00:07:15.351 --> 00:07:18.187
Your electronic vacuum
is definitely Linux.

00:07:18.187 --> 00:07:20.565
Your camera is definitely Linux.

00:07:20.565 --> 00:07:23.985
Most TVs, most electronics are Linux.

00:07:23.985 --> 00:07:26.195
- Linux even runs some of
the most sensitive machines

00:07:26.195 --> 00:07:27.822
on the planet.

00:07:27.822 --> 00:07:29.866
- You can assume that
Linux is pretty much used

00:07:29.866 --> 00:07:32.577
in anything of high-security need,

00:07:32.577 --> 00:07:36.038
not necessarily because
Microsoft, for instance,

00:07:36.038 --> 00:07:38.458
couldn't build something equally secure,

00:07:38.458 --> 00:07:41.711
but because usually
there's secrecy involved

00:07:41.711 --> 00:07:44.130
in building, let's say,
a new weapon system,

00:07:44.130 --> 00:07:46.507
and you don't necessarily
want to have to work

00:07:46.507 --> 00:07:47.884
with some tech company.

00:07:47.884 --> 00:07:49.385
You don't want to involve more people

00:07:49.385 --> 00:07:50.970
than absolutely necessary.

00:07:51.846 --> 00:07:54.307
- [Henry] Of the top 500
supercomputers in the world,

00:07:54.307 --> 00:07:56.684
every single one runs Linux.

00:07:56.684 --> 00:07:59.562
It's used in the Pentagon
and on US nuclear submarines.

00:08:00.855 --> 00:08:02.982
- Every bank you can think of really,

00:08:02.982 --> 00:08:07.069
manufacturers, hospitals, governments,

00:08:07.069 --> 00:08:09.030
defense organizations
and things like that,

00:08:09.030 --> 00:08:11.073
they're all running Linux servers.

00:08:11.073 --> 00:08:12.492
- Today, Linux is everywhere,

00:08:12.492 --> 00:08:15.495
and most people are familiar
with Windows and macOS,

00:08:15.495 --> 00:08:17.705
but they are not the most
popular operating systems

00:08:17.705 --> 00:08:18.706
in the world.

00:08:18.706 --> 00:08:22.418
No, they are dwarfed by
systems running a Linux kernel.

00:08:22.418 --> 00:08:26.756
Android, with over 3 billion
devices, is built on Linux.

00:08:26.756 --> 00:08:29.175
And it also powers the
majority of internet servers

00:08:29.175 --> 00:08:30.009
in the world.

00:08:30.009 --> 00:08:32.470
- There is no one company
that could have imagined

00:08:32.470 --> 00:08:36.307
all the different cases where
computers are used these days,

00:08:36.307 --> 00:08:39.310
and Linux, thanks to its adaptability

00:08:39.310 --> 00:08:41.395
where everyone can just
tweak it in little ways

00:08:41.395 --> 00:08:43.189
to make it fit their use case,

00:08:43.189 --> 00:08:45.441
now covers all the use cases.

00:08:47.235 --> 00:08:48.611
- But all of this,

00:08:48.611 --> 00:08:52.031
it all relies on one key assumption.

00:08:52.031 --> 00:08:53.950
That the code is secure.

00:08:53.950 --> 00:08:56.160
Now, there's a good
reason to feel this way.

00:08:56.160 --> 00:08:58.246
Because there are so many
people looking at the code,

00:08:58.246 --> 00:08:59.914
there's this idea that bugs,

00:08:59.914 --> 00:09:02.291
either intentional or unintentional,

00:09:02.291 --> 00:09:04.043
won't be too deep to catch.

00:09:04.043 --> 00:09:06.671
It's known simply as Linus's Law.

00:09:06.671 --> 00:09:09.674
That with enough eyeballs,
all bugs are shallow.

00:09:09.674 --> 00:09:12.468
But there's a big problem
with this assumption.

00:09:12.468 --> 00:09:15.471
The open source movement
isn't one big project.

00:09:15.471 --> 00:09:16.806
It's an ecosystem.

00:09:16.806 --> 00:09:19.016
You need thousands of
small tools and libraries

00:09:19.016 --> 00:09:20.351
each doing a different job,

00:09:20.351 --> 00:09:23.437
like networking, security, or compression.

00:09:23.437 --> 00:09:24.855
Now, a lot of these projects start

00:09:24.855 --> 00:09:27.817
because one person wants
to fix a specific problem,

00:09:27.817 --> 00:09:29.485
so they build it themselves.

00:09:29.485 --> 00:09:30.486
They're often unpaid,

00:09:30.486 --> 00:09:33.698
coding on nights and weekends
just to make the tool work.

00:09:33.698 --> 00:09:36.534
If it's useful, one open
source project adopts it,

00:09:36.534 --> 00:09:37.660
then another,

00:09:37.660 --> 00:09:39.787
and suddenly you have millions of machines

00:09:39.787 --> 00:09:42.373
all relying on one
person's passion project.

00:09:42.373 --> 00:09:45.626
That's how the entire ecosystem
can end up quietly resting

00:09:45.626 --> 00:09:48.879
on a project maintained
by a single volunteer.

00:09:48.879 --> 00:09:50.590
There's a famous XKCD comic

00:09:50.590 --> 00:09:53.134
that captures this idea perfectly.

00:09:53.134 --> 00:09:55.720
But what happens when
that block is compromised?

00:09:58.306 --> 00:10:01.309
In our story, our person
isn't from Nebraska.

00:10:01.309 --> 00:10:03.936
No, Lasse Collin is from Finland,

00:10:03.936 --> 00:10:06.314
and he's been working on a
small data compression tool

00:10:06.314 --> 00:10:08.899
called XZ since 2005.

00:10:08.899 --> 00:10:10.693
XZ is so good at compression

00:10:10.693 --> 00:10:13.696
that it's now used in almost
every major Linux distribution.

00:10:14.614 --> 00:10:15.698
For the past 20 years,

00:10:15.698 --> 00:10:18.367
almost all of the work of
keeping the tool compatible

00:10:18.367 --> 00:10:20.244
with ever-evolving hardware,

00:10:20.244 --> 00:10:22.163
it's all fallen on Lasse.

00:10:22.163 --> 00:10:23.456
He's never been paid for it,

00:10:23.456 --> 00:10:26.500
but up till now, he's been okay with that.

00:10:26.500 --> 00:10:29.629
Recently, though, he's been
under more and more pressure.

00:10:30.546 --> 00:10:33.257
"Over one month and no
closer to being merged.

00:10:33.257 --> 00:10:34.842
Not a surprise."

00:10:34.842 --> 00:10:37.970
"Progress will not happen until
there is a new maintainer.

00:10:37.970 --> 00:10:40.848
Submitting patches here
has no purpose these days.

00:10:40.848 --> 00:10:42.516
The current maintainer lost interest

00:10:42.516 --> 00:10:45.019
or doesn't care to maintain anymore."

00:10:45.019 --> 00:10:47.271
Lasse responds, "I haven't lost interest,

00:10:47.271 --> 00:10:50.066
but my ability to care
has been fairly limited,

00:10:50.066 --> 00:10:52.568
mostly due to long-term
mental health issues,

00:10:52.568 --> 00:10:54.612
but also due to some other things.

00:10:54.612 --> 00:10:56.155
It's also good to keep in mind

00:10:56.155 --> 00:10:59.116
that this is an unpaid hobby project."

00:10:59.116 --> 00:11:00.910
But it's not enough.

00:11:00.910 --> 00:11:02.870
"I'm sorry about your
mental health issues,

00:11:02.870 --> 00:11:05.456
but it's important to be
aware of your own limits.

00:11:05.456 --> 00:11:07.458
The community desires more.

00:11:07.458 --> 00:11:09.168
You ignore the many patches bit

00:11:09.168 --> 00:11:10.753
rotting away on this mailing list.

00:11:10.753 --> 00:11:13.381
Right now, you choke your repo."

00:11:13.381 --> 00:11:15.299
Lasse is burning out.

00:11:15.299 --> 00:11:17.927
But just when he thinks he
can't handle it anymore...

00:11:19.220 --> 00:11:20.971
"Nice job to both of you
for getting this feature

00:11:20.971 --> 00:11:22.932
as far as it is already.

00:11:22.932 --> 00:11:25.142
Just trying to do my
part as a helper elf."

00:11:25.142 --> 00:11:27.144
Signed, Jia Tan.

00:11:27.144 --> 00:11:30.189
For months, Jia has been taking
some of the load off Lasse.

00:11:30.189 --> 00:11:32.024
He's been incredibly helpful.

00:11:32.024 --> 00:11:33.442
Now he offers to step up

00:11:33.442 --> 00:11:36.237
and take over as
maintainer of the project.

00:11:36.237 --> 00:11:39.615
To Lasse, it sounds almost
too good to be true.

00:11:39.615 --> 00:11:41.283
"As I've hinted in earlier emails,

00:11:41.283 --> 00:11:43.452
Jia Tan may have a bigger
role in the project

00:11:43.452 --> 00:11:44.745
in the future."

00:11:44.745 --> 00:11:46.872
Finally, Lasse can step back and breathe

00:11:46.872 --> 00:11:48.666
after 20 years of hard work.

00:11:49.834 --> 00:11:52.461
But Jia is not who he appears to be.

00:11:53.504 --> 00:11:56.298
And he's identified
Lasse Collin's XZ project

00:11:56.298 --> 00:11:58.843
as a weak link in the Linux ecosystem,

00:11:58.843 --> 00:12:00.052
one that could give him access

00:12:00.052 --> 00:12:02.596
to almost every computer on the internet.

00:12:02.596 --> 00:12:05.599
(suspenseful music)

00:12:08.936 --> 00:12:11.397
Today we take secure
remote logins for granted.

00:12:11.397 --> 00:12:14.024
I mean, they've worked
reliably for over 30 years.

00:12:14.024 --> 00:12:16.235
But it all started in 1995

00:12:16.235 --> 00:12:18.696
at the Helsinki University of Technology

00:12:18.696 --> 00:12:21.699
when a hacker captured thousands
of usernames and passwords

00:12:21.699 --> 00:12:23.325
sent over the campus network

00:12:23.325 --> 00:12:25.327
in a sniffing attack.

00:12:25.327 --> 00:12:27.163
In hindsight, the problem's obvious.

00:12:27.163 --> 00:12:30.332
These login requests were being
sent totally in plain text,

00:12:30.332 --> 00:12:33.043
so anyone who intercepted
the data could just read it.

00:12:34.503 --> 00:12:36.505
(suspenseful music)

00:12:36.505 --> 00:12:39.300
When Tatu Ylonen, a computer
researcher at the university,

00:12:39.300 --> 00:12:40.426
learned of the attack,

00:12:40.426 --> 00:12:41.844
he made it his mission to ensure

00:12:41.844 --> 00:12:44.180
that it would never happen again.

00:12:44.180 --> 00:12:46.432
- [Tatu] Password sniffing was perhaps

00:12:46.432 --> 00:12:50.561
the most serious security issue
on the internet back then.

00:12:51.687 --> 00:12:55.149
- To do this, his solution
needed to ensure two things.

00:12:55.149 --> 00:12:58.360
First, machines had to
establish a secure connection.

00:12:58.360 --> 00:13:01.030
If both computers could
agree on a shared secret code

00:13:01.030 --> 00:13:02.865
that they would use to
scramble their data,

00:13:02.865 --> 00:13:04.700
then even if they were overheard,

00:13:04.700 --> 00:13:07.328
anyone without that secret
code would just get gibberish.

00:13:07.328 --> 00:13:09.121
Now, you could agree on that shared secret

00:13:09.121 --> 00:13:10.456
ahead of time in person.

00:13:10.456 --> 00:13:11.874
- Password.

00:13:11.874 --> 00:13:14.502
- But on the internet,
that's rarely practical.

00:13:14.502 --> 00:13:17.046
No, you have to agree
on that shared secret

00:13:17.046 --> 00:13:19.089
ahead of time without ever having met

00:13:19.089 --> 00:13:21.342
and also with someone
listening in the entire time.

00:13:21.342 --> 00:13:24.553
It sounds really tricky,
but there is a way to do it,

00:13:24.553 --> 00:13:27.306
and I can show you how
using this jar of paint.

00:13:27.306 --> 00:13:29.767
Say I'm trying to send a
message to Gregor over there.

00:13:30.851 --> 00:13:33.896
First step is we agree
on a shared public color.

00:13:33.896 --> 00:13:35.439
Let's pick this red.

00:13:35.439 --> 00:13:37.399
This is no secret, anyone can see this.

00:13:38.317 --> 00:13:40.778
Now we each pick our own private color.

00:13:40.778 --> 00:13:43.656
I'm gonna pick yellow, and he
can pick whatever he wants.

00:13:44.949 --> 00:13:46.575
So we take our private color,

00:13:47.618 --> 00:13:50.120
and then I'm gonna mix
that with the public color.

00:13:51.038 --> 00:13:51.872
It's worth saying now

00:13:51.872 --> 00:13:54.667
that these mixtures are assumed
to be impossible to unmix,

00:13:54.667 --> 00:13:57.002
so even if you know this
orange and you know this red,

00:13:57.002 --> 00:13:58.462
you can't exactly deduce

00:13:58.462 --> 00:14:00.422
the exact shade of yellow
we used to create it,

00:14:00.422 --> 00:14:03.384
and this is important for the
actual computer example later.

00:14:03.384 --> 00:14:05.845
Okay, so I'm gonna send
this over to Gregor.

00:14:05.845 --> 00:14:07.972
- So, I mixed in my secret
color with the public,

00:14:07.972 --> 00:14:09.640
and I'm gonna pass this to Henry.

00:14:10.724 --> 00:14:11.851
- So, Gregor sent me this,

00:14:11.851 --> 00:14:15.938
which looks like a sort of
dark green sort of color.

00:14:15.938 --> 00:14:17.815
And what we're gonna do
now is we're gonna mix it

00:14:17.815 --> 00:14:19.483
with my original private color.

00:14:21.735 --> 00:14:23.737
- Okay, now that I have
Henry's secret color

00:14:23.737 --> 00:14:24.822
mixed in with the public,

00:14:24.822 --> 00:14:26.240
I'm gonna add some of my own.

00:14:28.617 --> 00:14:32.246
- So we end up with this
sort of distinct olive color.

00:14:33.122 --> 00:14:35.040
There's my yellow in there, I can see,

00:14:35.040 --> 00:14:37.126
and whatever Gregor had in his side.

00:14:37.126 --> 00:14:38.836
And the thing is because
each set of paints

00:14:38.836 --> 00:14:40.379
went through the same process,

00:14:40.379 --> 00:14:43.465
they both end up with
this same olive green,

00:14:43.465 --> 00:14:46.385
even though we never
shared our secret colors.

00:14:46.385 --> 00:14:49.471
So we end up with this shared
secret color at the end

00:14:49.471 --> 00:14:50.890
that no one else can get,

00:14:50.890 --> 00:14:52.850
and that means that we can
use it as our secret code

00:14:52.850 --> 00:14:54.310
when sending information.

00:14:54.310 --> 00:14:55.519
Now, in the real exchange,

00:14:55.519 --> 00:14:57.938
we use big public numbers
instead of colors,

00:14:57.938 --> 00:14:59.690
but the idea is the exact same.

00:14:59.690 --> 00:15:02.443
Each side mixes in
their own private number

00:15:02.443 --> 00:15:04.695
using some math that, when
you try to reverse it,

00:15:04.695 --> 00:15:06.405
leads to a discreet log problem,

00:15:06.405 --> 00:15:08.949
which makes it practically
impossible to unmix them.

00:15:08.949 --> 00:15:11.577
That way, we solve the first problem.

00:15:11.577 --> 00:15:14.121
But there is another threat
that's unaccounted for.

00:15:14.121 --> 00:15:17.917
Say a hacker, like Casper here,
tries to sit in between us.

00:15:18.792 --> 00:15:21.295
Now we can create a legitimate connection,

00:15:21.295 --> 00:15:23.714
so we end up with a shared secret code,

00:15:23.714 --> 00:15:26.467
and Casper could do the
exact same thing with Gregor.

00:15:27.343 --> 00:15:30.596
Now, whenever I send a message,
he can relay that to Gregor,

00:15:30.596 --> 00:15:33.599
he can change and modify it
and send his response back.

00:15:33.599 --> 00:15:35.893
And to each of us, the
connection looks legitimate,

00:15:35.893 --> 00:15:38.145
but Casper's sitting
between us the whole time.

00:15:38.145 --> 00:15:40.147
He's a man in the middle.

00:15:40.147 --> 00:15:41.649
So, I need a way of authenticating

00:15:41.649 --> 00:15:44.318
that Gregor is really who he says he is.

00:15:44.318 --> 00:15:45.486
Now, we could do this again

00:15:45.486 --> 00:15:48.113
by agreeing on a password
ahead of time in person,

00:15:48.113 --> 00:15:50.950
but we need a practical way
to do it over the internet.

00:15:50.950 --> 00:15:53.953
This was the second problem
that Tatu had to solve.

00:15:53.953 --> 00:15:54.787
To make that happen,

00:15:54.787 --> 00:15:57.039
Gregor can take two
really big prime numbers,

00:15:57.039 --> 00:15:58.666
which he keeps secret.

00:15:58.666 --> 00:16:00.125
He then multiplies them together

00:16:00.125 --> 00:16:01.502
to get an even bigger number,

00:16:01.502 --> 00:16:03.504
which he then makes public.

00:16:03.504 --> 00:16:05.214
Now, when I want to send Gregor a message,

00:16:05.214 --> 00:16:07.007
I just take that big public number

00:16:07.007 --> 00:16:09.259
and I scramble it in a
way that only Gregor,

00:16:09.259 --> 00:16:10.636
who knows the two prime factors

00:16:10.636 --> 00:16:12.221
that make up that big public number,

00:16:12.221 --> 00:16:14.264
can successfully unscramble.

00:16:14.264 --> 00:16:15.099
For anyone else,

00:16:15.099 --> 00:16:17.893
getting those two prime factors
is practically impossible.

00:16:17.893 --> 00:16:19.979
So, as long as I know that
that big public number

00:16:19.979 --> 00:16:21.438
actually belongs to Gregor,

00:16:21.438 --> 00:16:23.148
I know that anything encrypted to that key

00:16:23.148 --> 00:16:24.858
can only be read by him.

00:16:24.858 --> 00:16:26.860
This is called RSA encryption,

00:16:26.860 --> 00:16:29.113
and it means that if I know
the certificate is valid,

00:16:29.113 --> 00:16:30.698
then I accept the connection.

00:16:30.698 --> 00:16:32.116
And by authenticating Gregor,

00:16:32.116 --> 00:16:34.952
it foils our man in the
middle, Casper Devious.

00:16:36.578 --> 00:16:38.080
All right.

00:16:38.080 --> 00:16:40.416
Tatu Ylonen combined these two steps,

00:16:40.416 --> 00:16:42.876
securing the channel and
authenticating the user,

00:16:42.876 --> 00:16:46.046
into a protocol for remote
logins between machines.

00:16:46.046 --> 00:16:49.383
It gave you the same simple
text shell people were used to,

00:16:49.383 --> 00:16:51.468
a plain terminal where you type commands,

00:16:51.468 --> 00:16:53.804
but now the connection was encrypted.

00:16:53.804 --> 00:16:57.057
He called it Secure Shell, or SSH.

00:16:57.057 --> 00:16:59.226
And it was immediately useful.

00:16:59.226 --> 00:17:02.271
Many Linux machines don't even
have keyboards or monitors,

00:17:02.271 --> 00:17:03.772
especially not servers,

00:17:03.772 --> 00:17:06.775
so you wanna be able to log
in and control them remotely.

00:17:06.775 --> 00:17:08.444
So SSH was soon adopted

00:17:08.444 --> 00:17:11.071
on almost every machine that ran Linux.

00:17:11.071 --> 00:17:14.408
And as Linux spread, so too did SSH.

00:17:14.408 --> 00:17:16.452
Today, when you control
a machine remotely,

00:17:16.452 --> 00:17:18.245
there's a good chance you're using SSH.

00:17:18.245 --> 00:17:22.249
- SSH is literally the
maintenance backbone

00:17:22.249 --> 00:17:23.625
of the entire internet.

00:17:23.625 --> 00:17:26.920
- And the most widely used
open source SSH implementation

00:17:26.920 --> 00:17:29.089
is called OpenSSH.

00:17:29.089 --> 00:17:33.427
And because it's so popular,
it's heavily protected.

00:17:33.427 --> 00:17:35.387
- I mean, OpenSSH is probably

00:17:35.387 --> 00:17:39.850
one of the most closely
examined projects out there

00:17:39.850 --> 00:17:42.436
because it's just so vitally important

00:17:42.436 --> 00:17:44.396
to the security of servers everywhere.

00:17:44.396 --> 00:17:49.026
Having a way to bypass the
authentication in secure shell

00:17:49.026 --> 00:17:51.695
is like having the
master key to the hotel.

00:17:51.695 --> 00:17:53.113
It lets you into every room.

00:17:54.073 --> 00:17:56.033
(suspenseful music)

00:17:56.033 --> 00:17:59.411
- [Henry] This is why Jia
Tan wants a way into OpenSSH,

00:17:59.411 --> 00:18:03.123
but trying to hack it directly
would be almost impossible.

00:18:03.123 --> 00:18:06.001
Lucky for Jia, the open
source model doesn't just mean

00:18:06.001 --> 00:18:07.961
that operating systems
are stitched together

00:18:07.961 --> 00:18:09.463
from many programs,

00:18:09.463 --> 00:18:12.549
but that each of those programs
is itself stitched together

00:18:12.549 --> 00:18:14.218
from other programs.

00:18:14.218 --> 00:18:16.303
Those are called dependencies.

00:18:16.303 --> 00:18:19.890
- OpenSSH is one of the most
scrutinized software packages,

00:18:19.890 --> 00:18:23.185
but that doesn't extend to
all of its dependencies.

00:18:24.144 --> 00:18:25.896
- Jia believes that if he can compromise

00:18:25.896 --> 00:18:27.481
a dependency of OpenSSH,

00:18:27.481 --> 00:18:30.692
he can sneak an exploit
into the main project.

00:18:30.692 --> 00:18:31.777
And it just so happens

00:18:31.777 --> 00:18:34.154
that Lasse Collin's compression tool XZ

00:18:34.154 --> 00:18:36.615
is linked through a chain
of these dependencies.

00:18:38.784 --> 00:18:41.787
(suspenseful music)

00:18:43.497 --> 00:18:45.582
Now, Lasse's original goal with XZ

00:18:45.582 --> 00:18:48.335
was to find a better way
to compress data on Linux.

00:18:48.335 --> 00:18:49.753
That data could be anything.

00:18:49.753 --> 00:18:51.880
Code, an image, text.

00:18:51.880 --> 00:18:53.423
But what was important to Lasse

00:18:53.423 --> 00:18:56.009
was that once you compressed
and decompressed it,

00:18:56.009 --> 00:18:58.303
it had to come back exactly the same.

00:18:58.303 --> 00:19:00.597
The method had to be lossless.

00:19:00.597 --> 00:19:01.640
Let me give you an example.

00:19:01.640 --> 00:19:02.933
We're gonna take the lyrics

00:19:02.933 --> 00:19:05.310
to Rick Astley's hit
"Never Gonna Give You Up"

00:19:05.310 --> 00:19:07.062
and we're gonna try to compress it.

00:19:07.062 --> 00:19:08.605
Now, say we take this

00:19:08.605 --> 00:19:11.233
and we represent it as
a stream of characters,

00:19:11.233 --> 00:19:14.987
and each one gets a
fixed-width 8-bit code.

00:19:14.987 --> 00:19:17.698
Now, that works, but it's inefficient.

00:19:17.698 --> 00:19:18.991
If we go through this stream

00:19:18.991 --> 00:19:21.410
and just count up how
often each symbol appears,

00:19:21.410 --> 00:19:22.828
you'll notice there's a pattern.

00:19:22.828 --> 00:19:24.830
Some appear more frequently,

00:19:24.830 --> 00:19:27.040
like N with 430 uses,

00:19:27.040 --> 00:19:28.584
and some, barely at all,

00:19:28.584 --> 00:19:30.586
like J with one use.

00:19:30.586 --> 00:19:31.461
To save space,

00:19:31.461 --> 00:19:33.422
why don't we give the ones
that appear more frequently

00:19:33.422 --> 00:19:34.673
shorter codes,

00:19:34.673 --> 00:19:37.634
and the rarer ones, well,
they can afford to be long.

00:19:37.634 --> 00:19:38.844
But how do we do that?

00:19:38.844 --> 00:19:42.055
So, let's start by counting up
how often each symbol appears

00:19:42.055 --> 00:19:45.058
and sorting that from most
frequent to least frequent.

00:19:45.058 --> 00:19:46.768
We take the two least frequent symbols

00:19:46.768 --> 00:19:48.812
and join them together into a pair.

00:19:48.812 --> 00:19:51.148
We then treat that pair
as a new combined symbol

00:19:51.148 --> 00:19:54.484
whose frequency is the sum
of the two it represents.

00:19:54.484 --> 00:19:57.070
We can then reinsert
that back into the list.

00:19:57.070 --> 00:19:58.405
Then we do it again.

00:19:58.405 --> 00:20:01.742
We take the two least
frequent items, combine them,

00:20:01.742 --> 00:20:03.702
and then reinsert them back into the list.

00:20:03.702 --> 00:20:05.412
And we do that over and over again

00:20:05.412 --> 00:20:08.582
until we get this massive
structure called a Huffman tree.

00:20:09.458 --> 00:20:12.002
Now, to get our codes,
we just walk the tree.

00:20:12.002 --> 00:20:15.297
A step right is a 1, a step left is a 0.

00:20:15.297 --> 00:20:16.798
So, for example, to get R,

00:20:16.798 --> 00:20:19.218
we just go right, left, left, right,

00:20:19.218 --> 00:20:21.470
so the code is 1001.

00:20:21.470 --> 00:20:24.306
So what you'll notice is the
more commonly occurring symbols

00:20:24.306 --> 00:20:26.225
naturally appear at the top of the tree,

00:20:26.225 --> 00:20:27.809
so they get shorter codes,

00:20:27.809 --> 00:20:29.269
while the ones that appear less frequently

00:20:29.269 --> 00:20:30.729
are at the bottom of the tree.

00:20:30.729 --> 00:20:33.649
The system works well, but
it also has a weakness.

00:20:33.649 --> 00:20:35.275
In our "Never Gonna Give You Up" example,

00:20:35.275 --> 00:20:39.571
it always encodes N-E-V-E-R space.

00:20:39.571 --> 00:20:42.532
It doesn't realize that
this whole chunk repeats.

00:20:42.532 --> 00:20:44.451
So, what if instead of looking at symbols,

00:20:44.451 --> 00:20:46.245
we looked at those chunks?

00:20:46.245 --> 00:20:47.454
Now, they don't have to be words,

00:20:47.454 --> 00:20:49.248
they can be parts of words or even longer.

00:20:49.248 --> 00:20:51.250
They just have to be patterns that repeat.

00:20:51.250 --> 00:20:52.668
So let's scan through the text

00:20:52.668 --> 00:20:55.420
but keep a rolling dictionary
of what we've just seen.

00:20:55.420 --> 00:20:56.546
Then, as we move forward,

00:20:56.546 --> 00:20:59.549
we can check whether the next
chunk has already appeared.

00:20:59.549 --> 00:21:02.094
And if it has, we don't need
to write that chunk again.

00:21:02.094 --> 00:21:05.180
We just write a code with two
numbers, how far back to look,

00:21:05.180 --> 00:21:07.349
and how many characters to copy.

00:21:07.349 --> 00:21:08.850
Now, when we decompress,

00:21:08.850 --> 00:21:10.018
we can just read along

00:21:10.018 --> 00:21:11.937
and whenever we hit one of these codes,

00:21:11.937 --> 00:21:13.981
we jump back, copy the matching chunk,

00:21:13.981 --> 00:21:15.899
and paste it into place.

00:21:15.899 --> 00:21:17.651
Two scientists, Lempel and Ziv,

00:21:17.651 --> 00:21:20.112
published this algorithm in 1977,

00:21:20.112 --> 00:21:22.614
so it became known as LZ77.

00:21:24.616 --> 00:21:26.201
But some of these symbols and pointers

00:21:26.201 --> 00:21:28.161
show up more often than others.

00:21:28.161 --> 00:21:30.497
They actually have their own frequencies.

00:21:30.497 --> 00:21:33.250
So we can feed that whole
stream into another Huffman tree

00:21:33.250 --> 00:21:35.419
to get a second layer of compression.

00:21:35.419 --> 00:21:36.295
And in our demo,

00:21:36.295 --> 00:21:39.006
it actually gets the file down 85% smaller

00:21:39.006 --> 00:21:40.632
than the original.

00:21:40.632 --> 00:21:41.633
This might look new,

00:21:41.633 --> 00:21:43.969
but you've almost
certainly used it yourself.

00:21:43.969 --> 00:21:45.262
It's called deflate,

00:21:45.262 --> 00:21:49.016
but it's better known for
the files it creates, .zip.

00:21:49.016 --> 00:21:50.767
If you ever clicked Close on this before,

00:21:50.767 --> 00:21:52.060
you've definitely used it.

00:21:52.978 --> 00:21:56.398
But Huffman only uses
the overall frequency

00:21:56.398 --> 00:21:58.150
of a chunk repeating.

00:21:58.150 --> 00:22:01.194
Real data isn't just random chunks.

00:22:01.194 --> 00:22:03.405
In our example, after "Never gonna",

00:22:03.405 --> 00:22:07.284
you might get "give you
up", "let you down",

00:22:07.284 --> 00:22:08.994
or "run around and desert you".

00:22:08.994 --> 00:22:10.454
You might get "make you cry",

00:22:10.454 --> 00:22:13.498
you might get "say goodbye"
or "tell a lie and hurt you".

00:22:13.498 --> 00:22:15.709
Each one has its own probability,

00:22:15.709 --> 00:22:17.502
and you can represent these probabilities

00:22:17.502 --> 00:22:20.505
with a mathematical tool
called a Markov chain.

00:22:20.505 --> 00:22:23.800
The algorithm can then
encode the stream of data

00:22:23.800 --> 00:22:27.554
so that the more probable
next chunks cost few bits

00:22:27.554 --> 00:22:30.182
and the less probable ones cost more.

00:22:30.182 --> 00:22:32.809
If you combine that with a
much bigger search window

00:22:32.809 --> 00:22:34.936
so it can point much
further back in memory,

00:22:34.936 --> 00:22:39.649
then you get the Lempel Ziv
Markov chain algorithm, or LZMA.

00:22:39.649 --> 00:22:42.903
LZMA was developed by
Igor Pavlov around 1998,

00:22:42.903 --> 00:22:45.864
and it often beats much
more familiar methods.

00:22:45.864 --> 00:22:46.698
In many cases,

00:22:46.698 --> 00:22:49.409
it can shrink files to
about 70% of the size

00:22:49.409 --> 00:22:50.994
of a typical .zip.

00:22:50.994 --> 00:22:53.121
Lasse took this elegant
compression algorithm

00:22:53.121 --> 00:22:54.831
and made it work on Linux,

00:22:54.831 --> 00:22:57.667
and he called it XZ not
because it stood for anything,

00:22:57.667 --> 00:22:59.878
but just because it sounded cool.

00:22:59.878 --> 00:23:01.713
- I'm using XZ quite a lot.

00:23:01.713 --> 00:23:03.757
I think XZ is a wonderful project.

00:23:03.757 --> 00:23:06.051
There are lots of different
ways of compressing data.

00:23:06.051 --> 00:23:09.596
Some of them are fast but
they don't compress very well,

00:23:09.596 --> 00:23:12.057
and some of them are slow

00:23:12.057 --> 00:23:14.059
but they get extremely good compression.

00:23:15.477 --> 00:23:16.520
- But across Linux,

00:23:16.520 --> 00:23:19.106
projects are constantly shipping
the same files and updates

00:23:19.106 --> 00:23:20.690
to millions of machines,

00:23:20.690 --> 00:23:22.192
so XZ is perfect.

00:23:22.192 --> 00:23:23.485
You compress something once,

00:23:23.485 --> 00:23:26.321
then you get a smaller
file to download forever.

00:23:26.321 --> 00:23:28.740
Lasse released XZ in 2009,

00:23:28.740 --> 00:23:30.242
and over the next decade and a half,

00:23:30.242 --> 00:23:32.661
it went from a niche
tool to the common choice

00:23:32.661 --> 00:23:35.664
whenever a project needed
effective lossless compression.

00:23:35.664 --> 00:23:37.999
So, XZ quietly spread everywhere,

00:23:37.999 --> 00:23:40.919
eventually becoming a
dependency of OpenSSH.

00:23:41.753 --> 00:23:44.756
(suspenseful music)

00:23:46.508 --> 00:23:50.303
- So, it was at some point
in about February 2024

00:23:50.303 --> 00:23:53.098
and Jia Tan, he emails me.

00:23:53.098 --> 00:23:56.017
He's got all these new features
in the new version of XZ.

00:23:57.269 --> 00:23:59.813
- [Henry] He wins Rich
over almost immediately.

00:24:00.897 --> 00:24:03.275
- So I get to talk to hundreds
of contributors all the time,

00:24:03.275 --> 00:24:06.528
and I do get a feel for them.

00:24:06.528 --> 00:24:09.406
I feel, you know, are they good coders,

00:24:09.406 --> 00:24:11.366
which is what I really care about.

00:24:11.366 --> 00:24:14.494
Are they conscientious
people, are they helpful?

00:24:14.494 --> 00:24:17.622
Do they respond to bug reports quickly?

00:24:18.623 --> 00:24:20.750
And in all of the dimensions,

00:24:20.750 --> 00:24:23.670
Jia Tan would be a very good contributor

00:24:23.670 --> 00:24:25.589
because he's obviously a good coder.

00:24:26.506 --> 00:24:29.092
He's very responsive, he's very keen,

00:24:29.092 --> 00:24:30.594
and I love all that.

00:24:30.594 --> 00:24:33.930
- All indications are that
Jia is a great contributor,

00:24:33.930 --> 00:24:35.515
and this puts Rich at ease,

00:24:35.515 --> 00:24:37.142
so he lets his guard down.

00:24:37.142 --> 00:24:39.519
And that's often where the
problems start on the internet.

00:24:39.519 --> 00:24:41.396
You can't keep your guard up forever.

00:24:41.396 --> 00:24:42.439
But lucky for us,

00:24:42.439 --> 00:24:44.483
with today's sponsor, NordVPN,

00:24:44.483 --> 00:24:45.317
you don't have to.

00:24:45.317 --> 00:24:47.360
NordVPN's Threat Protection Pro

00:24:47.360 --> 00:24:49.988
blocks dangerous websites
before they load.

00:24:49.988 --> 00:24:51.531
It stops malicious downloads

00:24:51.531 --> 00:24:54.743
and it strips out trackers and
intrusive ads automatically.

00:24:54.743 --> 00:24:57.621
And it works even when you're
not connected to the VPN,

00:24:57.621 --> 00:25:00.081
so a lot of these attacks
never get the chance to start

00:25:00.081 --> 00:25:00.957
in the first place.

00:25:00.957 --> 00:25:03.043
I use NordVPN whenever I'm traveling

00:25:03.043 --> 00:25:04.503
or working on public wifi

00:25:04.503 --> 00:25:05.837
because it means that
I don't have to think

00:25:05.837 --> 00:25:07.380
about who's running the network.

00:25:07.380 --> 00:25:08.423
It's just one click

00:25:08.423 --> 00:25:10.675
and it's so fast that I
often forget that it's on.

00:25:10.675 --> 00:25:11.551
Not just that,

00:25:11.551 --> 00:25:14.513
if there's a show that's no
longer available in my region

00:25:14.513 --> 00:25:16.806
or a sports team that's blacked out,

00:25:16.806 --> 00:25:18.600
like I'm often watching
international football

00:25:18.600 --> 00:25:20.602
and they don't quite
have it where I'm going,

00:25:20.602 --> 00:25:21.478
well, in that case,

00:25:21.478 --> 00:25:23.980
I can just switch my server
location with one click

00:25:23.980 --> 00:25:25.190
to unlock the content.

00:25:25.190 --> 00:25:26.483
Apparently you can even use it

00:25:26.483 --> 00:25:28.485
to find better deals on plane tickets

00:25:28.485 --> 00:25:31.321
by changing your IP
address to another country.

00:25:31.321 --> 00:25:33.907
I haven't tried it yet, but
that sounds fascinating.

00:25:33.907 --> 00:25:36.117
So, if you wanna try it,
you can get the best deal

00:25:36.117 --> 00:25:39.329
by going to nordvpn.com/veritasium.

00:25:39.329 --> 00:25:41.998
When you use that link or this QR code,

00:25:41.998 --> 00:25:43.625
you'll get a huge discount.

00:25:43.625 --> 00:25:47.045
Also, you get a 30-day money
back guarantee through Nord.

00:25:47.045 --> 00:25:47.963
It's a no brainer.

00:25:47.963 --> 00:25:52.050
So again, that's nordvpn.com/veritasium

00:25:52.050 --> 00:25:54.511
or you can click the link
in the description below.

00:25:54.511 --> 00:25:55.845
Thanks so much to Nord,

00:25:55.845 --> 00:25:57.806
and let's get back to Jia

00:25:57.806 --> 00:25:59.724
and the prize he's got his eyes on.

00:26:00.559 --> 00:26:03.144
- At this point, we
were preparing RHEL 10.

00:26:04.396 --> 00:26:07.399
- [Henry] See, Red Hat ships
two major flavors of Linux.

00:26:07.399 --> 00:26:10.110
Fedora, which is free
and publicly available,

00:26:10.110 --> 00:26:13.280
and Red Hat Enterprise Linux, or RHEL,

00:26:13.280 --> 00:26:15.532
which is available through
a paid subscription.

00:26:15.532 --> 00:26:17.450
This one has to be stable and secure

00:26:17.450 --> 00:26:20.287
because it's widely used on
the most important machines,

00:26:20.287 --> 00:26:22.581
like in governments and hospitals.

00:26:22.581 --> 00:26:24.374
Jia wants his code in RHEL,

00:26:24.374 --> 00:26:26.251
but RHEL only has a new major release

00:26:26.251 --> 00:26:28.253
about once every three years.

00:26:28.253 --> 00:26:30.463
- So, there's definitely a deadline,

00:26:30.463 --> 00:26:35.135
and that deadline was around
sort of March, April in 2024.

00:26:35.135 --> 00:26:36.678
- Jia has to act fast.

00:26:36.678 --> 00:26:39.764
He wants complete control
of any compromised machine.

00:26:39.764 --> 00:26:42.892
And to pull it off, he has
three steps in his plan.

00:26:42.892 --> 00:26:45.353
Step one, the Trojan horse.

00:26:47.355 --> 00:26:50.442
The code for XZ lives on
a website called GitHub,

00:26:50.442 --> 00:26:53.903
which tracks all edits to XZ's
code using a tool called Git,

00:26:53.903 --> 00:26:56.323
which was also developed
by Linus Torvalds.

00:26:56.323 --> 00:26:58.700
So, Jia starts by making small changes.

00:26:58.700 --> 00:27:01.161
He changes the primary
contact for bug reports

00:27:01.161 --> 00:27:02.412
to his own email.

00:27:02.412 --> 00:27:04.748
He tweaks small tools
that will help him later.

00:27:04.748 --> 00:27:07.375
But he can't sneak in
the payload this way.

00:27:07.375 --> 00:27:08.877
I mean, it'd be too obvious.

00:27:08.877 --> 00:27:10.503
So he needs a way to sneak it in

00:27:10.503 --> 00:27:14.341
without it ever appearing as
normal source code on GitHub.

00:27:14.341 --> 00:27:16.551
- So, when you're writing
compression software,

00:27:16.551 --> 00:27:17.802
it's very often the case

00:27:17.802 --> 00:27:21.473
that your software is full
of these binary blobs,

00:27:21.473 --> 00:27:22.307
as we call them,

00:27:22.307 --> 00:27:24.809
so just lumps of binary
which are used to test

00:27:24.809 --> 00:27:28.647
the compression or the
decompression is still working.

00:27:28.647 --> 00:27:30.398
- Nobody reads these test blobs.

00:27:30.398 --> 00:27:32.067
They're included without ever appearing

00:27:32.067 --> 00:27:33.985
in the human readable source code.

00:27:33.985 --> 00:27:36.488
They're assumed to be garbage data.

00:27:36.488 --> 00:27:40.116
But for Jia, this is the perfect
place to hide his payload,

00:27:40.116 --> 00:27:44.120
inside something that at
first glance looks harmless.

00:27:44.120 --> 00:27:47.040
But in reality, it's a Trojan horse.

00:27:48.625 --> 00:27:50.919
But with a Trojan horse inside of XZ,

00:27:50.919 --> 00:27:54.089
it's still just a lump
of data in a binary blob.

00:27:54.089 --> 00:27:56.174
He has to unpack it.

00:27:56.174 --> 00:27:58.009
So, in the code that builds the project,

00:27:58.009 --> 00:28:00.929
he slips in a small easy-to-miss change.

00:28:00.929 --> 00:28:03.515
It hides among all the
automatically generated code

00:28:03.515 --> 00:28:05.934
and quietly unpacks his payload,

00:28:05.934 --> 00:28:08.728
inserting it into the XZ library.

00:28:08.728 --> 00:28:10.605
But now that it's inside of XZ,

00:28:10.605 --> 00:28:13.066
it still has to pick
the right time to act.

00:28:13.066 --> 00:28:15.985
On to step two, Goldilocks.

00:28:18.321 --> 00:28:21.074
Jia's end goal is to
compromise a very specific part

00:28:21.074 --> 00:28:23.201
of the SSH connection process,

00:28:23.201 --> 00:28:25.745
the RSA authentication step.

00:28:25.745 --> 00:28:27.122
He realizes that if he can slip

00:28:27.122 --> 00:28:29.207
a small malicious component in there,

00:28:29.207 --> 00:28:30.709
let's call it the payload,

00:28:30.709 --> 00:28:32.836
then every time SSH checks for a key,

00:28:32.836 --> 00:28:34.796
his code will run first.

00:28:34.796 --> 00:28:36.881
It will quietly look
for a special master key

00:28:36.881 --> 00:28:38.007
that only he knows,

00:28:38.007 --> 00:28:40.677
and if it sees that key,
it'll let him straight in.

00:28:40.677 --> 00:28:41.511
If it doesn't,

00:28:41.511 --> 00:28:44.264
it'll call the real code
and no one's the wiser.

00:28:44.264 --> 00:28:47.517
So, he will have his
backdoor entrance to OpenSSH.

00:28:47.517 --> 00:28:50.562
But he can't just go in
and rewrite RSA Decrypt,

00:28:50.562 --> 00:28:52.564
the function that verifies
the client's identity

00:28:52.564 --> 00:28:53.815
during the login.

00:28:53.815 --> 00:28:54.899
It's not that easy.

00:28:56.651 --> 00:28:58.069
See, when you build an application,

00:28:58.069 --> 00:28:59.654
you could take all the code you need

00:28:59.654 --> 00:29:00.739
from different libraries

00:29:00.739 --> 00:29:02.699
and bundle it into your application.

00:29:02.699 --> 00:29:05.577
But there's a big
drawback to this approach.

00:29:05.577 --> 00:29:07.495
If 10 different applications on a system

00:29:07.495 --> 00:29:09.164
all bundle the same library,

00:29:09.164 --> 00:29:11.958
you end up with 10 separate
copies on your machine,

00:29:11.958 --> 00:29:13.793
so it's redundant.

00:29:13.793 --> 00:29:17.130
That's why modern systems
mostly use shared libraries.

00:29:17.130 --> 00:29:18.381
When an application starts,

00:29:18.381 --> 00:29:20.800
the linker fills in a table of addresses.

00:29:20.800 --> 00:29:22.552
These addresses point to the functions

00:29:22.552 --> 00:29:23.762
and variables it needs

00:29:23.762 --> 00:29:25.889
from the libraries it links to.

00:29:25.889 --> 00:29:28.975
That table is called the
Global Offset Table, or GOT.

00:29:30.268 --> 00:29:32.604
Now, when it wants to use
something from a shared library,

00:29:32.604 --> 00:29:34.063
it just checks the GOT

00:29:34.063 --> 00:29:36.483
and jumps to the right spot in memory.

00:29:36.483 --> 00:29:39.652
RSA Decrypt doesn't
belong to OpenSSH at all.

00:29:39.652 --> 00:29:41.696
It comes from a shared crypto library.

00:29:41.696 --> 00:29:43.406
So to hijack authentication,

00:29:43.406 --> 00:29:45.241
Jia can overwrite the GOT entry

00:29:45.241 --> 00:29:47.118
that tells SSH where it is.

00:29:48.411 --> 00:29:50.413
And to do that, he can
use a little known tool

00:29:50.413 --> 00:29:52.415
called an IFUNC resolver.

00:29:52.415 --> 00:29:54.793
- The IFUNC is used where

00:29:54.793 --> 00:29:56.920
let's say you wanna optimize your code

00:29:56.920 --> 00:30:00.173
to run on Intel's
hardware and AMD hardware.

00:30:00.173 --> 00:30:02.634
Now, you could write the
software just for Intel,

00:30:02.634 --> 00:30:04.052
and it would run very fast on Intel

00:30:04.052 --> 00:30:07.347
and it probably would run
very badly on AMD hardware.

00:30:07.347 --> 00:30:09.140
- [Henry] Instead, you
keep multiple versions

00:30:09.140 --> 00:30:10.433
of the same function

00:30:10.433 --> 00:30:12.268
and the IFUNC resolver picks the right one

00:30:12.268 --> 00:30:13.853
for the hardware you're on.

00:30:13.853 --> 00:30:14.687
At first glance,

00:30:14.687 --> 00:30:16.898
that sounds like a way for
Jia to trick the system

00:30:16.898 --> 00:30:18.358
into thinking it's running hardware

00:30:18.358 --> 00:30:21.528
that needs his own compromised
version of RSA Decrypt.

00:30:21.528 --> 00:30:23.196
But there is a catch.

00:30:23.196 --> 00:30:25.365
A library can only define IFUNC resolvers

00:30:25.365 --> 00:30:26.908
for its own functions.

00:30:26.908 --> 00:30:29.160
And since RSA Decrypt
doesn't belong to XZ,

00:30:29.160 --> 00:30:32.413
it can't use an IFUNC
resolver to override it.

00:30:32.413 --> 00:30:34.374
But IFUNC can still help him.

00:30:34.374 --> 00:30:35.667
- So it will,

00:30:35.667 --> 00:30:37.961
very, very early on in
the running of the program

00:30:37.961 --> 00:30:39.921
it will do this sort of determination

00:30:39.921 --> 00:30:40.839
of what hardware is available,

00:30:40.839 --> 00:30:45.301
and crucially, it does
let you run your own code

00:30:45.301 --> 00:30:47.428
in the library very early on.

00:30:48.263 --> 00:30:49.806
- Now, at this early stage,

00:30:49.806 --> 00:30:51.891
from within an IFUNC resolver,

00:30:51.891 --> 00:30:55.103
Jia could try to directly
rewrite the GOT entry

00:30:55.103 --> 00:30:56.813
for RSA Decrypt.

00:30:56.813 --> 00:30:59.691
But at this point, the system
is still filling in the GOT,

00:30:59.691 --> 00:31:02.694
so even if Jia changes
the RSA Decrypt slot,

00:31:02.694 --> 00:31:04.070
the loader will come along later

00:31:04.070 --> 00:31:05.947
and write the real address back in,

00:31:05.947 --> 00:31:07.448
wiping out his change.

00:31:07.448 --> 00:31:09.868
And there's a limit on
the other side as well.

00:31:09.868 --> 00:31:11.578
To make this sort of hijacking harder,

00:31:11.578 --> 00:31:13.997
once every entry is filled on the GOT,

00:31:13.997 --> 00:31:16.416
the system marks the table Read Only.

00:31:16.416 --> 00:31:18.501
That means that if Jia waits too long,

00:31:18.501 --> 00:31:20.378
the RSA Decrypt entry is frozen.

00:31:21.546 --> 00:31:24.465
So he has to slip it in
at a very precise moment.

00:31:24.465 --> 00:31:27.510
After the RSA Decrypt entry
is filled in legitimately,

00:31:27.510 --> 00:31:30.388
but before the table
gets marked Read Only.

00:31:30.388 --> 00:31:33.766
And that tiny window
is the Goldilocks zone.

00:31:34.851 --> 00:31:37.061
And to hit it, he's
gonna need another tool.

00:31:37.979 --> 00:31:41.566
So, linking shared libraries
in the GOT often leads to bugs,

00:31:41.566 --> 00:31:43.610
so Linux has a special debugging feature

00:31:43.610 --> 00:31:45.820
that tracks what the system's doing.

00:31:45.820 --> 00:31:46.779
It lets you run code

00:31:46.779 --> 00:31:50.199
whenever the linker writes a
symbol's address into the GOT.

00:31:50.199 --> 00:31:52.160
It's called a dynamic audit hook,

00:31:52.160 --> 00:31:54.829
and normally you'd use it
to profile performance.

00:31:54.829 --> 00:31:58.041
But crucially for Jia, there
are no real guardrails.

00:31:58.041 --> 00:32:00.501
The hook can run any code he wants.

00:32:00.501 --> 00:32:03.129
And this is where IFUNC finally pays off.

00:32:03.129 --> 00:32:06.966
Jia uses an IFUNC resolver
to set the audit hook early.

00:32:06.966 --> 00:32:08.217
Then, when the linker writes in

00:32:08.217 --> 00:32:10.178
the real RSA Decrypt address,

00:32:10.178 --> 00:32:12.597
the hook fires and swaps in his payload.

00:32:13.806 --> 00:32:15.975
Right in the middle of
the Goldilocks zone.

00:32:17.226 --> 00:32:19.395
There is one final complication, though.

00:32:19.395 --> 00:32:21.648
Audit hooks are normally
configured by the system,

00:32:21.648 --> 00:32:23.816
not by libraries like XZ.

00:32:23.816 --> 00:32:26.194
So when Jia is first looking
for the audit hook variable

00:32:26.194 --> 00:32:27.654
that he's supposed to rewrite,

00:32:27.654 --> 00:32:29.364
it's actually hidden from him,

00:32:29.364 --> 00:32:30.907
so he first has to find it.

00:32:31.824 --> 00:32:32.825
Within the IFUNC,

00:32:32.825 --> 00:32:35.203
he scans a small region of binary code,

00:32:35.203 --> 00:32:37.163
hunting for signs of the hook.

00:32:37.163 --> 00:32:38.581
But it's just raw bites,

00:32:38.581 --> 00:32:40.166
so he writes a tiny decoder

00:32:40.166 --> 00:32:43.169
to turn them back into
instructions that he can read.

00:32:43.169 --> 00:32:45.171
Now Jia can find where
the hook lives in memory

00:32:45.171 --> 00:32:47.340
and finally plant his code.

00:32:47.340 --> 00:32:49.592
Then, when RSA Decrypt
gets called legitimately,

00:32:49.592 --> 00:32:52.220
it triggers the payload and he's in.

00:32:52.220 --> 00:32:54.013
But now that he's in, what does he do?

00:32:54.013 --> 00:32:56.599
And how does he get out of there cleanly?

00:32:56.599 --> 00:32:58.643
Step three, the cat burglar.

00:33:00.436 --> 00:33:02.105
With Jia's exploit in place,

00:33:02.105 --> 00:33:05.316
SSH isn't just checking for
a legitimate login anymore.

00:33:05.316 --> 00:33:08.152
It's also listening for
a hidden master key.

00:33:08.152 --> 00:33:09.112
And Jia is careful,

00:33:09.112 --> 00:33:11.614
he doesn't want anyone else
stumbling onto the backdoor,

00:33:11.614 --> 00:33:14.742
so that master key isn't
just a simple password.

00:33:14.742 --> 00:33:18.121
It's actually a mini
cryptographic exchange of its own.

00:33:18.121 --> 00:33:21.040
First, the backdoor code
checks for a shared secret,

00:33:21.040 --> 00:33:23.459
and then, second, it
authenticates the user.

00:33:23.459 --> 00:33:26.546
And only if both checks
pass does the payload run.

00:33:26.546 --> 00:33:28.214
In effect, it's like
the backdoor is running

00:33:28.214 --> 00:33:31.092
a miniature version of
the encryption from SSH

00:33:31.092 --> 00:33:32.927
inside of SSH.

00:33:32.927 --> 00:33:34.012
But in SSH,

00:33:34.012 --> 00:33:36.681
it uses that encryption
to keep the attackers out.

00:33:36.681 --> 00:33:38.891
In this case, the backdoor
is using that encryption

00:33:38.891 --> 00:33:41.936
to make sure that it's only
the attackers that can get in.

00:33:41.936 --> 00:33:43.438
But he's still careful.

00:33:43.438 --> 00:33:45.732
One of the main ways
defenders catch intrusions

00:33:45.732 --> 00:33:47.692
is through SSH logging.

00:33:47.692 --> 00:33:48.901
So, to cover his tracks,

00:33:48.901 --> 00:33:51.446
he wipes evidence of the
backdoor ever firing.

00:33:51.446 --> 00:33:53.823
And this is on top of the
numerous safety checks

00:33:53.823 --> 00:33:55.700
that he's inserted throughout the process

00:33:55.700 --> 00:33:58.286
to make sure the system
supports the backdoor

00:33:58.286 --> 00:34:00.663
and doesn't crash and draw attention.

00:34:00.663 --> 00:34:02.749
And this is the genius of Jia's trap.

00:34:02.749 --> 00:34:05.001
It's cautious and meticulous,

00:34:05.001 --> 00:34:07.879
designed to slip through only
where it will run invisibly.

00:34:08.880 --> 00:34:10.465
With all three of these steps complete,

00:34:10.465 --> 00:34:12.842
he can finally control
the machine undetected.

00:34:13.843 --> 00:34:16.345
All he needs to do now
is get his updated XZ

00:34:16.345 --> 00:34:18.765
implemented in the next release.

00:34:18.765 --> 00:34:21.100
But just as Jia is
completing his backdoor,

00:34:21.100 --> 00:34:23.770
an open source developer
requests to remove the dependency

00:34:23.770 --> 00:34:25.897
that links XZ to OpenSSH.

00:34:26.939 --> 00:34:29.817
This would spell disaster for Jia Tan.

00:34:29.817 --> 00:34:30.985
He becomes frantic,

00:34:30.985 --> 00:34:33.446
pushing harder and harder
to get his compromised XZ

00:34:33.446 --> 00:34:35.531
into major Linux releases.

00:34:35.531 --> 00:34:38.159
He gets it into an early
experimental build of Debian.

00:34:38.159 --> 00:34:40.661
He files a request to
have it added to Ubuntu.

00:34:40.661 --> 00:34:43.039
He's trying to land the
backdoor everywhere he can

00:34:43.039 --> 00:34:45.792
before anyone realizes what's going on.

00:34:45.792 --> 00:34:48.586
And it's then that Rich gets
his first message from Jia.

00:34:49.462 --> 00:34:52.006
Over the next few weeks, he
gets more and more insistent,

00:34:52.006 --> 00:34:53.758
urging Rich to add the updated XZ

00:34:53.758 --> 00:34:55.802
into the next release of Fedora.

00:34:55.802 --> 00:34:56.761
- I'm always very keen

00:34:56.761 --> 00:35:00.431
to talk to keen upstream contributors,

00:35:00.431 --> 00:35:03.684
contributors who are really excited

00:35:03.684 --> 00:35:05.603
about new things in their software,

00:35:05.603 --> 00:35:08.898
who are really willing to
help us get stuff into Fedora.

00:35:08.898 --> 00:35:10.441
So, you know, that's great, love it.

00:35:10.441 --> 00:35:13.486
That kind of makes my
day, it's my happy place.

00:35:13.486 --> 00:35:15.655
- Eventually, Jia gets what he wants.

00:35:15.655 --> 00:35:19.617
Rich adds the updated XZ to a
pre-release version of Fedora.

00:35:19.617 --> 00:35:20.868
Jia has succeeded.

00:35:21.953 --> 00:35:24.997
Except there's a bug.

00:35:24.997 --> 00:35:26.874
In low-level code like the backdoor,

00:35:26.874 --> 00:35:28.459
things you normally take for granted,

00:35:28.459 --> 00:35:29.877
like memory management,

00:35:29.877 --> 00:35:31.504
are not done automatically.

00:35:31.504 --> 00:35:33.297
If a function grabs a bit of memory,

00:35:33.297 --> 00:35:36.175
it also has to give that
memory back when it's done.

00:35:36.175 --> 00:35:38.553
And if it doesn't, then
every time the function runs,

00:35:38.553 --> 00:35:41.639
it grabs more and more memory
and then never releases it.

00:35:41.639 --> 00:35:44.142
Over time, the program just keeps growing.

00:35:44.142 --> 00:35:45.893
That's called a memory leak.

00:35:45.893 --> 00:35:47.270
And to catch problems like this,

00:35:47.270 --> 00:35:49.772
developers use a tool called Valgrind.

00:35:49.772 --> 00:35:51.482
It runs the program more slowly

00:35:51.482 --> 00:35:55.111
but watches every memory
operation for anything suspicious.

00:35:55.111 --> 00:35:58.739
Valgrind is raising hell on Jia's code.

00:35:58.739 --> 00:36:01.993
- We put XZ, this version, 560,

00:36:01.993 --> 00:36:04.579
into Fedora 40.

00:36:04.579 --> 00:36:07.540
We get a bug report initially.

00:36:07.540 --> 00:36:10.334
- And the backdoor in XZ
specifically is generating

00:36:10.334 --> 00:36:12.378
invalid writes errors.

00:36:12.378 --> 00:36:14.297
Well, the logic was written by hand,

00:36:14.297 --> 00:36:16.299
bypassing the compiler's safety checks,

00:36:16.299 --> 00:36:19.343
and so they accidentally wrote
outside the memory stack.

00:36:19.343 --> 00:36:22.680
Now, lucky for Jia, all this
isn't immediately obvious.

00:36:22.680 --> 00:36:24.891
Rich still hasn't
noticed what's happening.

00:36:24.891 --> 00:36:26.392
- New software has bugs, right?

00:36:26.392 --> 00:36:28.936
It's the state of nature of software.

00:36:28.936 --> 00:36:31.856
Software is absolutely
full of bugs all the time.

00:36:31.856 --> 00:36:33.941
- [Henry] Now, the real problem
is inside the malicious code

00:36:33.941 --> 00:36:35.443
in the test file.

00:36:35.443 --> 00:36:37.195
But Jia can't just go and fix that,

00:36:37.195 --> 00:36:39.447
that would completely expose the backdoor.

00:36:39.447 --> 00:36:41.240
So he invents a cover story.

00:36:41.240 --> 00:36:42.950
He claims that the random data he used

00:36:42.950 --> 00:36:45.077
to generate the original test files,

00:36:45.077 --> 00:36:46.370
well, it's not reproducible,

00:36:46.370 --> 00:36:47.330
so he's replacing it.

00:36:47.330 --> 00:36:50.875
And in this updated code,
he fixes the memory error.

00:36:50.875 --> 00:36:54.337
- It's a very convincing
and plausible explanation

00:36:54.337 --> 00:36:56.797
for why this test blob has to be updated.

00:36:56.797 --> 00:36:59.425
But of course, it's not the real reason.

00:36:59.425 --> 00:37:01.093
- All right, so now the real fix is in,

00:37:01.093 --> 00:37:03.054
but if the bug just magically went away,

00:37:03.054 --> 00:37:04.805
it would look a bit suspicious.

00:37:04.805 --> 00:37:06.599
So he has to find a way to cover it up.

00:37:06.599 --> 00:37:11.354
- So what he then does is
he changes the IFUNC code

00:37:11.354 --> 00:37:14.398
in a way where he adds like
a whole bunch of comments

00:37:14.398 --> 00:37:18.319
and changes to the code around it

00:37:18.319 --> 00:37:20.488
that doesn't actually change the code

00:37:20.488 --> 00:37:22.031
but is plausible enough

00:37:22.031 --> 00:37:24.408
to look like he's changing
how the IFUNC works

00:37:24.408 --> 00:37:26.160
to fix the Valgrind bug.

00:37:26.160 --> 00:37:27.453
- It does, listening
to it and I'm like

00:37:27.453 --> 00:37:30.414
I know that this is the
evil hacker Jia Tan,

00:37:30.414 --> 00:37:32.166
but I'm like, ooh, that's clever.

00:37:32.166 --> 00:37:34.377
You know?
- Yeah, I mean, look,

00:37:34.377 --> 00:37:37.755
the guy is obviously not an idiot, right?

00:37:37.755 --> 00:37:39.966
But none of this is suspicious.

00:37:41.300 --> 00:37:44.303
This is what we expect
from compression software.

00:37:44.303 --> 00:37:46.639
And as a packager, it's not really my job

00:37:46.639 --> 00:37:51.227
to fix every bug in upstream software.

00:37:51.227 --> 00:37:54.105
As soon as it gets to a
certain level of difficulty,

00:37:54.105 --> 00:37:57.149
my thought here is, well,

00:37:57.149 --> 00:37:59.610
Jia Tan has actually been
writing this software, right?

00:37:59.610 --> 00:38:02.780
So he's got it all in his
head, he knows how it works.

00:38:02.780 --> 00:38:05.992
It's easier for me to
just give him the problem.

00:38:05.992 --> 00:38:07.743
And I send the bug over to him

00:38:07.743 --> 00:38:09.829
and like a day later
he sends the fix back.

00:38:09.829 --> 00:38:11.497
From my point of view,
it's problem solved.

00:38:11.497 --> 00:38:13.040
It worked, system worked, right?

00:38:13.040 --> 00:38:14.542
I made the right call.

00:38:14.542 --> 00:38:15.710
I don't see,

00:38:16.711 --> 00:38:19.005
at that point, knowing what I know then,

00:38:19.005 --> 00:38:21.882
I don't see that there's any problem.

00:38:21.882 --> 00:38:24.468
- So we downloaded Jia
Tan's version of XZ,

00:38:24.468 --> 00:38:27.263
which was available on Fedora publicly,

00:38:27.263 --> 00:38:29.181
but we made a slight modification.

00:38:29.181 --> 00:38:31.767
Instead of using Jia's secret
code, we're using our own,

00:38:31.767 --> 00:38:35.062
and that means that we can take
advantage of Jia's backdoor.

00:38:35.062 --> 00:38:39.108
In this case, we're targeting
the veritasium.com website.

00:38:39.108 --> 00:38:41.569
And once we get control of it,

00:38:41.569 --> 00:38:43.446
I got a little trick in store for Derek.

00:38:43.446 --> 00:38:46.282
Now, to make sure I don't mess
with any real traffic too bad

00:38:46.282 --> 00:38:47.408
and lose my job,

00:38:47.408 --> 00:38:49.410
we actually cloned the Veritasium website

00:38:49.410 --> 00:38:51.454
and put it on a very similar URL,

00:38:51.454 --> 00:38:52.913
but it will work the same.

00:38:52.913 --> 00:38:56.042
Of course, Derek doesn't know
that I've covered my bases.

00:38:56.042 --> 00:38:56.876
- Oh no.

00:38:58.419 --> 00:39:01.213
Man, when you guys do
these things, I just,

00:39:01.213 --> 00:39:03.007
I start to get more and more scared now.

00:39:03.007 --> 00:39:04.550
I want it to work for the video,

00:39:04.550 --> 00:39:05.926
but I also don't want it to work

00:39:05.926 --> 00:39:08.012
'cause I don't wanna screw stuff up, so.

00:39:08.012 --> 00:39:10.306
- Yeah, it's the risk you take, I guess,

00:39:10.306 --> 00:39:11.515
letting us run rampant.

00:39:11.515 --> 00:39:13.142
- It is a concern.

00:39:13.142 --> 00:39:14.602
- I'm gonna execute a script here,

00:39:14.602 --> 00:39:16.479
which is gonna open up.

00:39:16.479 --> 00:39:20.691
It's opening up a port
on the Veritasium server.

00:39:20.691 --> 00:39:23.903
And then on this side I'm
gonna execute a little script.

00:39:26.280 --> 00:39:28.491
- Uh-oh.
(Henry laughs)

00:39:28.491 --> 00:39:29.825
Henrytasium.

00:39:30.785 --> 00:39:32.036
Who is this goof?

00:39:32.036 --> 00:39:33.954
On the main photo,

00:39:33.954 --> 00:39:37.124
you spent time getting
all suited up there.

00:39:37.124 --> 00:39:38.292
- Of course.

00:39:38.292 --> 00:39:41.045
- Looking sharp, sir.
- Thank you, thank you.

00:39:41.045 --> 00:39:43.422
- [Derek] "Videos Derek
would never approve of."

00:39:43.422 --> 00:39:45.174
Uh-oh.
- The concept was

00:39:45.174 --> 00:39:47.510
over the years that we've worked together,

00:39:47.510 --> 00:39:49.678
you've said no to a bunch of my ideas,

00:39:49.678 --> 00:39:51.389
and I figured now with control of the website

00:39:51.389 --> 00:39:53.307
it's about time the world saw it.

00:39:53.307 --> 00:39:56.185
- "Surviving 7 days living underwater.

00:39:56.185 --> 00:40:00.648
How do saturation divers
live at -1,000 feet?"

00:40:00.648 --> 00:40:02.650
I mean, you wouldn't be outside, right?

00:40:02.650 --> 00:40:04.193
So I don't know why you need goggles there

00:40:04.193 --> 00:40:08.197
and like a respirator but
you're not underwater.

00:40:08.197 --> 00:40:12.535
"Why it's almost impossible
to shoot 4,000 meters."

00:40:12.535 --> 00:40:13.911
It's a sniper video.

00:40:14.995 --> 00:40:15.830
Yeah.

00:40:15.830 --> 00:40:19.625
"The CIA lied: exposing how
the CIA lied about torture."

00:40:19.625 --> 00:40:22.920
I feel like that still goes
into a tough territory for us.

00:40:22.920 --> 00:40:25.172
"How xenon gas replaced oxygen.

00:40:25.172 --> 00:40:28.676
I attempted to climb Mount
Everest on xenon gas."

00:40:28.676 --> 00:40:30.803
That sounds like a terrible idea.

00:40:30.803 --> 00:40:32.680
This is what this whole video is about,

00:40:32.680 --> 00:40:34.765
this whole video is just about

00:40:34.765 --> 00:40:37.810
trying to get me to green
light your projects.

00:40:37.810 --> 00:40:39.895
You know, if people
like these video ideas,

00:40:39.895 --> 00:40:41.689
they can feel free to let
us know in the comments

00:40:41.689 --> 00:40:43.065
and we can actually make them.

00:40:43.065 --> 00:40:47.695
The top upvoted comment one,
I will green light happily.

00:40:47.695 --> 00:40:49.029
- Let's go!

00:40:49.029 --> 00:40:50.906
- Is this live to the public right now?

00:40:50.906 --> 00:40:53.784
- It is live, yeah, it's
live on the server, yeah.

00:40:53.784 --> 00:40:55.161
- If anyone's on the website right now,

00:40:55.161 --> 00:40:57.163
that would be very strange for them.

00:40:57.163 --> 00:41:00.458
Look, I'm not pleased, I would
like you to change it back.

00:41:02.209 --> 00:41:05.379
It doesn't seem like
this should be possible

00:41:05.379 --> 00:41:06.589
on a Linux server.

00:41:06.589 --> 00:41:09.383
So the big question is, how did you do it?

00:41:09.383 --> 00:41:11.427
- The address is the server,

00:41:11.427 --> 00:41:12.553
the seed is our code to get in,

00:41:12.553 --> 00:41:14.597
and then the command is what we're doing

00:41:14.597 --> 00:41:17.683
to essentially open up, in this case nc,

00:41:17.683 --> 00:41:19.518
which is like opening
up a port on the machine

00:41:19.518 --> 00:41:21.979
that we can then access
from this second terminal.

00:41:21.979 --> 00:41:24.023
Then what we're doing is on this side

00:41:24.023 --> 00:41:25.816
we're running a script that's connecting

00:41:25.816 --> 00:41:28.152
to that port that's just been opened up,

00:41:28.152 --> 00:41:31.614
copying our files and then
by the end we're gonna have

00:41:31.614 --> 00:41:33.657
root access on the server.

00:41:33.657 --> 00:41:36.327
That means that it thinks
that we own the thing.

00:41:36.327 --> 00:41:37.786
- That's so crazy.

00:41:37.786 --> 00:41:39.872
This is a very scary hack.

00:41:40.998 --> 00:41:42.208
I do not like it.

00:41:42.208 --> 00:41:45.711
- Another thing is that
this is a very obvious way

00:41:45.711 --> 00:41:47.004
of demonstrating this attack.

00:41:47.004 --> 00:41:48.506
Like I've changed
everything on the website,

00:41:48.506 --> 00:41:50.007
you immediately know that I've gone in

00:41:50.007 --> 00:41:51.175
and hacked the server.

00:41:51.175 --> 00:41:52.927
If we were doing this for real,

00:41:52.927 --> 00:41:54.803
we would do it a lot sneakier.

00:41:54.803 --> 00:41:56.096
- I mean, as you say, right?

00:41:56.096 --> 00:41:57.264
The thing to do would not be

00:41:57.264 --> 00:42:00.267
to totally rework someone's
website so everyone notices,

00:42:00.267 --> 00:42:03.604
but to change it subtly so nobody notices

00:42:03.604 --> 00:42:07.399
so you can skim data or, yeah,
like get credit card details

00:42:07.399 --> 00:42:10.194
or take payments to a different location,

00:42:10.194 --> 00:42:11.070
stuff like that.

00:42:11.070 --> 00:42:13.239
- So you can copy anything you want,

00:42:13.239 --> 00:42:14.448
you can change anything you want,

00:42:14.448 --> 00:42:15.741
you can delete anything you want.

00:42:15.741 --> 00:42:19.078
So if there's any interesting
documents or crypto tokens,

00:42:19.078 --> 00:42:22.164
any files you're interested
in, those are yours now.

00:42:22.164 --> 00:42:25.501
If there's secret communications
going across these,

00:42:25.501 --> 00:42:28.087
and let's keep in mind all
of our communication networks

00:42:28.087 --> 00:42:30.422
are also built around Linux,

00:42:30.422 --> 00:42:33.133
those communication streams are yours now.

00:42:33.133 --> 00:42:36.887
If you wanted to encrypt
something and ask for ransom,

00:42:36.887 --> 00:42:38.430
that's possible now.

00:42:38.430 --> 00:42:40.891
- [Henry] The possibilities
really are endless.

00:42:40.891 --> 00:42:42.810
After two and a half years of hard work,

00:42:42.810 --> 00:42:44.728
slowly infiltrating the XZ Project

00:42:44.728 --> 00:42:47.481
and weaving in this ingenious backdoor,

00:42:47.481 --> 00:42:49.066
Jia's done it.

00:42:49.066 --> 00:42:50.901
He now has free rein on any machine

00:42:50.901 --> 00:42:53.362
that installs the new Fedora pre-release.

00:42:53.362 --> 00:42:55.739
And he also gets the same
access on Debian testing

00:42:55.739 --> 00:42:58.075
and Ubuntu's pre-release environments.

00:42:58.075 --> 00:42:59.243
And with RHEL 10 coming up,

00:42:59.243 --> 00:43:01.495
his code could infect some of
the most important computers

00:43:01.495 --> 00:43:02.788
in the world.

00:43:02.788 --> 00:43:05.416
Now he should be able to
relax, wait for the release,

00:43:05.416 --> 00:43:07.418
and he's got his backdoor key.

00:43:07.418 --> 00:43:10.087
But just when he thinks
everything's going right...

00:43:11.880 --> 00:43:14.883
(suspenseful music)

00:43:17.428 --> 00:43:19.763
Andres Freund is a German programmer.

00:43:19.763 --> 00:43:23.100
He's not a security
researcher, he's not a hacker.

00:43:23.100 --> 00:43:25.019
He's just an employee at Microsoft

00:43:25.019 --> 00:43:28.230
working on an open source
project called Postgres.

00:43:28.230 --> 00:43:29.857
One day in March 2024,

00:43:29.857 --> 00:43:31.942
he tries out the unstable
release of Debian

00:43:31.942 --> 00:43:34.445
to make sure that Postgres
will run smoothly.

00:43:34.445 --> 00:43:36.530
But while checking the
server connection times,

00:43:36.530 --> 00:43:38.699
he notices something odd.

00:43:38.699 --> 00:43:40.034
A slowdown.

00:43:40.034 --> 00:43:40.868
It's not much.

00:43:40.868 --> 00:43:43.037
In the worst case, it's
only half a second,

00:43:43.037 --> 00:43:45.581
but it's enough to make Andres suspicious.

00:43:45.581 --> 00:43:47.333
We tested the connection times ourselves

00:43:47.333 --> 00:43:48.834
on our own version of the XZ hack

00:43:48.834 --> 00:43:50.669
and we found the exact same thing.

00:43:50.669 --> 00:43:54.923
Consistent slowdowns of about
400 to 500 milliseconds.

00:43:54.923 --> 00:43:56.300
Andres had already seen the problems

00:43:56.300 --> 00:43:58.719
with XZ and Valgrind weeks earlier

00:43:58.719 --> 00:44:00.554
and this only makes him more suspicious,

00:44:00.554 --> 00:44:01.889
so he digs in deeper.

00:44:01.889 --> 00:44:03.932
He looks at recent additions to OpenSSH

00:44:03.932 --> 00:44:07.227
and traces the delay
back to an update in XZ.

00:44:07.227 --> 00:44:08.646
He sees the binary test files

00:44:08.646 --> 00:44:11.106
but notices that they
were never used in a test.

00:44:11.106 --> 00:44:12.524
It's even stranger.

00:44:12.524 --> 00:44:13.984
Andres tries to get back to work,

00:44:13.984 --> 00:44:15.903
but he can't stop thinking about it.

00:44:15.903 --> 00:44:17.613
- [Andres] I remember sitting
in a bunch of meetings

00:44:17.613 --> 00:44:20.574
and like not really
being able to concentrate

00:44:20.574 --> 00:44:21.659
because it feels like,

00:44:23.035 --> 00:44:25.329
I need to continue looking into this.

00:44:25.329 --> 00:44:26.747
- Eventually, Andres sees it.

00:44:26.747 --> 00:44:30.167
This isn't some bug, this is a backdoor.

00:44:30.167 --> 00:44:32.795
And this backdoor is meticulous.

00:44:32.795 --> 00:44:35.339
It hunts through memory
to find the audit hook,

00:44:35.339 --> 00:44:37.841
it implements a decoder
to read those raw bites,

00:44:37.841 --> 00:44:40.010
and then it wraps everything
in custom encryption

00:44:40.010 --> 00:44:41.136
and safety checks

00:44:41.136 --> 00:44:44.515
so that it only triggers on
the right kind of connection.

00:44:44.515 --> 00:44:46.558
I mean, it even garble its own strings

00:44:46.558 --> 00:44:48.060
so that it won't be detected.

00:44:48.060 --> 00:44:50.187
It's incredibly cautious.

00:44:50.187 --> 00:44:52.940
But all of that takes
time, and in the end,

00:44:52.940 --> 00:44:55.317
that's what grabs Andres's attention.

00:44:55.317 --> 00:44:56.568
- If they had done less obfuscation,

00:44:56.568 --> 00:44:59.571
I probably would not have
noticed that anything was wrong.

00:44:59.571 --> 00:45:02.700
- [Henry] Now, XZ's
security contact is Jia Tan,

00:45:02.700 --> 00:45:04.493
so Andres can't exactly report it

00:45:04.493 --> 00:45:06.203
through the usual channels.

00:45:06.203 --> 00:45:08.997
Instead, he emails the
Debian security team directly

00:45:08.997 --> 00:45:10.374
and posts a detailed report

00:45:10.374 --> 00:45:13.001
to a public security mailing list.

00:45:13.001 --> 00:45:15.212
Then, all hell breaks loose.

00:45:16.046 --> 00:45:18.507
- I'm called up

00:45:18.507 --> 00:45:21.927
on I think it was a Friday evening,

00:45:21.927 --> 00:45:24.054
in fact, I'm sure it was a Friday evening,

00:45:24.054 --> 00:45:28.434
to join a internal Red Hat meeting.

00:45:28.434 --> 00:45:32.062
It's immediately obvious that
this is not a normal meeting

00:45:32.062 --> 00:45:35.065
because like our head
of security is there.

00:45:35.065 --> 00:45:39.027
It's explained to me that it's been found

00:45:39.027 --> 00:45:40.404
by somebody in the community

00:45:40.404 --> 00:45:42.156
that XZ has a backdoor,

00:45:42.156 --> 00:45:45.951
and immediately I'm like, WTF?

00:45:45.951 --> 00:45:47.411
How did this happen?

00:45:47.411 --> 00:45:48.412
- To cover their bases,

00:45:48.412 --> 00:45:50.289
Red Hat quickly rolls Fedora back

00:45:50.289 --> 00:45:52.249
and tells all their users to revert,

00:45:52.249 --> 00:45:53.667
and the whole open source community

00:45:53.667 --> 00:45:55.127
starts digging into the project

00:45:55.127 --> 00:45:56.920
to understand what went wrong.

00:45:58.297 --> 00:46:00.090
One thing is clear, though.

00:46:00.090 --> 00:46:01.967
Andres is a hero.

00:46:01.967 --> 00:46:04.094
- Now, the fact that this was discovered

00:46:04.094 --> 00:46:05.304
in a different test at all,

00:46:05.304 --> 00:46:06.346
that was lucky.

00:46:06.346 --> 00:46:09.057
But then what are the chances

00:46:09.057 --> 00:46:11.310
that someone who isn't
looking for a security bug

00:46:11.310 --> 00:46:13.228
spends days investigating this?

00:46:13.228 --> 00:46:17.065
So, big kudos to the researcher,

00:46:17.065 --> 00:46:18.734
and yeah, saved us all

00:46:18.734 --> 00:46:22.196
from possibly a doomsday on the internet.

00:46:22.196 --> 00:46:24.782
- I think that Andres did a brilliant job

00:46:24.782 --> 00:46:27.951
because he did what I
should have done, actually,

00:46:27.951 --> 00:46:29.536
which is I should have
looked at the, you know,

00:46:29.536 --> 00:46:32.414
I should have looked at
the bug when I saw it

00:46:33.290 --> 00:46:35.584
and I should have gone there, you know,

00:46:35.584 --> 00:46:39.379
like a crazy hound sort of sniffing around

00:46:39.379 --> 00:46:40.798
trying to find out what's going on.

00:46:40.798 --> 00:46:41.965
- [Henry] Andres even gets a shout out

00:46:41.965 --> 00:46:43.801
from the CEO of Microsoft.

00:46:43.801 --> 00:46:45.219
But when the story breaks,

00:46:45.219 --> 00:46:48.222
the mainstream response
is surprisingly muted.

00:46:48.222 --> 00:46:50.015
- Actually, I'm still surprised now

00:46:50.015 --> 00:46:53.644
that the mainstream news outlets

00:46:53.644 --> 00:46:55.437
haven't really covered this very much.

00:46:55.437 --> 00:46:56.730
Well, I can tell you how many systems

00:46:56.730 --> 00:46:58.023
would have been compromised,

00:46:58.023 --> 00:46:59.274
which would have been millions,

00:46:59.274 --> 00:47:03.529
- Anything from spying, to ransom,

00:47:03.529 --> 00:47:07.241
to just taking down entire countries,

00:47:07.241 --> 00:47:09.326
you could have done it with this backdoor.

00:47:10.202 --> 00:47:13.914
- [Henry] I guess the big
question is, who is Jia Tan?

00:47:13.914 --> 00:47:15.958
- That's the question, isn't it?

00:47:15.958 --> 00:47:18.210
Okay, so my feeling is that Jia Tan,

00:47:18.210 --> 00:47:22.089
the person that I talked
to I believe is one person,

00:47:22.089 --> 00:47:23.465
but I also believe

00:47:23.465 --> 00:47:27.928
that behind him must be a group of people.

00:47:27.928 --> 00:47:30.597
And they worked for quite a while.

00:47:30.597 --> 00:47:33.517
I mean, they were at this for
perhaps two and a half years

00:47:33.517 --> 00:47:34.768
that we know about.

00:47:34.768 --> 00:47:37.437
- If you look back at the
accounts pressuring Lasse,

00:47:37.437 --> 00:47:39.398
they share some similarities.

00:47:39.398 --> 00:47:41.191
They use free email addresses

00:47:41.191 --> 00:47:45.279
and they have almost no footprint
outside of the XZ threads.

00:47:45.279 --> 00:47:47.948
These were very likely
sock puppet accounts,

00:47:47.948 --> 00:47:50.367
identities manufactured to apply pressure

00:47:50.367 --> 00:47:53.954
as part of a multi-stage
social engineering campaign.

00:47:53.954 --> 00:47:55.998
- Now, who spends a million dollars

00:47:55.998 --> 00:47:57.416
and takes two and a half years

00:47:57.416 --> 00:48:01.253
to attempt to break into every
hotel room on the internet

00:48:01.253 --> 00:48:02.421
with a master key?

00:48:02.421 --> 00:48:03.964
(suspenseful music)

00:48:03.964 --> 00:48:06.675
I think it's not a criminal organization

00:48:06.675 --> 00:48:08.594
because I don't think
a criminal organization

00:48:08.594 --> 00:48:10.095
would have that patience

00:48:10.095 --> 00:48:13.974
to spend that time
without any real return.

00:48:13.974 --> 00:48:18.645
So I think it has to be a
nation state actor, here.

00:48:20.230 --> 00:48:23.066
- A lot of the aliases, like Jia Tan,

00:48:23.066 --> 00:48:24.818
they sound like Asian names,

00:48:24.818 --> 00:48:28.614
and the published changes
are all timestamped in UTC+8,

00:48:28.614 --> 00:48:29.990
Beijing time.

00:48:29.990 --> 00:48:32.451
So the signs point to China.

00:48:32.451 --> 00:48:35.454
And that's why it's probably not China.

00:48:35.454 --> 00:48:37.497
I mean, why would they
make it that obvious?

00:48:37.497 --> 00:48:38.916
Every other part of the operation

00:48:38.916 --> 00:48:41.877
has been so meticulous, so cautious.

00:48:41.877 --> 00:48:43.629
And they also worked on Chinese New Year,

00:48:43.629 --> 00:48:45.172
but not on Christmas.

00:48:45.172 --> 00:48:47.633
And over the years,
there were nine changes

00:48:47.633 --> 00:48:51.929
that fall outside of the
Beijing time into UTC+2,

00:48:51.929 --> 00:48:54.056
which is a time zone that includes Israel

00:48:54.056 --> 00:48:56.308
and parts of Western Russia.

00:48:56.308 --> 00:48:58.560
That's why some experts have speculated

00:48:58.560 --> 00:49:01.396
that this could be the work of APT29,

00:49:01.396 --> 00:49:05.400
a Russian-state-backed hacker
group also known as Cozy Bear.

00:49:05.400 --> 00:49:07.527
- But again, do we know?

00:49:07.527 --> 00:49:09.112
No, of course we don't know who it is,

00:49:09.112 --> 00:49:10.614
and we likely will never know.

00:49:10.614 --> 00:49:12.491
Jia Tan himself just disappeared

00:49:12.491 --> 00:49:15.118
as soon as this exploit
became publicly known

00:49:15.118 --> 00:49:18.205
and never heard from again.

00:49:18.205 --> 00:49:19.289
- In a sense it doesn't matter

00:49:19.289 --> 00:49:22.584
whether this was Russian
or Chinese or Iranian.

00:49:22.584 --> 00:49:25.128
We need to protect from
these types of backdoors

00:49:25.128 --> 00:49:26.630
no matter where they're coming from.

00:49:26.630 --> 00:49:29.967
- I see this as like, you know,
the canary in the coal mine

00:49:29.967 --> 00:49:31.927
of what's gonna be happening

00:49:31.927 --> 00:49:35.305
as attackers get more sophisticated,

00:49:35.305 --> 00:49:37.265
they make fewer mistakes.

00:49:37.265 --> 00:49:39.559
You know, the gloves are off in a way.

00:49:39.559 --> 00:49:42.938
I don't think that the
Linux community is fully,

00:49:44.523 --> 00:49:47.567
you know, is fully ready for this yet.

00:49:48.819 --> 00:49:50.278
- In the aftermath of XZ,

00:49:50.278 --> 00:49:51.446
the open source community

00:49:51.446 --> 00:49:54.366
poured over countless
small similar projects

00:49:54.366 --> 00:49:56.910
looking for similar campaigns,

00:49:56.910 --> 00:49:58.870
but they found almost nothing.

00:49:58.870 --> 00:50:00.831
- I'm worried that we
didn't find other backdoors.

00:50:00.831 --> 00:50:02.791
The incentives are just too clear.

00:50:02.791 --> 00:50:07.587
There are state-sponsored
parts of either governments,

00:50:07.587 --> 00:50:11.341
militaries or even private
contractors working for states

00:50:11.341 --> 00:50:15.345
that are all preparing for
the next cyber escalation,

00:50:15.345 --> 00:50:18.265
some kind of a war, some kind
of a geopolitical conflict,

00:50:18.265 --> 00:50:20.225
and where are all of those backdoors?

00:50:20.225 --> 00:50:23.311
There's just too many people
incentivized to put backdoors

00:50:23.311 --> 00:50:26.815
for the few backdoors that
we're actually discovering.

00:50:26.815 --> 00:50:28.316
- Now, some experts have argued

00:50:28.316 --> 00:50:31.820
this reveals a fundamental
flaw in the open source model,

00:50:31.820 --> 00:50:33.447
but not everyone agrees.

00:50:33.447 --> 00:50:35.866
- Closed source software
would be no better here.

00:50:35.866 --> 00:50:40.245
In fact, who's to say that
there aren't already state spies

00:50:40.245 --> 00:50:42.664
working as paid software engineers

00:50:42.664 --> 00:50:44.416
at some of the larger companies

00:50:44.416 --> 00:50:46.835
putting in exactly backdoors like this?

00:50:46.835 --> 00:50:49.171
But then there would
be no community member

00:50:49.171 --> 00:50:52.924
running free testing and
detecting this by chance.

00:50:52.924 --> 00:50:54.217
This backdoor, if anything,

00:50:54.217 --> 00:50:57.387
underlines the ethos of open source.

00:50:57.387 --> 00:50:59.097
- I mean, just think of what it took

00:50:59.097 --> 00:51:01.016
to get this done in public.

00:51:01.016 --> 00:51:04.269
There was a multiple-year
social engineering campaign,

00:51:04.269 --> 00:51:05.979
there were all these
layers of misdirection,

00:51:05.979 --> 00:51:07.606
and then there was code that was designed

00:51:07.606 --> 00:51:09.775
to withstand constant scrutiny.

00:51:09.775 --> 00:51:12.319
Compare that now with
a closed source hack.

00:51:12.319 --> 00:51:14.738
Sometimes all it takes to get
a backdoor installed there

00:51:14.738 --> 00:51:16.406
is a court order,

00:51:16.406 --> 00:51:17.824
or you have a public company

00:51:17.824 --> 00:51:21.495
that can just brush a
breach under the rug.

00:51:21.495 --> 00:51:24.414
I actually used to work as an
open source researcher myself

00:51:24.414 --> 00:51:26.875
at the Japanese telecom giant NTT,

00:51:26.875 --> 00:51:28.126
and my perspective is

00:51:28.126 --> 00:51:30.837
that it's only because this
is an open source project

00:51:30.837 --> 00:51:33.215
that it's been picked apart, analyzed,

00:51:33.215 --> 00:51:35.967
and turned into a conversation
about security at all.

00:51:35.967 --> 00:51:39.471
One that focuses on the
fundamental vulnerability.

00:51:39.471 --> 00:51:42.349
It's not the code, it's the people.

00:51:42.349 --> 00:51:44.643
Now, the system has not
supported them enough.

00:51:45.769 --> 00:51:48.105
- I feel for Lasse that

00:51:49.022 --> 00:51:52.526
he's given this beautiful gift

00:51:52.526 --> 00:51:55.821
to the whole world

00:51:55.821 --> 00:51:57.447
and, you know, what have we,

00:51:57.447 --> 00:52:00.283
what has humanity done back to him, right?

00:52:00.283 --> 00:52:02.953
We've poisoned his gift.

00:52:02.953 --> 00:52:06.206
And then I think implicitly a little bit,

00:52:06.206 --> 00:52:07.582
not everyone's saying this,

00:52:07.582 --> 00:52:11.586
but implicitly we're blaming him

00:52:11.586 --> 00:52:16.591
for not being there to maintain
this stuff for free forever.

00:52:17.467 --> 00:52:18.927
But why are we demanding

00:52:18.927 --> 00:52:22.347
that Lasse do anything

00:52:22.347 --> 00:52:24.349
when he's not being paid for this stuff?

00:52:24.349 --> 00:52:27.477
And that's, in my opinion, quite unfair.

00:52:28.770 --> 00:52:31.189
On this Saturday evening,

00:52:31.189 --> 00:52:34.192
we were working together on a workaround

00:52:34.192 --> 00:52:36.987
for this bug in RHEL 9

00:52:36.987 --> 00:52:38.613
that he's added to XZ,

00:52:38.613 --> 00:52:42.868
and he absolutely could
have told us to get lost,

00:52:42.868 --> 00:52:43.910
and didn't.

00:52:43.910 --> 00:52:45.120
What a brilliant guy.

00:52:48.498 --> 00:52:53.461
(electronic beeping)
(music fades out)

