HomeVideos

Why is Microsoft updating their text editors!? | TheStandup

Now Playing

Why is Microsoft updating their text editors!? | TheStandup

Transcript

848 segments

0:00

Do we want to get to the main topic?

0:01

This Yes.

0:02

>> main topic. 40 minutes in. Yeah.

0:09

>> Uh anyways, sorry. Today on the standup,

0:11

we are going to have Casey Miratory give

0:13

us the lowdown on Notepad and Notepad++.

0:16

If you are not familiar, there has been

0:18

some big news in both of the old pads.

0:21

And so, Casey, why don't you take this?

0:23

>> I mean, big big news might be saying a

0:26

little bit much. They both had security

0:29

exploits is really what was kind of

0:31

weird. And the reason normally we

0:33

probably wouldn't be talking about it if

0:35

it weren't for the fact that it's kind

0:36

of just getting absurd now that like

0:38

both of the Notepad apps for Windows

0:40

both had security exploits in like the

0:42

last 12 months. Uh which is just kind of

0:45

a little bit weird and you're just like

0:46

how are how have we gotten to the place

0:48

where like the text editor is regularly

0:50

having security exploits.

0:52

So, I'll start with regular Notepad,

0:55

which is just the one that comes bundled

0:56

with Windows. That's the one that you're

0:58

probably most likely to use because it

1:00

comes directly from Microsoft and you

1:02

don't have to have installed it. It's

1:03

just going to be there, right?

1:06

So, this one's kind of nuts. And

1:08

actually, I'm I'm sort of glad that I

1:10

read up on this one because I didn't

1:12

actually know this fact about Windows. I

1:16

maybe could have guessed it had I

1:18

thought really hard, but I might not

1:20

have because I might have been like,

1:21

"Well, surely no one would do that." Um,

1:25

>> you underestimate Microsoft, my friend.

1:28

>> And I was like, "Okay, I guess uh yeah,

1:30

lesson learned." So anyway,

1:33

so what happens is, uh, in Notepad, in

1:37

normal Notepad now, they've sort of

1:38

started adding features, which is

1:40

exactly what you don't want someone to

1:42

do to a Notepad, right? Like the whole

1:43

point of Notepad is it's just this like

1:45

really crappy text editor and you can

1:48

kind of breathe a sigh of relief when

1:49

you fire it up because it's just not

1:51

going to do anything, right? So you kind

1:53

of would have hoped that like, oh, if

1:54

I'm going to open this file, nothing

1:56

could possibly go wrong because it's

1:57

Notepad. It doesn't have anything in it.

1:59

Can't do anything. It's fine. But

2:01

they've been steadily adding features to

2:03

Notepad. So now that's not true anymore,

2:04

right? It's got co-pilot integration and

2:06

all this other stuff. Now

2:07

>> that's what I need.

2:08

>> Yeah. So now if you open up Notepad,

2:10

it's like anything goes. It's just like

2:11

opening up Microsoft Word or something,

2:13

who knows how much security uh snafoods

2:16

could be hiding. So, one of the things

2:18

that they did is if you open a markdown

2:21

file in Notepad, now normally you'd

2:24

think, well, it's just notepad, so if I

2:26

open a markdown file, it's going to show

2:27

it as a text file. But no, it will

2:29

actually do the markdown parsing in

2:32

Notepad, I guess. And now, I have never

2:35

noticed this myself. I've never used

2:36

Notepad to open a markdown. I didn't

2:37

even know it did that.

2:38

>> Same. Apparently it does, right? And one

2:42

of the things that it does when it

2:44

parses the markerdown file is that it

2:46

properly obeys that like parentheses

2:49

bracket syntax for linking where you can

2:51

basically put in like here's a URL of

2:54

some kind and here's the display text

2:56

that I want for it. It will actually do

2:58

that conversion and properly display

3:00

that in the notepad so that you can kind

3:03

of just click on links and they will,

3:05

you know, it'll take you to the links.

3:08

Now, here is where the problem begins.

3:11

The way that they shipped this feature

3:16

is like

3:19

mo

3:21

>> Oh my god.

3:22

>> So,

3:22

>> Casey, are you okay? Do we need to like

3:24

do we have do we need like a personal

3:26

chat right now?

3:27

>> Yeah. Here, Casey, I can make you feel a

3:29

lot better. I actually do have a copy of

3:31

