WEBVTT

00:01.900 --> 00:03.080
All right.

00:03.500 --> 00:04.800
Hello, everyone.

00:04.800 --> 00:07.620
All right, let's address the burning question in the room.

00:07.620 --> 00:13.880
No, we did not get access to the source code for Grand Theft Auto VI, nor do we know if the game will ever be released.

00:13.880 --> 00:16.440
Maybe in the following presentation, but not today.

00:16.860 --> 00:21.280
This is Grand Theft Actions abusing self-hosted GitHub runners at scale.

00:21.840 --> 00:23.240
Hello, everybody.

00:23.580 --> 00:29.640
Before we get started, we read online that as long as we have a disclaimer, nobody's allowed to sue us, so here we go.

00:29.640 --> 00:32.520
All vulnerabilities mentioned during this talk have been remediated.

00:32.740 --> 00:39.020
The views and opinions expressed are solely our own, and the content is not endorsed by, nor does it represent the views of our employers.

00:40.080 --> 00:40.860
All right.

00:40.920 --> 00:42.140
Whoa, there we go.

00:42.320 --> 00:44.060
Adnan, I think we're good to go.

00:46.900 --> 00:50.600
All right, if you're wondering about us, so my name is Adnan Khan.

00:50.600 --> 00:52.900
For my day job, I work as a security engineer.

00:52.900 --> 00:57.920
I'm also a security researcher and bug bounty hunter on the side, and you can find some of my socials below.

00:57.920 --> 00:59.800
My name is John Stawinski.

00:59.800 --> 01:01.940
I'm a red team security engineer at Praetorian.

01:02.120 --> 01:05.280
I also do CICD security research on the side.

01:05.320 --> 01:12.520
In the last year, I've watched Avatar the Last Airbender three times, the animated version, and in a past life, I was a collegiate wrestler.

01:13.900 --> 01:14.900
All right.

01:14.920 --> 01:22.040
All right, so we're going to be talking a lot about self-hosted runners today, so I want to make sure everyone has a background understanding of how GitHub runners work.

01:22.040 --> 01:24.360
On one side, you have GitHub-hosted runners.

01:24.360 --> 01:30.980
These are built by GitHub, updated frequently, and as of writing, cover a wide variety of operating systems and architectures.

01:30.980 --> 01:38.900
The key thing with GitHub-hosted runners is that they are ephemeral, meaning they are torn down at the conclusion of each workflow job.

01:38.900 --> 01:41.600
On the other hand, you have self-hosted runners.

01:41.600 --> 01:56.500
These are managed and secured entirely by the end user, and it's not surprising here that the path of least resistance when configuring one of these self-hosted runners is a non-ephemeral self-hosted runner that is actually the least secure.

01:56.500 --> 02:04.060
Both GitHub-hosted and self-hosted runners work to service GitHub Actions workflows that are triggered from repositories on GitHub.

02:04.720 --> 02:06.460
So, why are we here today?

02:06.460 --> 02:15.300
Well, all the organizations and projects that you see on the screen here use or at one point use self-hosted runners on their public GitHub repositories.

02:15.300 --> 02:24.880
Not only that, but they use them in an insecure manner, and over the last 12 months, we were able to identify vulnerabilities in these organizations and many more that we can't talk about.

02:24.880 --> 02:29.340
Some of these cases could have led to widespread critical supply chain attacks.

02:30.320 --> 02:39.480
You may be wondering if we just showed that last slide to flex our cool bones at DEF CON, and I just want to go on record saying that, yeah, pretty much.

02:39.660 --> 02:42.360
But it also raises a bigger question.

02:42.360 --> 02:46.520
Why were we in a position to execute supply chain attacks on all of these companies?

02:46.520 --> 02:56.380
And the reason behind that is that GitHub Actions provides this broad attack surface that exposes these organizations to compromise, especially when they use self-hosted runners.

02:57.360 --> 03:01.440
All right, so how do we get started with our vulnerability research campaign?

03:01.440 --> 03:07.980
Well, it all started all the way back in August of 2022 when I was working on a red team with my former employer.

03:07.980 --> 03:11.900
I was fairly new to red teaming at the time, and I tripped a canary and got us kicked out of the client network.

03:11.900 --> 03:13.460
Maybe that's happened to some of y'all.

03:13.720 --> 03:24.240
But while trying to get back in, we did some social engineering, and I found that we could use a GitHub access token that we obtained to execute a workflow and persist on a non-ephemeral self-hosted runner inside that client's network.

03:24.240 --> 03:26.520
And that got us back in, and we reached objective.

03:26.600 --> 03:34.780
That led to a talk at ShmooCon called Phantom of the Pipeline that was given in January of 2023, and the release of the original Gato tool.

03:35.520 --> 03:43.300
Around the time that Anand, Mason Davis, and Matt Chakassi were developing Gato, I joined them on the red team, and Gato was my entry to CICD security.

03:43.300 --> 03:48.380
So I started using Gato to identify GitHub Actions vulnerabilities during red team engagements.

03:48.380 --> 03:53.940
And then we started diving deeper into GitHub Actions abuse, especially around post-exploitation.

03:54.080 --> 04:01.300
And as we were doing our research, we were trying to brainstorm ways to blow this up and bring it from internal red team engagements to everybody.

04:01.300 --> 04:04.220
And Anand had an idea that really took it to the next level.

04:04.420 --> 04:16.900
So one of the little asterisks at the end of the ShmooCon presentation was that if you fixed a typo on a public repository that was using a non-ephemeral self-hosted runner, you could just make a pull request and modify the workflow file and get persistence.

04:16.900 --> 04:24.560
I demonstrated that vulnerability against GitHub Actions runner images repository, which was accepted as a critical vulnerability.

04:25.780 --> 04:33.300
After Anand hacked GitHub Actions runner images, we started looking at all public repositories and realized that these misconfigurations were everywhere.

04:33.300 --> 04:34.820
So we decided to team up.

04:34.820 --> 04:41.780
Our first joint operation was breaching Microsoft's perimeter by getting code execution on a domain-joined machine through Microsoft DeepSpeed.

04:41.780 --> 04:47.920
And then we launched a series of attacks, the next one of which we will cover today.

04:47.920 --> 04:53.340
Alright, so at a high level, there's three steps to discovering this vulnerability at scale.

04:53.340 --> 04:58.260
The first step is to search for candidate repositories that might be using a self-hosted runner.

04:58.260 --> 05:04.040
To do this, we used a combination of GitHub CodeSearch and Sourcegraph CodeSearch dorks.

05:04.040 --> 05:12.460
Both have pros and cons, so we used both and deduplicated the results to get a nice list of candidate repositories for further analysis.

