06:00 UTC Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Register
Aa · Display
Themes
Type size
Density
Cloud & Identity · Wiz · · 29:56 runtime

Root Cause Episode 1: The Forensic Trail behind the NPM Registry Heist

In the wiki NPMTeamPCPRed HatGitHubOIDCAzure Also namedGoogle Cloud, SLSA provenance, GitHub Actions, SAP, Microsoft, MiniShift All in One, Miasma, Wiz
and 1 more, Shai-Hulud
Transcript 4677 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

And in your professional opinion, what are the probabilities of that? >> That doesn't make a lot of sense. >> Right. >> If you're going to use an open source tool and if you want to create new features, you'll add new features. You're not You're not going to exactly add the same features that were added with the same names and implemented in the exact same way. Uh that's very odd. >> Is what you just described a smoking gun here? >> In like to the best of our knowledge and the best of our abilities, this is a smoking gun. >> [music] >> It's the morning of June 1st, 2026, and security dashboards start lighting up across developer environments.

More than 30 package releases under Red Hat's official Red Hat Cloud Services NPM namespace have suddenly been republished in two rapid waves. The code carries a malicious pre-install [music] script that executes the moment anyone runs NPM install, harvesting local secrets and sweeping [music] for active cloud credentials. Now, on the surface, the fingerprint [music] feels instantly recognizable. The multi-stage dropper, the pre-install execution, and the worm-like self-propagation all mirror the tradecraft of Team [music] PCP, the threat group behind the mini Shai Hulud campaign that recently hammered high-profile targets across SAP, TanStack, >> [music] >> and Microsoft tooling. But as researchers dig into the payload a bit deeper, the familiar markers start shifting.

Now, the Dune movie and sci-fi book series references that define Team PCP's [music] past operations, like strings like Shai Hulud and fire the laser, are

gone now. In their place is a new theme drawn from [music] Greek mythology, Miasma, the spreading blight. Under the hood, the malware now actively targets full Azure and GCP cloud identities, and it encrypts every payload dynamically per infection to shatter static hash IOCs. And then comes the detail that complicates everything. Just weeks before this outbreak, TeamPCP publicly dumped the entire MiniShift All in One source code on [music] GitHub and Breach Forums, inviting basically anyone to run their own campaign. So, what are we actually looking at here? Is this TeamPCP evolving their playbook with upgraded cloud collectors [music] and new C2 channels? Or is a copycat actor wielding open-source malware to strike Red Hat's ecosystem?

The telemetry was telling two different stories, and we needed to figure out which one was real. >> [music] >> Root Cause

Root Cause

>> So, welcome to Root Cause. This is the podcast where we unravel the technical breakdowns, trust failures, and forensic clues behind the industry's most significant security incidents. >> [music] >> I'm your host, Ian Sterling. Today, we're stepping inside the investigation of the Miasma supply chain attack. An incident where an attacker hijacked a Red Hat employee account, used orphaned GitHub commits to bypass pull request reviews, and abused GitHub Actions OIDC tokens to publish backdoored packages stamped with valid SLSA provenance. Now, joining me today is Gili Tichonovsky from the Wiz threat research team and he's going to walk us through the forensic trail, deconstruct how OIDC trust was weaponized, and untangle whether Miasma was actually the return of team PCP, or maybe the work of a copycat.

Gili, it's great to have you with us. Thanks for joining. >> Yeah, thanks Ian. Thank you for having me. I'm excited to share the work that me and my team did uh on this >> [music] >> uh incident. >> So, Gili, take us back to the morning of June 1st when those first alerts triggered across the Red Hat cloud services namespace. What was the initial anomaly on your screen that made you realize this wasn't just a misconfigured build at package release? >> So, firstly, in Israel it was actually lunch. So, it was way better than most incidents where you have to wake up early or maybe work during the weekend.

Uh so, we were glad that it came during this time. And uh because of all the recent supply chain attacks, a lot of the Shai Hulud previous incidents, we created a proprietary crawler in to have early signals warning us about suspicious or malicious packages being released on NPM. Uh as part of that crawler, we uh go over every new package release and we also include stats regarding the package that is compromised. [music] Now, every day tons of packages are compromised. >> [music] >> But, in this case, all of the alerts said, "Hey, this package is not only compromised, but it's also extremely popular and it's an official Red Hat uh package."