uh the secure notepad. It's right here.

3:33

I got it right here. This is This is

3:35

super secure. I've got

3:36

>> Yeah, you could you could have fit secur

3:38

one online.

3:38

>> No mistakes.

3:40

>> No mistakes. Anyways, go ahead.

3:42

>> Hey, is that HTTP? Get that out of here.

3:45

That's not how we order coffee. We order

3:47

coffee via ssh terminal.shop. Yeah, you

3:50

want a real experience. You want real

3:52

coffee? You want awesome subscriptions

3:54

so you never have to remember again? Oh,

3:56

you want exclusive blends with exclusive

3:58

coffee and exclusive content? Then check

4:02

out Kron. You don't know what SSH is?

4:04

Well, maybe the coffee is not for you.

4:16

>> So, the way that they they shipped this

4:18

feature, uh, anyone that mo this will be

4:22

lost on most of you, but anyone who's

4:24

been like a longtime Windows programmer,

4:26

they will be they will just they won't

4:29

they'll have the face that I just had on

4:31

my face. They will have that on their

4:33

face, too.

4:34

So the way that they shipped this

4:36

feature was they do the markdown parsing

4:39

as you would expect and they produce the

4:42

like URL. They they produce the like

4:45

string the display string like you would

4:47

in markdown and they take whatever the

4:49

URL would have been and they save just

4:52

that raw string. Basically they just

4:54

keep that.

4:56

When the user clicks on the link,

4:59

literally they call shell execute exw

5:05

and just pass that through.

5:08

>> Oh man. Hey Gabby,

5:12

>> how's that even pass? Like is it like

5:14

security audits when they like do this

5:16

stuff?

5:18

>> I don't believe it.

5:19

>> Yes.

5:20

>> And it's hidden, right? You can't see

5:22

what it is because it's it's hidden

5:23

under

5:24

>> Yeah. I mean it's not going to tell you

5:25

what it it's just going to pass it to

5:26

shell execute just that's it right so

5:28

it's just like they fill out you can

5:30

actually go see uh the people have

5:32

decompiled the code so they you can

5:34

actually go see it's like yep it fills

5:35

out the shell x uh w like inferstruct it

5:38

sets the command to open and just just

5:43

blam the string is just there's the

5:45

string like have a party open right

5:49

>> wow

5:50

>> so basically what this means is that

5:52

anybody who, you know, was unaware

5:56

because like normally you wouldn't think

5:57

that's what it would do. Like normally

5:58

you'd be like, "Oh, this is going to go

6:01

to a web like this will go to a web

6:04

browser and the web browser will

6:06

interpret the URL. So how risky could it

6:09

possibly be? It's no different than if I

6:11

was just clicking a link on a website,

6:13

right?" No, you can literally put

6:16

anything you want in there like file

6:19

slash the path to something you want to

6:22

run and it will just run with your

6:24

permissions on your machine right there.

6:27

No web browser necessary, right? I tried

6:30

I'm trying in my head to come up with a

6:32

reason why that happened and like I

6:34

can't even come up with one.

6:35

>> Well, I'm trying to come up with how it

6:37

was allowed to happen. That's the

6:39

>> So So that's just in there, right? And

6:42

the only real saving grace here. So like

6:44

that's really bad. Like that just should

6:47

never I mean that's not

6:50

there's people there's apologists who

6:52

like replied to the tweet that I made

6:53

about this who were like well I mean the

6:56

user clicked on the link. I'm like no no

6:57

no I don't think you understand the user

7:00

clicked on the link is true for every

7:02

security exploit that's ever occurred.

7:03

Like every security exploit somebody at

7:06

some point installed something even if

7:08

it's the operating system. And you can't

7:10

be like, "Well, they installed an

7:11

operating system on the computer, so

7:13

it's their fault that eventually it got

7:15

hacked." Like, no.

7:16

>> They clicked accept on the terms and

7:17

conditions, so therefore.

7:19

>> Yes. Like the user is if the user clicks

7:21

on a link, it's the program's

7:23

responsibility to ensure that it's going

7:26

to just open the link in a web browser,

7:28

not oh, that could just be crap that

7:31

runs on your machine. Now,

7:32

>> can I can I ask a follow?

7:33

>> That's not on the table, right? Yeah. So

7:36

shell execute when it gets handed a URL

7:39

that is a properly formatted HTTPS thing

7:42