05:12.660 --> 05:17.440
To do this, use the tool that's open source right now called GatoX.

05:17.440 --> 05:23.440
It uses automated workflow run log analysis to determine if there's a non-ephemeral self-hosted runner in use.

05:23.440 --> 05:30.820
Once you have the results, you can plan your next step, which is essentially, can you hack it and can you hack it for some good impact?

05:31.940 --> 05:37.840
Self-hosted runner takeover is a special case of public Poison Pipeline execution.

05:37.840 --> 05:47.180
So, Poison Pipeline execution at a high level is anytime you can get your own code executed by a GitHub Actions workflow, you can conduct a Poison Pipeline attack.

05:47.180 --> 05:56.340
In the case of self-hosted runner, we'll use this to deploy persistence on the self-hosted runner via a pull request and that opens up a ton of lateral movement and privilege escalation paths.

05:56.340 --> 05:59.920
So, the first two aspects of this diagram are pretty straightforward.

06:00.040 --> 06:05.280
This last section, the GitHub Actions post-exploitation, is where we focus most of our research.

06:06.040 --> 06:08.820
Alright, so it's a tale as old as Unix time itself.

06:09.160 --> 06:12.000
Misconfigurations are amplified by insecure defaults.

06:12.140 --> 06:20.720
So, the default setting for a pull request approval on the pull request trigger is that it only requires approval for first-time contributors.

06:20.720 --> 06:29.380
So , if someone has a pull request, no matter how trivial, merged into the default branch, they won't need approval for workload executions on their pull requests.

06:29.640 --> 06:32.740
This is that bad insecure default.

06:34.440 --> 06:44.580
Today, we're going to walk through playing with fire, which is what we've called our supply chain attack on the PyTorch repository, which began by compromising self-hosted runners.

06:44.580 --> 06:46.960
This is one of our more complex and more...

06:47.440 --> 06:55.200
more intricate attacks, so we're going to use it as a case study to teach technical TTPs of GitHub Actions exploitation and post-exploitation as we go.

06:55.700 --> 06:57.760
Alright, so, what is PyTorch?

06:57.760 --> 07:07.400
I'm sure a lot of you already know what it is, but it's a machine learning framer originally developed by Meta that's been open-sourced, and it's used by companies around the world like Google, Lockheed Martin, OpenAI, and more.

07:07.400 --> 07:15.320
If someone were to backdoor PyTorch, this could allow compromising developers and organizations in that very much red-hot AIML space right now.

07:16.040 --> 07:23.460
In all seriousness, probably the hardest part of compromising PyTorch was searching through their workflows.

07:23.460 --> 07:31.080
They had something like over 90 workflows, over 15 GitHub secrets, and more than five self-hosted runners on their public repository.

07:31.240 --> 07:46.880
And I vividly remember sitting at my desk, I had like three different notebooks out, and I was manually, pen and paper, mapping out the data flow through all these workflows, a lot of which were nested, in preparing for this attack, so that we could try to figure out the potential impact before we actually started.

07:47.800 --> 07:54.440
When we confirm that a repository has a self-hosted runner, we look at the workflow logs, like Adnan talked about earlier.

07:54.440 --> 08:02.620
So here's an example of the PyTorch repository, and in this screenshot, you can see in the workflow log, it has the runner name, the runner group name, and the machine name.

08:02.620 --> 08:11.760
So we see that this is a Jenkins runner, it's a self-hosted runner attached to their public repository in the default group, and this is one of the runners that we ended up compromising.

08:12.540 --> 08:15.500
Alright, remember that default approval requirement?

08:15.500 --> 08:21.140
Well, for certain repositories that are very busy, you can often determine that just using contextual analysis.

08:21.140 --> 08:23.540
And let me tell you, PyTorch was very busy.

08:23.540 --> 08:28.620
So what you look for is a pull request submitted by a previous contributor that's from a fork pull request.

08:28.620 --> 08:35.680
You check that the workflow run associated with it was not approved, and that it ran on the pull request trigger.

08:35.680 --> 08:40.300
When all these things come together, it's very likely that the default approval requirements are in place.

08:41.780 --> 08:51.080
GitHub warns against attaching self-hosted runners to public repositories for obvious reasons, but they don't make their documentation and their warnings obvious, and you kind of have to go out of your way.

08:51.080 --> 08:57.420
So part of the reason we think that so many repos publicly use self-hosted runners is because they don't end up seeing this documentation.

08:57.800 --> 09:05.460
In this next slide, we'll just walk through what it looks like to register a self-hosted runner and see what documentation you come across as a developer.

09:06.240 --> 09:14.400
So in my GitHub repository, I'm going to actions panel, I'm trying to register a self-hosted runner, but first, I'm going to look through their documentation, because I'm a good developer.

09:14.580 --> 09:22.560
And I click on these links, I don't see anything security related, so I click on this other link, and we get to a lot of GitHub self-hosted runner documentation.

09:22.600 --> 09:31.640
We learn about auto-scaling, usage limits, I think it lists architecture stuff, and then every API that the runner is going to use in its lifetime.

09:31.980 --> 09:36.480
And then, way down here at the bottom, it talks about self-hosted runner security.

09:36.480 --> 09:42.900
And so, GitHub does clearly say they don't recommend using self-hosted GitHub runners on public repositories.

09:42.900 --> 09:47.020
And they have other articles out there, too, elaborating on this.

09:47.020 --> 09:50.820
But the point we want to drive is it's not obvious.

09:50.820 --> 09:56.420
So chances are, if you're just registering a self-hosted runner to a public repo, you're not going to come across this documentation.

09:57.260 --> 10:00.820
Alright, the first step was to infiltrate the contributor list.

10:00.820 --> 10:04.520
This is what's important to take advantage of those default approval settings.

10:05.120 --> 10:09.840
To infiltrate the contributor list, if you've been following our blogs at all, we always call the grammar police.

10:09.840 --> 10:12.180
So the grammar police is me and Adnan.

10:12.180 --> 10:16.240
We show up, and we run all their markdown files through Grammarly.

10:16.240 --> 10:20.760
Again, fixing a typo here and finding a grammatical error doesn't matter at all.

10:20.760 --> 10:27.260
To become a contributor, we also could make a legitimate, substantial code contribution to the PyTorch repository.

10:27.520 --> 10:29.600
But, that's a lot of work.

10:29.860 --> 10:35.640
So, what we do instead is we notice resolve was in the past tense, and it should have been in the present tense.

10:35.640 --> 10:42.200
So, we fix that for them, we did a pull request, and a few days later, it got merged by the maintainers.