>> Okay. >> That makes the incident a whole lot more interesting and a whole lot more pressing. Um You You see this and you you immediately have to say, "Okay, there's a lot of work to do." And then we started investigating the how what happened, how it happened, and what and how to detect it. >> Before after you had lunch, Gili? >> If I recall correctly, we had to skip lunch and then we took it ate it later. >> Okay, so when you started looking at the published releases, one of the most alarming details is what that they carried valid SLSA provenance attestations. Now, how did unauthorized code end up stamped with a legitimate built by trusted pipeline seal of approval? How did that happen?

>> Well, basically what the SLSA provenance attestation mean is that the package was released in the regular and official method it is always released in. It has no saying regarding the content of the actual package and what's inside it. >> So, it's commenting on the process. >> Yeah, exactly. It's commenting on that the person who published this package is the person who usually publishes this package. >> In this case, someone at Red Hat. >> Exactly. >> Okay. >> Now, the issue is that it doesn't protect if this pipeline if this process

itself is compromised. The GitHub that usually publishes the packages was the source of the compromise and the attackers could control this process, meaning they could release their official attested good versions with their own malicious code and all malicious content. The guarantee that Salsa provides is not that the package is clean and good, but that it's um officially released in a clean way. >> Right, the process is legitimate and authorized. >> Yeah. >> Without any comment on the internals of it. >> Exactly. >> So, as your team deobfuscated the malicious index.js payload, you noticed that the Dune universe references [music] from previous Team PCP attacks had actually been swapped out for Greek mythology themes >> [music] >> like miasma.

Now, when you saw that, let's call it cosmetic pivot, what was your immediate reaction and did it have any connection to Hollywood, maybe? >> Well, first my first reaction was that I was very excited. I'm a huge I'm more of a mythology nerd than a sci-fi nerd myself. >> Really? >> Yes. So, it's more fun for me when the malware references Greek mythology. >> Okay. >> And it's hard not to notice the coincidence that the previous malware coincided a few months with the release of Dune and that and all those publications on the internet. And then when Odyssey became the most talked about topic on the internet >> Mhm.

>> suddenly they change theming towards that. I guess they're just trying to garner as much attention as they can by basically writing memes and things that are viral inside their malware. >> Okay. Gili, beyond our speculations and the thematic shift that may or may not have occurred as a result of so, you know, blockbuster Hollywood movies. On a more technical point a more technical level, what else should we be focusing on here? >> Yeah. When they modified the theming from Dune to Greek mythology, it also affected our detection methods. As with any malware, part of the the process of detecting it is trying to look at anything unique any unique identifiers inside the malware and using that to find new variants in order to proactively detect attacks the newer attacks before being [music] affected.

>> Okay. >> That means that we had to swap the indicators that we were looking for from all of these Shai-Hulud references to those Greek mythology methods. And also try as much as we can to find what stayed the same

even after this thematic shift >> Mhm. >> in order so in the future, if they decide to do another thematic shift, we will still have the real core that doesn't change and we can detect those really unique identifiers. >> Right. So, basically you were trying to dig deeper than the the thematic shifts on the surface and go to the core consistencies that maybe from theme to theme would be would be the same. >> an attack does this thematic shift or does a major update change, it really gives you the opportunity to find the actual real core stuff that hopefully won't change in a longer term and will help you catch future attacks even if they try to do a big change that might cause detections to miss.

>> Okay. >> So, it's actually like a good opportunity for us to find what really matters to the attackers. >> Right. Right. And Gili, in addition to that, the technical analysis actually revealed brand new data collectors specifically designed for GCP and Azure identities. What did those additions tell you about how the attackers' underlying objectives were actually evolving? >> It really fits the profile that we had for Team PCP so far. In each wave we saw

them progressing slightly, evolving the

malware slightly, adding more and more information collectors for any source of data they can find.

And one thing that was missing in the previous versions was full collection and proper collection of GCP and Azure. >> Mhm. >> And in this version it was added. It fits timeline that we saw where each wave that came in each few weeks had more and more capabilities, more features. It looked like an advancement from the same attacker who wants to grab as many stuff as they can. >> So, Gili, really this is either this is either really Team PCP or someone who's really trying very hard to behave like Team PCP. Yes? >> Yeah, that's that's one of the major questions that we had to ask ourselves and we have we we have an answer that even I am still not 100% convinced that we we believe right now