will just launch a browser. It had I

7:45

didn't even that's kind of crazy. I I

7:48

guess I never really realized that you

7:49

could just

7:49

>> protocol you so shell so so shell

7:52

execute um

7:54

>> I don't know shell execute. I've never

7:55

tried this method. It just seems

7:57

interesting to me that you can just be

7:58

like here's https you know what to do

8:00

and it's just like

8:00

>> yeah actually this is so so you could

8:03

think of it as that is the job of open

8:05

so so when you do shell execute you can

8:08

basically pass there these things called

8:10

verbs right

8:11

>> is x open the same

8:13

>> sorry

8:13

>> sorry keep going I'm just trying a xdg

8:16

xdg open

8:18

>> yes

8:19

>> um and the idea is this is you know it

8:22

it makes sense and when it was created

8:24

you know shell execute uh the first time

8:26

I remember it was in win 95. Uh so it's

8:28

it's been around like a very long time

8:31

but the yeah uh but the ide

8:36

>> yeah uh so the idea behind shell execute

8:39

is very simple it's that protocol

8:41

handlers like people who know how to do

8:43

something they can register those with

8:46

the shell and the shell can go oh you

8:49

know I you know someone called open and

8:52

they gave me a PDF file who are the

8:55

people who are currently registered to

8:56

handle PDF files Okay, let's open one of

8:59

those and hand them this thing. So, it

9:01

literally like this is its job. Its job

9:04

is to take something like a URL and

9:07

decode it into saying, "Oh, that I know

9:09

how to open one of those. Here's a

9:11

program on the machine that can do that

9:12

for me." So, shell execute is operating

9:15

as intended. Now, obviously, this is a

9:18

huge security hole, which is one of the

9:19

reasons you generally don't want a

9:20

program to just be calling shell execute

9:22

on stuff if the user is unfamiliar with

9:24

it. Typically, like if you're going to

9:25

call shell execute, you probably want to

9:27

do a bunch of like hardening of that

9:29

path to make sure that you've parsed the

9:31

string yourself and know that it's not

9:33

something confusing. Right now,

9:35

obviously this has been a security

9:37

exploit topic before because

9:40

and now we'll get to the really cool

9:42

stuff.

9:44

So, prior to 2024,

9:48

one of the things that shell execute did

9:50

know how to handle was installer apps.

9:53

So MSIs, that just runs and

9:56

installs crap to your machine, right? So

9:59

you could with this exploit, you could

10:02

do ms-app install colon some remote file

10:07

and it will download and run it. Now

10:10

thankfully in 2024, Microsoft just

10:13

removed that feature.

10:14

>> 2024

10:16

>> 2020 Well, you know, better late than

10:18

never, Ted.

10:20

>> Yeah. Yeah, that's okay.

10:22

>> Yeah. So

10:22

>> Wow. So now what will actually happen if

10:25

you wanted to do the maximal version of

10:27

this notepad exploit is thankfully

10:30

Microsoft's other you know people who

10:32

removed that will stop that from

10:34

happening. You'll get a box that pops up

10:35

that says hey uh I can no longer

10:37

autoinstall things. Please notify

10:40

whoever it was that distributed the

10:41

software that they have to update their

10:43

installation link. Like yes good very

10:46

very good job. Um that was good. Right.

10:49

And so that actually stopped this

10:51

exploit from being potentially a lot

10:53

worse than it was. Now

10:54

>> question one quick question. Can you

10:57

just do like a like a curl,

10:59

you know, some I don't know what they

11:01

call uh DOSS scripts. I I'm just going

11:04

to call bash for, you know, some remote

11:06

script and then pass it into bash,

11:08

whatever the equivalent of that. Can can

11:10

you just shell execute that? Can you

11:11

just shell execute a curl?

11:13

Uh, so you as far as I know, and I guess

11:18

I haven't thought about it too hard, but

11:20

as far as I know, with with a single

11:22

click, meaning all you're going to do is

11:24

click on one of those one of those

11:26

markdown parsed links, and it's going to

11:28

pass something to shell execute.

11:31

The thing that it's going to do has to

11:34

be resident on your machine. So, it

11:36

would have to be like file something on

11:39

your machine and it would run that.

11:40

>> Okay? But it can't with because they

11:42

closed that MS-app install. So, so a

11:46

practical exploit for this exploit would

11:48

have had to look like, hey, um, here's

11:50

