start	end	text
0	1300	My name is Paul McCarty.
1360	6840	I am currently the head of safety... sorry, head of research at Safety.
6840	11360	Safety is a small supply chain security company based in Vancouver.
11480	12700	That's not why I'm here, though.
12700	19840	I'm here to talk about open source malware and why it's invading our security toolings.
19840	22080	I have worked for a lot of large organizations.
22080	23860	I've worked for a lot of startups.
23920	28640	And the problem is the same for both of those sizes, regardless.
28640	30840	Just a different scale.
32940	37580	So... I like to write a lot of open source tools.
37580	38320	I'm a very prolific...
41000	43380	yeah, anyhow, I do a lot of open source stuff.
43380	45160	The stuff on the left is all my tooling.
45160	46360	These are things I've written.
46700	53000	I'm actually really super excited about Gimme Pats, Super Confused, and Malice.
53000	54540	I haven't even dropped Malice yet.
54540	56980	It's got zero stars on GitHub right now.
56980	67380	Malice, basically what it is, it helps you identify malicious open source packages in the NPM ecosystem or the PyPy ecosystem.
67900	70460	And I'm going to be officially kind of launching that next week.
70460	72640	But all the stuff on the left is mine.
72640	79260	The stuff on the right are projects that I hack on, that I like working on.
79800	89480	And in particular, I want to call out the fact that who here has used the OpenSSF's malicious packages repository or osv.dev?
90440	91040	All right.
91040	91520	Dope.
91520	92200	Sweet.
93260	104580	I was the top contributor for the last six months to the malicious packages repository, but a guy from AWS has now overtaken me, so I'm number two.
107220	108180	Oh, I'm going the wrong way.
108180	108840	Sorry.
110200	110740	All right.
110740	113620	Here's the takeaways that I wanted to come away with today.
113940	118480	How does open source malware evade security tool detection?
118560	124980	Basically, part of the weird thing about open source malware is that it's not just the source code itself.
124980	135820	It's the source code and the package ecosystem and all the things wrapped around it that combine together to make this amazing malware experience that we see.
135820	139640	It's very different from kind of traditional binary based malware.
140640	144320	It targets developers in CICD pipelines.
144320	145360	Why does it do that?
145380	148480	Because there's not many security tools there, right?
148480	153060	What are the number one and two exclusions for EDR tooling?
153620	162420	Like when an organization, when an enterprise has EDR tooling, who are the two personas in the organization that have the most exclusions?
162460	163060	Anybody?
164220	164700	Developers?
164700	165480	Who else?
166320	167560	Yep, very good.
167560	169400	Oh, my gosh, you guys have been reading my notes.
170380	171100	Yeah, that's right.
171100	173660	Executive suite and developers.
175100	176800	So why do we think that they're targeted?
176800	177720	Well, there you go.
178300	183560	And the reality is that there's not many good security tools that address this space.
183900	187000	Software engineers think that they've got coverage from SCA products.
187300	191240	Security teams think they've got coverage from EDR and other security tools.
191340	192940	In fact, neither is true.
192960	196760	And finally, the reality is that security teams don't understand the threat.
196760	203240	Engineering teams maybe theoretically understand it, but security teams just don't understand the threat.
203240	205120	And that's based on my personal experience.
205340	209160	So why, we're here, we only have 25 minutes today, right?
209160	210980	Why are we here to talk about NPM?
210980	213560	Well, bad guys love NPM.
213900	215220	Why do they love NPM?
216140	225140	Well, NPM, first and foremost, it was built in a time, 2011, 2012, it was built in a time before, I call it before security.
226380	235020	If you look at the original notes and documentation from NPM, you'll see that security, right, wasn't something they were actively thinking about.
235020	240480	And that's not a criticism, it's just an observation of the reality.
241440	253220	In a similar way, the founding people of the NPM ecosystem, in JavaScript itself, and especially Node, had this concept of no batteries included.
253220	254640	Have you guys heard this before?
254640	256840	The idea of JavaScript no batteries included?
257260	263120	It's actually, if you go and look at the original documentation from the Node team, they talk about this a lot.
263120	267520	Basically the idea here is that we don't want JavaScript to do anything itself internally.
267520	268400	Now that's different.
268400	274820	In 2025, JavaScript now has a bunch of internal commands and you don't need to pull in all these libraries like you used to.
274820	284000	But by definition, it was built to basically require you to use things like left pad and is even and is odd and all these ridiculous things, right?
284100	286340	And that's part of the problem, it was built to do that.
286340	290680	And you'll see in a slide in a few minutes why this comes back to haunt us.
291420	294400	All right, next, why is NPM so crazy insecure?
294880	302440	Brian Fox from Sonosype calls the install scripts in NPM, he calls that RCE by design.
303020	310660	And the reality is that the post and pre-install scripts in NPM were perfectly built to deploy your JavaScript.
310660	316920	So basically there's a pre-install script that you can call, not every package.json calls it, but if it does, guess what?
316920	320320	Before the package contents get installed, it does this thing.
320320	325540	Similarly, if there's a post install script, after it's installed, it does a thing.
325540	332820	So imagine a scenario where somebody writes some super sweet malicious content and then the post install script goes ahead and runs it for them.
332820	336420	It's like the perfect RCE pipeline.
336760	339020	Next, the barrier to entry is low.
339180	352160	When I did my four-hour workshop yesterday, before I started the class, I timed myself to see how long it took me to create a new Gmail account, a new GitHub account and a new NPM account and it took me less than five minutes.
352680	356840	The ease of onboarding those ecosystems is amazing.
356840	362080	So that means that somebody can create an NPM account in a minute and immediately publish packages.
362100	370800	And then they can use some of the other things that we're going to talk about here in a second to make themselves look better, to make themselves look like they're more realistic and legit.
371020	373320	Anyone can claim a namespace .
373320	380920	Not only can you create an account really quickly, but anybody, if at Microsoft and NPM is available, guess what?
380920	381820	You can take it.
381820	383680	You don't have to prove that you're from Microsoft.
383680	387720	You don't have to prove that your email address ends in Microsoft.com.
387720	389560	If it's available, you can take it.
389720	400640	And the way that attackers use this is when there's some new hot thing, the first thing they do is they go and grab the at scope for the thing, like at immutable or at Solana or whatever the hell it is.
401220	402900	Anybody can grab a namespace.
402980	405280	Package metadata can be faked.
405720	406720	This is crazy.
406720	408300	Like this still blows my mind.
408580	413760	Package metadata in NPM, about half of those fields can be faked.
413760	417760	And what I mean by that is the author field, you can put anything in there you want to.
417760	420960	You can put Linus Torvalds, you can put anything in there you want to.
421360	423420	Similarly, you can do the same thing with the git repo.
423420	425840	You can point at any git repo you want to.
427160	429080	All right, so we've got some more people coming in.
429180	430720	Sorry, yo, I started early.
431320	432000	But that's okay.
432000	433280	You're here for the good stuff.
435540	446500	So this makes it really easy to make like really legit looking lookalike packages because you can literally take the original package, reuse it, it points at the original legitimate author.
448460	451380	The only thing that changes is the NPM user.
452220	452920	All right.
453200	455760	Account takeover in NPM is really easy.
456140	463560	Still to this day, it doesn't require you to NPM doesn't require you to use 2FA or MFA.
464060	469200	It does if you're one of those super important maintainers.
469460	471940	But still doesn't require if you create an account.
472120	479340	And unfortunately it takes a long time to remove malicious NPM packages from the registry.
479680	486040	In fact, I found one in December, late December of 2024.
486460	488320	I let NPM know about it.
488420	491460	And when do you think that got removed from the NPM registry?
492420	493200	I like it.
493200	493880	It hasn't.
493880	495080	I like that guy.
495380	496620	That's the winner right there.
496620	498000	No, they took it out in May.
498120	498900	May.
499120	500960	December to May.
501080	503060	So just say this out loud.
503340	508920	I let them know it was vetted malicious in December of 2024.
508920	510340	And it was still in the registry.
510340	515580	You could download it and get pwned by it until May of 2024.
515900	517520	Frankly, it's a shit show.
518880	520960	GHSA and NPM don't track.
520960	522940	So GHSA is GitHub security advisory.
522940	524820	NPM is NPM.
524820	527720	They don't track malware data.
527720	536200	So for example, they don't track when they mark, when GHSA marks something as malicious, all they do is add this tag to a malware.
536280	537940	There's no mention of the author.
538200	540820	There's no mention of any other important information.
540820	541940	Doesn't even say what it does.
541940	544400	It just says that package is malicious.
544860	551260	Now why that's a problem is I can't then pivot from the author into other packages that author has created, right?
551260	552520	And that's a real problem.
553260	554460	We doing good so far?
554760	555980	Not going too fast?
556020	556780	All right, sweet.
556820	557580	Like this.
559080	559700	All right.
559860	563760	So remember how I said you can get a name space and all those other things?
563900	570780	Well, according to a sonotype study, 98.5% of all malicious packages they took a look at exist in NPM.
570780	574700	Less than one percent is in PyPy.
574700	580260	Although PyPy is growing, all you Python fans, don't worry, your malware day in the sun will come.
580480	586360	The reality is that most of the malicious packages exist in NPM for all the reasons we're going to talk about today, right?
586480	588400	98.5%.
588400	593840	Now couple that with, boom, this is data from GitHub.
594000	596500	What this shows, my bag is in the way so I apologize.
596740	609640	What this shows is the little black columns on the left represent how many direct dependencies a particular language package in GitHub has.
609640	611600	So let me say this a different way.
611680	625540	GitHub basically took a look at all the repositories in their ecosystem and said when I find a JavaScript package, sorry, project, not package, project, how many direct dependencies does it have versus how many transitive dependencies does it have.
625540	627080	So let's look at PHP.
627260	627920	Nine.
627920	630580	Nine direct dependencies.
630900	634680	Seventy indirect or transitive dependencies.
634680	643020	JavaScript, ten direct dependencies, 683 indirect or transitive dependencies.
643020	654200	The reason this is so important is because this idea of no batteries included means that the average JavaScript package pulls in more transitive dependencies than all the other languages.
654200	658640	If you were to add all those transitive dependency numbers up, still not as big as JavaScript.
659360	665680	This is how the problem inside of NPM and inside the JavaScript ecosystem is compounded.
665740	667140	I need some water, yo.
674140	675340	All right, I'm good.
676520	681020	So how does open source malware invade security tools?
681020	687540	First, let's start by talking about the fact that most open source malware is an interpreted language.
687540	689820	It's JavaScript, Python, Go, what have you.
689820	696200	And sure, Go can be compiled, but the reality is that most of these malicious packages are just source code.
696200	697700	They're just JavaScript, right?
697700	706040	Because 98.5% of the malicious packages, roughly speaking, are malicious, that are malicious, are in the NPM ecosystem and are JavaScript.
706160	709300	That means that you're not really looking for binaries anymore.
709300	712040	You're dealing with interpreted source code.
712600	721400	And a lot of the common techniques, the muscle memory that malware analysis reverse engineers have just does not apply, right?
721400	729460	So if you spent many years reversing malware, many of those skills just don't apply when you start doing this for open source malware.
731120	737000	Also, the reality is that the payloads, because they're packages, are highly, highly iterative.
737080	747760	So for example, you'll see later on, actually I don't know if that slide's in this one, but the point is that bad guys can change their payloads from one version to the next in the space of just a couple of minutes, right?
747760	761820	So for example, if version 1.0 has a C2 of this IP address, the bad guy, if somebody burns that IP address, bad guy can push out a brand new version of it and has a different C2, has a different hard-coded IP.
761820	773460	They can change everything so quickly, we are so used to dealing with a binary and we know that that binary does these things and it takes a while for the bad guys to push out a new version of that.
773460	776040	With open source malware, they are iterating often.
776060	781980	I looked at one particular package that had been around for about two months and it had 19 versions.
781980	791620	And in those 19 versions, it had three or four major different changes in both the payload structure, how it encoded the payload, and the C2 that it called out to.
791880	799900	And finally, I'm sorry, but anybody that works at some of these sandboxes company, you're not doing a lot for me from a JavaScript perspective, right?
799940	805020	For the free versions of these products, I can't even call a node to run interpreted JavaScript.
805340	810660	So using these kind of traditional sandboxes like any run in Joe's, those are great things.
810660	815300	I use them all the time, but they don't really do a lot for JavaScript or interpreting languages.
816120	816580	Oops.
819140	820080	All right, cool.
820380	822360	There we go.
823000	823500	Obfuscation.
823840	827620	I heard somebody at RSA on stage say obfuscation equals malicious.
827620	831220	If you see obfuscated code inside of a package, it's malicious.
831220	832340	That's just not true.
832340	833940	It's just not true.
833940	843740	There's lots of reasons that people obfuscate their source code now, and I'm going to guess that you guys have an answer, but what's one good reason that somebody would obfuscate their JavaScript?
846300	847060	What was that?
848240	849000	That's right, yeah.
849000	851080	They just don't want to disclose it, right?
851200	856500	And the reality is most of the time that's they've put business logic that they don't want to expose in the JavaScript, right?
856500	858520	And so they obfuscate it for that reason.
858580	866360	Totally legitimate, but that means that you can't, if you see obfuscation, you can't just assume that equals malware.
866360	868520	You can't assume that it's malicious, right?
869080	878280	And the problem is there are some malicious detection engines out there that will see obfuscation and label it as malicious, and that's just wrong, right?
878280	882440	That's a bad assumption of intent.
882960	886140	There's lots of very legitimate reasons to have obfuscation.
886140	899940	Now, here's a problem is that there's lots of different obfuscation techniques, and bad guys have really gotten good at layering those different obfuscation techniques on top of each other to make very, very difficult to comprehend code.
899940	909800	I don't have enough time today to go into all those obfuscation techniques, but control flow flattening and control flow reordering is a very, very difficult obfuscation technique to deal with.
909800	916500	It's basically where you take kind of a logical order of the source and you flip it around using a bunch of conditionals and stuff.
916500	927780	So basically when you look at it, especially after you use identifier renaming or variable renaming, it just makes it so you can't understand the kind of context and order of the code.
927780	929820	It's very, very productive.
930160	942160	And because there are so many obfuscation techniques, we're seeing some crazy weird techniques now where people are using, they're encoding everything to emojis and all kinds of stuff, and then they're layering other obfuscation techniques on top of that.
942160	947620	It just makes it super crazy hard to figure out what's going on.
947700	958820	Luckily, now I'm a bit of an AI skeptic, but I'm going to say that Gemini lately has been doing a really, really good job of helping me understand what this code is doing.
958820	960920	You can't trust implicitly what it says.
960920	967900	You have to verify, but the reality is this is one of the few places where I see LLMs really kicking ass and taking names.
967920	971400	It's understanding what the source code is doing and then translating it for you.
971500	978520	And finally, obfuscation, typically, LLMs aside, typically it means that a human being has to get involved.
978700	980680	And that slows down the process.
980680	983420	That makes it really hard for you to figure out what's going on.
983420	984920	Because you're trying to identify.
984920	986880	You're trying to figure out, there's some signals here.
986880	990060	It makes me look like it's maybe bad, but I don't know.
990100	990460	Right?
990460	991140	I don't know.
991140	993960	And you have to spend time figuring that out.
994180	994620	All right.
994620	997740	What's great about JavaScript is it runs in the browser.
998000	1002460	A lot of the malware nowadays is targeting specifically to run in a browser.
1002460	1009780	The most common example right now is our malicious packages that are targeting crypto developers.
1009800	1014840	So basically what they want you to do is they want you to import their malicious package into your web app.
1014840	1016500	You're building this crypto thing.
1016500	1019460	They want you to import that library into your web app.
1019640	1021720	And then it does what it says it does.
1021720	1026680	It logs crypto events or whatever the hell it does.
1026680	1028160	But it also does the bad thing.
1028160	1028600	Right?
1029120	1035100	The reality is that the browser is an attack surface that we really don't have an answer for.
1035260	1035700	Right?
1035920	1037560	We really don't.
1038040	1039640	JavaScript is also flexible.
1039680	1044740	Obviously you can target devs in the front end and kind of targeting the apps that they're building.
1044740	1046820	But it can also target the back end.
1046820	1048080	And that's the thing about JavaScript.
1048080	1049340	It's a very flexible language.
1049340	1051340	By the way, I'm not a big fan of JavaScript.
1051360	1053160	So you might think that I am up here talking about it.
1053160	1055500	But the reality is it is a very flexible language.
1055500	1057100	Can be used in multiple ways.
1057440	1062200	And those, when you are targeting the developer of crypto or what have you, what are you doing?
1062200	1065200	You're trying to target, you know, wallet files.
1065200	1068080	You're trying to target cookies, access tokens.
1069040	1072320	It's just a very, very rich environment.
1072320	1074100	And I'm now saying malicious packages.
1074340	1078660	Like, for example, the North Koreans for a long time there were specifically looking for Solana tokens.
1078660	1081740	And they were very specific, very targeted about what they were looking for.
1081900	1084180	Now, they have got conditional logic.
1084180	1086480	They say, hey, do you see any Solana stuff?
1086480	1086780	Nope.
1086780	1088420	Do you go and see some ton stuff?
1088420	1088720	Nope.
1088720	1091600	Do you see some, you know, they're looking for things.
1091600	1093880	And if they find it, then they go further.
1093880	1099280	It's becoming a lot smarter and able to be used in more looking for more stuff.
1099320	1102600	And finally, our friend browser extensions.
1102600	1103020	Right?
1103680	1105920	The pain of our existence.
1105920	1108140	I'm still, in this browser, I'm not using any.
1108140	1114920	But, yeah, the reality is that bad guys are able to use open source malware via browser extensions.
1114960	1116820	And this is a growing threat really quickly.
1116920	1120700	Open source malware targets developers and the dev environments.
1120760	1121820	How does it do that?
1122100	1123260	I'm sorry, why does it do that?
1123260	1124340	It does that for two reasons.
1124340	1126740	It does that to deploy the malware itself.
1126800	1131960	But it also does it, targets the developers to take over their accounts.
1132780	1140120	Why would you build this complex attack chain when you can just phish a developer and get their creds and take over all their shit?
1140440	1146840	Why would I spend that time doing that when I could just, you know, build a much simpler path?
1147260	1150080	Security tools, I can't stress this enough.
1150660	1154100	Security tools, app set tools, are absolutely viable.
1154100	1157580	They address the accidental vulnerabilities that we all know.
1157580	1160340	The top ten vulnerabilities that we know.
1160360	1164980	But they are not built, I'm sorry, they're not built to detect malicious behavior.
1165120	1176880	In my workshop yesterday, I gave copious examples of how static analysis and SCA platforms just don't find this stuff.
1176880	1177960	They just don't.
1178320	1185600	The reality is that, as we talked about earlier, developers have a lot of exclusions from EDR, but most of the time they just don't run security tools.
1185600	1187020	They're just not running an EDR agent.
1187020	1189800	Not that it would actually, you know, catch much of this stuff.
1189800	1196120	But there's just this history of developers not having to run security tooling, and there you go.
1196320	1203440	And developers use a lot of browser extensions, so that's another area that you can get to them.
1203440	1206280	And finally, my favorite, all this AI stuff.
1206280	1217780	I'll talk about this a little bit later, but the reality is bad guys right now, for a while there, if there was a package on Python that talked about MCP, there was probably a 50% likelihood that that was malicious.
1217840	1221980	It was just crazy how much the bad guys were targeting MCP specifically.
1222380	1225160	But all the AI tooling right now is being targeted.
1226100	1239900	Bad guys like to target CICD pipelines, so in that scenario a second ago, we're talking about targeting a developer on their individual laptop, but now let's talk about, we don't want to target a human, we want to target something that's going to get reused a lot of times in a CICD pipeline.
1239900	1245080	Well, first and foremost, security tools are never running in those CICD pipelines.
1246240	1255520	The pipelines themselves call these libraries and these containers again and again and again, hundreds of thousands, millions of times with no oversight.
1255640	1266860	If you're using GitHub, the free version of GitHub, your CI logging goes away in 90 days, so you can't even go back and look and see if there was a bad event after 90, you know, 91st day, you're SOL.
1267660	1277560	The amount of logging and the understanding of what logging is there is just not there, so unfortunately it's really easy for these events to get missed in the CI pipelines.
1277560	1284300	And finally, continuous integration, these pipelines, it's where two really important things come together.
1284300	1289040	First is your core intellectual property, your source code, it's there.
1289040	1304780	And the next thing is a shit ton of access, API keys, AWS access tokens and all kinds of other stuff, prolexity keys, NPM tokens, the combination of those two makes the area a super rich place for bad guys to be and that's why they are there.
1312380	1313460	All right.
1314340	1319900	All right, so you want to really, really try as a bad guy, let's pretend you guys are all bad guys, right?
1319900	1321480	Do we have anybody that wants to admit that?
1321480	1324660	Are you offensive security and operate in this environment?
1324660	1325840	Anybody want to admit that?
1326360	1327380	All right, we got one.
1327380	1327920	Me too.
1327920	1328840	Me and you, bro.
1329340	1330520	Me and you against the world.
1331280	1345920	The reality is that much of the malicious package detection that platforms use happens in GitHub security advisory or OSV, the open SSF malicious packages repository.
1346440	1351840	Many security vendors use those two things to determine if something is malicious.
1351840	1355920	I've proven this again and again and again for sneaking a whole bunch of other tools out there.
1356500	1364100	So here's the thing, if you can keep your malware out of, especially out of GHSA, you're good.
1364480	1376840	And so if you're a bad guy and you see somebody like me or one of my friends who finds a malicious package and we turn it into OSV, OSV marks it as malicious.
1377040	1388600	But if you then as a bad guy go and remove that package from NPM, you're self-removing yourself, it's never going to get into the GHSA.
1388740	1390220	And so you now have saved yourself.
1390220	1396140	You can reuse that name for that package again in the future and you can also not burn that capability.
1396140	1397860	So how do you not get detected?
1397860	1408100	If somebody finds you, if some smart person like me finds you, pull your package immediately out of NPM and sit tight and you'll be able to come back like a phoenix.
1408920	1413340	That's a little tip for all you offensive security practitioners out there.
1413480	1415780	And finally, malware doesn't go boom.
1415820	1419860	We have this idea of when you detonate malware, a binary .
1419860	1423500	The reality is the kind of malware I look at doesn't go boom.
1423600	1439340	One of the craftiest open source malware packages that I looked at recently was a library that basically copied the world's most commonly used web 3 event logging library.
1439340	1442360	It did everything that this web 3 package did.
1442360	1443920	So it did what it was supposed to.
1443920	1450080	It just also took every single event that was logged and sent it to the bad guys, right?
1450940	1457020	Now the thing is that the only reason you would get pwned by that is if you imported that library.
1457020	1458680	It wasn't using post install scripts.
1458680	1460160	It wasn't using install scripts.
1460160	1470580	You had to actually import that into a working web application that then wanted to, you know, send events, web 3 events somewhere and then they would just grab them.
1470580	1474800	But you would never see that malicious behavior unless you knew to take a look in that library.
1474800	1479800	And so that library stayed on NPM for months and months and months doing all kinds of bad stuff.
1479800	1482020	The reality is that this stuff is interpreted.
1482020	1485540	It's not, you know, it doesn't blow up like traditional stuff does.
1485540	1487680	It doesn't look like the normal stuff does.
1487680	1490080	And that's why InfoSec really has left it alone.
1490080	1492700	There's not a lot of people building solutions for this.
1492760	1498060	And like I said earlier, part of the problem is the source code itself combined with the shit show that is NPM.
1498060	1500680	You put those two things together and get this amazing grenade.
1501400	1510640	The good stuff, the good bad guys, the nuanced bad guys, the nation state actors, they never use, they almost never, somebody corrected me yesterday.
1510660	1511640	If you're in the audience, I'm sorry.
1511640	1512660	I won't do it again.
1513880	1518900	Almost never use install scripts instead they use import.
1519460	1520160	All right.
1520320	1523020	So bad guys like to target what's hot.
1523020	1525340	And so right now I just did it really quickly.
1525860	1528180	Basically this is just me doing some hot data tape.
1528180	1535840	But basically the three areas that I see bad guys concentrating are from top to bottom right now are, I don't even know how to say that.
1535840	1536200	Vite?
1536200	1536860	Is that how I say it?
1537440	1537820	Vite?
1537820	1538480	Vite?
1538700	1544680	Anything vite right now in NPM or PyPy, spend some extra time looking at it, right?
1545620	1550760	Anything MCP, oh my God, take the time to look at it because bad guys are all over it.
1550760	1558560	And finally Solana, I swear to God, like 60 plus percent of the stuff I looked at talks about Solana is like probably more than that.
1559020	1561600	I'm going to go on a limb and say it's probably more than 60 percent.
1561600	1562820	It's just straight up.
1562880	1563780	It's going to gank you.
1563780	1564660	It's just malicious.
1565540	1571160	So basically the point there of that slide is to say bad guys are going to target what's hot, you know?
1571160	1574460	Stuff that's hot, yeah, I see a lot of phones going up here, yeah.
1574900	1577420	You guys all owe me 900, no.
1578120	1579680	I'm not going to go through every single one.
1579760	1581080	Actually, how much time do I got?
1582180	1584720	Yeah, I don't have time to go through every single one of these.
1584720	1588520	But if I was a bad guy trying to, wow, that's a lot of phones.
1590040	1591540	I wish I could take a picture of that.
1591540	1592360	That would be sick.
1593420	1601440	But if I was a bad guy building open source malware and I didn't want to get caught, this is what I would do.
1602180	1603880	And a couple highlights here.
1605180	1606300	And I see this right now.
1606300	1607320	We'll talk about this in a second.
1607400	1610080	Actually, I'm just going to jump ahead to the threat actors.
1610080	1614040	We're going to talk about actual bad guys that are actually making malicious packages.
1614240	1618060	Because I started a little bit early, I can go through all three of these.
1618140	1621100	So first, let's talk about our friends in North Korea.
1621920	1624140	Lazarus Group, you might have heard of them, right?
1624980	1625760	No?
1625760	1626720	Oh, sorry.
1626720	1627760	Okay, my bad.
1628500	1634840	They are actually, I just saw a report yesterday saying that they finally are now doing espionage.
1634840	1635900	Did anybody else see this?
1635900	1640440	Because they've been so singularly focused on stealing crypto.
1640440	1644880	They've stolen over $2 billion worth of crypto in the last 18 months that we know about.
1645000	1650740	They're 100% concentrating on it and they've come up with all kinds of crazy ways to do that.
1651440	1661460	One of the biggest that we've seen is it targets people working in the crypto space, developers working in the crypto space, on LinkedIn and on GitHub and all kinds of places.
1661760	1668640	I have a friend, he's Armenian, he's been in Web3 for years, he's a developer, and so he gets hit up with these all the time.
1668760	1673240	And so he's constantly, probably like once a week or once every two weeks, he sends me a new one.
1673240	1679900	And so I just get all this juicy, brand new North Korean, I mean, I don't call it North Korean until somebody else has attributed it.
1679900	1681840	So just to be clear, yep, 10-4.
1682260	1684160	I don't do the attribution, other people do.
1684160	1690880	But anyhow, they are flooding NPM right now, and to a lesser extent, PyPy, with dependency confusion and typosquatting.
1690880	1697480	So basically, they put the dependency confusion and typosquatting things there to then use in other parts of their campaign.
1697480	1703040	So then when they hit you up on GitHub or LinkedIn, they can then call those malicious packages.
1703420	1710920	Typically, it used to be that they were very, very specific, they were looking for a specific type of wallet file, and if it didn't find it, it wouldn't do anything.
1710940	1715700	But now, they're starting to be a little bit more, they're using conditional logic, they're looking for stuff.
1716360	1720620	They do like to use obfuscation , they also like to use filler code.
1720620	1727520	So basically, filler code is where they just drop hundreds or thousands of extra JavaScript files in there, and they just just make it really hard for you to find stuff.
1728280	1737520	And the only time that I've actually seen the enterprise find this stuff is looking at egress outbound from their enterprise when they saw the calls out to the C2.
1738600	1740640	And by the way, these are singular events, right?
1740640	1744060	This is why EDR has such a hard time finding this stuff, because it's a singular event.
1744060	1750720	It's not like ransomware or other things where you can look for these multiple like heuristics and then tie them together, look at those singles and tie them together.
1750860	1756480	This is a literally a singular like curl or the equivalent calls out to them.
1757260	1762240	Socket just came out with a report that talks about a tiny portion of this, but I've been tracking these guys for like two or three months.
1762240	1765880	Basically, I call these guys the Liren gang, they're Indonesians.
1765960	1770260	For some reason, they've all kind of decided we're going to pretend to be Vietnamese women.
1770260	1771520	I don't know why, but whatever.
1772400	1774860	So you can and their OPSEC is shit.
1774860	1775400	I mean, it's terrible.
1775400	1776760	You can go and find these guys.
1776900	1784740	Like, if you go and search for Vaylin, and you'll find a bunch of the other threat actors involved in this campaign, and you can ultimately find them all the way.
1784740	1787360	There's a bunch of them that are high schoolers in Indonesia, right?
1787360	1788740	Their OPSEC is terrible.
1788780	1789580	And why?
1789660	1790760	Because they feel comfortable.
1790760	1792560	They feel like they're not doing anything wrong.
1792700	1798500	Basically, their thing, and they're not particularly technical, what they like to do is they like to attack WhatsApp.
1798500	1800080	So WhatsApp now does payments.
1800080	1814580	And so they do this bot thing where they basically, you come up and you connect your WhatsApp account to the WhatsApp business account, but then they create a bot that basically takes the integration that you just used, and uses that to do a bunch of monetization stuff,
1814580	1816300	like look at YouTube videos and all kinds of shit.
1816300	1818900	I mean, they've got all kinds of crazy ways that they're using this.
1818960	1821140	All of this stuff gets ex-filled back to Discord.
1821140	1827240	They love Discord, probably because they're not technical enough to, yeah, buddy, to create actual C2 infrastructure.
1827280	1829060	Very, very low technical skill.
1829800	1831780	The Russians, we all know about the Russians.
1831780	1833140	So I probably will skip this one.
1833140	1841140	But one thing to point out, now, I'm not talking about the state actors, but the criminal gangs, they're actually using a lot of .ru and .sus.
1841140	1850060	I think the sanctions are actually working in the sense that I am seeing a genuine increase in the use of .ru and .sus when they used to buy .coms and stuff like that.
1850320	1855480	They're still using some of the cheap ones, .tops and .xyzs, but I've definitely seen the increase in .ru and .sus.
1855640	1857600	And finally, bug bounty researchers.
1857640	1861820	Bug bounty researchers are flooding NPM on a month to month basis.
1861820	1866660	We're looking at 40 plus percent of the malicious packages that I look at are from researchers.
1866820	1868000	And we need to do something about this.
1868000	1874940	So I've worked, I've reached out to bug crowd and HackerOne asking them, can you change your terms of service so that we see a lot less of this stuff?
1874940	1881660	But I mean, it's honestly, it, it spends a lot of researchers spend a lot of time trying to address this.
1881660	1882400	How do we get better?
1882400	1887600	We need better detection for our solution, from our solutions, our SCA providers, our ASPM providers.
1887660	1893580	Engineering teams need to understand how to pull vetted packages from known private registries.
1893580	1897220	Or I like to use, I like the idea of package firewalls.
1897220	1900940	So the company I'm working for is building one, but Sonotype has one.
1901360	1902880	A bunch of companies are working on them.
1902880	1904640	There's an open source one too as well.
1904860	1907640	You want to make sure that that integrates with your proxies as well.
1907640	1913340	And basically what they do is they wrap around NPM or PyPy and don't let you call malicious packages.
1913720	1917580	And finally, hire people with subject matter expertise, right?
1917580	1919160	This is complicated shit.
1919570	1921860	You know, don't think that tools is going to solve this.
1921860	1925080	You need to hire some people with some SME in this space.
1925200	1927900	And finally, here's some open source malware.
1928240	1930360	Let me move the cursor so you can see that.
1930360	1931400	Take a picture of that.
1931440	1933620	These are all the places that I go to get information.
1933620	1935040	Damn, that's a lot of phones.
1935040	1937240	That is such a, oh man, I wish I could take a picture of that.
1937240	1937920	That's dope.
1939500	1941860	I'll try to make this available on my GitHub account.
1941860	1944860	So GitHub.com slash six mile.
1944880	1947220	I'm from Detroit, probably so.
1947680	1951180	This, this is some of the places that I go to get information about open source malware.
1951180	1952600	And finally, that's me, Paul McCarty.
1952600	1953140	Thank you so much.
1953140	1954080	I appreciate it.
