start	end	text
0	6460	Start by saying thank you for our next speaker for all of his sleepless nights, whether he's paid for it or not.
6460	8060	He's here to give this to all of you.
8780	9820	Thank you.
18080	20460	One, two, okay.
24480	25500	Okay, it works.
25500	28860	Clicker test, clicker test, clicker test.
28860	29740	Our
33700	38460	story begins on March 14th, 2025.
38660	40080	At about 4 p.m.
40080	49480	UTC, an attacker was able to compromise a popular GitHub actions repository called TJ actions change files.
50740	58840	The attacker injected code to the repository that was printing all of the CI runner's secrets to the CI runner's logs.
60100	73520	About 4 hours later, the first issue was created on GitHub, pointing out that something odd was going on in this repository and that consumers of it were getting their credentials leaked.
75460	80020	The following days were a mess in the GitHub actions ecosystem.
80960	85540	We had companies trying to warn users against using this action.
86380	96120	We had CVEs being created and overall fear was sown among the GitHub actions users.
97480	104260	Everybody posted about the leakage and the TJ actions was compromised.
105720	109680	However, this was not the attack.
109680	112120	The leakage was not the point of the attacker here.
112160	122040	So, my name is Aviad and welcome to today's talk, Not Just a Pipeline Leak, Reconstructing the Real Attack Behind the TJ Actions Incident.
123880	130120	Um, a word about myself , um, my name is Aviad Hachami, previously a security researcher at Power Auto Networks .
130120	139320	Um, currently an eBPF engineer at Autigos.io and I'm interested in bug bounty, graph theory, lack of fermentation and other stuff.
140180	144900	Um, right before I start, I'd like to say two things.
144900	148920	First, um, parts of my family, my parents are here.
148920	151460	So, they came all the way to DEF CON.
151460	152440	Thank you.
153300	154860	Here's the voice crack.
154860	157120	Um, they came all the way to DEF CON.
157120	160720	Last year they didn't believe I gave a talk here so they had to see it in their own eyes.
160720	162120	Uh, thank you for coming.
163160	168640	Um, this is exciting, I really appreciate it and I hope you'll last past for, uh, slide number four.
169080	173240	Um, second, my wife and a group of my friends sit at my house now watching this.
173240	177540	Um, here's a drinking game for you and for future YouTube, uh, viewers.
177540	179820	Whenever I say TJ Actions, take a sip.
179820	181600	I'm an alcoholic, trust me.
183480	184400	Alright.
187420	189180	Okay, focusing.
189840	190580	Okay.
191240	198200	So, as I just said at the time of this research, I was a security researcher at Palo Alto Networks but no more so I'm gonna read this one.
198200	205020	Um, this represent, this presentation covers research performed by my colleagues and myself during my time of employment at Palo Alto Networks.
205020	210700	I have since left the company and no longer work for Palo Alto Networks and therefore I'm not speaking on their behalf here today.
211220	216640	Um, I would like to thank Palo Alto Networks for allowing me to research, to share this research with the community.
217900	218700	Alright.
220360	221000	Cool.
221040	222920	Um, so what's in this talk?
222920	226920	This talk is going to be a debug level walk through the TJ Actions incident.
226920	231680	We will uncover the end to end attack flow and track the timeline of it.
232300	240600	We will go over the TTPs the attacker employed and break them down in order to get a better understanding at our ecosystem and its vulnerabilities.
241160	249920	We will then go over how we at Palo Alto Networks were able to trace and uncover the steps of this attacker, um, and what tools we've utilized to do so.
250620	260620	Um, I'll then share some additional victims of this attacker and the impact and wrap it up with some mitigations and, uh, a brain teaser.
260620	263760	Something I'd like to ask you all and share with you.
265220	274220	So, as I said, uh, our story, the TJ Actions story takes place in the GitHub world, uh, where anyone can make their code accessible to others.
274220	280340	We know this today as the open source community, um, which we learned to rely upon and trust.
280340	285020	Uh, we trust it so much that we have complete ecosystems rely upon that.
285020	288340	A quick and easy example is the Golang ecosystem, right?
288800	298240	Um, and within GitHub exists the CICD offering called GitHub Actions, uh, which allows users to execute arbitrary code from other open source repositories.
298440	314280	Um, in that context such repositories are called Actions and by referencing them in our CI pipeline we allow GitHub to execute the actor, the Actions code, uh, in our context, uh, and perform various tasks like build, lints, tests, you name it.
314280	331640	Um, and if you're curious to know how many engineers and developers, uh, actually rely on running arbitrary repositories code in their pipelines, then a recent paper showed GitHub Actions is said to be used by at least 33% of the market.
331700	339560	Um, I did see some papers stating more than 50% but it seemed a bit like non-realistic so I went with a more conservative paper.
341180	352100	And throughout the years, we as a community , we developed a habit of assuming that if something is accessible to us, um, and it's accessible to the masses, uh, we can rely upon it.
352100	359260	We call it highly eyeballed, uh, well opinionated , we give it names, but basically it's accessible to the masses so we trust it.
359640	365060	We actually trust it with our most sensitive processes like building our product.
365980	368540	And attackers know that fact too.
368680	374080	And when such a trust contract is breached, we get the following news.
374900	380240	23,000 project getting their credentials leaked to random people online.
380460	386440	And while this is a severe thing, I agree, um, I just said a moment ago that this was not it.
386440	387940	This was not the attack.
387940	393980	And in reality, this was just the tip of the iceberg, um, the nuke, if you will say, at the end of the line.
394400	396700	So let's start breaking down this attack.
398400	403080	When we initially faced the attack, we were met with the following scenario.
404120	409760	We had an attacker that somehow compromised the TJ Actions changed files repository.
410540	417940	And this repository is actually, happens to be a popular GitHub Action that was used by many GitHub Actions users in their workflows.
418820	424460	Um, and during the time of this event, whomever used this, uh, action got their credentials leaked.
424540	425720	Pretty simple.
426960	445120	When I say, by the way, a workflow, uh, that was used by many, then it implies you had or other had, uh, others had, um, this type of, uh, workflow definition in their repository, um, either public, private, you name it, um, and you were basically referencing the repo TJ Actions explicitly like we see here.
445120	452120	And if you see it references, uh, V39, so it implies I want this repo at git tag V39.
452120	453280	That's basically it.
453600	463180	Um, when you have that in your pipeline, you basically tell, you say, hi GitHub Actions, run the code in this repository, in this repository in my context.
463180	463980	Right?
465560	476100	That said, um, after the initial, uh, uh, facing, two weeks after, we were, we were able to draw this diagram.
477020	486180	Um, this was created by my team and, and myself and it's a much more complex diagram and contains many more steps than what we initially thought happened.
486760	491420	I probably look like this with the slides behind me, with everything with all the arrows.
491420	500300	So, instead of where we started this quest, uh, which is from the highlighted part of this diagram, in this talk we will actually start from the beginning.
500900	503540	We, we will start from the attacker's position.
503560	515880	By doing so, I'll be able to explain the TTPs in a constructive and progressive way and we'll be able to draw the complete events timeline in a coherent and continuous way and I hope things will make sense.
516340	524160	Uh, once done, I'll discuss what tools we've utilized in order to be able to recline that tree and draw everything that you saw on the diagram.
526320	528000	Thank you for the other hall.
528720	530360	Um, so let's clear the board.
530360	533000	Uh, we will use the diagram as our quest map.
533980	543460	And at the bottom, between each movement of the attacker that I'll highlight in the quest map, um, I'll display a timeline and we'll put a point on each, for each event.
543600	546740	Um, we can actually start and add what we already know.
546740	551880	This is March 14th, 2025, the mass credential leakage, that's on the right hand side.
552000	556280	Um, let's put our attacker on the board, they're going to be on the left hand side.
556740	561900	And now let's see how the attacker finally reached the TJ Actions repository.
563260	567920	First move by the attacker, compromising the spot bugs organization.
568080	570700	This is the first move, this is what initiated everything.
570700	571940	Let's see what they did.
572040	579560	In order to do this step, the attacker employed, uh, a TTP called pawn request, a poison pipeline execution.
580160	584660	And this is when an actor can run unauthorized code in your CI machine.
584720	587460	Um, basically a CIRC if you want.
587680	589840	So, let's visualize that.
589840	593240	And there are many options, so I'm going to show you the one the attacker employed.
593240	599900	Assuming you have this, uh, GitHub setup, you have your GitHub, uh, Actions CI setup and you have your repo, repo A.
600700	604320	And let's also assume that somebody forked your repo.
604540	608280	Then this is their position now, the attacker's repo.
608440	618940	Um, from this point there are again many variations to perform a pawn request, but what our attacker did was create a malicious commit inside the fork and create a pull request.
618940	625540	In response, the victim's CI got triggered and executed.
625580	632640	Now, during the vulnerable execution of the CI workflow, it checked out the code from the forked repo.
632640	634240	This is because of misconfiguration.
634240	636980	This is the specific variation of pawn request.
637380	640860	And executed the malicious code in its context.
640860	651860	And now you have a malicious code executed in the context of a victim's repository and you could do many things, like in our case, exfiltrate all the secrets that are accessible to this machine.
652360	655720	Let's see this TTP, uh, employed by our attacker.
655880	665480	Um, so using this technique, the attacker targeted a vulnerable GitHub Actions workflow in an organization called Spot Bugs, specifically in a repository called Sonar Find Bugs.
666540	671620	Here we can see the pull request of the malicious, uh, commit that the attacker created in their fork.
671620	680280	Uh, all the attacker actually did was introduce a single line change inside the Maven W file, uh, which was later executed in this- in the CI workflow.
680400	694680	Um, in the change we can see a curl to- to fetch a bash script, um, from the attacker's repo, piped to bash for execution, everything is being- all the STD out, uh, STD are being redirected to DevNow, so everything is muted as well.
694780	696320	Um, and that was it.
696320	698240	That's all the attacker had to do.
699340	704000	Now this event took place in December 6th, 2024.
704120	708940	That is more than 3 months prior to what we were told about the TGActions incident.
710440	721220	And the result of this exploitation was a personal access token, a PAT, uh, of a maintainer, Spot Bugs maintainer, that the attacker was able to leaked- to leak, sorry.
721660	729060	Um, I'll mention that if a PAT, uh, gets stolen as long as the owner does not revoke it, it's acce- it's, like, usable.
729060	733520	It contains- it contains all the permissions the owner gave the PAT.
733520	739160	And throughout this attack, this token was accessible to the attacker because the owner just didn't know.
739180	741480	So we have this PAT in hand.
742220	743980	Let's pop back our diagram.
743980	748500	Here's our attacker, and here's the Sonar Find Bugs, uh, repository.
750560	758880	And since the attacker collected a PAT by exploiting the pipeline like we just saw, the attacker now have admin access to Spot Bugs organization.
759060	769580	Do note that the stolen access token had access to more repositories than what is shown on the screen, but I am only showing the repositories that took place throughout this attack.
770540	772100	Let's see the timeline.
772240	776860	Um, so we had on the right hand side March 14th, match cred- mass credential leakage.
776860	781000	And on the very left hand side, we have Spot Bugs getting compromised.
781940	783340	Let's move on.
783980	787940	The second step of the attacker was recon and waiting.
789660	800440	In the time following the attacks on Spot Bugs, the attacker used the stolen PAT they obtained for sniffing around and checking what other organizations and repositories they could access using that token.
801600	807620	We only know that because of the help we got from the maintainer of Spot Bugs who was kind enough to share their activity log with us.
807960	812060	Um, and I'd like to share something interesting that we could draw.
812060	817800	So, um, actually it was deleted so I wouldn't share that.
817800	821740	But here's an example of one of the things the attacker was able to find.
822460	831120	Um, inside a repository Spot Bugs Spot Bugs, uh, which the attacker can now control using the stolen PAT, existed another interesting PAT.
831120	844220	The attacker found out that there was another Spot Bugs maintainer and not the previously mentioned one, which had their own PAT being used as a secret for the GitHub Actions Workflows of Spot Bugs Spot Bugs.
845300	852880	What made this specific PAT interesting to the attacker is that this maintainer was also a maintainer of another organization.
854000	856940	And this organization is called Review Dog.
857680	858820	Remember that fact.
858820	860780	We're going to meet that in a second.
862440	866020	And, thank you.
866380	871000	And for the second step phase of step two, all the attacker did was to wait.
871180	875380	Um, the attacker didn't exploit anything or perform any known lateral movements.
875380	879200	Uh, although they technically could, they had the credentials, but they didn't do anything.
879920	885380	And three months after that, after the compromise of Spot Bugs, the right target showed up.
885380	886980	The whale surfaced.
887640	890320	The attacker waited and waited.
890840	900560	And then, on March 7th, a Coinbase maintainer pushed a GitHub Actions Workflow that utilized the TGAction change files repository.
901500	905260	And that is when our attacker started moving and moving fast.
905260	913660	In practice, the attacker moved so explicitly and boldly towards that Coinbase repository that they were basically admitting along some other IOCs.
913660	916360	We will see indications of compromise we're going to see ahead.
916360	920400	Uh, that Coinbase was the only thing that they were interested in throughout this attack.
921120	924240	Let's put this date as well in our timeline.
924240	926900	And this is March 7th, 2025.
927340	929180	Coinbase becomes vulnerable.
931000	932620	Now for the fast movement.
932620	936020	Step number 3, lateral movement into the Review Dog organization.
936940	944080	Uh, as I just showed you, during the recon phase, the attacker found out about the path of the Review Dog maintainer existing within Spot Bugs.
944180	948720	Um, this token was the, the key into moving into Review Dog.
948780	953580	And in order to exfiltrate this new path, the attacker had to interact with the code base.
953580	957300	This is because they can't just use the path they stole to access to GitHub.
957420	959400	Um, they can't just, it doesn't work like that.
959400	961540	They can't click and view the secrets.
961540	963220	GitHub hides that on their UI.
963240	966340	So the attacker had to extract the token in a different way.
967260	974220	Now, obviously, since the attacker had write permissions to Spot Bugs, they could simply push a malicious workflow, right?
974220	975120	They had, they could do that.
975120	976240	They had write permissions.
976240	978120	And it would exfiltrate the token.
978400	980700	But such a push makes a lot of noise.
980700	992220	So, if the attacker would do that, they would have either push a new branch with a commit, which makes a lot of noise, or push a commit to another branch, which also, which also makes a lot of noise.
992340	994400	So, what did they do here?
994400	995440	Let's see that.
999260	1000080	Yup.
1001900	1005860	TTP number 2, this is, uh, memberships and disposable users.
1005880	1009320	So, this was the attacker's solution for this, uh, situation.
1009320	1016380	In order to stay under the radar and not, uh, raise suspicions, the attacker created a dummy user, uh, called Juka of Avak.
1016380	1020680	Um, I'm only mentioning that because, at the time, I tried to find what the hell that means.
1020700	1022200	Something anime, I believe.
1022200	1024160	But I wasn't able to decide on that.
1024300	1028800	Um, and they invited this user to be a member of the Spot Bugs, Spot Bugs repository.
1029900	1037160	Using that user, the attacker pushed a branch with a commit containing a malicious workflow that exfiltrated the said path.
1037440	1043200	And once the workflow was triggered, the Juka of Avak user deleted itself and the branch.
1044580	1047720	Now, this may be a bit complex.
1047720	1049560	Let's see that, uh, visualized.
1050220	1058000	So, we have, we're gonna use a sequence diagram we have in the, on the top, uh, the attacker, Juka of Avak, and the Spot Bugs, uh, Spot Bugs repository.
1058000	1063040	We have step nu- 1, the attacker invites as a member the user.
1063040	1071080	Um, step number 2, Juka of Avak, basically the attacker pushed a branch with a malicious workflow to Spot Bugs.
1071080	1080920	Um, the CI of Spot Bugs kicks in, executes the malicious commit, and roughly the same time, Juka of Avak deletes the branch and itself.
1082900	1085120	Um, let's see the artifacts of that.
1085120	1088340	What we have here is the activity log, uh, of Spot Bugs.
1088340	1090100	This is public, you can check it afterwards.
1090320	1094740	Um, and we can see that a branch was created and deleted.
1095720	1100700	We can see at the top the branch name, this is just gibberish, whatever Herber Kerber, whatever that means.
1101040	1108280	Um, and if we would inspect the timelines, we will see the, uh, sorry, the time stamps of these, uh, events, we will see that they happened within the same minute.
1108280	1110020	So pretty fast movement.
1111400	1114780	This is the malicious workflow that the attacker pushed.
1115660	1122740	If we zoom in, this is the workflow's trigger, so basically on push to this specific gibberish branch.
1123180	1131660	Um, and the rest of the, uh, the workflow, the payload may seem a bit fancy, we're going to break that down, but it's pretty standard in the exfiltration world.
1131660	1132640	Let's take a look.
1132640	1139400	So at the top we have the attacker taking all the secrets that are available, um, to the machine and strigify them.
1139460	1147460	They move on to generate an asymmetric AS key, encrypt this, um, encrypt the file with the secrets.
1148080	1156200	And they move on to, uh, encrypt the encrypted secrets and the key with their own, uh, uh, public key that they hardcoded.
1156200	1161140	And they uploaded this whole thing as a GitHub artifact so they can download it after.
1161200	1166300	Now since everything is encrypted, even if you would see that online, you wouldn't be able to decrypt that, right?
1166300	1169600	So this is how it's being done in the GitHub world.
1170840	1189920	Um, now not only the attacker by exploiting this workflow, not only the attacker obtained the new path and was able to move laterally now into ReviewDog, by performing, uh, the exfiltration using this technique, the attacker left minimal footprint which made detecting the exfiltration a lot harder.
1190700	1192700	Let's go back to our quest map.
1192700	1194800	This is where we left our attacker.
1194800	1204060	They can access pod bugs and, uh, in the newly highlighted part we can see what our attacker did using the dummy user and the malicious workflow they pushed.
1204560	1213080	And once the deed was done, a new access token was obtained, a path for ReviewDog and the attacker's domain expended.
1213260	1217260	I really hope someone is catching that, that reference, but yeah.
1217460	1227860	Um, anyways, now in the highlighted part we can see the new options that the attacker unlocked and we can see on the right hand side the ReviewDog action set up repository and that the attacker can access it.
1227860	1232480	Again, the attacker could access many other repositories but this is the one that mattered.
1233240	1235500	Let's move on to the next step.
1237020	1242640	Step number 4 of the attacker, lateral movement into the TJ actions organization.
1246570	1254850	Okay, so this is the attacker's current position and as I just said the attacker is about to move into the TJ actions organization.
1255530	1273470	Highlighted in blue, uh, you can see a dependency chain that the attacker is about to compromise where we can see that ReviewDog action set up is a dependency of an action called TJ actions ESLint changed file which is used in the repository TJ actions changed files as an action.
1273750	1288550	Um, I remind you that the attacker already have an access token to the ReviewDog, um, and again they could just push a malicious commit , um, and infect this whole chain but instead they did something different.
1288550	1294910	The attacker employed, uh, very interesting technique here which in my opinion is the most interesting one throughout this whole attack.
1294910	1299390	Um, and it is, it is abusing one of GitHub's core, core features.
1300410	1302230	Let's see what the attacker did.
1302790	1308390	TTP number 3, um, we're gonna give it another name in a second but for commits and git tags.
1309150	1316470	So on GitHub when a repository is forked, uh, it is added to the so-called fork network of the original repository.
1317330	1322110	However, this is a GitHub feature, not a git feature.
1322110	1324610	Git doesn't have forks, it has branches.
1324850	1332690	So behind the scenes , forks are pseudo-branches or whatever it was wrapped in in the GitHub backend but it's just a branch.
1333110	1341350	So a residual artifact of that, um, is that commits that were pushed to a fork are accessible from the main repo.
1341550	1352890	Okay, so you can go afterwards and check it, um, make a fork , get your own repo and try to access a shaft from that fork and you'll be able to see that from your main repo.
1353910	1366390	Um, now this when combining it with git tags is an interesting thing but I just want to add that in other words, committing to a fork is equivalent to pushing a branch to a repository you don't own.
1366390	1369030	The code doesn't do anything but it's there.
1370550	1372750	Let's combine it with git tags.
1372750	1382770	So when combined it creates an interesting behavior if you are, don't remember, you don't remember for some reason git tags are just pointers to commit shafts.
1382770	1395690	Um, so assume in this, this uh, main branch, assume this uh, consider this main branch on some repository and let's assume that it was forked and a malicious commit was pushed to that fork.
1397590	1407330	According to what I just said, uh, about the commits inside forks, in GitHub all of these are roughly in the same, you can say in the same context, in the same repo's context.
1408610	1421630	So with respect to git tags, if I have a git tag pointing to a commit shaft, for example, commit to, as seen in the diagram, nothing stops me from making that tag point to a commit from a fork .
1425300	1429220	This TTP is a well thought one actually because it achieves two things.
1429360	1434340	One, no commit noise , nothing was pushed to the repo, complete silence on that end.
1435320	1448560	And second one, this is a GitHub audit log blind spot, it does not get logged there and without uh, like help from GitHub support, which they can obviously give you the ref logs, the git ref logs, without them doing that, you won't be able to see these events.
1450940	1457060	So the attacker utilized this technique multiple times in the steps ahead and we're gonna refer to them as shadow commits.
1457540	1459220	And let's see them in play.
1460900	1468400	So back to our di- to the diagram and the about to be exploited dependency chain, let's remove the highlighted part and make the attacker earn it.
1469560	1478540	So for this step, the attacker created a fork of the review dog action, the action set up repository like we saw happens in the shadow commit TTP.
1479620	1482680	And then they pushed the following commit to it.
1482720	1484360	This is that commit.
1484360	1490420	Um, it's another weird looking uh, user name, ILM, whatever we used to call that earmon during the investigation.
1490460	1502120	And we actually um, yeah we actually used to call it earmon and if we'll expand that diff, we'll see a base 64, a base 64 uh, encoded uh, string which decodes the Python program.
1502120	1503180	You're gonna see that in a second.
1503180	1505140	And some script underneath that.
1505140	1506480	Uh, let's look into them.
1506480	1509940	This is the same diff with the Python base 64 decoded.
1510460	1511420	Let's zoom in.
1511420	1513220	Here we can see the Python script.
1513220	1519140	Um, it's a bit small but I'll tell you that uh, it is looping over the proc FS file system.
1519140	1524640	Um, it extracts the maps and the memory of the processes it found.
1524880	1529220	And down the line it basically prints them to the standard output.
1531280	1537280	Now on the second part of that script we can see the snippet obviously decoding the base 64 which I've done for this talk.
1537280	1545980	Um, writes it to a file, makes Python executed, takes the outcoming STD out, pipes it, does some filtering, some clean ups.
1545980	1548620	Um, and prints it to the log.
1549020	1556120	Now this may be a spoiler but this is pretty much the same code that later landed in the 23,000 repos.
1558320	1562520	So once our attacker had this commit in place, we're in the shadow commits TTP.
1562520	1569440	Once their commit was in place, they override the tag V1 of review dog action setup making it point to their malicious commit.
1569440	1570760	We can see that highlighted.
1571140	1573160	And let's put that as well in our timeline.
1573160	1574220	This is an important event.
1574220	1576620	This was March 11th, 2025.
1578920	1585640	By doing the override step, our attacker poisoned the V1 tag of the review dog action setup with minimal footprint.
1587120	1600540	And per our chain, since TGAction's ESLint change files was referencing the V1 tag of the action setup repository, it was now infected as well and was shipping the malicious code to its consumers.
1601420	1606420	Among its consumers, the repository TGAction's change files was a consumer of it.
1606480	1609680	Um, and this action ran as a part of its CI.
1610200	1612740	Now, this didn't happen yet.
1612980	1618200	TGAction's change file wasn't compromised yet, but the attacker was staged to do so.
1618200	1620600	So all they had to do now was wait.
1621180	1629560	Um, and we know that the tag was pushed on 642 PM UTC on, um, March 11th.
1629700	1636600	And we found out that the tag was reverted to its previous value by the attacker, of course, less than 2 hours after the infection.
1636600	1645200	That was 831 PM UTC, basically marking that the attacker was now inside TGAction's and they didn't need the review dog infection no more.
1649000	1661920	Alright, since TGAction's change files ran the malicious code, the CI picked it up and ran the malicious code, all the secrets that were present on that machine, um, were leaked and compromised, were leaked to the attacker and compromised.
1662080	1670180	And by that, our attacker obtained another set of access tokens with permissions and this time, 2 TGActions.
1673890	1677950	Let's put this event in our timeline as well and let's move on.
1678430	1683990	This is still March 11th and TGAction gets compromised originally.
1685190	1693790	With our attacker staged at TGAction's change files and with full control over it, it was time for the attacker to infect the actual target.
1695050	1696330	Coinbase.
1698070	1698850	So the attacker had to infect the target.
1698850	1705570	If you're unfamiliar with Coinbase, Coinbase is a NASDAQ traded crypto platform, uh, with a market cap of 106 billion dollars.
1705570	1707950	Suddenly this attack makes sense.
1707950	1717510	Um, it allows users to buy, sell and store digital assets like Bitcoin, Ethereum, whatever coins, um, using self-made tools like the highlighted repository agent kit.
1717510	1723230	Specifically, this repository is described as every AI agent deserves a wallet.
1723550	1726890	If you'd like to hear my rant about AIs, come meet me later.
1727410	1735050	Um, so this repository, as I said before, was using TGActions change files, um, and that was the target of our attacker.
1735050	1736270	Let's see what they did.
1736550	1744950	Using the same TTP of shadow commits, the attacker created a fork of the repository TGActions change files and overrode the tag V39.
1745850	1747230	This is highlighted.
1747230	1756210	Um, this event takes place on March 13th, 2 days after the review dog infection and less than a week after Coinbase got into a vulnerable position.
1756350	1757750	Let's add that as well.
1761050	1766230	This is the commit the attacker made, um, throughout the, uh, shadow commits TTP.
1766230	1774270	Uh, we can see highlighted, um, again, uh, a curl bringing some script and then later being executed by Python.
1774310	1779170	But what's more interesting here than this payload is the smoking gun.
1779170	1790210	We can see here the attacker explicitly and hardcoded the name of Coinbase and said to the machine, if you're not in Coinbase and there's an or if you see there, the or is to one of these dummy users.
1790210	1793950	So if you're not in Coinbase or in my place, you execute.
1793950	1799490	So even if you would use one of the malicious versions, if you're not Coinbase, you wouldn't get the impact.
1800490	1803170	But that is a nice smoking, uh, gun.
1803850	1810550	So with a committed tag in position, our attacker again had to wait for a CI machine of Coinbase to pick it up.
1811530	1813350	And eventually it happened.
1814110	1826770	On March 14th, 310 PM UTC, a CI machine of Coinbase picked up the malicious action and the credentials and secrets that were present on that machine got leaked to the attacker.
1828350	1829810	Let's add that to the timeline.
1829810	1832890	I decreased the size of the previous events to make some room.
1833230	1837030	Um, and let's look at some indications of compromise.
1838710	1843750	This is how the CI log of the infected machine of Coinbase looked like.
1844170	1854370	Um, we can see in the upper right, uh, the permission execution had like, uh, write permissions for deployments or contacts, contents, which implies you can write to the repo.
1854590	1868410	Um, and in the lower highlighted part, you can see that the shell of the malicious commit, um, the malicious commit the attacker made, you can see that it was fetched when the, uh, when the Coinbase machine tried to fetch V39.
1868510	1875030	So instead of getting the actual V39 commit that was pointed to, the machine got the malicious version.
1876230	1888630	Back to our attacker, after about an hour after Coinbase got compromised at 437 PM, Coinbase was notified that there is some suspicious activity in their CI pipeline.
1889970	1896850	And they immediately identified that it was coming from the TJ Actions usage and removed the workflow that used TJ Actions.
1897610	1902030	And at once, the link our attacker was building towards was deleted.
1903370	1906070	Coinbase was no longer accessible for our attacker.
1906250	1913350	Now, we assume the attacker noticed that the link was deleted because this is a great segue to what we're going to see next.
1914870	1921090	Twenty minutes after the attacker lost the link to Coinbase, they decided to go all out and burn the field.
1921090	1924350	They basically Leroy Jenkins'd everything we're going to see.
1925870	1946730	On March 14th at 457 PM, the attacker performed the last shadow commit maneuver and the attacker overruled most, if not all of the commit, the attack, sorry, of TJ Actions change files, made them all point to the malicious commit they created with the secret logger that I showed you before that was printing to the logs.
1948170	1955070	By doing that, the attacker basically nuked everything and we are arriving to what we learned to know as the TJ Actions incident.
1955070	1959310	Again, as you saw, this was just the tip of the iceberg of this thing.
1959670	1970150	And it took us some time but we were able to track the steps of this attacker, draw the complete attack flow diagram and I hope it was clear and I'll stop seeing comments like this on Reddit.
1975400	1981560	So I'm aware this is a lot to digest and let me show you some pictures from behind the scenes.
1981560	1985060	This is how one of the boards in our office during the investigation.
1985300	1995900	Um, this is my personal notepad where you can see some classic uh, coffee stains on the left hand side and was few uh, all-nighters, fun times, great CTF honestly.
1996360	2000920	Um, and let's go over the TTPs and put them in a list so we can understand what exactly happened here.
2000920	2002460	So list of TTPs.
2003420	2012560	Um, we got one, shadow commits abusing GitHub's fork network in order to introduce code changes to a repository's context without making actual commits to it.
2012560	2019460	We got two, tag overrides abusing GitHub's audit log blind spot and silently redirecting consumers to different commit SHAs.
2019740	2031680	We have three, the disposable members uh, where the attacker made the noise be associated to a disposed user and last and not least, upon request, RCNCI workflows due to various misconfigurations .
2033020	2038100	Now, towards the end we're getting there, I want to share how we conducted this investigation.
2038100	2044280	So as I said, we began here in the highlighted part and we had to climb back this whole chain and find all the evidence.
2044280	2046020	So we've used the following tools.
2046020	2049700	Uh, we heavily utilized the GitHub events data set on Clickhouse.
2049980	2057780	Um, this is, if you're unfamiliar, a great SQL queryable tool based on the Clickhouse infrastructure, blazing fast, free.
2057800	2061800	Um, but however it doesn't always contain all the information that we needed.
2061900	2067180	So in order to get a better resolution and sp- at specific points, we've used the GitHub archive.
2067180	2072080	I said it was referenced here yesterday in one of the talks, so it is a great tool apparently.
2072200	2077620	Um, it allows you to download the logs of most GitHub events in a resolution of one hour.
2077620	2079760	Um, comes in handy in cases like this.
2079760	2081120	Thank you for that project.
2081280	2088940	Um, and in addition we communicated to all- with all the involved maintainers and they were very kind and helped us draw the picture of this attack as we saw today.
2088940	2090000	Great community.
2090620	2098320	Uh, one shout out I would like to make is to Adnan Khan who tweeted this amazing lead, uh, during the investigation.
2098320	2103740	Uh, there was a lot of discussions on- on X during the investigation and this was a great breakthrough.
2103780	2116080	Um, I know Adnan is not in the crowd now- right now because he's giving a talk at 1 PM, um, on the creator stage 5 about- alongside looping about advanced offensive strategies in the supply chain, uh, ecosystem.
2116080	2117600	I highly recommend that one.
2119240	2121820	Now for additional victims and impact.
2121820	2134160	Um, we observed that the attacker tested various payloads against a fork of Ultralytics and that was done 4 days, um, sorry 3 days after Ultralytics was breached on December 4th, 2024.
2134160	2136620	We saw the attacker was testing with some payloads.
2136620	2140880	Um, but we didn't find any impact although we saw the payloads.
2141280	2145800	At the same- in the same fashion, the attacker played with a fork of Apache Superset.
2145800	2151800	Uh, this is a data visualization- visualization framework, uh, 67.3K stars on GitHub.
2151800	2154360	Uh, yet again we didn't find impact.
2154360	2155440	We didn't detect.
2156180	2165280	That said, the next repo, Model Federation, uh, core which is according to them, concept that allows developers to share code across multiple JavaScript applications.
2165340	2175420	Um, we did see the infrastructure for the shadow commits, uh, being done, being made but we didn't see any logs and indications of compromise.
2175420	2178140	So we did see the things but we weren't able to confirm that.
2178140	2179420	So we're uncertain.
2179960	2193400	And for the last repo, uh, by Baidu BC which is a one stop shop for AI native applications, uh, we were able to detect malicious pull requests and we know for a fact that their pipeline was compromised.
2195870	2199490	Quick words about mitigation, um, here's the list again.
2199490	2200530	Let's go one by one.
2200530	2206670	So shadow commits, if you have forks allowed in your repo, you are opted in, nothing you can do.
2207190	2212610	Um, tag overrides, you'd be happy to hear that GitHub is testing with immutable releases and tags.
2212610	2219170	Um, this feature means that once you make a tag or release, they're uh, immutable, they're pointers and they will be immutable.
2219170	2222770	Uh, this may be GitHub's take away from the post-mortem of this.
2222830	2231190	Uh, I only know this because I stumbled across this LinkedIn post by a GitHub product manager, says she's in charge of the supply chain security at GitHub.
2231730	2234910	Uh, you have at the bottom the QR to go to that uh, post.
2235110	2242310	And in one of the comments she made, I found a link she shared to a gist of hers with details and specs of the immutable releases feature.
2242410	2247290	Uh, the moment I saw it was marked as a secret, I forked it and you can access it here.
2249130	2250230	Why not?
2251310	2256530	Um, paired upon request, this is a well-covered topic in various uh, ecosystems.
2256630	2262510	This is a little , a list of tools um, that can help you audit the uh, your pipeline basically.
2263030	2269530	And the last mitigation advice here would be to stop the bad practice of using Git tags as Git, in GitHub Actions.
2269530	2272350	It was covered previously many times.
2272710	2276790	Most of the community still does that so thank you Biden, don't use that.
2276790	2281490	And instead, prefer a 40 char Git sha, a complete one.
2282790	2290830	Before I seal this talk with a brain teaser, um, I'd like to thank my colleagues at Power Alternate Networks, to Yaron, Assi, Omer, and Gil.
2291030	2298190	Thank you for your part in this research and being amazing colleagues 24-7 and I'm annoying as hell so 24-7 was needed for me.
2300110	2303970	And now for the last outstanding question with this research, of this research.
2303970	2306130	Something I'd like to send you home to think about.
2306650	2308930	Let's zoom out and look at the complete diagram.
2309010	2312010	Uh, we saw that the attacker executed a well-planned attack.
2312030	2313810	Uh, they had time during the execution.
2313810	2316090	They used various techniques while executing it.
2316090	2319390	Some are more impressive than others, I agree, but still various TTPs.
2320570	2325250	And they moved very fast once Coinbase was vulnerable, right?
2328700	2345960	Now, with respect to that, given that this was the final exploit of the attacker, an open source Python memory dumper that simply logs to the console and gets downloaded on each CI machine that is infected, um, that makes a lot of noise.
2345960	2350060	They didn't make the script call home at the final exploit like they did on Coinbase.
2350060	2351080	They could have, they didn't.
2351080	2352880	They did make the network noise though.
2353060	2357780	Um, and they didn't double encrypt the stolen credentials like they did for ReviewDog.
2357780	2359760	They could have, they chose not to.
2360620	2365780	Instead the attacker simply printed the secrets to the logs of 23,000 repos.
2365780	2372200	That's a lot of credentials, a lot of potential money, um, and a lot of potential further lateral movements.
2372200	2374680	Instead the attacker printed it to the logs.
2375080	2394360	Logs are noisy, downloading, downloading in your CI stuff is noisy, so my question with respect to this whole research is why did the attacker choose to make that noise?
2394920	2397560	The attacker eventually pushed a commit.
2397560	2398420	It was a decision.
2398420	2399980	It was an active thing.
2400300	2402600	Um, why would they do that?
2402620	2404860	Was this decision made by mistake?
2404900	2415280	Um, the attacker was nervous about getting caught and bailed or they didn't have a proper exfiltration in place so they were unprepared for that masses of credentials?
2415740	2419340	Um, we saw the TTPs, it doesn't really make sense.
2419460	2420920	Or was it on purpose?
2420920	2422300	They purposely tripped the wire.
2422300	2423300	They made the noise.
2423300	2425400	Um, what would be the reasons for that?
2425420	2429860	Was that in order to make GitHub su- uh, stampeded GitHub support?
2429940	2437080	Um, getting 25,000 Zendesk tickets can kill someone so maybe they just wanted to blog GitHub support?
2437640	2443680	Or maybe it's an upcoming APT just trying to gain some street cred but then we're lacking the attribution.
2443680	2446420	They didn't post anywhere who they are.
2446840	2459680	So, these are open and there's another hypothesis saying what if there is a buyer and a seller here where the bu- where the seller found this Spotbugs token, sold it, and the second actor was not as professional.
2459680	2468080	We did see, uh, a breach forums, uh, post on that, on the, on the pun request TTP, specifically mentioning, uh, Ultralytics by the way.
2468180	2472340	Um, and that was the same month Spotbugs was exploited.
2472340	2473760	So maybe it's related.
2475800	2481200	So, the last outstanding for me, and that is my final slide, so, heh, thank you for your time.
2481200	2485160	Um, the last outstanding question for me is, why?
2485840	2487260	Why would you do that?
2489540	2500380	Um, here's a link to our complete article regarding this incident, more IOCs, uh, more information, more complete timeline, how we exactly traced it back because tracing it back was a bit more confusing and long.
2500540	2508200	And I would like to thank everyone who helped me make this talk, um, especially to my wife, which at this point knows more about TJ Actions than I do.
2508840	2512320	Um, I was Aviad, find me on X, thank you for your time.
2513740	2514740	This is it.
2518420	2525160	Um, if there are any questions, I'll be answering them down here until we get kicked out and then outside.
2525200	2526220	Thank you very much.