10:42.480 --> 10:46.060
And then we are now officially contributors, which is not a security boundary.

10:46.220 --> 10:49.120
And this is the same process we did with all of our exploits.

10:49.420 --> 10:51.580
All right, so this is where the hacking starts.

10:51.580 --> 10:58.400
So , the step phase two was to install command and control on those non-ephemeral self-hosted runners attached to PyTorch.

10:58.400 --> 11:01.880
To do this, we leverage something we like to call runner-on-runner.

11:01.960 --> 11:07.000
In a nutshell, what that is, is we install another self-hosted runner on their self-hosted runner.

11:07.000 --> 11:14.000
This has the benefit of sending all traffic to the same domains and IP addresses that the original self-hosted runner uses.

11:14.000 --> 11:19.440
So, if there is any EDR or monitoring software on that runner, it's very likely that it will fly right under the radar.

11:19.680 --> 11:21.080
Oh yeah, so remember that default?

11:21.080 --> 11:23.680
This is where those defaults lead to an actual compromise.

11:23.680 --> 11:29.520
To do this, we just modified the workflow in our fork and had it just install our C2.

11:30.180 --> 11:35.740
The second runner is attached to our private C2 repository, so we can task it to execute commands.

11:35.740 --> 11:37.340
It's essentially a web shell.

11:37.800 --> 11:43.160
Using this web shell, we're able to look around the file system and learn about the host.

11:43.160 --> 11:46.120
And all of this is in preparation for phase three.

11:46.840 --> 11:51.540
Phase three is the most important phase of all of our CICD compromise.

11:51.540 --> 11:59.980
So, the great secret heist, self-hosted runner post-exploitation, is how you go from trivial RCE to complete supply chain attack.

11:59.980 --> 12:11.940
And when we started our research, we submitted some reports and we saw some reports where researchers would get code execution on self-hosted runners, and then they'd say, hey, and by the way, you can probably do all these theoretical post-exploitation stuff.

12:12.280 --> 12:14.820
And orgs just didn't care at all.

12:14.820 --> 12:24.600
They should care if you're executing code on the runners, but it's kind of what they're supposed to do anyway, and so they didn't realize the actual impact of these attacks unless you go and demonstrate it.

12:24.600 --> 12:26.360
So, that is what we did.

12:26.880 --> 12:33.440
All right, so to understand how we were able to achieve some of this impact, I want to make sure everyone understands the magical getup token.

12:33.440 --> 12:43.700
So, this is a token that is used by all getup actions workflows to authenticate to GitHub for API or Git operations, and it's an OAuth bearer token that has multiple scopes.

12:43.700 --> 12:51.660
Some of these scopes can be read or write, and they're configured at the repository organization level or specified within each specific workflow file.

12:52.160 --> 12:58.620
So, it's very important to know that these tokens are only valid for the duration of each job within a workflow.

12:58.620 --> 13:01.660
As soon as that job concludes, the token is no longer valid.

13:01.660 --> 13:07.960
So, to conduct some of the post-exploitation attacks here, we need to work around this limitation.

13:08.240 --> 13:14.060
So, let's see how PyTorch, at the time, used or privileged the getup token.

13:14.480 --> 13:17.380
Okay, so this getup token has all the right permissions.

13:17.440 --> 13:27.300
This means we can, we have a lot of options to play with for some of our post-exploitation, and also, this runner right here is the same one that we now have C2 on.

13:28.640 --> 13:37.880
So, when a workflow uses the actions checkout step or some other steps, the getup token is stored on the self-hosted runner's file system, which we have compromised.

13:37.880 --> 13:42.380
So, the problem is that getup tokens from fork PRs only have read permissions.

13:42.520 --> 13:49.900
So, if we tried to take the getup token from the fork PR we used to actually implant the runners, it's pretty much useless to us.

13:49.900 --> 13:55.000
So, the solution is we persist on the runner and then we capture a token from a future workflow.

13:55.280 --> 13:56.880
This is the setup we typically see.

13:56.880 --> 14:02.780
We have the workflow from our fork PR, no access to secrets, and a getup token with only read permissions.

14:03.500 --> 14:07.020
Then, we have a workflow from the base repository.

14:07.160 --> 14:11.620
This workflow does have access to secrets and the getup token has write permissions.

14:11.620 --> 14:15.400
Notice how they both execute on the same self-hosted runner.

14:15.400 --> 14:19.580
So, this is the reason that persistent, non-ephemeral, self-hosted runners are so bad, right?

14:19.580 --> 14:26.960
If the runner's ephemeral and we implant it, it doesn't give us much access beyond secrets on the file system or something like that.

14:26.960 --> 14:31.120
If it's persistent and long-lived, then it will execute future workflows.

14:31.120 --> 14:36.980
So, we implant the runner, then we wait for future workflows from the base repo to execute on the runner.

14:36.980 --> 14:41.080
This is why we need to install persistence rather than just showing code execution.

14:41.300 --> 14:46.080
And then we compromise the getup token and any getup secrets used by subsequent workflows.

14:46.460 --> 15:00.800
So, in the PyTorch attack, you can see here, this was our C2 repository, so we were executing code on their self-hosted runners and we waited for a future workflow to execute from the base repo and then we just print out the getconfig file at runtime.

15:00.800 --> 15:04.960
So, this base64 encoded token is that getup token that we were just talking about.

15:04.960 --> 15:06.780
So, we compromised that getup token.

15:06.780 --> 15:14.280
Again, we could only use it for the duration of the build, but some of these jobs lasted a long time, so we were able to use it for a while.

15:14.560 --> 15:29.060
Alright, one of the first things we did after obtaining the getup token, which had actions write access, is we used it to delete the workflow run logs because if we got caught, then we likely wouldn't be able to show impact in order for Meta's triage team to understand the severity of the submission.

15:30.100 --> 15:35.540
One of the most direct ways to demonstrate impact with a getup token is by modifying getup releases.

15:35.540 --> 15:42.060
So, getup releases is just one way for a user to download a release of an application from a repository.

15:42.220 --> 15:54.620
What typically will happen is you can upload getup releases, so PyTorch uploads releases to their getup releases page, and then if you want to download PyTorch, one of the ways you can do that is by going to getup releases and downloading it there.

15:54.620 --> 16:00.780
Depending on the permissions of the getup token, it can allow you to modify releases and release assets.

16:00.780 --> 16:08.940
So, you could potentially backdoor a release asset, upload it, and then everyone who downloads and uses that asset will be running your malicious code.

16:09.660 --> 16:13.200
We did not want to upload any backdoored assets.

