1 00:00:05,860 --> 00:00:13,940 Okay, let's start. Hi, everybody. Today we're going to talk about... Okay, maybe I won't use it. Okay. 2 00:00:15,740 --> 00:00:21,360 Today we're going to talk about some GitHub action worms. So this talk is going to be very technical. 3 00:00:21,580 --> 00:00:29,260 Can you hear me good in the back? Yeah? Woo! Let's go. I try to not lose you if you get lost. 4 00:00:29,260 --> 00:00:35,880 You'll have something that will show you the progress bar on the bottom of the slides. And this 5 00:00:35,880 --> 00:00:42,300 is basically a result of research I did. It took about three months. My basic goal was to find a 6 00:00:42,300 --> 00:00:48,020 new way to attack CCD pipelines. And this is what I came up with. This is a new way which will 7 00:00:48,020 --> 00:00:54,820 understand slowly the real impact and the scale of it. So a bit about myself. My name is Asik 8 00:00:54,820 --> 00:00:59,240 Reynolds. I'm a security researcher currently at Palo Alto Networks. And I'm going to talk a 9 00:00:59,240 --> 00:01:02,500 little bit about myself. I have around eight years of experience in cybersecurity. I've done 10 00:01:02,500 --> 00:01:08,880 incident response, SOC security architecture, and of course, application security. For the last two 11 00:01:08,880 --> 00:01:13,840 years, I've been working for cybersecurity, which was acquired not too long ago by Palo Alto 12 00:01:13,840 --> 00:01:23,560 Networks. And I research CCD security and all the things that revolve around it. So let's talk 13 00:01:23,560 --> 00:01:28,780 about some notable projects I've been a part of. So the first one is the Top 10 CCD Risks. This is a 14 00:01:29,240 --> 00:01:33,840 project we released about a year ago. And it was embraced by OWASP. You can find it on GitHub, 15 00:01:34,000 --> 00:01:41,700 also on OWASP's website. The second one is the CCD Go. This is a deliberately vulnerable CCD 16 00:01:41,700 --> 00:01:47,020 environment, basically a CTF, in which you can hack a real CCD environment that's being 17 00:01:47,020 --> 00:01:52,320 installed on your local computer. You can find it on GitHub, download it, play with it, and learn 18 00:01:52,320 --> 00:01:59,220 how to hack CCD pipelines. Now, before we begin, let's do a quick overview of what gave us the 19 00:01:59,240 --> 00:02:04,020 name GitHub Actions is. So how many of you are using GitHub Actions, by a raise of hand? Okay, 20 00:02:04,120 --> 00:02:10,460 that's a lot. Nice. So I'll do this quick, and we'll just get everybody to the same page. So GitHub 21 00:02:10,460 --> 00:02:15,880 Actions is a continuous integration, continuous delivery platform, CACD, that allows you to 22 00:02:15,880 --> 00:02:21,220 automate your build, test, and deployment pipelines. You can see on the left side, there are 23 00:02:21,220 --> 00:02:26,900 events that can trigger pipelines, such as push, pull request events, and so on. And pipelines in 24 00:02:29,240 --> 00:02:31,100 GitHub Actions can be used to run multiple jobs. So workflows can contain multiple number of jobs, 25 00:02:31,240 --> 00:02:37,360 as you see. Each job is running on a different runner, and on each job can contain multiple 26 00:02:37,360 --> 00:02:43,940 number of steps. Each step can contain a bash command or an action. What is an action? An action 27 00:02:43,940 --> 00:02:51,520 is basically a code package that allows you to use someone else's, let's say, library to execute 28 00:02:51,520 --> 00:02:56,420 some stuff in your pipeline. For example, you want to do something that probably everyone does, like 29 00:02:56,420 --> 00:03:00,860 checking out the code from the repository to the runner itself. You don't want to develop it 30 00:03:00,860 --> 00:03:05,800 yourself, someone else probably already developed it. So you can use an action that checks out your 31 00:03:05,800 --> 00:03:13,200 code from the repository to the runner itself. Now let's see an example of a workflow, a simple 32 00:03:13,200 --> 00:03:19,140 one. So let's start with our first part. So we have the on keyword, which is the triggers of the 33 00:03:19,140 --> 00:03:25,080 workflow. Here it's triggered by a workflow dispatch, which is a manual trigger. Push to the 34 00:03:25,080 --> 00:03:25,620 main branch. 35 00:03:25,800 --> 00:03:26,400 And to access a new command, you control the application with ID ĐỞPù mistress. I do that, 36 00:03:26,400 --> 00:03:31,720 pull requests. Pretty easy. Next we have the jobs. We have only one job here. It's called 37 00:03:31,720 --> 00:03:38,480 check links and it's running on an Ubuntu virtual machine. Next we have the steps. So here we have 38 00:03:38,480 --> 00:03:42,980 the first step that checks out the code and it uses an action. The name of the action is 39 00:03:42,980 --> 00:03:49,980 actions slash checkout at v3. Now what v3 means, it's the version of the action and the actions 40 00:03:49,980 --> 00:03:55,320 slash checkout is the organization slash repository. So actions are contained in a 41 00:03:55,320 --> 00:04:00,200 GitHub repository and this is how you reference them and how you call them. This specific action 42 00:04:00,200 --> 00:04:05,680 was written by GitHub themselves. The actions organization is an organization that's maintained 43 00:04:05,680 --> 00:04:14,380 by GitHub. Next we have the setup node step which uses a setup node action which also receives two 44 00:04:14,380 --> 00:04:22,260 inputs as you can see here. Actions can also return outputs which is nice. Simple stuff. And next we 45 00:04:22,260 --> 00:04:25,040 have a bash command that's using 46 00:04:25,040 --> 00:04:25,220 the 47 00:04:25,320 --> 00:04:32,360 to do NPMCI, install the dependencies of the package here. And after that we see a third party package. 48 00:04:32,580 --> 00:04:37,100 This is a package that was written by someone on the internet and published as a public 49 00:04:37,100 --> 00:04:42,460 repository and we're using it here. You can see at the end there's a different reference type. This 50 00:04:42,460 --> 00:04:49,320 reference is a hash commit of the repository. We'll go later exactly into what it means and how we can 51 00:04:49,320 --> 00:04:55,080 use it but this is the basic idea of workflows. And here you have a screenshot of the GitHub actions 52 00:04:55,080 --> 00:04:56,180 actions. And finally, let me tell you about the GitHub marketplace. The GitHub actions, the GitHub 53 00:04:56,180 --> 00:05:01,100 marketplace and specifically the actions. When I took this picture not too long ago, there was 54 00:05:01,100 --> 00:05:06,680 around 19,000 actions on the marketplace. The vast majority of them is actions written by the 55 00:05:06,680 --> 00:05:12,500 community. Some of them are written by GitHub. Some of them are written by vendors. But the majority are 56 00:05:12,500 --> 00:05:14,720 is written by kind people on the internet. 57 00:05:16,220 --> 00:05:19,020 So let's talk about the worm itself now, finally. 58 00:05:19,260 --> 00:05:22,360 So in order to understand how to build the GitHub Actions worm, 59 00:05:22,560 --> 00:05:24,180 we need to understand a few parts 60 00:05:24,180 --> 00:05:27,960 of the puzzle, which we will build during this presentation. 61 00:05:28,760 --> 00:05:32,080 And the different parts are initial attack vector, 62 00:05:33,140 --> 00:05:35,940 action dependencies, action to infect actions, 63 00:05:36,280 --> 00:05:38,080 and finding attack graphs at scale. 64 00:05:38,260 --> 00:05:40,480 Now, if this doesn't mean anything to you right now, 65 00:05:40,480 --> 00:05:42,220 you'll understand it in a few minutes. 66 00:05:42,980 --> 00:05:44,660 But we'll go through each one of them, 67 00:05:44,720 --> 00:05:46,200 basically completing the puzzle. 68 00:05:46,380 --> 00:05:47,600 And when the puzzle will be finished, 69 00:05:47,700 --> 00:05:50,200 we'll be able to show a demo of the worm itself 70 00:05:50,200 --> 00:05:51,460 attacking repositories. 71 00:05:52,480 --> 00:05:54,440 So let's start with initial attack vectors. 72 00:05:54,800 --> 00:05:58,860 So most of the CICD attacks that happened up until now 73 00:05:58,860 --> 00:06:01,320 were done kind of in a similar fashion. 74 00:06:01,500 --> 00:06:04,080 Basically, attackers compromised a repository or a package 75 00:06:04,080 --> 00:06:05,540 or some kind of a project. 76 00:06:05,760 --> 00:06:07,720 And they infected it with code that 77 00:06:07,720 --> 00:06:10,020 is used to directly infect. 78 00:06:10,020 --> 00:06:12,120 The direct dependence of the package. 79 00:06:12,540 --> 00:06:15,140 Let's show some examples. 80 00:06:15,440 --> 00:06:18,160 So one of them will be to exfiltrate environment 81 00:06:18,160 --> 00:06:20,380 variables when the package is being run, 82 00:06:20,540 --> 00:06:23,120 to steal maybe secrets from the pipeline execution 83 00:06:23,120 --> 00:06:24,580 or from production environments. 84 00:06:25,040 --> 00:06:28,420 Second thing may be to run a reverse shell. 85 00:06:28,580 --> 00:06:30,460 When this package is being run in production, 86 00:06:30,660 --> 00:06:32,940 it will start a reverse shell, allowing attackers access 87 00:06:32,940 --> 00:06:33,900 to production environments. 88 00:06:34,120 --> 00:06:36,340 But when they compromise a package, 89 00:06:36,480 --> 00:06:38,900 they basically only affect the direct dependence. 90 00:06:38,900 --> 00:06:42,920 And let's see a few examples of how 91 00:06:42,920 --> 00:06:46,100 to compromise GitHub repositories specifically 92 00:06:46,100 --> 00:06:47,920 with some known attack vectors. 93 00:06:49,160 --> 00:06:51,580 So we're going to talk about three attack vectors. 94 00:06:51,840 --> 00:06:55,560 I've implemented scanning automatically for those attacks 95 00:06:56,100 --> 00:06:58,640 to look for vulnerable repositories that 96 00:06:58,640 --> 00:07:00,780 are vulnerable to those attacks in my research. 97 00:07:00,940 --> 00:07:03,760 So this is the reason they're the only ones relevant 98 00:07:03,760 --> 00:07:05,300 for this presentation. 99 00:07:05,580 --> 00:07:06,520 But of course, there are more. 100 00:07:06,700 --> 00:07:07,940 So let's go through them. 101 00:07:08,100 --> 00:07:08,880 The first one is the attack. 102 00:07:08,900 --> 00:07:09,440 The second one is repo-jacking. 103 00:07:09,700 --> 00:07:10,620 What is repo-jacking? 104 00:07:10,880 --> 00:07:12,600 On the left, we have a repository that's 105 00:07:12,600 --> 00:07:14,020 using the action in the middle. 106 00:07:14,180 --> 00:07:15,940 The action is part of an organization. 107 00:07:16,360 --> 00:07:18,800 And let's say one day the maintainer wakes up 108 00:07:18,800 --> 00:07:21,620 and decides to move the action to a new organization. 109 00:07:22,980 --> 00:07:23,900 Nice animations. 110 00:07:24,120 --> 00:07:26,180 So what happens next? 111 00:07:26,380 --> 00:07:29,100 The repository makes a request to the action, 112 00:07:29,260 --> 00:07:31,420 and GitHub automatically redirects it 113 00:07:31,760 --> 00:07:32,620 to the new repository. 114 00:07:33,020 --> 00:07:34,020 That's great, right? 115 00:07:34,200 --> 00:07:35,880 But what happens when the maintainer decides 116 00:07:35,880 --> 00:07:37,560 to delete the old organization? 117 00:07:38,400 --> 00:07:38,880 What happens? 118 00:07:38,900 --> 00:07:40,840 Well, when it doesn't exist anymore, 119 00:07:41,020 --> 00:07:43,300 an attacker can come and basically register 120 00:07:43,300 --> 00:07:46,680 the same organization name and same old repository name. 121 00:07:46,920 --> 00:07:49,460 When another request is being made by the repository, 122 00:07:49,820 --> 00:07:52,780 it will cancel the redirection, which will actually 123 00:07:52,780 --> 00:07:56,560 compromise the repository that is using the now malicious 124 00:07:56,560 --> 00:07:58,560 action instead of the original one, which 125 00:07:58,560 --> 00:08:00,000 was moved or maybe deleted. 126 00:08:00,460 --> 00:08:03,920 Now, GitHub knows of this issue, and they've made a mitigation. 127 00:08:03,960 --> 00:08:05,920 They retired the namespaces of projects 128 00:08:05,920 --> 00:08:08,880 that had more than 100 clones in the week leading up to this. 129 00:08:09,780 --> 00:08:12,600 They have an election system called 130 00:08:12,600 --> 00:08:14,180 But still, it's not full proof. 131 00:08:14,380 --> 00:08:15,040 It's not sealed tight. 132 00:08:15,240 --> 00:08:18,060 There are still cases which repositories are reprojectable. 133 00:08:18,260 --> 00:08:19,740 We want to talk about why, but I'll 134 00:08:19,740 --> 00:08:21,960 show you some real examples of repositories 135 00:08:21,960 --> 00:08:24,140 that have reproject, but it's still possible. 136 00:08:24,800 --> 00:08:27,720 So just know this for now and you can look it up later. 137 00:08:27,940 --> 00:08:30,100 The next one is NPM email hijacking. 138 00:08:30,240 --> 00:08:32,920 So here we want to basically hijack an NPM package. 139 00:08:33,140 --> 00:08:33,900 How can we do it? 140 00:08:34,220 --> 00:08:38,660 So we pass the package log JSON over a repository, getting all the packages, 141 00:08:38,880 --> 00:08:42,240 that the target repository that we want to compromise is using. 142 00:08:42,720 --> 00:08:46,360 For each package, we'll send a request to the NPM registry 143 00:08:46,360 --> 00:08:48,620 to get the manifest of the package. 144 00:08:48,940 --> 00:08:51,620 Inside the manifest, we find a few interesting things, 145 00:08:51,760 --> 00:08:53,380 the maintainers and their emails. 146 00:08:54,200 --> 00:08:56,760 For each email, we can send a request 147 00:08:56,760 --> 00:09:00,540 to check if the domain of the email is available for purchasing. 148 00:09:01,360 --> 00:09:04,320 Basically, the maintainer created an email for themselves 149 00:09:04,320 --> 00:09:06,620 and they forgot to renew the domain 150 00:09:06,620 --> 00:09:09,980 or the domain got expired or deleted or something like that. 151 00:09:10,180 --> 00:09:13,300 And if it's possible to buy the domain, we buy the domain. 152 00:09:13,640 --> 00:09:17,520 We can then set up a mail server, redirect the emails to our inbox, 153 00:09:17,740 --> 00:09:19,520 and reset the maintainer's password. 154 00:09:19,720 --> 00:09:22,860 Now, this is only possible on accounts that don't have two-factor authentication, 155 00:09:22,980 --> 00:09:26,100 but still, a lot of accounts that have two-factor authentication. 156 00:09:26,120 --> 00:09:29,340 And, of course, I'll also show you a real example later. 157 00:09:30,580 --> 00:09:32,640 Now, NPM also knows of this issue, 158 00:09:33,120 --> 00:09:36,120 and this is a snapshot from them. 159 00:09:36,620 --> 00:09:37,560 This is a snapshot from their documentation, 160 00:09:38,140 --> 00:09:41,940 and they're saying that they periodically check 161 00:09:41,940 --> 00:09:44,500 if packages have expired domains, 162 00:09:44,740 --> 00:09:47,440 and if so, they disable the account from doing password resets. 163 00:09:47,660 --> 00:09:52,060 The issue is that today, there are on NPM around 2.5 million packages, 164 00:09:52,660 --> 00:09:54,840 probably huge numbers of different domains, 165 00:09:55,100 --> 00:09:57,640 and it's pretty hard to scan them daily or even weekly. 166 00:09:57,840 --> 00:09:59,420 I don't know how long they're doing it for, 167 00:09:59,560 --> 00:10:02,720 but let's say you're an attacker and you want to target specific packages, 168 00:10:02,880 --> 00:10:06,500 and you scan them even hourly if you have a few packages, 169 00:10:06,620 --> 00:10:10,300 and you check if the domain is expired or something like that, 170 00:10:10,400 --> 00:10:13,300 and you can buy them before NPM makes their checks, 171 00:10:13,480 --> 00:10:18,120 you can still take over the package and do this attack, 172 00:10:18,300 --> 00:10:20,120 of course, if they don't have two-factor authentication. 173 00:10:20,900 --> 00:10:22,660 And the last one is command injection. 174 00:10:22,920 --> 00:10:25,820 So, here we have a code snippet from a GitHub action. 175 00:10:26,000 --> 00:10:29,500 You can see here a simple configuration of the Git client, 176 00:10:29,740 --> 00:10:32,160 and then pushing some code to the repository. 177 00:10:32,520 --> 00:10:34,860 Now, in the line with the red box, 178 00:10:34,980 --> 00:10:36,200 you can see that it's using something 179 00:10:36,200 --> 00:10:37,100 that's called context. 180 00:10:37,380 --> 00:10:39,120 So, as I told you, GitHub actions, 181 00:10:39,320 --> 00:10:41,420 GitHub workflows, when they're triggered, 182 00:10:41,620 --> 00:10:43,420 they're triggered by an event. 183 00:10:43,700 --> 00:10:47,700 The workflow itself receives the event in the type of a context, 184 00:10:47,960 --> 00:10:50,040 and it can access some fields on the events 185 00:10:50,040 --> 00:10:52,200 and get data about what triggered the event itself. 186 00:10:52,540 --> 00:10:55,000 So, for example, one of the events that are available 187 00:10:55,000 --> 00:10:57,480 is the author email of the head commit. 188 00:10:58,120 --> 00:11:00,660 Now, who controls the author email of the head commit? 189 00:11:01,040 --> 00:11:04,360 Whoever did the commit and not the maintainers of the repository. 190 00:11:04,720 --> 00:11:05,900 So, they can write, 191 00:11:05,900 --> 00:11:06,960 anything they want there. 192 00:11:07,040 --> 00:11:08,680 One of the funny things they can write 193 00:11:08,680 --> 00:11:11,660 in the author email of the Git commit is this string. 194 00:11:11,940 --> 00:11:13,460 What is this nice string? 195 00:11:13,720 --> 00:11:14,960 This is basically command injection. 196 00:11:15,280 --> 00:11:16,280 We write an email. 197 00:11:16,380 --> 00:11:20,160 We do like a small back tick before and after the curl command. 198 00:11:20,360 --> 00:11:22,560 We download a malicious bash script 199 00:11:22,560 --> 00:11:25,600 and execute it inside the pipeline. 200 00:11:25,920 --> 00:11:28,060 So, you simply do that on your computer, 201 00:11:28,220 --> 00:11:30,100 push the code with this nice email, 202 00:11:30,220 --> 00:11:34,160 and it will cause this code snippet here to execute your code, 203 00:11:34,240 --> 00:11:35,080 download the bash script, 204 00:11:35,900 --> 00:11:36,560 and execute malicious stuff, 205 00:11:36,800 --> 00:11:37,540 which is nice. 206 00:11:38,400 --> 00:11:39,940 Now, of course, there are more attacks. 207 00:11:40,200 --> 00:11:43,360 As I've told you, some of them are dependency confusion, 208 00:11:43,860 --> 00:11:44,660 public PPE, 209 00:11:45,260 --> 00:11:47,260 and just creating a malicious pull request, 210 00:11:47,480 --> 00:11:49,720 hoping the maintainers will merge it. 211 00:11:50,120 --> 00:11:51,480 Now, you think maybe this is crazy, 212 00:11:51,600 --> 00:11:54,100 but actually someone did it to the Linux project 213 00:11:54,620 --> 00:11:55,760 about a year or two ago. 214 00:11:55,960 --> 00:11:57,220 They didn't like it so much, 215 00:11:57,300 --> 00:12:00,480 but they actually successfully committed malicious code 216 00:12:00,480 --> 00:12:02,840 with a vulnerability to the Linux project. 217 00:12:03,500 --> 00:12:04,660 And, of course, there are more. 218 00:12:05,080 --> 00:12:07,600 I won't get into what each of those attacks are. 219 00:12:07,740 --> 00:12:08,600 You can look it up on Google, 220 00:12:08,740 --> 00:12:11,320 but just know there are more possible ways. 221 00:12:11,660 --> 00:12:13,680 Now, how can we further our attack? 222 00:12:13,820 --> 00:12:16,580 We just understood how to compromise a single repository. 223 00:12:16,900 --> 00:12:18,920 Of course, here we're going to talk about worms. 224 00:12:19,040 --> 00:12:21,020 We want to compromise infinite repositories. 225 00:12:21,180 --> 00:12:22,180 How can we do that? 226 00:12:22,340 --> 00:12:24,780 So, next thing we'll talk about is action dependencies. 227 00:12:26,380 --> 00:12:28,580 Now, there are a few types of actions. 228 00:12:28,780 --> 00:12:29,960 Three types to be exact. 229 00:12:30,220 --> 00:12:31,780 The first one is a Docker action. 230 00:12:31,900 --> 00:12:33,620 You can see here it's using a Docker file. 231 00:12:33,740 --> 00:12:34,560 You can also use... 232 00:12:34,660 --> 00:12:37,480 a Docker image to define what the action does. 233 00:12:37,700 --> 00:12:39,840 Now, what you're seeing here is the action YAML file. 234 00:12:40,060 --> 00:12:42,580 This is a file that sits at the root of the repository 235 00:12:43,040 --> 00:12:45,280 that defines what the action actually does. 236 00:12:45,560 --> 00:12:48,860 So, this is like the main function of the action. 237 00:12:49,540 --> 00:12:50,520 So, this is simple. 238 00:12:50,740 --> 00:12:52,380 Next, we have a JavaScript action. 239 00:12:52,560 --> 00:12:53,540 You can write plain JavaScript. 240 00:12:53,940 --> 00:12:56,980 And this is also relevant for the NPM email hijacking attack 241 00:12:56,980 --> 00:12:59,140 because if an action uses JavaScript 242 00:12:59,140 --> 00:13:01,220 and it has a dependency that we can hijack, 243 00:13:01,280 --> 00:13:03,520 we can hijack the action. 244 00:13:04,660 --> 00:13:07,600 And the third one which is important for the dependency part 245 00:13:07,600 --> 00:13:08,900 is a composite actions. 246 00:13:09,180 --> 00:13:11,700 Now, composite actions can use other actions 247 00:13:11,700 --> 00:13:13,180 as part of their logic 248 00:13:13,180 --> 00:13:15,180 and they can also execute bash. 249 00:13:15,520 --> 00:13:18,660 So, this is the first type of dependencies between action. 250 00:13:18,900 --> 00:13:22,060 A composite action can actually depend on other action 251 00:13:22,060 --> 00:13:24,400 and just execute it when it's been executed. 252 00:13:24,860 --> 00:13:27,560 Now, what is the second way actions are depending on each other? 253 00:13:28,080 --> 00:13:29,440 Actions are stored on GitHub. 254 00:13:29,720 --> 00:13:31,780 They obviously need their own CICD. 255 00:13:31,900 --> 00:13:33,320 And most of the times, 256 00:13:33,320 --> 00:13:35,160 what CICD platforms do they use? 257 00:13:35,400 --> 00:13:36,740 GitHub actions, of course. 258 00:13:37,040 --> 00:13:40,240 So, here's an example of a GitHub workflow of an action. 259 00:13:40,520 --> 00:13:42,760 You can see that it uses other actions. 260 00:13:44,000 --> 00:13:45,740 Well, this is a dependency 261 00:13:46,320 --> 00:13:49,380 not in a similar fashion that we know like code libraries. 262 00:13:49,580 --> 00:13:51,000 This is kind of an implicit dependency. 263 00:13:51,360 --> 00:13:53,280 Now, this action is depend... 264 00:13:53,280 --> 00:13:56,000 The action that this workflow belongs to 265 00:13:56,000 --> 00:13:58,240 is depending on the actions that are being ran 266 00:13:58,240 --> 00:13:59,520 inside its workflow, 267 00:14:00,280 --> 00:14:02,200 but it's not part of the code itself. 268 00:14:02,420 --> 00:14:02,580 Now, 269 00:14:02,580 --> 00:14:05,180 as you saw in the snippet that I've showed you 270 00:14:05,180 --> 00:14:07,000 of the command injection, 271 00:14:07,360 --> 00:14:08,860 maybe it has some permissions. 272 00:14:09,140 --> 00:14:11,600 Maybe we can, by compromising an action in the workflow, 273 00:14:11,880 --> 00:14:13,560 push malicious code to the repository. 274 00:14:14,040 --> 00:14:15,100 Maybe we'll see it. 275 00:14:15,140 --> 00:14:15,660 Maybe not. 276 00:14:15,740 --> 00:14:16,740 Maybe nothing will work. 277 00:14:17,620 --> 00:14:20,380 So, this is the other way actions are dependent on each other 278 00:14:20,380 --> 00:14:24,200 using other actions in their CICD. 279 00:14:24,440 --> 00:14:27,360 Now, what we can do is basically take those two files, 280 00:14:27,540 --> 00:14:28,360 parse them, 281 00:14:28,520 --> 00:14:31,960 and build a huge tree on Neo4j of action dependencies. 282 00:14:31,960 --> 00:14:33,500 And this is exactly what I did. 283 00:14:33,620 --> 00:14:35,740 And this is how I do art. 284 00:14:35,900 --> 00:14:36,880 I don't know how to paint, 285 00:14:37,020 --> 00:14:38,140 so this is my art. 286 00:14:38,500 --> 00:14:40,200 I create flowers of dependencies 287 00:14:40,900 --> 00:14:42,180 using GitHub Actions. 288 00:14:42,580 --> 00:14:45,020 I promise you this is a random query of the database. 289 00:14:45,200 --> 00:14:46,780 I didn't make it, like, by myself. 290 00:14:48,060 --> 00:14:49,280 So, what we're seeing here 291 00:14:49,980 --> 00:14:51,240 are action dependencies. 292 00:14:51,520 --> 00:14:54,260 We can see a repository with a purple node. 293 00:14:54,540 --> 00:14:57,660 Now, we parse the files and we can see all the action usages. 294 00:14:58,100 --> 00:15:00,800 Each orange node of an action usage 295 00:15:00,800 --> 00:15:03,160 is an action which comes from a repository. 296 00:15:03,320 --> 00:15:05,440 So, we have a purple node that's connected 297 00:15:05,440 --> 00:15:06,640 to an action usage node, 298 00:15:06,840 --> 00:15:08,760 which is connected to the repository 299 00:15:08,760 --> 00:15:10,920 of the action being used and so on. 300 00:15:10,960 --> 00:15:11,820 It goes recursively. 301 00:15:11,980 --> 00:15:14,360 And you can see this in this beautiful flower 302 00:15:14,360 --> 00:15:17,040 that we have all the actions, like, 303 00:15:17,180 --> 00:15:19,040 on the outer side of the flower 304 00:15:19,040 --> 00:15:21,740 that are dependent on the one in the middle, 305 00:15:22,280 --> 00:15:23,080 which is nice. 306 00:15:23,700 --> 00:15:25,600 Let's see the same graph in a different way. 307 00:15:25,760 --> 00:15:27,600 This is the same graph. 308 00:15:27,800 --> 00:15:30,440 Now, here we want to target the repository on the left. 309 00:15:30,800 --> 00:15:31,800 How can we do that? 310 00:15:31,980 --> 00:15:34,840 Let's say we have some weak link in the chain. 311 00:15:35,860 --> 00:15:37,860 Some action is using another action, 312 00:15:37,920 --> 00:15:38,860 which uses another action. 313 00:15:39,020 --> 00:15:43,440 And the other action was created by someone random on the Internet. 314 00:15:43,620 --> 00:15:45,280 They probably made it. 315 00:15:45,320 --> 00:15:48,700 They didn't make so much effort to secure it, so on. 316 00:15:48,820 --> 00:15:50,220 So, we can maybe compromise it. 317 00:15:50,740 --> 00:15:52,440 And by compromising that action, 318 00:15:52,500 --> 00:15:55,300 potentially, we may be able to climb up the tree, 319 00:15:55,360 --> 00:15:58,480 infect all the actions that are dependent on it, 320 00:15:58,580 --> 00:16:00,680 and reach our target. 321 00:16:00,800 --> 00:16:04,040 Now, how can we do the initial infection of the weakest link? 322 00:16:05,300 --> 00:16:06,180 This is by the... 323 00:16:06,180 --> 00:16:07,680 You can see the line that is missing there, 324 00:16:07,780 --> 00:16:10,140 but we can do it using one of the initial attack vectors 325 00:16:10,140 --> 00:16:11,240 that we talked about earlier. 326 00:16:11,520 --> 00:16:13,280 So, we have a few parts of the puzzle. 327 00:16:13,780 --> 00:16:15,780 We know that we have the initial attack vector, 328 00:16:15,920 --> 00:16:18,780 and now we need some kind of a way to infect actions 329 00:16:18,780 --> 00:16:21,400 and to jump from one action to another action. 330 00:16:21,780 --> 00:16:24,860 So, let's see actually how to do it. 331 00:16:24,980 --> 00:16:26,740 So, action to infect actions. 332 00:16:27,400 --> 00:16:30,680 We'll start with talking about secrets in GitHub Actions. 333 00:16:30,800 --> 00:16:32,140 So, here we have an example workflow 334 00:16:32,140 --> 00:16:35,640 that I'll use to explain how secrets work. 335 00:16:35,840 --> 00:16:37,860 So, we have the first job on the top 336 00:16:37,860 --> 00:16:40,100 that's using the first secret, as you can see, 337 00:16:40,160 --> 00:16:42,460 and the second job that uses the second secret 338 00:16:42,460 --> 00:16:43,540 on its second step. 339 00:16:44,700 --> 00:16:46,800 Now, you can see some interesting bash code 340 00:16:47,270 --> 00:16:48,620 here in the red box. 341 00:16:48,840 --> 00:16:50,460 What this bash code does is basically 342 00:16:50,460 --> 00:16:52,220 dump the memory of the runner 343 00:16:52,750 --> 00:16:55,320 and grab four secrets in its memory. 344 00:16:55,540 --> 00:16:58,660 Now, secrets are stored in clear text 345 00:16:58,660 --> 00:16:59,960 in the memory of the runner. 346 00:16:59,960 --> 00:17:02,680 I know this thanks to research by a guy 347 00:17:02,680 --> 00:17:04,800 that's mentioned here below, Karim Rahal. 348 00:17:05,120 --> 00:17:08,600 And what he described in his research 349 00:17:08,600 --> 00:17:11,360 is that the job receives all the secrets 350 00:17:11,360 --> 00:17:13,080 that are being used inside the job 351 00:17:13,080 --> 00:17:14,360 even before it starts. 352 00:17:14,640 --> 00:17:17,020 So, it doesn't matter where we dump the secrets 353 00:17:17,020 --> 00:17:18,120 inside the job. 354 00:17:18,200 --> 00:17:19,980 We'll get all the secrets that are available. 355 00:17:20,300 --> 00:17:22,700 So, here we see an example that we're dumping the secrets 356 00:17:22,700 --> 00:17:24,320 even before it's being used. 357 00:17:24,480 --> 00:17:26,840 And let's see how the secret dump will look like. 358 00:17:27,680 --> 00:17:29,700 So, this is the decoded base64. 359 00:17:29,960 --> 00:17:30,180 This is the dump. 360 00:17:30,440 --> 00:17:32,260 We see the second secret and its value. 361 00:17:32,460 --> 00:17:33,060 I'm a secret. 362 00:17:33,340 --> 00:17:34,980 And we also see a GitHub token. 363 00:17:35,300 --> 00:17:37,940 We'll get in a second into what GitHub token is. 364 00:17:38,140 --> 00:17:40,820 But so far, we know that all secrets are accessible 365 00:17:40,820 --> 00:17:42,480 to all steps in a job. 366 00:17:42,660 --> 00:17:44,100 We didn't see the first secret 367 00:17:44,100 --> 00:17:46,220 because it's on a different job 368 00:17:46,220 --> 00:17:47,640 which runs on a different runner. 369 00:17:47,840 --> 00:17:49,360 We only saw the second secret. 370 00:17:50,740 --> 00:17:52,680 Another point worth mentioning 371 00:17:52,680 --> 00:17:54,220 is that on self-hosted runners, 372 00:17:54,480 --> 00:17:55,940 if they're not configured correctly 373 00:17:55,940 --> 00:17:58,900 and they're not destroyed after each execution of a workflow, 374 00:17:59,960 --> 00:18:01,400 they're not able to get secrets of past jobs 375 00:18:01,400 --> 00:18:03,160 that were ran on the same runner, 376 00:18:03,300 --> 00:18:03,980 which is much cooler. 377 00:18:05,800 --> 00:18:07,720 And the GitHub token is accessible, 378 00:18:08,020 --> 00:18:09,760 although it wasn't even referenced 379 00:18:09,760 --> 00:18:11,060 in the workflow at all. 380 00:18:11,280 --> 00:18:13,100 So, these are the two important things we know. 381 00:18:14,620 --> 00:18:16,340 And what is the GitHub token? 382 00:18:16,580 --> 00:18:18,400 So, in the start of each workflow, 383 00:18:18,620 --> 00:18:20,640 GitHub generates a token for the workflow 384 00:18:20,640 --> 00:18:22,820 so the workflow can use it to authenticate 385 00:18:22,820 --> 00:18:24,660 to GitHub's API and perform actions 386 00:18:24,660 --> 00:18:26,140 like pushing code to the repository, 387 00:18:26,800 --> 00:18:28,440 publishing comments on pull requests, 388 00:18:28,440 --> 00:18:30,680 querying some data about the repository, 389 00:18:31,060 --> 00:18:33,740 basically identifying as the workflow itself. 390 00:18:34,940 --> 00:18:37,040 Now, to understand the next part, 391 00:18:37,300 --> 00:18:40,100 we'll get into how actions are being called. 392 00:18:41,240 --> 00:18:43,720 Everything will just get... 393 00:18:43,720 --> 00:18:46,720 will complete the picture in a few seconds. 394 00:18:46,980 --> 00:18:49,180 So, there are three main ways to reference actions. 395 00:18:49,420 --> 00:18:51,020 There are more ways, but those are the ones 396 00:18:51,020 --> 00:18:52,360 that are relevant for this presentation. 397 00:18:52,820 --> 00:18:55,020 We can reference an action using a hash commit. 398 00:18:55,520 --> 00:18:58,060 We can reference it using a branch or a tag. 399 00:18:58,060 --> 00:19:00,240 So, the GitHub actions runner will know 400 00:19:00,240 --> 00:19:01,740 which action it needs to fetch. 401 00:19:01,980 --> 00:19:03,880 Now, if we want to infect actions, 402 00:19:04,080 --> 00:19:06,760 we need to modify one of those references. 403 00:19:07,140 --> 00:19:09,520 Now, modifying an existing commit hash 404 00:19:09,520 --> 00:19:11,480 might be a bit difficult, 405 00:19:11,640 --> 00:19:14,260 but we can create a new commit to an existing branch, 406 00:19:14,460 --> 00:19:16,920 and something else we can do 407 00:19:16,920 --> 00:19:18,700 is we can delete an existing tag, 408 00:19:18,880 --> 00:19:20,580 creating a new malicious commit, 409 00:19:20,760 --> 00:19:23,140 and creating the same tag name 410 00:19:23,140 --> 00:19:25,060 with the new malicious commit. 411 00:19:25,220 --> 00:19:26,900 Now, let's see how it's actually being done. 412 00:19:26,900 --> 00:19:28,440 Just a diagram. 413 00:19:28,780 --> 00:19:32,140 So, here we have an action repository on the left, 414 00:19:32,200 --> 00:19:35,340 which uses GitHub actions as its CICD, 415 00:19:35,460 --> 00:19:38,340 and it uses the compromised action on the right 416 00:19:38,340 --> 00:19:39,780 using the main branch reference. 417 00:19:40,120 --> 00:19:42,060 Now, we want to infect the main branch 418 00:19:42,060 --> 00:19:43,580 of the left action. 419 00:19:43,800 --> 00:19:44,840 How can we do that? 420 00:19:44,960 --> 00:19:46,680 So, when the job begins, of course, 421 00:19:46,780 --> 00:19:48,640 as we said, the runner generates 422 00:19:48,640 --> 00:19:50,320 a GitHub token for the job, 423 00:19:50,440 --> 00:19:52,920 and also because we can dump secrets, 424 00:19:53,080 --> 00:19:54,240 as I showed earlier, 425 00:19:54,560 --> 00:19:56,880 we may be able to use some personal access 426 00:19:56,900 --> 00:19:58,740 tokens that are being used during the workflow. 427 00:19:58,940 --> 00:20:01,320 Maybe they also have some nice permissions 428 00:20:01,320 --> 00:20:02,380 that we can exploit. 429 00:20:03,880 --> 00:20:06,120 So, when the compromised action is being run, 430 00:20:06,240 --> 00:20:08,080 it can use this token 431 00:20:08,080 --> 00:20:10,280 to push code back to the main branch. 432 00:20:10,480 --> 00:20:11,640 Now, this is only possible 433 00:20:11,640 --> 00:20:14,400 if the main branch doesn't have branch protection rules, 434 00:20:14,580 --> 00:20:17,840 but what can we do if it does have branch protection rules? 435 00:20:18,060 --> 00:20:19,580 We can do the same thing. 436 00:20:19,720 --> 00:20:22,120 Let's see here, like, a different scenario. 437 00:20:22,360 --> 00:20:24,900 We want to infect the temporary branch, 438 00:20:25,060 --> 00:20:26,140 so same thing. 439 00:20:26,140 --> 00:20:27,380 The token is being generated. 440 00:20:27,700 --> 00:20:29,760 We push code to the unprotected branch 441 00:20:29,760 --> 00:20:31,840 because the main one has branch protection rules, 442 00:20:32,000 --> 00:20:34,520 and then we push a new tag to the repository, 443 00:20:34,820 --> 00:20:37,640 and by that, overriding an existing tag, 444 00:20:38,200 --> 00:20:41,700 which will now cause any new requests 445 00:20:41,700 --> 00:20:44,500 for using the action to use the new malicious tag. 446 00:20:44,680 --> 00:20:48,500 We'll see an actual example of this in a few minutes. 447 00:20:48,800 --> 00:20:50,460 And to do that, of course, 448 00:20:50,580 --> 00:20:53,320 all those pushes and stuff like that, 449 00:20:53,520 --> 00:20:55,280 and deleting tags, we need permissions. 450 00:20:55,280 --> 00:20:58,760 So how does the GitHub token permissions work? 451 00:20:59,260 --> 00:21:02,140 So up until not too long ago, 452 00:21:02,420 --> 00:21:05,700 all the repositories had default write permissions 453 00:21:05,700 --> 00:21:06,480 for the tokens. 454 00:21:07,080 --> 00:21:09,860 GitHub changed it about half a year ago, 455 00:21:10,000 --> 00:21:12,700 but this still means that most of the repositories 456 00:21:12,700 --> 00:21:15,100 on GitHub nowadays have write permission 457 00:21:15,100 --> 00:21:16,280 to the token by default, 458 00:21:16,460 --> 00:21:17,780 which is great for hackers, 459 00:21:17,960 --> 00:21:20,300 not so great for the maintainers of the repositories. 460 00:21:21,300 --> 00:21:23,280 And what maintainers can do 461 00:21:23,280 --> 00:21:25,160 if they still need the write permissions, 462 00:21:25,280 --> 00:21:27,580 they can override the permissions of the token 463 00:21:27,580 --> 00:21:29,680 specifically for specific workflows, 464 00:21:30,040 --> 00:21:31,600 like this snippet here, 465 00:21:31,720 --> 00:21:33,420 which says that the content permission 466 00:21:33,420 --> 00:21:35,940 which is used for pushing code to the repository 467 00:21:36,440 --> 00:21:37,660 will be set to read, 468 00:21:37,740 --> 00:21:39,220 even though the repository is defined 469 00:21:39,220 --> 00:21:41,220 to have write access for the token. 470 00:21:41,500 --> 00:21:43,900 Now, in my research, I wanted to find 471 00:21:43,900 --> 00:21:47,180 which repositories are actually vulnerable 472 00:21:47,180 --> 00:21:48,220 to this kind of attack, 473 00:21:48,320 --> 00:21:50,540 and which repositories will allow the worm 474 00:21:50,540 --> 00:21:51,620 to spread between them, 475 00:21:51,660 --> 00:21:52,680 so I needed to calculate 476 00:21:52,680 --> 00:21:55,260 what is the actual permissions of the GitHub token. 477 00:21:55,280 --> 00:21:56,420 Now, if I see this, 478 00:21:56,480 --> 00:21:58,380 I know the exact permissions, 479 00:21:58,540 --> 00:21:59,480 but if it doesn't exist, 480 00:21:59,640 --> 00:22:01,140 I need to find out the default permissions 481 00:22:01,140 --> 00:22:02,200 of the repository. 482 00:22:02,560 --> 00:22:03,980 How can I see that? 483 00:22:04,540 --> 00:22:05,600 We can look at the logs. 484 00:22:05,880 --> 00:22:08,560 It says there, right in clear text, 485 00:22:08,780 --> 00:22:10,340 the GitHub token permissions are right, 486 00:22:10,420 --> 00:22:11,820 and we can just pass the logs. 487 00:22:12,440 --> 00:22:13,420 It sounds simple, 488 00:22:13,520 --> 00:22:14,900 but to actually implement it 489 00:22:14,900 --> 00:22:18,060 and get all the logs from the repositories 490 00:22:18,060 --> 00:22:19,340 and get the ones that are relevant 491 00:22:19,340 --> 00:22:22,380 is a bit more complicated than I expected at first, 492 00:22:22,500 --> 00:22:23,700 but it worked eventually. 493 00:22:23,700 --> 00:22:26,360 So let's do a quick recap 494 00:22:26,360 --> 00:22:27,740 of what we've got until now. 495 00:22:27,920 --> 00:22:30,620 So the first step to execute the worm 496 00:22:30,620 --> 00:22:32,080 is to compromise a repository 497 00:22:32,080 --> 00:22:34,580 using one of the three initial attack vectors 498 00:22:34,580 --> 00:22:35,980 I've showed earlier. 499 00:22:36,340 --> 00:22:38,260 The next step is to infect actions 500 00:22:38,260 --> 00:22:41,220 by using the GitHub token 501 00:22:41,220 --> 00:22:43,560 or a personal access token inside the repository 502 00:22:43,560 --> 00:22:45,860 to push code to the main branch, 503 00:22:45,920 --> 00:22:48,060 one or another branch that is being used, 504 00:22:48,160 --> 00:22:50,180 or override an existing tag. 505 00:22:50,660 --> 00:22:52,620 By that, we'll climb up the tree 506 00:22:52,620 --> 00:22:54,260 of action dependencies, 507 00:22:54,460 --> 00:22:56,760 and we'll reach the target repository 508 00:22:56,760 --> 00:22:59,220 in which we'll be able to execute code, 509 00:22:59,480 --> 00:23:01,700 steal secrets, maybe modify its code, 510 00:23:01,860 --> 00:23:03,500 and a lot of fun like this. 511 00:23:04,760 --> 00:23:06,980 Now, let's start with the automation. 512 00:23:07,340 --> 00:23:09,500 How can we find vulnerable repositories 513 00:23:09,500 --> 00:23:10,480 like this one at scale? 514 00:23:11,080 --> 00:23:13,120 So what I did was this process. 515 00:23:13,380 --> 00:23:15,100 So the first thing I did was to collect targets. 516 00:23:15,380 --> 00:23:16,940 I collected two types of targets. 517 00:23:17,060 --> 00:23:21,580 The first one is the top 10k repositories 518 00:23:21,580 --> 00:23:22,400 in GitHub by stars, 519 00:23:22,540 --> 00:23:25,700 and the second one was 32k repositories 520 00:23:26,180 --> 00:23:27,760 of companies with bug bounty programs. 521 00:23:28,080 --> 00:23:30,840 I collected this data using a database 522 00:23:30,840 --> 00:23:32,080 that's here in the picture. 523 00:23:32,260 --> 00:23:34,080 It contains a lot of bug bounty programs. 524 00:23:34,800 --> 00:23:37,000 And what I did next is to filter out 525 00:23:37,000 --> 00:23:39,060 all the repositories that are not using GitHub actions 526 00:23:39,540 --> 00:23:40,440 because it's not relevant. 527 00:23:40,720 --> 00:23:43,340 Then I cloned each repository to my computer, 528 00:23:43,960 --> 00:23:45,880 checked for the three initial attack vectors. 529 00:23:45,980 --> 00:23:47,400 If I found one that's possible, 530 00:23:47,560 --> 00:23:50,160 I added a red node inside the Neo4j graph, 531 00:23:50,160 --> 00:23:53,220 and then I collected metadata about the actions. 532 00:23:53,340 --> 00:23:54,120 So I collected... 533 00:23:54,120 --> 00:23:56,020 I passed the action YAML files 534 00:23:56,020 --> 00:23:58,140 and the workflow YAML files that we've seen earlier 535 00:23:58,140 --> 00:24:02,460 to find which actions this repository is depending on. 536 00:24:02,860 --> 00:24:05,420 And I collected this metadata about each action. 537 00:24:05,600 --> 00:24:07,760 You can see if the content write permissions 538 00:24:07,760 --> 00:24:09,040 is true or false 539 00:24:09,040 --> 00:24:12,080 according to the calculation of the different permissions 540 00:24:12,080 --> 00:24:13,840 and the override of the permissions 541 00:24:13,840 --> 00:24:14,920 inside the workflow file. 542 00:24:16,180 --> 00:24:17,900 We can see here the name of the action, 543 00:24:18,000 --> 00:24:19,040 which line it was used in, 544 00:24:19,040 --> 00:24:21,660 what secrets are accessible to it inside of the job. 545 00:24:21,760 --> 00:24:23,780 Here it's empty, but of course there are a lot of secrets 546 00:24:23,780 --> 00:24:25,120 that are accessible to a lot of actions. 547 00:24:26,240 --> 00:24:27,580 And next thing we do... 548 00:24:27,580 --> 00:24:30,580 Next thing I did was to go through this step for each action. 549 00:24:30,640 --> 00:24:32,240 So for each action dependency I find, 550 00:24:32,420 --> 00:24:35,100 I clone its repository, search for its dependencies, 551 00:24:35,260 --> 00:24:37,560 check for initial attack vectors, 552 00:24:37,640 --> 00:24:40,640 and for each dependency, this process goes on and on and on. 553 00:24:40,860 --> 00:24:42,860 And by using this process, 554 00:24:43,020 --> 00:24:45,040 we can create this beautiful graph. 555 00:24:45,180 --> 00:24:46,280 Now, this is a real case 556 00:24:47,020 --> 00:24:48,460 of a project that's vulnerable 557 00:24:49,500 --> 00:24:50,560 to this attack. 558 00:24:50,840 --> 00:24:53,240 Now, let's explain what we're seeing here. 559 00:24:53,400 --> 00:24:55,760 So at the bottom we see two red arrows 560 00:24:55,760 --> 00:24:57,620 that are pointing to two initial attack vectors. 561 00:24:58,020 --> 00:25:01,280 Now, those two repositories that it points to 562 00:25:01,280 --> 00:25:02,740 are actually the same repository 563 00:25:02,740 --> 00:25:04,580 which was moved from one name to another. 564 00:25:04,840 --> 00:25:06,060 So it has two references, 565 00:25:06,180 --> 00:25:07,620 but it's actually the same repository. 566 00:25:08,060 --> 00:25:10,560 Now, what this repository is, 567 00:25:10,640 --> 00:25:14,280 is a dependency of some other actions that are using it. 568 00:25:14,400 --> 00:25:16,380 And those other actions are a dependency 569 00:25:16,380 --> 00:25:18,460 of the target repositories 570 00:25:18,460 --> 00:25:19,840 that have started scanning. 571 00:25:20,220 --> 00:25:21,420 So in this picture, 572 00:25:21,480 --> 00:25:23,420 we can see that by attacking one repository 573 00:25:23,420 --> 00:25:24,580 and compromising it, 574 00:25:24,680 --> 00:25:28,380 we can compromise 18 intermediate actions, 575 00:25:28,460 --> 00:25:29,620 and by compromising them, 576 00:25:29,780 --> 00:25:32,820 we can compromise 72 of the target repositories 577 00:25:32,820 --> 00:25:34,300 I initially started scanning, 578 00:25:34,560 --> 00:25:35,680 which is super crazy, 579 00:25:35,840 --> 00:25:37,860 but still this is not the whole picture 580 00:25:37,860 --> 00:25:40,260 and the impact and scale of this attack. 581 00:25:41,160 --> 00:25:43,580 Sadly, I cannot disclose the exact names 582 00:25:43,580 --> 00:25:45,600 of those repositories. 583 00:25:45,700 --> 00:25:47,660 I can tell you that the target repositories 584 00:25:47,660 --> 00:25:48,340 that you see here 585 00:25:48,340 --> 00:25:50,600 are target repositories of huge companies, 586 00:25:50,860 --> 00:25:51,920 names that all of you know, 587 00:25:52,540 --> 00:25:55,260 and I'll show you some real examples 588 00:25:55,260 --> 00:25:57,180 which I can disclose 589 00:25:57,180 --> 00:26:01,800 to describe the real impact and scale of this attack. 590 00:26:02,020 --> 00:26:03,300 So here's a real example 591 00:26:03,300 --> 00:26:05,080 that I can show all the participants 592 00:26:05,080 --> 00:26:06,360 in this attack graph. 593 00:26:06,600 --> 00:26:09,120 So what we're seeing here on the bottom left side, 594 00:26:09,260 --> 00:26:10,640 you can see the Hangfire repository, 595 00:26:10,940 --> 00:26:12,280 which is a popular open source 596 00:26:12,280 --> 00:26:15,180 about 8K stars on GitHub, 597 00:26:15,740 --> 00:26:17,240 and it uses two actions, 598 00:26:17,660 --> 00:26:20,040 which you can see in the orange nodes. 599 00:26:20,300 --> 00:26:23,180 Those two actions come from two repositories, 600 00:26:23,300 --> 00:26:25,360 the Veracode repository at the top 601 00:26:25,360 --> 00:26:27,800 and the PayPlotter repository at the bottom. 602 00:26:28,080 --> 00:26:29,300 Now, the PayPlotter repository 603 00:26:29,300 --> 00:26:31,160 has a red node connected to it, 604 00:26:31,240 --> 00:26:32,540 which says Reprojecting, 605 00:26:32,540 --> 00:26:34,620 meaning this repository is reprojectable. 606 00:26:35,160 --> 00:26:38,380 Now, next thing I did was to register the organization. 607 00:26:38,860 --> 00:26:40,960 I am the owner of the PayPlotter organization, 608 00:26:41,280 --> 00:26:43,720 and as you can see here in my screenshot, 609 00:26:43,900 --> 00:26:46,040 I can register the ActionZip repository. 610 00:26:46,040 --> 00:26:49,620 Now, I didn't do that in order to not break anyone's pipeline 611 00:26:49,620 --> 00:26:52,040 or execute malicious code on innocent people, 612 00:26:52,720 --> 00:26:53,840 but it's possible. 613 00:26:54,040 --> 00:26:55,040 I still own this organization. 614 00:26:56,620 --> 00:26:58,440 And I, of course, reported this issue 615 00:26:58,440 --> 00:27:01,860 to the other repositories that are depending on it, 616 00:27:01,860 --> 00:27:02,460 and they fixed it. 617 00:27:02,840 --> 00:27:04,980 But let's see how their workflows looked like. 618 00:27:05,200 --> 00:27:06,940 So this is the Veracode repository, 619 00:27:07,300 --> 00:27:08,220 the Veracode workflow. 620 00:27:08,540 --> 00:27:09,980 You can see it's using the PayPlotter, 621 00:27:10,060 --> 00:27:12,540 the action that I'm able to reproject. 622 00:27:13,800 --> 00:27:16,020 And you can see here the Hangfire repository. 623 00:27:16,040 --> 00:27:19,200 We chose the PayPlotter and the Veracode repository. 624 00:27:19,680 --> 00:27:20,980 So, and also in the middle, 625 00:27:21,020 --> 00:27:22,640 you can see some secrets that it uses 626 00:27:22,640 --> 00:27:25,540 that, of course, this worm can potentially access. 627 00:27:25,860 --> 00:27:29,040 So this means that in order to attack these Hangfire repositories, 628 00:27:29,180 --> 00:27:30,100 we have two paths. 629 00:27:30,340 --> 00:27:32,460 We can directly attack it using the ActionZip 630 00:27:32,460 --> 00:27:33,780 reprojectable repository. 631 00:27:34,160 --> 00:27:36,840 We can also reproject the ActionZip repository, 632 00:27:37,220 --> 00:27:38,760 infect the Veracode repository, 633 00:27:39,120 --> 00:27:41,480 and through that, infect the Hangfire repository. 634 00:27:41,840 --> 00:27:44,180 Now, this looks simple, right? 635 00:27:44,300 --> 00:27:45,460 This is the same diagram. 636 00:27:45,460 --> 00:27:46,920 We see the same repositories. 637 00:27:47,080 --> 00:27:49,140 So, okay, we reproject this one repository. 638 00:27:49,240 --> 00:27:50,780 We get to two other repositories. 639 00:27:51,000 --> 00:27:51,960 Sound boring, right? 640 00:27:52,220 --> 00:27:55,540 But you can see because there is a lot of empty space on the slide 641 00:27:55,540 --> 00:27:57,440 that there's actually much more to that. 642 00:27:59,380 --> 00:28:00,860 So let's say we do this attack. 643 00:28:00,980 --> 00:28:02,800 We reproject the ActionZip repository, 644 00:28:03,360 --> 00:28:06,300 and we by that infect the Veracode and the Target repository. 645 00:28:06,760 --> 00:28:08,140 But this is not the whole story. 646 00:28:08,700 --> 00:28:11,260 The Veracode repository is an action by itself 647 00:28:11,260 --> 00:28:13,580 which has 1.6k dependents 648 00:28:13,580 --> 00:28:15,160 which we can also infect them. 649 00:28:15,460 --> 00:28:17,800 And these dependents probably have more dependents 650 00:28:17,800 --> 00:28:18,980 and more dependents and so on. 651 00:28:19,140 --> 00:28:20,280 So that's it. 652 00:28:20,440 --> 00:28:24,320 And the ActionZip repository also have about 600 dependents 653 00:28:24,320 --> 00:28:26,560 which probably have maybe their own dependents. 654 00:28:26,760 --> 00:28:29,980 So we can see this looks like, okay, 655 00:28:30,060 --> 00:28:31,420 that's a lot of repositories. 656 00:28:31,440 --> 00:28:32,640 Instead of attacking like three, 657 00:28:32,700 --> 00:28:34,720 I can now attack like 2,000 repositories. 658 00:28:34,960 --> 00:28:35,880 Yeah, it's nice, 659 00:28:35,920 --> 00:28:37,680 but still there's a lot of empty space on the slide. 660 00:28:38,360 --> 00:28:41,260 The Hangfire repository actually creates a NuGet package 661 00:28:41,260 --> 00:28:44,720 which has 9.4k daily downloads, 662 00:28:44,720 --> 00:28:45,500 which is nice. 663 00:28:45,680 --> 00:28:49,000 So we can also compromise all the 9.4k daily downloads 664 00:28:49,000 --> 00:28:50,040 of the NuGet package. 665 00:28:50,740 --> 00:28:52,740 But this is still not the full picture. 666 00:28:52,900 --> 00:28:54,700 Now, this is only public information. 667 00:28:54,940 --> 00:28:57,320 Those are only public repositories that we've seen. 668 00:28:57,560 --> 00:29:00,100 What about all the private repositories? 669 00:29:00,240 --> 00:29:02,380 There are probably a lot more private repositories 670 00:29:02,380 --> 00:29:04,200 that are dependent on this action. 671 00:29:04,460 --> 00:29:05,900 And by infecting them, 672 00:29:06,020 --> 00:29:09,160 we can also propagate inside private organizations. 673 00:29:09,620 --> 00:29:12,400 Now, let's say even if we don't have right permissions 674 00:29:12,400 --> 00:29:13,320 for the GitHub token, 675 00:29:13,320 --> 00:29:16,980 actually running the worm inside those private repositories, 676 00:29:17,140 --> 00:29:19,140 they give us read permission, 677 00:29:19,300 --> 00:29:21,240 which you can use to exfiltrate source code 678 00:29:21,240 --> 00:29:23,760 of a lot of companies, potentially organizations. 679 00:29:24,600 --> 00:29:26,340 So you can say now, okay, 680 00:29:26,460 --> 00:29:28,260 so this is really cool, real crazy, 681 00:29:28,400 --> 00:29:30,280 huge impact of the attack, right? 682 00:29:30,380 --> 00:29:31,260 But that's not it. 683 00:29:31,320 --> 00:29:33,900 That's just one scenario, one attack path. 684 00:29:34,220 --> 00:29:35,740 I found a lot of those. 685 00:29:36,320 --> 00:29:39,900 And this is actually the real impact of the attack. 686 00:29:40,280 --> 00:29:42,020 Woo! Woo! 687 00:29:42,020 --> 00:29:43,100 Nice, yeah. 688 00:29:43,980 --> 00:29:44,940 Let's see some energies. 689 00:29:46,840 --> 00:29:50,300 Now we finally have all the different puzzle pieces combined. 690 00:29:50,620 --> 00:29:53,860 And the next thing we can do is some PowerPoint magic. 691 00:29:55,200 --> 00:29:57,940 And let me introduce you the dendro worm. 692 00:29:58,400 --> 00:30:02,380 The word dendro comes out of the word dendrology, 693 00:30:02,380 --> 00:30:04,100 which is the science and study of woody plants. 694 00:30:04,320 --> 00:30:06,520 This is how I called my pet worm. 695 00:30:06,780 --> 00:30:10,100 And let's see how the demo actually looks like. 696 00:30:10,100 --> 00:30:12,560 So in the demo, we'll see this environment. 697 00:30:12,940 --> 00:30:15,740 In this environment, we have the target repository on the left, 698 00:30:15,800 --> 00:30:19,060 which uses a GitHub Actions CACD workflow 699 00:30:19,060 --> 00:30:24,140 that uses the random action using a V1 tag annotation. 700 00:30:25,320 --> 00:30:28,400 The random action also uses GitHub Actions, 701 00:30:28,460 --> 00:30:30,200 and it uses the main branch annotation 702 00:30:30,200 --> 00:30:32,780 of the RevDate action in its workflow. 703 00:30:33,140 --> 00:30:35,700 The RevDate action is a composite action 704 00:30:35,700 --> 00:30:38,300 which uses directly the Rev action. 705 00:30:38,680 --> 00:30:39,940 Now, as an attacker, 706 00:30:40,100 --> 00:30:43,080 what we'll do is we'll start with right access 707 00:30:43,080 --> 00:30:44,700 to the repository on the right. 708 00:30:44,800 --> 00:30:47,280 We'll infect it with malicious code of the worm, 709 00:30:47,400 --> 00:30:50,080 and then it will automatically, of course, 710 00:30:50,120 --> 00:30:51,980 infect the composite action 711 00:30:51,980 --> 00:30:54,660 because it uses it as part of its logic. 712 00:30:55,420 --> 00:30:57,300 And then we'll see what happens 713 00:30:57,300 --> 00:30:59,400 when a maintainer of the random action 714 00:31:00,320 --> 00:31:03,500 creates a push to the main branch of its repository, 715 00:31:03,620 --> 00:31:05,440 which will trigger the workflow. 716 00:31:05,800 --> 00:31:07,380 When the workflow is being triggered 717 00:31:07,380 --> 00:31:08,800 by running the compromised action, 718 00:31:10,100 --> 00:31:11,620 the worm will infect the repository 719 00:31:11,620 --> 00:31:13,680 by overriding an existing tag, 720 00:31:13,840 --> 00:31:16,400 which this tag is being used by the target repository. 721 00:31:16,600 --> 00:31:19,940 So when the target repository workflow is being ran, 722 00:31:20,380 --> 00:31:22,620 it will actually execute the model itself, 723 00:31:22,920 --> 00:31:25,380 and then it will be able to steal secrets. 724 00:31:26,280 --> 00:31:28,420 Now, let's see the demo itself. 725 00:31:32,100 --> 00:31:33,800 Let's do duplicate. 726 00:31:40,100 --> 00:31:40,300 Okay, nice. 727 00:31:40,940 --> 00:31:42,540 Okay, you can see here in the bottom, 728 00:31:42,620 --> 00:31:44,280 there's the same graph that I've shown you. 729 00:31:44,400 --> 00:31:48,980 It's dynamic, so it will evolve during the demo. 730 00:31:49,160 --> 00:31:50,020 On the right side, 731 00:31:50,060 --> 00:31:51,360 you can see the terminal of the server, 732 00:31:51,480 --> 00:31:53,540 and on the left side, the repositories. 733 00:31:54,240 --> 00:31:56,240 Now, we'll start with the first repository. 734 00:31:57,360 --> 00:31:59,900 Here it's an ActionML file, 735 00:32:00,080 --> 00:32:02,000 and we're infecting it with malicious code, 736 00:32:02,200 --> 00:32:03,180 some Zoom magic, 737 00:32:03,440 --> 00:32:07,080 and we see that we're downloading a malware from the server 738 00:32:07,080 --> 00:32:09,640 and installing it as a Python package, 739 00:32:09,640 --> 00:32:10,660 and executing it. 740 00:32:10,820 --> 00:32:12,840 Now, I did it using Python just as a PLC, 741 00:32:13,000 --> 00:32:15,400 but this, of course, can be done much more stealthy. 742 00:32:16,340 --> 00:32:18,780 And now we commit the changes to the repository, 743 00:32:19,500 --> 00:32:21,520 and we go to the second repository. 744 00:32:21,800 --> 00:32:22,740 Now, the second repository, 745 00:32:22,820 --> 00:32:25,460 we can see it uses the first repository 746 00:32:25,460 --> 00:32:28,140 as part of its composite ActionML file, 747 00:32:28,360 --> 00:32:31,000 which means this repository is automatically compromised, 748 00:32:31,300 --> 00:32:32,800 because next time it will run, 749 00:32:32,860 --> 00:32:35,680 it will run the malicious action we've just infected. 750 00:32:36,940 --> 00:32:39,620 Next thing we see is the third repository, 751 00:32:39,640 --> 00:32:39,940 which is the CICD action. 752 00:32:40,400 --> 00:32:43,220 Here you can see it just generates a random number, 753 00:32:43,340 --> 00:32:44,460 which does nothing, 754 00:32:44,640 --> 00:32:46,700 and it has a CICD workflow. 755 00:32:47,040 --> 00:32:49,520 Now, this workflow uses the second action 756 00:32:49,520 --> 00:32:51,260 as part of its logic. 757 00:32:51,520 --> 00:32:52,280 You can see here, 758 00:32:52,440 --> 00:32:54,300 so it's using the main branch, 759 00:32:54,460 --> 00:32:59,000 which is infected because of the composite action. 760 00:32:59,980 --> 00:33:01,520 And another thing we can see, 761 00:33:01,600 --> 00:33:04,280 this repository has a V1 tag that was created yesterday, 762 00:33:04,460 --> 00:33:06,200 which we'll override soon. 763 00:33:06,460 --> 00:33:08,800 Now, here we can see the maintainer 764 00:33:08,800 --> 00:33:10,520 pushes new code to the main branch, 765 00:33:10,640 --> 00:33:11,460 which you'll see here, 766 00:33:11,520 --> 00:33:14,640 it's protected using branch protection rules. 767 00:33:14,900 --> 00:33:16,680 This is why the override is needed. 768 00:33:17,840 --> 00:33:21,260 And this push triggers the workflow we've just seen. 769 00:33:21,840 --> 00:33:24,280 And you'll be able to see in a few seconds, 770 00:33:24,320 --> 00:33:26,320 on the right, the worm being executed. 771 00:33:26,860 --> 00:33:28,380 Here you can see it's being downloaded, 772 00:33:28,580 --> 00:33:30,040 executed on the left. 773 00:33:31,340 --> 00:33:32,540 And in a few seconds, 774 00:33:32,600 --> 00:33:33,680 we'll see the actual infection. 775 00:33:35,060 --> 00:33:38,200 And you can see that it didn't successfully infect it 776 00:33:38,200 --> 00:33:38,720 using a push. 777 00:33:38,800 --> 00:33:40,920 But it successfully infected it 778 00:33:40,920 --> 00:33:42,580 using override of the tag itself. 779 00:33:42,840 --> 00:33:45,880 And also, it printed out all the secrets that are available, 780 00:33:46,080 --> 00:33:47,700 which is only the GitHub action token. 781 00:33:48,780 --> 00:33:53,740 And we can see now the tag that was overwritten just now. 782 00:33:53,940 --> 00:33:55,800 Here is the new malicious code, 783 00:33:55,940 --> 00:33:59,060 same code like the infection we did at the start. 784 00:33:59,680 --> 00:34:01,380 And now we're seeing the target repository, 785 00:34:01,780 --> 00:34:03,320 which also has HCI, 786 00:34:03,500 --> 00:34:06,540 which uses the action that just got infected 787 00:34:06,540 --> 00:34:08,100 using the V1 tag 788 00:34:08,100 --> 00:34:12,600 that was just got also infected. 789 00:34:12,880 --> 00:34:14,820 And it's also using the very secret, 790 00:34:14,920 --> 00:34:16,520 secret, very cool name. 791 00:34:16,740 --> 00:34:19,120 And what we see here next 792 00:34:19,120 --> 00:34:21,040 is the maintainer of the repository 793 00:34:21,680 --> 00:34:23,340 pushing code to the main branch, 794 00:34:24,540 --> 00:34:26,520 like everything as usual, business as usual. 795 00:34:26,760 --> 00:34:29,160 And it will trigger the workflow 796 00:34:30,780 --> 00:34:31,820 that we've just seen. 797 00:34:33,400 --> 00:34:34,580 And same thing happens. 798 00:34:34,660 --> 00:34:36,100 We'll see the malware being downloaded. 799 00:34:39,100 --> 00:34:40,800 And executed and installed. 800 00:34:45,060 --> 00:34:47,580 And you can see here that it successfully 801 00:34:48,340 --> 00:34:49,800 exfiltrated the secrets from inside. 802 00:34:50,140 --> 00:34:52,020 You can see it failed to infect the action, 803 00:34:52,140 --> 00:34:53,620 the workflow, the repository, 804 00:34:53,720 --> 00:34:55,200 because it's not an actual repository, 805 00:34:55,400 --> 00:34:57,280 but it did actually infect the secret. 806 00:34:58,160 --> 00:34:59,100 Still a secret. 807 00:35:00,900 --> 00:35:01,420 Woo! 808 00:35:02,120 --> 00:35:02,880 Thank you. 809 00:35:04,500 --> 00:35:05,660 Okay, let's continue. 810 00:35:14,620 --> 00:35:15,100 Okay. 811 00:35:16,020 --> 00:35:18,560 So we've just seen the demo of the actual malware. 812 00:35:18,820 --> 00:35:20,980 And we have a bit of time, 813 00:35:21,040 --> 00:35:22,780 so I'll show you more interesting stuff 814 00:35:22,780 --> 00:35:24,360 I found out during this research. 815 00:35:24,680 --> 00:35:26,960 So turns out there are a lot of repositories 816 00:35:26,960 --> 00:35:27,940 that are directly vulnerable 817 00:35:27,940 --> 00:35:29,640 to the three initial attack vectors 818 00:35:29,640 --> 00:35:31,080 I've shown you at the beginning. 819 00:35:31,340 --> 00:35:35,820 I found 175 repositories directly vulnerable 820 00:35:35,820 --> 00:35:37,160 to those three attacks, 821 00:35:37,160 --> 00:35:39,620 using 192 different ways. 822 00:35:39,900 --> 00:35:41,520 So some of the repositories 823 00:35:41,520 --> 00:35:44,600 had multiple command injections available on them, 824 00:35:44,740 --> 00:35:47,980 multiple NPM email hijacking of packages they're using. 825 00:35:48,400 --> 00:35:50,440 And those projects are actually projects 826 00:35:50,440 --> 00:35:53,540 of really known organizations. 827 00:35:54,180 --> 00:35:55,700 You can see the coolest one is 828 00:35:55,700 --> 00:35:57,180 I found a command injection in Angular, 829 00:35:57,440 --> 00:35:58,240 which is crazy. 830 00:35:58,340 --> 00:36:00,040 Probably everyone here is using Angular 831 00:36:00,040 --> 00:36:01,640 in some sort of a way, 832 00:36:01,660 --> 00:36:02,360 maybe as a user, 833 00:36:02,960 --> 00:36:03,840 maybe as a developer. 834 00:36:04,260 --> 00:36:07,140 Also, I found some command injection 835 00:36:07,140 --> 00:36:09,160 in a popular open source you can see here, 836 00:36:09,240 --> 00:36:10,980 the Astro open source, Canva. 837 00:36:11,240 --> 00:36:14,460 And in the last bullet you can see 838 00:36:14,460 --> 00:36:16,580 I hijacked one email domain 839 00:36:16,580 --> 00:36:18,600 of a company that's called Plotly. 840 00:36:19,140 --> 00:36:20,880 And of course I reported it to them, 841 00:36:20,980 --> 00:36:21,800 but by hijacking, 842 00:36:21,860 --> 00:36:24,360 by possibly hijacking that one domain, 843 00:36:24,520 --> 00:36:27,140 I could compromise 67 repositories 844 00:36:27,900 --> 00:36:29,700 that were maintained by this one user 845 00:36:30,200 --> 00:36:31,760 that belonged to this company. 846 00:36:31,900 --> 00:36:34,200 Now this user actually had like 90 repositories, 847 00:36:34,740 --> 00:36:37,080 but only 60 of them belonged to the company. 848 00:36:37,080 --> 00:36:41,080 So technically I was able to compromise 90 repositories 849 00:36:41,080 --> 00:36:42,940 by actually buying a single domain 850 00:36:42,940 --> 00:36:44,700 of a single user that forgot 851 00:36:44,700 --> 00:36:47,480 to renew its email domain. 852 00:36:47,960 --> 00:36:50,820 And now that we're nearing the end, 853 00:36:50,940 --> 00:36:53,920 let's talk about how actually 854 00:36:53,920 --> 00:36:56,320 you can protect yourself from this attack. 855 00:36:56,620 --> 00:36:58,820 So the first and most important thing you can do, 856 00:36:58,860 --> 00:37:00,980 it's ordered by most effective stuff 857 00:37:00,980 --> 00:37:02,180 to the less effective stuff. 858 00:37:02,340 --> 00:37:04,360 So you can set the GitHub token 859 00:37:04,360 --> 00:37:06,380 and any personal access token 860 00:37:06,380 --> 00:37:07,840 being used inside workflow 861 00:37:08,620 --> 00:37:10,260 to minimal permissions. 862 00:37:10,860 --> 00:37:12,300 Basically the content permission 863 00:37:12,300 --> 00:37:14,400 is the permission that's used to push codes. 864 00:37:14,600 --> 00:37:16,620 So if you don't need to push code to the repository, 865 00:37:16,940 --> 00:37:17,920 set it to read. 866 00:37:18,440 --> 00:37:20,520 You can also configure branch protection rules 867 00:37:20,520 --> 00:37:24,100 to prevent pushes to used branches 868 00:37:24,100 --> 00:37:25,900 and use protected tags, 869 00:37:26,500 --> 00:37:28,820 which is a less known feature of GitHub. 870 00:37:29,440 --> 00:37:31,680 Also you can limit outbound connections 871 00:37:31,680 --> 00:37:34,640 from runners to prevent downloading of malware, 872 00:37:34,840 --> 00:37:36,200 like in this example. 873 00:37:36,380 --> 00:37:38,120 Now of course the worm itself 874 00:37:38,120 --> 00:37:40,920 can contain its own code inside its own code 875 00:37:40,920 --> 00:37:42,840 without accessing the internet 876 00:37:42,840 --> 00:37:44,060 and still infect stuff, 877 00:37:44,200 --> 00:37:47,040 but it makes lives of attackers much harder. 878 00:37:47,740 --> 00:37:50,080 You can also pin actions by using a hash, 879 00:37:50,140 --> 00:37:52,320 which also makes it a bit difficult 880 00:37:52,320 --> 00:37:54,940 for attackers to perform this attack. 881 00:37:55,160 --> 00:37:57,540 It's still not sealed tight. 882 00:37:58,340 --> 00:38:01,260 And you can also use this project 883 00:38:01,260 --> 00:38:04,240 that was released by GitHub not too long ago, 884 00:38:04,320 --> 00:38:05,920 which helps you to reduce permissions 885 00:38:06,380 --> 00:38:07,340 for your workflows. 886 00:38:08,600 --> 00:38:10,540 That was the GitHub Actions worm, 887 00:38:10,740 --> 00:38:12,240 and thank you everybody for coming. 888 00:38:17,920 --> 00:38:20,420 I think if we have some time for questions. 889 00:38:22,640 --> 00:38:23,720 Do you have a mic? 890 00:38:23,980 --> 00:38:24,500 Yes. 891 00:38:35,340 --> 00:38:37,000 Okay, so we asked, 892 00:38:37,140 --> 00:38:38,780 how can I pass branch protection rules 893 00:38:39,520 --> 00:38:40,760 to override a tag? 894 00:38:40,980 --> 00:38:42,760 So branch protection rules don't affect tags. 895 00:38:43,200 --> 00:38:44,360 So even if you have branch, 896 00:38:44,480 --> 00:38:46,620 you need to use protected tags. 897 00:38:46,740 --> 00:38:47,680 It's a different feature. 898 00:38:48,320 --> 00:38:49,320 More questions? Yes. 899 00:38:56,220 --> 00:38:57,700 Can you say again a bit louder? 900 00:38:57,860 --> 00:38:58,820 I can barely hear you. 901 00:39:02,820 --> 00:39:03,780 Ah, yeah. 902 00:39:04,960 --> 00:39:05,660 Yeah, okay. 903 00:39:05,720 --> 00:39:06,740 So the companies have showed, 904 00:39:06,940 --> 00:39:08,560 that have reported this issue to, 905 00:39:08,680 --> 00:39:09,680 they fixed their workflows, 906 00:39:09,840 --> 00:39:12,600 they removed vulnerable actions, 907 00:39:14,180 --> 00:39:15,140 which makes them, 908 00:39:16,460 --> 00:39:19,880 which basically mitigates this issue. 909 00:39:21,480 --> 00:39:24,400 Most of the companies that had more like, 910 00:39:24,400 --> 00:39:25,760 complicated graphs, 911 00:39:26,180 --> 00:39:28,540 like you had to compromise a dependency of a dependency, 912 00:39:28,640 --> 00:39:30,620 they didn't consider it as an issue, 913 00:39:31,020 --> 00:39:32,100 because it's dependencies, 914 00:39:32,300 --> 00:39:34,000 and like in bug bounties, 915 00:39:34,020 --> 00:39:36,380 or generally in vulnerability disclosure programs, 916 00:39:36,640 --> 00:39:38,560 they consider it out of scope, 917 00:39:38,680 --> 00:39:39,240 or not relevant, 918 00:39:39,440 --> 00:39:41,600 but yeah, 919 00:39:41,700 --> 00:39:43,260 it's still possible to attack them this way. 920 00:39:45,260 --> 00:39:46,120 More questions? 921 00:39:48,800 --> 00:39:49,320 Yes. 922 00:39:57,280 --> 00:39:59,400 Okay, so if I come around any malicious action, 923 00:39:59,480 --> 00:40:00,340 being used in the wild, 924 00:40:00,460 --> 00:40:01,740 actually didn't see anything. 925 00:40:01,960 --> 00:40:02,780 I didn't look for them, 926 00:40:02,860 --> 00:40:04,700 so that's maybe the reason. 927 00:40:04,840 --> 00:40:06,360 But there are malicious actions, 928 00:40:06,480 --> 00:40:08,220 like probably around there. 929 00:40:08,480 --> 00:40:10,340 Not doing this stuff probably, 930 00:40:10,500 --> 00:40:11,740 but maybe other stuff, yeah. 931 00:40:12,900 --> 00:40:13,620 More questions? 932 00:40:13,880 --> 00:40:14,620 More questions? 933 00:40:18,200 --> 00:40:19,120 Okay, thank you.