the GitHub for our document collection.

11:53

No executables or anything, right? And

11:55

you download it, but it does secretly

11:57

have an executable in it, but you're

11:58

never going to click on that because

11:59

it's some buried in some subdirectory

12:01

you'll never see or whatever, right?

12:02

Yep. then the main page which is like

12:04

hey table of contents with a link you

12:06

click on that and it's got a file link

12:08

to that executable and it runs it and

12:10

then you're done you're toast right

12:12

because that's going to run that

12:13

executable with your permissions right

12:14

away um so but without that MS app

12:18

install because that loophole is closed

12:21

now for shell execute I don't think

12:22

there was a way to have oneclick both

12:24

download and run a program I could be

12:27

wrong about that though but I don't

12:29

think with a single shell execute it can

12:31

do that it had to be something already

12:32

read. So, it could either go get a file

12:34

from the internet like by opening a web

12:36

browser with one click or it could run a

12:39

file already on your computer. But, I

12:40

don't think it can do both together. I

12:42

don't think uh people can correct me if

12:43

I'm wrong about that though because I

12:45

mean I'm not the person who reverse

12:46

engineered this exploit. So, I don't

12:47

know. I'm just going by what uh security

12:49

researchers uh put up there and making

12:51

my best guess. Uh but I did test it

12:55

myself though. I went and ran I made my

12:56

own little shell execute thing uh to see

12:58

what happens if I did an MSM app install

13:00

and I did verify that that is now

13:02

blocked at least on my whatever my

13:03

current version of Windows is that was

13:05

running on this machine I'm talking to

13:06

you via right now uh it it does in fact

13:09

block those. So that's cool. Now I don't

13:11

think unlike the exploit we're going to

13:14

talk about next, I don't think this one

13:16

was ever exploited in the wild because

13:18

Microsoft found it. So they shift it and

13:21

then some security audit or somebody who

13:23

was going through the code or some

13:25

research team that found it send it send

13:28

it to them might have been what

13:30

happened. I don't know. Uh because there

13:32

were reverse engineerings of it online.

13:34

So it might have been that one of those

13:35

reverse engineering people actually were

13:36

the people who reported it right. I

13:38

don't I didn't look to see who was the

13:39

if there somebody got a bug bounty for

13:40

it or whatever. I had Canon is it's that

13:43

somebody was really mad that Microsoft

13:45

is shipping updates to Notepad

13:48

internally and they're like I'm gonna

13:49

show that you guys should stop updating

13:51

this cuz I know for sure that you guys

13:54

that's what I think in my head. I'm

13:55

thinking some guy inside is LIKE STOP

13:57

UPDATING THIS. I'VE BEEN TELLING YOU WE

13:59

JUST NEED AN ERROR.

14:01

>> YEP. The security like someone on one of

14:02

their hardcore security teams was like

14:04

they did what to notepad. All right, I'm

14:06

going to go look at that. And it was

14:07

like what did you do?

14:08

>> Yeah.

14:10

from engineering's on that team. I know

14:12

he left a shell exploit in here

14:14

somewhere.

14:14

>> Yeah. Yeah. Yeah.

14:17

>> Like the entire security audit is just

14:19

like Gp shell exec xw. It's like bam bam

14:23

bam bam bam bam bam. They're like oh no.

14:28

Yeah. Uh so that was that was the one

14:30

that shipped with Windows. And

14:32

fortunately, again, as far as I'm aware,

14:34

uh, this was found by either security

14:37

researchers inside or outside of

14:39

Microsoft prior to anyone getting

14:41

severely compromised by it. So, it

14:42

didn't end up being an issue, I don't

14:44

think. That's my understanding anyway.

14:47

Not so for Notepad++, unfortunately.

14:51

Notepad++,

14:53

which I use, by the way, and have now

14:55

uninstalled from my machines because I'm

14:57

now terrified

14:59

um of even using a text editor anymore,

15:01

which is terrifying. It's like I'm

15:03

having a hard time emotionally thinking

15:05

of whatever teams in charge of

15:07

Notepad++, which hasn't changed from

15:10

Windows 95 all the way up until just

15:12

like two years ago. whatever team that

15:15

was that was in charge of it has started

15:16

putting so many features into it

15:17

including AI and I don't think they're

15:20

ready for all the possible exploits.

15:21

Like I just don't think they're ready

15:22

for it and they don't know what they're