16:13.200 --> 16:16.500
We're trying to identify supply chain attacks, not actually execute them.

16:16.500 --> 16:20.440
So, instead of tampering with assets, we just tampered with the release name.

16:20.440 --> 16:28.740
So we sent this curl request using the getup API, and it uses the compromised getup token just to add my name to the end of the release.

16:28.740 --> 16:38.700
So, after we sent that request, you can see the latest PyTorch release at the time was now signed by yours truly, and all we did here was just take a screenshot and then revert it right away.

16:38.700 --> 16:45.260
Obviously, we didn't want this being seen by a lot of people, but this was our POC to show that we could tamper with getup releases if we wanted to.

16:46.000 --> 16:54.920
A problem that we've encountered with getup release tampering is organizations have came back to us and legitimately said, well, no one really uses our getup releases.

16:55.320 --> 17:02.300
Obviously, that shouldn't be the case, but to demonstrate further impact, we wanted to look at getup secrets.

17:02.380 --> 17:07.060
Getup secrets are the crown jewels of any repo that uses getup actions.

17:07.060 --> 17:13.900
A lot of the times, they're overprivileged, and they can provide lateral movement opportunities beyond the getup repository.

17:13.900 --> 17:24.440
So, we were back to being Charlie from It's Always Sunny, and we were searching through all those PyTorch workflows again, trying to see where getup secrets were used, and see if we could compromise them.

17:24.440 --> 17:28.760
Here, you can see that they're using some personal access tokens, which are always super interesting.

17:28.760 --> 17:33.800
They're using AWS keys, and there were a bunch of other secrets used by the PyTorch repository.

17:33.800 --> 17:37.660
And before we go any further, I want to quickly recap how we got here.

17:37.660 --> 17:49.900
So, remembering back to the grammar police, we came, we fixed the typo, that typo got merged, that made us a contributor to the repository, which was using the default setting, so we could execute arbitrary workflows.

17:50.040 --> 17:54.580
We used that access to execute a workflow that implanted three of their self-hosted runners.

17:54.780 --> 18:03.900
Then we stole this getup token from a future workflow executing on that runner, and now we're going to try to use this getup token to exfiltrate getup secrets.

18:04.280 --> 18:14.120
One problem that we had to work around is that the workflows that had the getup secrets that we wanted to take didn't actually run on the self-hosted runners that we were now sitting on.

18:14.120 --> 18:25.080
So, the solution here was to use the getup token to conduct pipeline privilege escalation and get arbitrary code execution within those workflows so we could get those very nice secrets.

18:25.960 --> 18:32.780
Another problem is getup tokens aren't allowed to modify files in the .github slash workflows directory.

18:32.780 --> 18:39.600
That seems like a kind of random restriction by getup, but it's actually implemented a few years ago to prevent these exact attacks.

18:39.600 --> 18:48.300
So, they want to stop attackers from doing what we're trying to do right now, and so you can't just make a new branch, modify a workflow to exfiltrate secrets, and then you're done.

18:48.520 --> 18:57.460
The solution here is you need to find a workflow that uses the getup secrets you're interested in that executes code from outside of this .github slash workflows directory.

18:57.460 --> 18:59.100
So, this was our path here.

18:59.300 --> 19:06.380
If you look back at PyTorch's weekly.yaml workflow at the time, you can see it does two interesting things.

19:06.380 --> 19:11.160
One of them is that it calls this underscore update commit hash .yaml workflow.

19:11.160 --> 19:19.820
The other is that it uses these update bot tokens and PyTorch bot tokens, which based on context, we were pretty sure were getup personal access tokens.

19:19.820 --> 19:22.720
So, let's look at update commit hash .yaml.

19:23.280 --> 19:38.580
This workflow is still in the restricted workflows directory, so we can't modify this workflow with the getup token, but it calls update commit hashes .py, which is in the .github slash scripts directory, so it's not in the restricted workflow directory.

19:38.580 --> 19:46.540
All right, so all we need to do now is use the getup token to make a new feature branch and modify that script.

19:46.540 --> 19:51.140
And we know that the workflow that calls it runs on a certain event, so we can take advantage of it.

19:52.340 --> 19:54.720
The modification that we introduced was quite simple.

19:54.720 --> 20:03.280
We saved off the tokens that it received via environment variables to files and then we used our public key to encrypt them and print them to the build logs.

20:03.280 --> 20:08.660
This would prevent any other attackers from getting those secrets while we were conducting our POC.

20:09.400 --> 20:10.820
Okay, so what did we actually do?

20:10.820 --> 20:13.360
We used the getup token to create a new branch.

20:13.500 --> 20:17.520
Then on the new branch we added our payload to update commit hashes .py script.

20:17.820 --> 20:22.020
Then we used the getup token to trigger our payload via workflow dispatch event.

20:22.020 --> 20:24.660
This is because the token had actions write privileges.

20:24.880 --> 20:31.740
And then we could retrieve the encrypted secrets from the build logs, cancel the workflow, delete the workflow logs, and actually decrypt the secrets.

20:31.740 --> 20:38.360
So at the time when we were doing this operation I was absolutely terrified that I was going to forget to take a screenshot.

20:38.360 --> 20:41.660
So instead of taking screenshots I just screen recorded the whole thing.

20:41.660 --> 20:45.460
So I have like an 8 hour screen recording of all this stuff from PyTorch.

20:45.460 --> 20:51.340
And I condensed some of it into a video on the next slide just showing the getup personal access token exfiltration.

20:51.340 --> 20:53.240
So we'll walk you all through that.

20:54.040 --> 21:03.100
Here we have our run on runner C2 and we're going to navigate to our command output and we're just going to get the base64 encoded getup token.

21:03.100 --> 21:07.300
This is from a future workflow that was executing on one of the compromised runners.

21:07.320 --> 21:13.120
So we're going to base64 decode that token and you can see it's just an authorization header within the getup token.

21:13.200 --> 21:18.740
Use the token to clone the repository and then we made a new branch in the PyTorch repository.

21:18.740 --> 21:25.140
So within our new branch we're going to modify that Python script that we identified as an injection point.

21:25.260 --> 21:37.760
Here with my really poor Vim skills I'm going to paste our new payload to exfiltrate those secrets and then once the payload is set we're going to actually commit this to the repository because the token has contents right.

21:37.760 --> 21:39.340
So we commit it to the repo.

21:39.340 --> 21:55.180
Now we're going to use a curl request just to trigger this workflow from our branch which has the injected code in it and then we're looking at the actual PyTorch repository now where we just triggered a workflow and we're going to see two base64 encoded encrypted blobs.