that it is Team PCP. >> Okay. >> And the open source publication was a way to try and deflect and make it reasonable that other people are copying them. >> Mhm. >> But with some hints that we'll talk about later, we have deduced that it most likely is just Team PCP playing tricks on us or just trying to make the whole system more confusing. >> Or entertaining themselves. >> Yeah, maybe it's just fun for them. >> Tracking this campaign also proved especially tricky because the malware generated a uniquely encrypted payload for every single infection. So, Gili, how did that dynamic encryption process complicate your team's ability to track the blast radius and build reliable indicators of compromise, IOCs?

>> Mhm. So, yeah, malware that changes with each infection, what we like to call polymorphic malware, >> Mhm. >> uh presents a bit of an operational challenge. >> [music] >> Uh usually in most malware reports you read online, people submit the hashes of the malware because most malware engines and most security products, you can easily dump those hashes in and scan all of your machines and then will tell you which machines have those have those hashes and you can easily [music] keep track of that and block those hashes. But in this case, the attackers um decided that each infected package will have a different version of the malware uh encrypted with a slightly different key, >> Mhm.

>> which means no two hashes are the same. So, all of these detection methods and these engines that are very like very efficient and well-built and we have integrated in a lot of our systems are simply not usable. >> Now, is this technique something that was was really caught you by surprise or it's something that although not common has been practiced before? >> [music] >> Yeah, luckily it didn't catch catch us by surprise. >> Okay. >> It's not the first time an attacker tried to do that and that's why we already implemented what we we call our YARA engine. Now, YARA is an open source old school um malware scanning um

pattern [music] based language. >> Mhm. >> And we use that pattern based language to create um rules to detect malware that are not based on specific hashes but more general um indicators that this file belongs to a specific family. And then what I was able to do is like create rules that all of those different variants, all of those different encrypted variants still had in common. And then the same YARA rule could catch all of those variants and we had high confidence that no new package was released without us knowing if it's infected or not. >> Isn't that interesting that that your answer to dynamic encryption was an old school set of rules, right?

>> Yeah, so YARA is super powerful. It's an industry standard for a reason. >> Mhm. >> And we use it for all those types of attacks and it just works. >> Great. When you and your team traced the breach back to its origin, Gili, you found a compromised Red Hat employee account pushing orphaned commits into Red Hat Insights repositories. Now, walk us through how those orphaned commits actually allowed the attacker to trigger workflows without opening a pull request or more importantly, without alerting reviewers. How did that happen? >> So, basically it's a case of miss

mismanagement of the the repository. >> Mhm. On the part of who? >> On the part of Red Hat. >> Okay. >> Because um instead of limiting the secrets and deployment abilities only to specific branches or specific PRs, the entire all self-hosted runners had those uh secrets and deployment capabilities. [music] That means that even orphaned commits, which usually are not running in any mainline branch, um still had access to those keys and those privileges needed to publish packages. >> Okay. So, Gilly, because Team PCP had open-sourced >> [music] >> the mini Shai Hulud code on GitHub and Breach Forums shortly before this wave occurred, your team had to confront a core attribution question.

Team PCP or copycat? Now, we touched on this question earlier in our in our discussion, but I want to get into it more deeply now. What specific operational patterns or overlaps tipped the scales during your analysis? And before you answer that, tell me how surprised you were or were not when PCP open-sourced all the Shai Hulud code? >> When Team PCP open-sourced the Shai Hulud code, first I was excited cuz then I could check my reversing game work and see how close I was to the actual code. >> That was time to party, right? That was some fun. >> It's very fun to see uh how close I was to how it actually uh was built.

>> Okay. >> Uh but then I thought oh, they'll uh just get a million copycats every day with the same powerful malware. And but we didn't see this huge spike or rise in actual attacks. >> Okay. >> Uh things got quiet, actually, for a bit. And then we had this attack, and we thought when immediately you say, "Okay, it's a new theme, new names, they claim to not be Team PCP." This is the first case of a copycat. >> Mhm. >> But then we noticed some decrep- discrepancies. First, there as part of the framework

for Shikulud or Myasna, >> Mhm. >> it had it can receive commands that are encrypted with a private RSA key.