15:23

doing out there.

15:24

>> No.

15:26

Notepad++ on the other hand, uh this one

15:29

is very scary. Uh the Notepad one that I

15:34

just said is more of like a face palm

15:37

kind of thing. It's like guys don't sh

15:39

don't like we don't need to add shell

15:40

execute to like just don't put shell

15:42

execute in Notepad ever. like it doesn't

15:44

need that, right? Um but uh yeah, so the

15:49

problem is with Notepad++, this is a

15:52

different story. Notepad++ is actually

15:55

like a very sophisticated attacking

15:59

individuals. That's why this one's so

16:01

scary.

16:02

>> Oh, cool. And by cool, I mean

16:04

terrifying, but also cool story.

16:06

>> Yeah.

16:08

>> Okay.

16:09

So, and I would preface that Notepad++

16:13

is like it's, you know, it's a something

16:15

developed by just some folks, right?

16:18

Like it's not a commercial package. It's

16:20

really not their responsibility to

16:22

secure it. So, at some level, it's not

16:25

that, you know, it's not like it's some

16:28

somebody's fault for doing a bad job

16:31

because it's like, well, they you you

16:32

know, you they aren't even getting paid

16:35

to do this thing, right? Like so it's

16:37

like they're not necessarily supposed to

16:38

employ a security team or anything else,

16:40

right? But it just goes to show you that

16:42

like well if you're just using some open

16:44

source software or whatever it is, it's

16:46

like actually you might just want to be

16:47

really scared about that because who the

16:50

heck knows at this point. What happened

16:53

with Notepad++ is as follows.

16:56

They unfortunately made the decision,

16:58

which I just wish people would just stop

17:00

doing. They unfortunately made the

17:02

decision quite some time ago to have the

17:04

thing have a auto autoupdate feature.

17:07

Now thankfully it's not the kind of

17:10

feature that's like you know Chrome or

17:12

whatever where it just silently updates

17:15

the binary like if you know if you have

17:17

the automatically keep updated checkbox

17:19

checked or something it just updates

17:22

your binary whenever there's a new one

17:24

or something like that. Thankfully they

17:25

did not do that. But what they did do is

17:28

they made a thing called the wind g or

17:31

wind g up or something like that which

17:34

they basically made their own little

17:36

update uh program their own little

17:38

update sort of uh codebase and they

17:41

actually share it. So you can use this,

17:43

you know, this is something that other

17:44

people could use as well. And it's just

17:46

an updator that checks a website, gets

17:48

an XML, a little XML like uh payload

17:51

that says like what the latest, you

17:53

know, um download is so that can compare

17:56

against itself. And if it's newer, it

17:59

pops up a dialogue box basically that

18:01

says like, "Hey, there's a new version

18:03

of, in this case, Notepad++ or whatever

18:05

the Windg is running on. There's a new

18:07

version. Would you like to download it

18:09

now?" Right? And you can click yes if

18:11

you want it or no if you don't.

18:13

Thankfully, because I hate software

18:16

updates, for the past four years, I have

18:18

always clicked no.

18:21

Other people who probably were also

18:25

advised that they should keep their

18:26

software up to date for security

18:28

reasons, which is always a mixed like

18:32

the thing they don't tell you is the

18:33

easiest way to get security exploits is

18:35

to not update your software. And the

18:37

easiest way to get security exploits is

18:39

to update your software. So, yep. Right.

18:42

>> Um, so like you're damned if you do,

18:44

damned if you don't. And this is a great

18:45

example of that. So,

18:48

>> probably going like, "Oh, I should make

18:49

sure I'm up to date on my Notepad++."

18:51

Clicked yes. So, this particular updater

18:54

at the time didn't have any kind of

18:57

cryptographic integrity check. So, for

19:01

those of you who maybe aren't familiar

19:03

with this kind of process, when you are

19:05

going to update a binary, typically what

19:08

you want to do is you want to make sure

19:10

that the binary that you're updating to

19:12

actually is the binary that you think it

19:14

is. So, for example, if I install

19:17

Notepad++ on my machine, in a in an

19:19

ideal world, what would happen is I only

19:22

have to trust the first time I got

19:24

Notepad++. Now, obviously, if the first

19:27

time I get Notepad++, it's a hacked

19:28

version of it. I'm screwed. So maybe

19:30

don't download the first version from

19:32

the pirate bay or whatever, right? But