21:55.180 --> 22:04.980
So we're going to scroll down and we're going to get these blobs which is the output of our commands and then we're going to go to this other terminal and decrypt them.

22:04.980 --> 22:12.580
So first we're just going to base64 decode them and then we're going to save them to a file and we're going to use our private key locally to actually decrypt them and get the token.

22:12.580 --> 22:29.660
So once you see some output that starts with ghp underscore those are the personal access tokens and we're going to take them and run them through Gato which will do a bunch of automated enumeration using the GitHub APIs and then Gato will tell us who the owners are,

22:29.660 --> 22:32.840
what they have access to, and what the potential impact is.

22:32.840 --> 22:37.680
Because if they just had read access to the repository, you know, there's not a real risk here to PyTorch.

22:37.680 --> 22:42.360
If they have other, you know, more sensitive privileges then it could be bad.

22:42.360 --> 22:44.080
So here we're running them through Gato.

22:44.140 --> 22:46.920
You can see one of the users is the PyTorch update bot user.

22:46.920 --> 22:48.800
The other is the PyTorch bot user.

22:48.800 --> 22:51.120
And they're both PyTorch organization members.

22:51.120 --> 22:53.140
The tokens have repo scope.

22:53.140 --> 22:56.820
So we can use this now to interact with the PyTorch repository directly.

22:56.820 --> 23:02.280
These are long-lived credentials and they had access to 93 repos within the PyTorch organization.

23:02.300 --> 23:05.020
A lot of which were private and did not have branch protection.

23:05.020 --> 23:07.180
So you could have done whatever you wanted to them.

23:07.340 --> 23:10.500
And there's a lot of paths here to supply chain compromise.

23:11.160 --> 23:12.920
Alright, that was a lot, right?

23:12.920 --> 23:15.020
Okay, so what can we do?

23:15.020 --> 23:20.540
So we have those two tokens so we can use them by themselves to simply introduce code into the main branch.

23:20.540 --> 23:23.620
One creates a pull request and have the other one approve and merge it.

23:23.620 --> 23:23.960
Boom.

23:23.960 --> 23:25.240
Supply chain compromise.

23:25.400 --> 23:32.040
Another form would be to backdoor a dependency within the PyTorch organization that's used by the primary PyTorch repo.

23:32.040 --> 23:36.840
And that could be a more subtle way to obtain that same final impact.

23:36.860 --> 23:45.380
And finally, there's even more clever ways like smuggling malicious code into an in-progress feature branch as a developer is working on and then have that merged in.

23:45.380 --> 23:51.020
So really there's too many paths to count for how this could impact end users of PyTorch.

23:52.220 --> 23:58.280
If you want to see even more impact and you're not really into github, this section is for you.

23:58.280 --> 24:03.920
So, if you noticed a few slides ago when we were looking at their secrets, we saw that they also had AWS keys.

24:03.960 --> 24:11.940
We conducted a very similar attack to the one we just showed, right, where we do that kind of workflow hopping and injection and triggering with the github token.

24:11.940 --> 24:14.740
We repeated that process to grab their AWS keys.

24:14.740 --> 24:25.740
And the reason we wanted to do this was if you don't understand github, it can sometimes be hard to even see why code contributions to the main branch of a repository could be impactful.

24:25.740 --> 24:29.080
But, everyone understands AWS and AWS releases.

24:29.080 --> 24:35.660
So, we grabbed these keys then we used the AWS CLI to authenticate and we confirmed that we were the PyTorch bot user.

24:35.660 --> 24:43.140
So, we didn't want to poke around too much, but we did some basic AWS S3 LS commands and saw that this user had a lot of privileges.

24:43.140 --> 24:47.900
We confirmed through the workflow logs that they could actually write to these S3 buckets.

24:48.080 --> 24:54.640
And, one weird thing that we weren't really expecting to see was there were PyTorch releases in these S3 buckets.

24:54.640 --> 25:02.280
So, at the time, honestly I didn't think too much of it because I was kind of freaked out with the access we had and wanted to submit the report right away.

25:02.280 --> 25:07.180
I think, like we said, this was hour 8 or 9 at this point and I just wanted to get the report in.

25:07.180 --> 25:09.320
So, I didn't really pay attention to these releases.

25:09.320 --> 25:16.080
And then we were rehearsing like a week ago and we were talking and I was like, why were these releases in these S3 buckets?

25:16.080 --> 25:17.960
Like, what system was pulling releases from here?

25:17.960 --> 25:34.760
So, I went to the PyTorch website and just going to PyTorch.org or PyTorch.com, whatever it is, you can scroll down and you can see when they instruct users to install, download and install PyTorch, if you're using PIP or whatever, you're using this download.

25:36.180 --> 25:36.880
What is it?

25:36.880 --> 25:38.880
Download.pytorch.org URL.

25:38.880 --> 25:41.360
So, a lot of the releases were coming from this URL.

25:41.360 --> 26:03.080
So, we went to this URL in a new tab and we're just looking at the request and response headers and sure enough, in the headers, they confirmed that these were actually pulling releases from these S3 buckets and the layout of the release assets on that website were identical to the layout in the S3 buckets.

26:03.080 --> 26:18.480
So, basically , with those AWS keys, we could have uploaded our own PyTorch releases to these S3 buckets and then anyone who downloads PyTorch by following the instructions from the website is going to be downloading and potentially executing our malicious code.

26:18.480 --> 26:23.840
So, this is that kind of solar wind style supply chain attack for anyone that uses PyTorch in the future.

26:25.340 --> 26:26.300
Okay.

26:26.620 --> 26:27.600
That was a lot.

26:27.600 --> 26:28.760
We just did a lot.

26:28.860 --> 26:36.660
This is what it looks like put into a nice little red team diagram and if anyone got here late or fell asleep, we'll do a quick recap.

26:36.660 --> 26:40.760
So, we started by opening a typo fix PR in the PyTorch repository.

26:41.040 --> 26:51.300
That PR got merged and then we were a contributor so we submitted a malicious pull request that installed our runner-on-runner C2 on three different self-hosted GitHub runners.

26:51.660 --> 26:57.260
From one of these runners, we stole a GitHub token from a future build and we used that to do a bunch of stuff.

26:57.260 --> 27:02.260
First, we just modified that release by updating the release title with my name and reverting.

27:02.260 --> 27:14.320
Then, we created a feature branch in the PyTorch repository and we triggered additional workflows using that workflow dispatch event injecting through the scripts that were outside of the restricted workflows directory.

27:14.940 --> 27:17.220
Through this process, we stole some secrets.

