HomeVideos

A bad day to use python

Now Playing

A bad day to use python

Transcript

233 segments

0:00

I have a story for you you just you you

0:02

might not even believe. Okay, this story

0:04

is like an might Shyamalan movie. Okay,

0:06

there's going to be turn after turn

0:08

after turn. We got three big ones and

0:10

the final one, honestly, I'm still kind

0:13

of tickled by it. I barely laughed when

0:15

I saw it. I didn't even believe it. I

0:17

said, "Nope, this has to be fake news."

0:19

And in fact, it was not fake news. One

0:21

of the biggest Python packages that gets

0:24

downloaded 97 million times a month has

0:28

just been compromised. And when I say

0:30

compromised, what ends up happening is

0:32

that if you launch any Python process,

0:36

you will get everything taken from your

0:38

computer. I'm talking about every last

0:40

item. SSH keys, AWS, GCP, Azareware,

0:44

Kreds, Kubernetes, configs, git

0:47

credentials, environment variables,

0:49

shell history, crypto wallets, SSL,

0:51

private keys, CI/CD, secrets, database

0:54

passwords. We're talking about

0:56

everything. This vulnerability treated

0:58

your tokens like Pokemon. Okay, they

1:00

caught actually all of them. All right,

1:02

before we get to the Might Shyamalan

1:04

stuff, we got to do a little bit of that

1:05

meat and potatoes. Little reading of the

1:07

friendly manual. What actually happened

1:09

here? Well, there is a company called

1:11

Light LLM. And they provide kind of like

1:14

this nice little uniform layer to be

1:17

able to request all the other LLMs. know

1:20

they saw these 14 different standards

1:22

and decided if they developed a 15th

1:25

standard they would make universal

1:28

access and everything would be better.

1:29

Somehow the owner of the light LLM

1:32

GitHub repository got compromised and

1:34

the hackers were able to push out a

1:36

version of software that contained this

1:39

Xfiltration code. So now we're going to

1:41

start getting into some of the fun might

1:42

Shimamlan territory. So, number one,

1:44

Andre Kaparthy, the one who coined the

1:47

term vibe coding, claims that the reason

1:50

why this hack failed, vibe coding. Now,

1:52

there's actually no evidence for this,

1:54

but if this were true, this would be the

1:55

happiest day. This would be the best day

1:57

in the universe. Okay, this would be so

1:59

dang funny if that was true. Callum

2:01

McMahon was using an MCP plugin inside

2:04

Cursor that pulled in Light LLM as a

2:06

transitive dependency. That's right. You

2:08

don't actually have to install it

2:09

yourself. If any program you use also

2:12

installs it, you also get had. And that

2:14

is because it takes over a special file

2:16

in Python called aptth

2:18

file. Which means when the Python

2:20

interpreter starts up, it executes this

2:22

file. And upon executing that file, it

2:25

actually goes out and grabs all your

2:26

credentials. Doublebase 64 encodes it

2:29

and tosses it up to a server. By the

2:31

way, double base 64 encoding, that's

2:33

double based. Okay, that is the classic

2:35

hacker signature. When light LLM 1.82.8

2:39

8 installed. Their machine ran out of

2:41

RAM and crashed. It turns out that

2:43

little PTH file, apparently it spawns

2:46

itself over and over again, accidentally

2:48

forkbombing the victim, but it's only on

2:51

an MCP server. Glorious. Okay.

2:54

Absolutely glorious. It may have not

2:57

been vibe coded, but a vibe coder most

3:00

certainly found the vulnerability. See

3:02

all those haters out there? All those

3:04

haters of AI out there don't even

3:05

realize it's actually vibe coding that's

3:07

saving you right now. Okay, stop the

3:09

hate. Now, I do think it's important to

3:11

remind everybody that package managers

3:13

are in fact evil. If you wish to read

3:15

the essay, absolutely fantastic linked

3:17

in the description. Okay, so now this is

3:18

where the might shimaling starts getting

3:21

uh real great. So this this Callum

3:23

McMahon fella ends up opening up a

3:26

ticket on GitHub and what ends up

3:28

happening? Well, it turns out this

3:30

GitHub repository gets absolutely

3:32

bombarded with bot AI replies, thus

3:36

attempting to suppress anybody's ability

3:39

to read the actual issue or to see if

3:41

any of the owners are going, "Oh, yeah,

3:43

that's actually really bad." It just

3:44

turns out there's Oh, great. Hey, great

3:46

explanation. Thanks for sharing. Great

3:48

explanation. Thanks for sharing. Hey,

3:49

great explanation. Thanks for sharing.

3:51

Load 59 more. I'm not even sure if

3:54

GitHub can actually load it. Let's find

3:55

out. Boom. Chicka boom. Chicka boom.

3:57

Chicka boom. load [laughter] the data.

4:00

All right. Nice. Okay. Actually, I think

4:01

this is a real person. There we go. Uh,

4:03

yep. We've been pawned by this. Uh, this

4:05

is very, very bad. Thousands of people

4:07

are likely getting poned right now. So,

4:08

this is actually pretty dang serious.

4:11

And then it goes on. Great example.

4:12

Great example. Great fix. Oh, fantastic.

4:14

You're the best. I think you're

4:15

absolutely lovely. Oh, look at this.

4:17

There's still 363 more.

4:19

>> Do you have a just Rust alternative to

4:21

the light LLM? Please,

4:22

>> CLAUDE, USE A COMPUTER AND FIX IT. NO

4:24