Now, the malware only includes the public key in order to decrypt and verify that the command is from this trusted source. >> Mhm. >> If you don't have that private key, you can't use this feature. And the private key was never published. Only the public key was part of the malware. So, when this new malware still used the old public key, it means that the writers, in order to use this feature, had to have the old private key that was never published. >> And what's that telling you? >> That's telling me it's the same writers of the previous malware. Now, again, this could be a red flag.

This could be just a way to make you suspect it's still Team PCP. >> diversionary tactic, maybe? >> Maybe. But a more subtle hint that I don't think was more what was as intentional was the collection features included in the malware. Because the collectors included in the malware had a versions that were newer

than what was published in the open source version, but were included in the latest waves of mini Shikulud. Imagine that they published the mini Shikulud version 1.0 as an open source.

>> Okay. >> released 1.1 and attacked with 1.1. And then when they created this new Myasna, they used features from 1.1.

A new attacker that only used the open source shouldn't have those new capabilities. >> Wouldn't have any knowledge of those new capabilities. >> Unless they explicitly recreated them themselves based on the on reversing the code from [music] the old malware. >> And in your professional opinion, what are the probabilities of that? >> That doesn't make a lot of sense. >> Right. >> If you're going to use an open source tool and if you want to create new features, you'll add new features. You're not You're not going to exactly add the same features that were added with the same names and implemented the exact same way.

Uh that's very odd. >> So Gili, I I I would like to ask you um

to to to use speaking of old school and Yara, let's let's really go old school. Is what you just described a smoking gun here? >> In like to the best of our knowledge and the best of our abilities, this is a smoking gun that it's the same attacker. [music] >> Okay. >> Like the possibility of it being a new attacker that purposely used the same private keys that they don't have and they can't actually use >> Right. >> and purposely copied these new features that were never actually publicly published is so minuscule that we are 99%

uh convinced that this is just Team PCP uh having fun. >> So that's about as close as you can get to a smoking gun in your line of work, I think. >> Yeah. Like if it was a jury, I think they'll vote to convict. >> Okay. So if an attacker can compromise a developer account and then use orphaned commits to dodge code review request OIDC tokens with ID token

write permissions, what fundamental assumption about CICD pipeline security is breaking down here? What's what's going on? >> Yeah, so publishing by CICD should guarantee that packages are released properly as we talked about the SLSA. >> Right, but that's the process, not not the internal content. >> Exactly. Cuz at the end of the day, if an attacker manages to get a privileged enough token from a developer, there's nothing that the developer could have done before Right. to prevent the attack. The trick is trying to build a system where there is no single developer who has enough privileges to publish on his own. Each project that collaborates with multiple people, you have to create guidelines and um guardrails, so no singular person has

enough permissions to modify the project enough to release stuff like this. As we talked about previously, >> Mhm. >> this could have been prevented if the um

deployment keys and tokens only existed on the mainline branches, the protected branches of the project, the attacker couldn't have released orphaned commits that are not part of that. And protected branches require approval from multiple parties to enter commits to them. >> Mhm. Well, we but but you know, I'm I'm thinking about what you what you're saying, Gilly, and and in in the best of all possible world scenario, that would be the best way to to protect against that type of situation. However, >> Mhm. >> looking at organizations, especially large organizations, maybe Red Hat, for example, how difficult would it be um to to actually implement a process that would work that way in a large organization, let alone an enterprise?

>> Yeah. Of course, it's much It's very easy for me to just say, "Ah, do the perfect always best options and then everything will be protected." In real life, any such large enterprise will have projects that are not as uh well managed. >> Mhm. And that's why we have to stay vigilant with any popular open source package. And you need to have multiple security nets. As an as a user of open

source malware >> Right. >> you need to also be proactive in scanning and checking what you are using on or having security products that proactively scan and check it. Cuz even when a package is released by a supposedly trusted entity like a Red

>> had employee for example? >> Exactly. That entity could have been compromised. >> Right. >> So you need to have multiple security nets. Also in the publishing line as we said and on your side as the user of the security of the open source package. >> So looking looking at the complete infection chain from the initial account compromise to OIDC token generation and

of course NPM publishing what was the real root cause behind this