27:17.220 --> 27:23.920
We stole the PyTorch bot AWS keys and then we stole two GitHub personal access tokens used by PyTorch bot users.

27:23.920 --> 27:30.100
There were a bunch more secrets in there but we didn't think there was any need for additional demonstration of impact.

27:30.380 --> 27:34.960
Using the AWS keys, we could upload new PyTorch releases to this S3 bucket.

27:34.960 --> 27:36.420
Obviously, we did not do that.

27:36.420 --> 27:41.080
Then, using the GitHub personal access tokens, we could have modified PyTorch dependencies.

27:41.220 --> 27:47.040
We could have used them in conjunction to commit and then approve merges to main and done a lot of other bad stuff.

27:47.720 --> 27:59.060
All of this goes to say, at the end of the day, there were a lot of supply chain compromised past year which would have affected most people using PyTorch both currently and in the future.

28:00.220 --> 28:13.420
You would think that this amount of demonstration of impact would be enough to convince PyTorch to immediately and urgently apply fixes and well, we'll let the disclosure timeline speak for itself.

28:13.420 --> 28:18.900
We submitted this issue in August 2023 to Metabug Bounty.

28:19.360 --> 28:23.820
A month later, Meta said there is no update to provide.

28:24.260 --> 28:27.900
Two months later, Meta said they consider the issue mitigated.

28:27.960 --> 28:35.080
I was suspicious so I went back in and just executed some shell commands on the runners.

28:35.080 --> 28:38.540
I didn't do the full attack, but anyone can still compromise their runners.

28:38.540 --> 28:46.380
Any contributor and based on the workflow logs and stuff, I don't think their configurations were still secure so we responded saying, hey, the issue is not fully mitigated.

28:46.380 --> 28:47.420
Here's some proof.

28:47.560 --> 29:01.240
Then another two months went by with really no word from Meta and we sent a strongly worded email expressing concerns on the remediation that has been implemented, which led to some back and forth.

29:01.240 --> 29:09.880
Then December 15th, Meta applied some other fixes which seemed to be sufficient and then they offered a call to discuss the remediation in depth.

29:10.020 --> 29:15.800
We actually ended up meeting with two of the PyTorch maintainers and they were very concerned about these issues.

29:15.800 --> 29:21.720
They were on top of it and they also expressed concern at the potential gaps in remediation.

29:21.800 --> 29:29.320
I'm not totally sure where the disconnect was, but it worried us that PyTorch was potentially vulnerable for this long.

29:31.100 --> 29:43.220
This attack took a lot of hands-on keyboard workflow modification, command and control, all that stuff, and so it kind of prompted us to say, hmm, is there an easier way to automate a lot of this?

29:43.800 --> 29:45.440
Alright, well, now there is.

29:45.440 --> 29:53.180
So with a tool that I've open sourced this week called GatoX, it actually automates that self-holster runner takeover process.

29:53.180 --> 30:03.360
So now, instead of all that work that you saw John have to do, which all you have to do is you fix a typo, and you become a contributor, then you run GatoX, and then one of two things happens.

30:03.500 --> 30:11.680
You either get a shell and you're on top of the world as hacker man, or you learn that approval is required and then you're sad because you didn't get to hack anything.

30:11.820 --> 30:18.360
So let's walk through a quick video demo of how GatoX works to automate this self-holstered runner takeover process.

30:18.800 --> 30:21.440
So first I use it to enumerate a runner.

30:21.440 --> 30:26.480
So now I'm going to go ahead and fix a typo in this test repository here.

30:26.660 --> 30:30.140
So I go ahead and fix a typo and make that commit.

30:31.040 --> 30:35.440
So after I make the commit, I'm going to go ahead and create a pull request.

30:35.440 --> 30:41.000
So I check that I fixed the typo and I make a quick typo fix PR and now that's merged in.

30:41.000 --> 30:45.420
So after that's merged in with my attacker account, I'm going to go ahead and delete the fork.

30:45.540 --> 30:49.760
So because GatoX will create a new fork to throw the payload at the repository.

30:49.760 --> 30:55.120
So I'm going to quickly go ahead and do the web flow to delete the fork and I hit confirm.

30:55.300 --> 30:57.320
Alright, now I'm going to run GatoX.

30:57.380 --> 31:03.540
So here I've just configured it to deploy a runner on runner on a Linux x86 64 -bit runner.

31:03.540 --> 31:10.160
So it's going to go ahead and create the payload within a gist and ask for confirmation because the next steps are overt.

31:10.260 --> 31:12.180
So I'm going to type confirm and hit enter.

31:12.580 --> 31:22.060
So as soon as I do that, it's going to create a draft pull request which is going to deploy that runner on runner payload onto that self hosted runner via fork PR.

31:22.120 --> 31:28.040
So it's going to take a second because it's now pulling for that runner to connect to GitHub and then check back into that repository.

31:28.100 --> 31:32.400
So as soon as it does that, it will drop into a nice and very convenient shell.

31:32.840 --> 31:48.920
Okay, now I'm just going to test this with uname-a and when I hit enter, what's happening under the hood is that GatoX is issuing a workflow dispatch event to that workflow in the C2 repository which is going to run code on that malicious self hosted runner.

31:48.920 --> 31:50.200
And you can see that output there.

31:50.960 --> 31:55.680
Alright , so now you know the techniques and now since I've open sourced it, you have a tool.

31:55.860 --> 32:06.480
And another thing I want to point out is that finding CICD misconfigurations in open source repositories can be a very thankless job because you submit a report, they fix a bug, and you don't even get a CVE.

32:06.480 --> 32:08.400
So there's not really a lot of motivation for people.

32:08.400 --> 32:13.020
So what I've done with GatoX is that on its wiki, I've created a little hall of fame.

32:13.020 --> 32:24.200
So if you use GatoX to find a pwn request, injection, or self hosted runner vulnerability in an open source project, and the maintainers fix it, then just make an issue and I'll add you your name to the wiki to get some credit.

32:24.200 --> 32:27.880
Just make sure it's actually fixed because we don't want the hall of fame to be the hall of odays.

32:27.880 --> 32:29.680
As much as some people might like that.

32:31.340 --> 32:39.740
Okay, so we showed all of the technical TTPs we used during our PyTorch attack but there are a bunch of other stuff we've used on other targets.

32:39.740 --> 32:47.340
And so we want to take these next few minutes to honor the die hard CICD nerds who are here to learn all the TTPs possible.

32:47.340 --> 32:52.060
So we're going to run through this pretty quickly but all the slides will be up there online so you can check it out after.

32:52.380 --> 32:57.900
Alright, so one thing you can do after getting persistence on a runner is solo run style build compromise.