19:35

once I have it installed, what I would

19:37

like is for that program to have what we

19:40

would traditionally call like a public

19:41

key that you know, every copy of

19:44

Notepad++ just has the same key. when it

19:47

wants to download a new version of

19:49

itself, when it downloads that

19:51

executable, it can check to see if that

19:54

executable is signed in some way so that

19:57

the binary itself actually matches

20:01

when you do a signature check matches

20:03

the public key that we have and only the

20:06

people who can who produce the binary

20:07

have the private key. So no one else can

20:09

do it without actually hacking like the

20:13

you know extracting the p private key

20:15

from this you know who wherever the

20:17

build from it and and that can happen

20:18

too at which case all bets are off but

20:20

at least now we know uh someone can't

20:23

just you know hijack it and the reason

20:26

that this is important is because if you

20:28

think about when something goes to

20:29

autoupdate it's just connecting to the

20:32

internet to get that update if it's you

20:34

know gets maninthem like somebody's

20:36

sitting there and can intercept the

20:37

traffic it can just go, "Oh, he's trying

20:39

to download a new Notepad++. I've got a

20:41

great Notepad++ for him." And gives the

20:44

you you know the the modified executable

20:46

that has all the security exploits in

20:47

it, right? So anyway, this particular uh

20:51

version of Notepad uh I guess prior to

20:54

2025, they just didn't have any kind of

20:57

verification. So they didn't verify the

21:00

XML package and they also that you know

21:02

came to say you know where you should

21:03

get the new version from and they also

21:05

didn't verify any executables that they

21:07

that you would have downloaded as a

21:08

consequence for that. So, this was just

21:10

an insecure process. And again, this is

21:12

a there's a standard CVE for this. If

21:13

you actually go uh not CV, there's a

21:16

standard what what do they call it? I

21:17

don't know if you've ever if you ever

21:18

read I'm not a security researcher. If

21:20

you've ever read those CVEes, which are

21:22

basically like the thing that details

21:24

what the exploit was from the MITER

21:26

Corporation keeps this them in a giant

21:28

list, right? Um there's part of the

21:31

thing that details the exploit. There's

21:33

like codes that they have for what kind

21:36

of exploit it was. So there like this is

21:38

just a standard kind. It's did not

21:40

validate an update binary. That's like

21:42

it's just that's just like a standard

21:44

thing, right? Because it this has

21:45

happened before.

21:47

So anyway, so that's the basic idea of

21:50

what's about to happen. And the so that

21:53

part while scary because it's like well

21:55

that's not great. The scarier part is

21:59

how they went about exploiting this

22:01

because a normal kind of exploit is a

22:04

lot less scary than the kind that they

22:07

carried out here. So what they chose to

22:09

do what the what the attackers chose to

22:11

do with it and they are believed to be

22:13

state sponsored because of the level of

22:15

sophistication

22:17

is they decided look if we start

22:20

randomly exploiting all of these you

22:24

know this back door to to notepad you

22:27

know that's going to get detected

22:28

quickly. So instead what we'll do is

22:30

we'll pick highv value targets whose

22:32

machines we were trying to compromise

22:35

and we will see if any like of those IP

22:38

addresses connect to update notepad++

22:42

we'll man in the middle it because we

22:44

figured out how to hack the web like we

22:46

hacked the like the web provider or

22:49

someone in between the web provider I

22:50

don't remember the specifics are

22:51

actually uh not as well documented as I

22:54

would have the specifics of the hack are

22:55

very well documented the specifics of

22:57

exactly what the man in the middle part

22:59

looked like we're not we man in the

23:01

middle that we're just going to wait

23:03

we're going to pass everything through

23:04

so it looks like notepad++ is updating

23:06

normally for everyone else but when we

23:09

see a high value IP comes in then we'll

23:11

slip them the mickey right then that and

23:14

only that cup of coke gets the roofy

23:18

right so what they then do is they serve

23:23

just the highv value targets an updated

23:26

Notepad++ ++

23:29

that has

23:31

and I loved I loved this. It was I don't

23:34

know if if hackers do these things to be

23:37

funny because you know I I I've never

23:41

really known like a real black hat

23:42

hacker I guess but I know some people

23:44

who are kind of like maybe adjacent to

23:46

that and they do like inside jokes uh in

23:49

that way so I don't know. So what it

23:52

does is it includes