attack, Gili? >> So the easiest and technically true answer is a developer had an infostealer on his machine. His tokens got stolen and a malicious package was created. But we can go a step further and say that the real root cause is that designing a system where a single developer with malicious intent can cause so much havoc is the root cause is the main problem. So for each infected organization the root cause is not just that some other info employee in another company got hacked. It's that you don't have a system where you check packages and you just trust things. >> Mhm. >> Like we can go into I think it'll take a whole the entire day to talk about the NPM system as a failure point and how trust works there

and the lack of scanning and checks that

happens in that framework. Now, uh recently NPM announced that they will try to scan malware before publishing NPM packages. >> Mhm. [music] >> Proactively, which is a huge step towards fixing the real root cause. >> Okay, but how optimistic are you that that will make uh an impact in this type of scenario? >> I think in a lot of the simpler cases, it will make an impact. >> Really? >> Yeah, in the cases where the malware is very obvious to find, there's no reason to believe that their malware scanning will be that um incompetent to miss those really, really obvious cases. >> Okay. >> It obviously won't be helpful for the more sophisticated cases where people are hiding the malware strategically and effectively, which will happen more when this new system emerges.

>> Mhm. >> When there's this new system that blocks all stupid attacks, you'll only get sophisticated and smarter attacks. That's just how it works. >> Of course. >> Yeah. Uh and then again, you have to go to more proactive scanning on the user side. I truly believe that in no way this will just solve all all of our problems. And in our case, we will keep our crawler running and scanning even after this feature is implemented. >> You're going to You're going to stay busy in all cases, Gili. >> Yeah, I think so. >> I'm pretty sure. I I want to circle back before we close and and pick up on something you said earlier in the conversation when we were talking about how Team PCP just casually open-sourced

all their code on on GitHub and and other other open forums. You said that you were excited [music] because it really gave you a chance to see for the first time how close you were in your >> [music] >> analysis, your deep analysis, your professional speculations and theoretical constructions in your mind, how close were you? I mean, what did you see when you what when you looked? I mean, I hate to put you on the spot, but nobody can listen to this conversation and not want to know the answer to that question. >> I think I was pretty close. >> Really? >> Yeah. Again, reversing node is not as difficult as reversing binary um

uh artifacts. Uh the code is textual and there. >> Mhm. >> Uh and I think that we our analysis and the things that we published uh was very very similar. I don't think there are any major features or capabilities that we missed or most major security vendors missed, which is a good sign. >> Right. >> It is a good sign. >> For sure. >> Uh but you don't know what what they hid and decided not to publish. Obviously, we can't trust this open-source project to be the end-all, true-all version. For example, there are multiple features that we found that weren't included in the open-source project. That's how we connected uh Mini Sha Khulud to this Myasma.

>> Right. And that's what gave you a high a high level of confidence that this in fact is not a copycat. >> [music] >> Yeah. >> And and so let's let's let's reiterate that once again. You and your team came to the conclusion that most likely what? >> Most likely it is the same actor >> [music] >> posing as if they are some new actor

or some copycats. >> Okay. >> Uh the real question is I mean, I guess the question is why would they do that, but it's a motive that you can't really You can also ask why would they do any of this cuz it's not really a profitable enterprise, this whole uh worm thing. >> Mhm. >> Um but my part I'm not a psychologist. >> [laughter] >> I just study malware.

>> The Myasma campaign demonstrates clearly how threat actors are moving away from brute-force package squatting and toward high-trust pipeline exploitation. By leveraging orphan commits and developer identities, >> [music] >> the attacker turned GitHub Actions OIDC publishing workflow against itself,

producing malicious code that arrived with cryptographically verified build providence. Now, whether Miazma marks the next chapter in Team PCP's ongoing operations or the emergence of a copycat [music] utilizing public tooling, the key takeaway for security teams is clear. Cryptographic signatures only protect software >> [music] >> if the identities and pipeline permissions generating them are rigorously isolated. Gili Tektinsky, once again, thank you for joining us on Root Cause and walking us through the forensic clues of this investigation. >> Thanks for having me. >> It was really our pleasure. To our listeners, thank you for tuning in. Join us on the next episode of Root Cause as we continue to dissect the technical [music] design flaws, trust failures, and root causes behind modern cyber attacks.

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers
That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

The freshest blend of security news delivered to you. Text and HTML, one-click unsubscribe. Free.

How often
Your desks