32:58.020 --> 33:06.120
So, you get persistence and then you just have to modify scripts for the build or source code after it's checked out.

33:06.120 --> 33:17.580
And once you do that, the final build artifacts from that run are going to be poisoned but there's no it's not going to be linked back to the original source code so it's a very stealthy way to conduct a supply chain attack.

33:17.760 --> 33:22.480
And here's another way that you could take GitHub release asset tampering a little further.

33:22.540 --> 33:33.080
So, if you have that context write token, then all you have to do to tamper with releases on assets is use the API to delete the old asset and then upload a new one with a post request right on top of it.

33:33.140 --> 33:42.500
And the indicator of compromise here is just going to be the timestamp when a user is looking at it through the web interface so it's not very obvious.

33:42.500 --> 33:53.340
And if you want to see a tale of a bug bounty gone wrong and a program acting in some pretty bad faith, go check out my blog post on my report to the ASTAR network which is a tiny polkadot parachain.

33:59.940 --> 34:05.160
Alright, another technique you can add to your arsenal is something called a post checkout hook.

34:05.180 --> 34:13.900
So, what happens when a subsequent workflow that you need to get secrets from or token from runs only very infrequently?

34:13.900 --> 34:16.700
Well, you need something that can have these qualities.

34:16.700 --> 34:27.620
You need to be able to extend the build time you also don't want to break how the workflow works to inform someone that something is going wrong and you also want to get notified because you don't want to be pressing F5 for two weeks.

34:27.680 --> 34:35.620
Well, a quick solution here is to place a script like this into the git hooks directory of the repository in the original self hosted runner.

34:35.640 --> 34:43.300
This example here will just take that git config file, encode it and then send it off to your exfil URL and then sleep for 15 minutes.

34:43.300 --> 34:48.880
So, this is going to give you 15 minutes to take advantage of that github token to perform post exploitation actions.

34:49.180 --> 34:59.060
Alright, before we dive into other TTPs, it's important to remember how self hosted runner takeover falls within the landscape of broader github actions attack techniques.

34:59.060 --> 35:06.700
So, there's another type of attack called bone requests where you basically get execution within a privileged workflow.

35:06.700 --> 35:08.980
That's the same thing that happens with runner takeover.

35:09.020 --> 35:12.780
From there, there's different post exploitation techniques you can use.

35:12.780 --> 35:25.200
So , you can steal secrets, you could get the actions runtime token, which has some interesting attacks with cache poisoning as well as OIDC abuse, which I think the talk right after us in this track actually goes into a lot more detail there.

35:25.200 --> 35:26.560
So, kind of cool.

35:26.840 --> 35:29.720
And then, there's just too many different attacks to talk about.

35:29.720 --> 35:32.420
There's so many ways to achieve great impact.

35:33.300 --> 35:38.180
We talked about some of the permissions of the github token today, but there's a lot of other dangerous permissions out there.

35:38.180 --> 35:44.260
Some of them don't pose a risk, but others, like contents write and actions write, obviously pose a significant risk.

35:44.360 --> 35:51.440
Other permissions we have identified as dangerous and actually abused during our attacks are pages write, pull requests write, and packages write.

35:51.440 --> 35:55.060
And there's a lot of good documentation online if you want to learn more about what these actually do.

35:55.880 --> 36:04.120
If you have just actions write and contents write, you can create feature branches, modify files, execute in workflows, and then issue dispatches events to seal secrets.

36:04.120 --> 36:07.440
If that looks familiar, it's because that's exactly what we did during PyTorch.

36:08.000 --> 36:11.300
Alright, what if you have a workflow that looks like this?

36:11.300 --> 36:16.140
It runs on workflow dispatch, but then uses some of that input in a github script or run step.

36:16.140 --> 36:19.740
Well, this lets you do good old 90's style code injection.

36:19.740 --> 36:21.400
And I'm going to walk you through how this process works .

36:21.400 --> 36:25.120
And you only need a github token actions write to make this hop.

36:25.460 --> 36:35.300
So, here you can see that the input from the dispatch event has org and repository, and within that script step, repository is used by github context expression.

36:35.300 --> 36:37.640
So , that's going to be our injection point there.

36:37.640 --> 36:38.620
See that arrow?

36:38.760 --> 36:43.320
So, here's an example payload thrown with a simple request script in Python.

36:43.320 --> 36:52.500
The first thing here is to close out the script because we don't want a syntax error or have it to crash because we still need the code to finish in order for us to get our payload execution.

36:52.820 --> 37:05.840
The next thing, and this is where the actual payload is, is a JavaScript injection payload that essentially will pull code from a C2 URL and pipe it to bash.

37:05.840 --> 37:14.020
So, then you can just have arbitrary code there and get execution in that workflow, get the token, get the secrets, and then from there do more post exploitation.

37:17.510 --> 37:21.470
If you only have contents write , there's still a lot of bad stuff you can do.

37:21.470 --> 37:26.510
You can modify non-protected branches a lot of times, which actually could end up in releases.

37:26.530 --> 37:30.170
You can modify releases directly, like we did when we signed my name.

37:30.230 --> 37:36.770
You can modify tags, which a lot of times reusable actions are referenced by tags, so that could open up some fun possibilities.

37:36.770 --> 37:40.490
And then you can also issue repository dispatch events to execute workflows.

37:41.430 --> 37:45.650
Alright, here's a really unique way to take advantage of contents write.

37:46.030 --> 37:59.210
Alright, so one way is if you want to get execution on a workflow that only runs on the push trigger, you can add code to that feature branch that modifies a script that's called by that workflow.

37:59.210 --> 38:07.550
And the next time the developer will push changes, now you have arbitrary code execution within the context of that workflow and then you can jump further from there.

38:07.550 --> 38:11.210
Another way is instead of targeting the workflows, why not target the developer?

38:11.210 --> 38:19.130
So you could modify a unit test within a feature branch that a developer is working on and add an info stealer payload.

38:19.130 --> 38:26.330
So then when the workflow runs, the dev account's compromised and often in organizations, dev accounts compromise can be game over.

38:26.350 --> 38:34.030
Another way is if you have these two permissions for the token, you can get code modification in the protected default branch.

38:34.030 --> 38:35.590
So there's some preconditions here.

38:35.590 --> 38:40.690
The repository has to have the setting to allow get of actions to approve and merge pull requests.

38:40.730 --> 38:45.870
There can be at most one reviewer required for that pull request approval rule.

38:45.990 --> 38:51.610
And there cannot be any code owner protection rule sets enabled and enforced.

38:51.610 --> 38:54.950
When all of these are together, you can have an attack like this.