23:55

a legitimate

23:58

copy of Bit Defender of some executable

24:01

from Bit Defender a legitimate one

24:05

that they have replaced some of the DLS

24:09

that it loads. So they use an executable

24:12

that is signed but that loads an

24:14

external DL so that they won't get

24:17

security checked on that and they

24:19

replace just the DLL it loads with the

24:22

DLL that does the security exploit that

24:24

they need right so I'm like okay so they

24:29

give you this package and effectively

24:31

what happens is Notepad++ will update

24:33

itself with the bad version that you

24:35

sent it doesn't check it just starts

24:37

running that you think you're running

24:38

Notepad++ but Actually, you're running

24:40

this uh copy of Bit Defender, which

24:42

they've actually renamed to Bluetooth

24:44

service. So, you're running a thing

24:47

called Bluetooth service, which yes,

24:49

you're running this extra thing called

24:50

Bluetooth service that's actually a copy

24:52

of Bit Defender that's that's intact.

24:54

They haven't changed that at all, but

24:56

they replace some of the DLS that it

24:58

would have loaded with ones that have

24:59

their exploit payload. And off we go.

25:02

So, this thing was like pretty hard to

25:05

find apparently. I'm not sure how the

25:07

security researchers actually ended up

25:08

doing it. You could see uh you can go

25:10

read rapid 7 has like their full

25:13

breakdown of like how they went about

25:15

finding it and it's like they had to

25:18

find it on just there was a small number

25:20

of machines that were having this happen

25:21

and they had to dig into it I guess

25:23

because again like very few people had

25:24

it so it's kind of like hair pulling of

25:26

like wait what's going on and eventually

25:29

they were able to track it back to the

25:30

fact that it was notepad even though

25:32

most people's notepad installs were not

25:35

compromised right so at the end of the

25:39

day. This is kind of terrifying because

25:41

it's like, holy cow. Like, I mean, I'm

25:43

not a highv value target, so I guess I

25:45

don't really have to worry too much

25:47

about that kind of thing. But it's crazy

25:49

just how intentional these things are. I

25:53

didn't quite realize like how specific

25:56

they might be. And my guess is we have

25:58

not found most of these, right? Like

26:01

like this is not the only time they've

26:04

done something like this, I'm sure.

26:06

And what are the chances that we've

26:08

actually detected most of them?

26:11

>> That's interesting that they're able to

26:12

man in the middle so thoroughly like

26:14

that. That's what I'm like most curious

26:16

about is how how could you like what

26:19

kind of access do you need to have or

26:21

what have you hacked to be able to do

26:23

that? just the web provider that

26:25

happened to be running um the the little

26:28

windy update other end or whatever it is

26:30

or not or the not the other end the um

26:32

where the file the the web provider

26:35

basically

26:36

>> whatever they were hosting the notepad

26:37

>> they just had to hack the host that's it

26:40

yeah

26:42

>> that's crazy and then they would just

26:43

they would selectively pick which one is

26:46

wild

26:47

>> yeah well that's the thing is like yeah

26:49

like I feel like that's what makes it so

26:51

insidious is because normally Like if

26:54

somebody hacks a web host provider or

26:56

hacks some website, a bunch of people

26:58

will get screwed but will know like that

27:00

day, right? Because all hell breaks

27:02

loose and like and security research are

27:04

seeing weird files like they're

27:05

monitoring all this stuff, right?

27:07

>> Yeah.

27:07

>> Whereas this they don't see anything

27:10

>> because they're not a high value target.

27:12

>> Well, they're presumably they know they

27:14

try to figure out where all of those

27:16

collection spaces are and intentionally

27:18

would never serve it to one of those.

27:20

Right. The hard part is finding someone

27:21

highprofile using nlad.

27:23

>> Dang it. YOU TOOK MY JOKE TRASH. THAT'S

27:25

WHAT I WAS GOING TO ASK IS THERE SUCH

27:27

THING AS A HIGH VALUE TARGET USING

27:29

>> NO.

27:29

>> SORRY BUDDY. I said it already. Sorry

27:30

prime. I said it already. Sorry.

27:32

>> I said can I ask the question?

27:34

>> THAT'S WHY I SLIPPED IT IN THERE. I WAS

27:35

LIKE, I GOT TO get this in before

27:36

somebody else says it.

27:37

>> Trash. That's genius. Thanks a lot.

27:39