MISTAKES.

4:25

>> THIS IS WHY I USE RUST. always use every

4:28

opportunity to show Rust to prove that

4:30

the owner was effectively compromised

4:32

almost immediately upon opening the

4:34

issue. The issue was closed is not

4:36

planned somewhere in the middle of all

4:38

these bot spam replies. The real

4:40

terrifying part though is just this all

4:42

these fake replies. It is something that

4:44

would fill up so many people's inboxes

4:46

they they may go investigate and just

4:48

kind of feel confused on the ticket. And

4:51

if this would have been done just a

4:52

little bit snappier, who knows what

4:54

would have happened. maybe more of this

4:55

would have been missed for even longer.

4:57

And all of these comments may have just

4:59

caused the collaboration between

5:01

everybody to kind of fall apart. It's

5:03

really a a unique way of just adding

5:05

friction that I never even came across

5:08

my mind as possible. All right, hold on.

5:09

Let me take off my trad. It's time to

5:12

get the vibes going. Okay, you know why?

5:14

Because of the last might shimalon turn

5:17

to this story. Now, I'm going to show

5:19

you something and maybe it won't make a

5:22

lot of sense. Do you see it? Do you see

5:24

what's wrong with this picture of the

5:25

website? How about now? Do you see it

5:28

now? Sock 2 type 1 secured by Delve.

5:31

ISO27001

5:34

secured by Delve. But what is Delve?

5:37

Well, it is AI native compliance. I

5:40

don't know what that means, but

5:41

apparently it's keeping your CISO out of

5:44

jail via the power of AI. And what makes

5:48

this even better, this entire story even

5:50

better is that the opensource software

5:53

that its owner got compromised due to

5:56

some lack of security, some lapse in

5:58

judgment is secured with their

6:00

compliance by a company that is

6:03

currently being accused of misleading

6:06

their customers with fake compliance

6:07

reports. [laughter]

6:08

This is just it just it can't it can't

6:11

actually get any funnier than this. And

6:12

both Light LLM and Delve ARE BACKED BY Y

6:15

COMBINATOR. IT'S JUST A OH MY GOSH, it's

6:18

just life is art but unknown to thee.

6:22

Absolutely hilarious. Now, if these

6:25

alleged faking of sock 2 compliance

6:27

reports are to be believed and ends up

6:30

turning out to be true with Delve, it

6:32

would actually mean that light LLM is

6:36

falling apart on the open source side

6:39

and their sock 2 compliance may not even

6:41

be real. But at the end of the day, this

6:44

hack actually caused a lot of problems.

6:46

There's a lot of people that are

6:47

suffering from it. We are in contact

6:49

with the actor behind Trivy, which by

6:51

the way, this is actually the second

6:52

attack in this ecosystem, and Light LLM

6:55

hack. They told us they're currently

6:57

extorting several multi-billion dollar

7:00

companies from which they exfiltrated

7:01

data. They've obtained 300 GB of

7:04

compressed credentials and are working

7:05

their way through them as we speak. The

7:07

light LLM compromise alone led to a half

7:10

million stolen credentials according to

7:12

the threat actor. Their message to the

7:14

world, team PCP is here to stay. Long

7:17

live the supply chain. They also have a

7:19

lovely little logo right here. Now, if

7:21

you happen to be someone who uses light

7:23

LLM or uses a package that relies on

7:26

light LLM, I would highly recommend

7:29

rotating those keys because let's just

7:31

face it, they came for your SSH keys.

7:33

They came for your database passwords.

7:35

They came for your M, your AWS, your

7:37

Azure credentials, your Kubernets. They

7:40

came for everything. They came even for

7:41

your husbands. You got to hide

7:42

everything from them because they're

7:43

taking everybody keys around here. the

7:45

name. This this is why again stop using

7:49

Python. Okay. G gross language. Ew. Ew.

7:56

I mean I guess I really can't I I

7:58

honestly can't even make fun of Python.

8:01

I often use TypeScript. So I mean what

8:04

what am I what am I I'm literally

8:06

throwing stones from a glass house at

8:08

this point. A gen. Hey, do you want to

8:11

learn how to code? Do you want to become

8:12

a better backend engineer? Well, you got

8:14

to check out boot.dev. Now, I personally

8:16

have made a couple courses from them. I

8:18

have live walkthroughs free available on

8:20

YouTube of the whole course. Everything

8:22

on boot.dev you can go through for free.

8:25

But if you want the gamified experience,

8:27

the tracking of your learning and all

8:28

that, then you got to pay up the money.

8:29

But hey, go check them out. It's

8:31

awesome. Many content creators you know

8:33

and you like make courses there.

8:35

boot.dev/prime for 25% off.

Interactive Summary

A critical Python package, Light LLM, downloaded 97 million times monthly, was compromised, leading to the exfiltration of sensitive data like SSH keys, cloud credentials, and crypto wallets from affected systems. The attack occurred after the Light LLM GitHub repository owner's account was breached, allowing malicious code to be pushed. The hack involved several surprising turns, including a claim that it failed for some due to "vibe coding" causing a forkbomb, a GitHub issue being spammed by AI bots to suppress visibility, and the revelation that Light LLM's compliance provider, Delve, is accused of providing fake compliance reports. The attackers, "Team PCP," have reportedly stolen 300 GB of compressed credentials, including half a million from Light LLM alone, and are extorting multi-billion dollar companies. Users are strongly advised to rotate their keys.

Suggested questions

7 ready-made prompts