38:55.070 --> 39:06.430
Attacker gets the GitHub token, they use their account to create a fork pull request with malicious changes and then they approve that pull request with that capture token and merge that pull request.

39:06.430 --> 39:09.070
That leads to a good old supply chain compromise.

39:10.870 --> 39:16.410
Now, if you're on a runner, it's possible to steal the GitHub actions runtime token from a future workflow.

39:16.410 --> 39:20.370
This is where you'll have some attack paths for GitHub actions cache poisoning.

39:20.370 --> 39:24.430
I have a blog post on my website that goes into the details of that.

39:24.710 --> 39:37.510
And if there's an organization level runner group that shares that also private repositories are using, then there's paths to jump to private repositories and other runner groups and it just kind of blows those attack paths wide open.

39:38.550 --> 39:41.770
Okay, that's the end of some of the more advanced TTPs.

39:41.770 --> 39:49.890
If you're the type of person who likes big mind maps to tell you exactly what to do, I made one and I put it on my GitHub a few days ago, so you can go check that out.

39:49.890 --> 40:00.270
Obviously, this is not comprehensive, but if you're trying to get into GitHub actions exploitation and you have read or write access to a repo but don't really know what to look for or what to do next, check this out.

40:00.270 --> 40:01.950
It should be able to give you some good guidance.

40:03.110 --> 40:05.130
In our opinion, GitHub can do a few things better.

40:05.130 --> 40:13.370
They can increase warnings and awareness, so if you try to attach a selfless runner to a public repo, it'd be great if there were big red letters saying, be careful, this is dangerous.

40:13.370 --> 40:30.550
They can also improve their secure defaults, like we talked about with the workflow approval requirements, and then they could implement granular approval requirements so that maintainers don't need to select between three options, all of which have broad privileges and probably will hurt developer workflows one way or the other.

40:31.010 --> 40:35.530
If you're trying to defend your organization from these attacks, start with the easy stuff.

40:35.530 --> 40:40.430
Please change this radio button so that you require approval for all outside collaborators.

40:40.650 --> 40:45.890
We use the GitHub token extensively and almost all of our attacks set it to read-only.

40:45.890 --> 40:48.470
That will stop a lot of post-exploitation opportunities.

40:48.470 --> 40:52.370
And then use, enforce your devs to use fine-grained personal access tokens.

40:52.370 --> 40:59.390
We, like, we hate discovering fine-grained tokens on red team engagements because they only give you access to one repository.

40:59.390 --> 41:02.910
If we find a personal access token that's classic, we can do a lot of stuff.

41:02.910 --> 41:06.010
If it's fine-grained, sometimes that's the end of the road.

41:06.570 --> 41:12.770
Alright, there's also ways to secure yourself more by making sure that your selfless runners are ephemeral.

41:12.770 --> 41:20.330
So, GitHub maintains something called ActionsRunnerController, which allows you to automatically spin up and spin down self-hosted runners using Kubernetes.

41:20.610 --> 41:28.050
Also, a lot of cloud providers have auto-scaling groups that can be linked with self-hosted runners and have that also be done automatically.

41:28.050 --> 41:39.090
And finally, there's a lot of third parties that offer turnkey drop-in replacements for GitHub runners that are also ephemeral if you don't want to use just the GitHub-hosted runners.

41:39.150 --> 41:46.650
And one thing that's important to remember here is that ephemeral means the environment that the runner is in also has to be ephemeral.

41:46.650 --> 41:56.550
So, if there's an ephemeral runner, but it's using a non-ephemeral file share, then an attacker can simply jump to other workflows by saving certain files off.

41:56.550 --> 42:03.030
So , it's important to really consider the entirety of that environment when it comes to build agent security.

42:03.990 --> 42:08.450
Alright, so another way is by using GitHub's feature for runner group pinning.

42:08.450 --> 42:16.950
So, GitHub has a feature where if you have a runner group, you can actually pin it to a specific workflow, or even a specific SHA or reference of a workflow.

42:17.050 --> 42:22.430
So, with this, you have a lot of different options to restrict which workflows can even use the runner.

42:22.430 --> 42:26.450
And all of this has the ultimate effect of protecting your most privileged runners.

42:27.190 --> 42:33.350
We want to end our talk today by emphasizing that this talk and this research is not about PyTorch .

42:33.350 --> 42:35.490
So, we have some key takeaways here.

42:35.490 --> 42:38.150
If you've been zoning out, lock in for this last slide.

42:38.150 --> 42:46.850
What we did to PyTorch, we've been able to do to a lot of advanced mature organizations because of this lack of awareness around CICD agent security.

42:46.850 --> 42:50.950
So, I think we've submitted over 20 high and critical bug bounty submissions.

42:50.950 --> 43:01.090
Among them were critical vulnerabilities in GitHub Actions, Microsoft, PyTorch, TensorFlow, ASTAR, HydroGX, ByteDance, and a lot more that we're not allowed to talk about.

43:01.930 --> 43:08.250
Additionally, if you think that public CICD security is bad, internal CICD security is a nightmare.

43:08.250 --> 43:18.810
Almost not every Red Team engagement I've been on, but a lot of Red Team engagements were able to get access to a CICD platform and then escalate privileges and use it to reach objective.

43:18.810 --> 43:27.570
It's almost become the new ADCS for us where internally everyone's vulnerable and compromising these CICD platforms can give you extensive privileges.

43:28.310 --> 43:32.710
Finally , what we need everyone to do is go learn about these attacks to protect your org from compromise.

43:32.710 --> 43:35.090
The main issue we see is just this lack of awareness.

43:35.090 --> 43:44.750
So if devs, architects, execs, and everyone is learning about these attacks, they'll be able to implement controls that hopefully protect their organization from the next critical supply chain attack.

43:45.430 --> 43:49.770
Alright, the moral of the story here is learn about this stuff and don't let this be you.

43:52.590 --> 44:01.970
Alright, so we want to start off by thanking all of the bug bounty triage teams that handled some of the reports and handled them well and applied solid mitigations to their products.

44:02.070 --> 44:03.890
We'd like to thank everyone who showed out today.

44:03.890 --> 44:07.990
Thank you so much for watching us and helping us raise awareness and for everyone watching online.

44:08.130 --> 44:09.050
Thank you.

44:09.050 --> 44:11.330
We'd like to thank DEF CON for giving us this platform.

44:11.330 --> 44:14.150
We wanted to speak here for a long time so this has been really fun.

44:14.530 --> 44:18.230
Please, we don't have time for questions, but come find us after if you want to talk more.

44:18.370 --> 44:19.310
Thank you everybody!