Thanks a lot. No, I really appreciate

27:41

that. Makes me feel great about myself.

27:42

I use it because I have to I make the

27:45

materials. I I want people to be able to

27:47

use a a text editor that they're

27:48

familiar with that they can just get for

27:50

free on Windows. Okay. You know, I'm not

27:52

proud of it.

27:53

>> They're handing out Notepad++ for free

27:55

for sure now. They're like, "Guys, Casey

27:58

Casey, how does it make you feel?"

28:00

>> Not great.

28:01

>> That when they attacked highv value

28:03

targets, you weren't included. Like,

28:05

what's like what what went through your

28:06

mind that day?

28:08

>> Up and up, guys.

28:09

>> We don't know that they didn't try.

28:11

Casey's been clicking no. That's say I

28:13

was just going to say I'm sure I was

28:15

tops on the list prime tops on that list

28:18

and I just didn't hit update. They they

28:20

were probably furious

28:23

>> that they couldn't get access to my

28:25

machine with this hack. Probably the

28:26

whole reason they did it and the other

28:28

targets were just like to you know

28:29

they're like well we could since we

28:31

didn't get Casey we'll get a couple

28:32

we'll get you know NORAD or whatever.

28:33

You know

28:34

>> there's like a cinematic scene that has

28:35

Casey's face on a dart board. A guy just

28:37

smoking cigars just throwing darts at

28:39

Casey's face.

28:40

>> Yeah. I mean, that's a chance why they

28:41

kept the exploit open. They were just

28:43

waiting for Casey to hit the update.

28:44

They were going, going, going. I don't

28:47

know, man. We got to we got to get

28:48

something back to the boss, even though

28:49

we're really here to get Casey. They're

28:51

like, "All we got was Bill." And it was

28:53

like, "No big deal."

28:54

>> Bill from it.

28:55

>> Yeah.

28:55

>> The first guy doesn't play Mind Sweeper

28:57

ever, and now he doesn't update his

28:59

notepad. How are WE GOING TO HACK this

29:01

guy?

29:02

>> We've tried leaving USBs on the

29:04

sidewalk. He doesn't put those in his

29:05

computer. We're screwed.

29:06

>> He's not even clicking markdown links in

29:09

Notepad. He's some kind of freak.

29:11

>> What the hell? Everyone clicks markdown

29:14

links. That's why they're there.

29:16

>> Especially in Notepad,

29:18

>> specifically in the world's most

29:21

markdown friendly editor that everyone

29:23

knows about, Notepad.

29:24

>> Yeah. Well, now that it has C-Pilot, I

29:27

do kind of think it is the best place to

29:29

work with Markdown documents. Prime.

29:31

>> I do like the idea of someone at

29:33

Microsoft coming out and going, "Well,

29:37

the we have some good news and bad

29:38

news." The bad news is that the markdown

29:41

parsing in notepad was attacked with a

29:43

pretty significant security exploit. The

29:45

good news is since nobody knew that

29:47

notepad parsed markdown to begin with,

29:49

no one was opening markdown files and so

29:51

we avoided any actual security.

29:54

>> We like to call that at here at the big

29:56

kind of shops like we operate at

29:58

Microsoft. We like to call that Swiss

29:59

cheese security. And so we're really

30:02

confident we've got so many layers of

30:03

abstraction nobody's going to be able to

30:05

exploit our software. Good news. Copilot

30:08

has had no security exploits because

30:10

nobody uses it. And we will continue

30:12

this nobody uses C-pilot so it can't get

30:14

exploited strategy. Hey guys, if you

30:16

like this episode, you can watch the

30:18

rest of it on the Spotify. And don't

30:20

forget to like and subscribe. Woo! See

30:24

you later.

30:24

>> Boot up

30:27

five errors on my screen.

30:32

Terminal coffee

30:35

and

30:36

living the dream.

Interactive Summary

In this video, Casey Muratori discusses two significant security exploits affecting common text editors on Windows: the built-in Notepad and the popular open-source Notepad++. He explains how the standard Notepad's new markdown parsing feature incorrectly handles links by passing raw strings directly to ShellExecute, allowing for local file execution. For Notepad++, he describes a sophisticated state-sponsored man-in-the-middle attack that exploited an unverified autoupdate mechanism to deliver malicious DLLs to high-value targets using signed executables as a cover.

Suggested questions

4 ready-made prompts