1 00:00:00,280 --> 00:00:02,639 so next up we have two speakers uh Carl 2 00:00:02,639 --> 00:00:05,600 fawson and Thomas Ellen Carl's the VP of 3 00:00:05,600 --> 00:00:08,639 research at net spy not netp by the way 4 00:00:08,639 --> 00:00:11,639 net spy Thomas and Thomas alling is the 5 00:00:11,639 --> 00:00:13,320 director of cloud pentesting is a 6 00:00:13,320 --> 00:00:16,239 security researcher at net spy um they 7 00:00:16,239 --> 00:00:17,680 focus on web application and Cloud 8 00:00:17,680 --> 00:00:19,960 security testing uh in this talk they're 9 00:00:19,960 --> 00:00:21,279 going to be discussing how the Azure 10 00:00:21,279 --> 00:00:23,599 function app service is utilized by 11 00:00:23,599 --> 00:00:24,920 Azure customers and some of the 12 00:00:24,920 --> 00:00:26,679 architecture design flaws there that can 13 00:00:26,679 --> 00:00:29,160 lead to approv escalation scenarios 14 00:00:29,160 --> 00:00:31,960 please give a warm welcome 15 00:00:35,760 --> 00:00:38,440 all right thank you for waiting in line 16 00:00:38,440 --> 00:00:40,879 today and uh taking the time to be here 17 00:00:40,879 --> 00:00:43,280 for the talk just kind of quick rundown 18 00:00:43,280 --> 00:00:44,399 of who we are that was a great 19 00:00:44,399 --> 00:00:46,719 introduction here uh just other thing to 20 00:00:46,719 --> 00:00:51,000 note here uh gosh 2021 I helped 21 00:00:51,000 --> 00:00:53,160 co-author the pentesting Azure for 22 00:00:53,160 --> 00:00:55,760 ethical hackers book with David oote 23 00:00:55,760 --> 00:00:57,920 Thomas was our technical editor or one 24 00:00:57,920 --> 00:00:59,719 of our technical editors on that and 25 00:00:59,719 --> 00:01:01,800 made made the book what it is so thanks 26 00:01:01,800 --> 00:01:04,239 to him for that additionally uh at net 27 00:01:04,239 --> 00:01:05,600 spy here we are going to be talking 28 00:01:05,600 --> 00:01:07,840 about some microburst tools a little bit 29 00:01:07,840 --> 00:01:09,200 uh but one of the tools that we created 30 00:01:09,200 --> 00:01:11,960 at netspy is microburst Thomas and I 31 00:01:11,960 --> 00:01:13,720 have both done a lot of work in that 32 00:01:13,720 --> 00:01:16,000 space and yeah we're Cloud researchers 33 00:01:16,000 --> 00:01:17,439 that work at net 34 00:01:17,439 --> 00:01:20,960 spy so uh before we get into the actual 35 00:01:20,960 --> 00:01:22,200 research that we're going to present 36 00:01:22,200 --> 00:01:23,759 here all of our research is kind of 37 00:01:23,759 --> 00:01:25,840 built off of the work of others like any 38 00:01:25,840 --> 00:01:27,720 other security researcher research 39 00:01:27,720 --> 00:01:30,600 that's out there so please take fees of 40 00:01:30,600 --> 00:01:32,399 this we'll put the slides out after the 41 00:01:32,399 --> 00:01:35,280 talk here but go read their research cuz 42 00:01:35,280 --> 00:01:36,840 like I said all of the stuff we're 43 00:01:36,840 --> 00:01:38,479 talking about today is really built off 44 00:01:38,479 --> 00:01:40,240 of the prior research from a lot of 45 00:01:40,240 --> 00:01:42,560 these folks uh some big ones here 46 00:01:42,560 --> 00:01:44,680 storage account abuse for the kind of 47 00:01:44,680 --> 00:01:46,479 top three items here we're going to be 48 00:01:46,479 --> 00:01:49,000 talking about that in Thomas's section 49 00:01:49,000 --> 00:01:50,799 MSR he's got some best practice 50 00:01:50,799 --> 00:01:52,439 recommendations and we got some kind of 51 00:01:52,439 --> 00:01:54,560 work around stuff for that and then the 52 00:01:54,560 --> 00:01:56,439 last couple here is really what you can 53 00:01:56,439 --> 00:01:58,360 do once you get access to an Azure 54 00:01:58,360 --> 00:02:00,719 function app key and using that and 55 00:02:00,719 --> 00:02:02,439 getting access to managed identities 56 00:02:02,439 --> 00:02:03,680 those kind of 57 00:02:03,680 --> 00:02:06,360 things so before we get into function 58 00:02:06,360 --> 00:02:09,160 apps themselves app Services is the 59 00:02:09,160 --> 00:02:11,879 underlying Azure resource type that 60 00:02:11,879 --> 00:02:13,920 function apps are built on so quick 61 00:02:13,920 --> 00:02:16,200 primer on app Services it is your 62 00:02:16,200 --> 00:02:18,599 serverless application hosting service 63 00:02:18,599 --> 00:02:21,760 within Azure uh it's pretty simply or 64 00:02:21,760 --> 00:02:24,200 apply named it's application Services 65 00:02:24,200 --> 00:02:26,680 app Services it's all Container based 66 00:02:26,680 --> 00:02:29,280 and really easy to host web applications 67 00:02:29,280 --> 00:02:31,160 through if if you want to throw up a 68 00:02:31,160 --> 00:02:33,599 really simple website app Services is 69 00:02:33,599 --> 00:02:36,400 the way to go the URL structure is 70 00:02:36,400 --> 00:02:38,480 pretty simple here you've just got appn 71 00:02:38,480 --> 00:02:41,920 name. azurewebsites.net handles custom 72 00:02:41,920 --> 00:02:44,280 domains as well uh this also makes it a 73 00:02:44,280 --> 00:02:47,560 prime target for uh subdomain takeovers 74 00:02:47,560 --> 00:02:49,200 if you're doing external Recon bug 75 00:02:49,200 --> 00:02:51,480 Bounty anything like that and you find 76 00:02:51,480 --> 00:02:54,239 DNS records pointing to Azure websites. 77 00:02:54,239 --> 00:02:56,400 net just do a quick check to see if that 78 00:02:56,400 --> 00:02:58,440 actually resolves anything cuz if that 79 00:02:58,440 --> 00:03:00,040 doesn't resolved anything you you can 80 00:03:00,040 --> 00:03:02,640 fire up an app Services application take 81 00:03:02,640 --> 00:03:05,959 over that subdomain pretty handy the app 82 00:03:05,959 --> 00:03:09,040 Services uh resources support integrated 83 00:03:09,040 --> 00:03:11,200 authentication be it Azure active 84 00:03:11,200 --> 00:03:14,319 directory soon to be entra ID Apple 85 00:03:14,319 --> 00:03:15,920 Facebook Google any of the other oth 86 00:03:15,920 --> 00:03:17,560 providers that are out there if you 87 00:03:17,560 --> 00:03:19,959 missed it a few months ago whiz put out 88 00:03:19,959 --> 00:03:22,519 the bing bang vulnerability which 89 00:03:22,519 --> 00:03:24,120 relates to these authentication 90 00:03:24,120 --> 00:03:27,239 providers namely Microsoft had the 91 00:03:27,239 --> 00:03:29,080 Microsoft authentication provider that 92 00:03:29,080 --> 00:03:30,840 allowed pretty much anybody to sign into 93 00:03:30,840 --> 00:03:33,239 their tendency and then modify Bing 94 00:03:33,239 --> 00:03:35,239 search results so like the top results 95 00:03:35,239 --> 00:03:37,879 that came back really really cool bug so 96 00:03:37,879 --> 00:03:40,760 definitely check that out so with the 97 00:03:40,760 --> 00:03:42,640 management side of things for app 98 00:03:42,640 --> 00:03:44,439 Services you've got a Management console 99 00:03:44,439 --> 00:03:47,040 that's built into the Azure portal makes 100 00:03:47,040 --> 00:03:48,480 it really easy to go in and execute 101 00:03:48,480 --> 00:03:50,400 commands in those containers if you 102 00:03:50,400 --> 00:03:51,720 don't like that one there's a secondary 103 00:03:51,720 --> 00:03:53,439 one called kudu which does the exact 104 00:03:53,439 --> 00:03:55,760 same thing you can also get access or 105 00:03:55,760 --> 00:03:58,120 easy access to the app Services files 106 00:03:58,120 --> 00:04:00,519 there the service itself supports 107 00:04:00,519 --> 00:04:02,439 managed identities if people are not 108 00:04:02,439 --> 00:04:04,879 familiar with managed identities might 109 00:04:04,879 --> 00:04:06,480 be a little bit more familiar with kind 110 00:04:06,480 --> 00:04:10,319 of the uh same type of idea within AWS 111 00:04:10,319 --> 00:04:11,680 which would be passing a role to a 112 00:04:11,680 --> 00:04:14,840 service managed identities you're 113 00:04:14,840 --> 00:04:17,839 basically specifying a identity to tie 114 00:04:17,839 --> 00:04:19,720 to a resource or potentially multiple 115 00:04:19,720 --> 00:04:21,560 resources in the case of user assign 116 00:04:21,560 --> 00:04:23,880 managed identities then you apply 117 00:04:23,880 --> 00:04:26,360 permissions to that managed identity so 118 00:04:26,360 --> 00:04:28,080 we can add a managed identity give it 119 00:04:28,080 --> 00:04:30,000 access to a key VA give it access access 120 00:04:30,000 --> 00:04:32,720 to other Azure resources to do things 121 00:04:32,720 --> 00:04:35,240 within Azure or Azure active directory 122 00:04:35,240 --> 00:04:37,440 and that helps support the service to 123 00:04:37,440 --> 00:04:38,880 build things that you want to build so 124 00:04:38,880 --> 00:04:40,440 that's managed identities we're going to 125 00:04:40,440 --> 00:04:43,039 play around with those in a little bit 126 00:04:43,039 --> 00:04:45,440 this is also technically inclusive of 127 00:04:45,440 --> 00:04:47,720 function apps so to give you the quick 128 00:04:47,720 --> 00:04:49,560 primer on function apps this is the 129 00:04:49,560 --> 00:04:52,360 subset of app Services used for just 130 00:04:52,360 --> 00:04:55,120 specifically hosting apis if you look at 131 00:04:55,120 --> 00:04:57,080 our example URLs here we've got 132 00:04:57,080 --> 00:04:59,960 azurewebsites.net you also see the API 133 00:04:59,960 --> 00:05:02,639 HTP Trigger 1 this is how you know that 134 00:05:02,639 --> 00:05:03,840 it's a function app you're going to see 135 00:05:03,840 --> 00:05:07,280 the/ API and then the name of the API 136 00:05:07,280 --> 00:05:09,680 trigger in this case HTP trigger one 137 00:05:09,680 --> 00:05:11,479 that's one of the default names here 138 00:05:11,479 --> 00:05:12,880 that's a dead giveaway that it's 139 00:05:12,880 --> 00:05:14,400 function out now it's not to say 140 00:05:14,400 --> 00:05:15,800 somebody couldn't spin up an app 141 00:05:15,800 --> 00:05:18,199 Services application have a/ API 142 00:05:18,199 --> 00:05:20,600 endpoint and then yeah it kind of looks 143 00:05:20,600 --> 00:05:22,800 like a function app but either way 144 00:05:22,800 --> 00:05:24,280 that's what you can expect here in this 145 00:05:24,280 --> 00:05:27,800 case the function app is named netspy so 146 00:05:27,800 --> 00:05:30,039 we get that netspy subdomain for Azure 147 00:05:30,039 --> 00:05:32,199 websites than our trigger that you're 148 00:05:32,199 --> 00:05:34,000 actually going to send API request to 149 00:05:34,000 --> 00:05:37,280 HTP Trigger 1 really simple you can have 150 00:05:37,280 --> 00:05:40,199 either windows or linux-based containers 151 00:05:40,199 --> 00:05:42,520 to run your application code you've got 152 00:05:42,520 --> 00:05:44,000 a number of different programming 153 00:05:44,000 --> 00:05:46,120 languages you can make use of I 154 00:05:46,120 --> 00:05:47,759 primarily like the Powershell ones 155 00:05:47,759 --> 00:05:49,600 because I write everything in Powershell 156 00:05:49,600 --> 00:05:52,560 but you can use net node Java all sorts 157 00:05:52,560 --> 00:05:55,080 of stuff this also has the console and 158 00:05:55,080 --> 00:05:57,120 kudu interfaces so some of the attacks 159 00:05:57,120 --> 00:05:58,319 that we're going to talk about today you 160 00:05:58,319 --> 00:06:00,000 could technically replicate those 161 00:06:00,000 --> 00:06:01,520 through those you do have to have 162 00:06:01,520 --> 00:06:03,520 contributor level access to the resource 163 00:06:03,520 --> 00:06:06,639 in order to run those commands but you 164 00:06:06,639 --> 00:06:07,840 might want to make use of some of these 165 00:06:07,840 --> 00:06:10,800 attacks that way so keep that in mind uh 166 00:06:10,800 --> 00:06:12,039 last couple of things here it does 167 00:06:12,039 --> 00:06:13,520 support managed identities like we 168 00:06:13,520 --> 00:06:15,880 talked about with app services and you 169 00:06:15,880 --> 00:06:17,560 know just general practice if you want 170 00:06:17,560 --> 00:06:20,720 to spin up a really lightweight API 171 00:06:20,720 --> 00:06:21,880 let's say you don't want to use burp 172 00:06:21,880 --> 00:06:23,520 collaborator to catch some kind of 173 00:06:23,520 --> 00:06:25,680 service side request forgery coming back 174 00:06:25,680 --> 00:06:28,120 you can just set up an API URL right 175 00:06:28,120 --> 00:06:30,199 here in Azure to capture whatever data 176 00:06:30,199 --> 00:06:31,759 is coming back spit it out to your 177 00:06:31,759 --> 00:06:34,919 console log right here lot of the Azure 178 00:06:34,919 --> 00:06:36,840 IP space is going to be open for most 179 00:06:36,840 --> 00:06:38,479 things that you might be getting say 180 00:06:38,479 --> 00:06:40,440 service side request forgy for so it's 181 00:06:40,440 --> 00:06:42,160 actually really nice for handling call 182 00:06:42,160 --> 00:06:44,160 backs for stuff so something to keep in 183 00:06:44,160 --> 00:06:47,080 mind plus that code test just makes it 184 00:06:47,080 --> 00:06:49,880 so much easier to modify files and write 185 00:06:49,880 --> 00:06:51,440 things kind of on the fly directly in 186 00:06:51,440 --> 00:06:52,639 the 187 00:06:52,639 --> 00:06:55,199 portal so for authenticating two 188 00:06:55,199 --> 00:06:56,800 function apps you've got the management 189 00:06:56,800 --> 00:06:58,759 plane where we've got standard azure 190 00:06:58,759 --> 00:07:01,520 arbac you know contributor reader all of 191 00:07:01,520 --> 00:07:02,960 those kind of things that's how you 192 00:07:02,960 --> 00:07:05,960 manage the actual resource in terms of 193 00:07:05,960 --> 00:07:08,560 getting code access to the resource 194 00:07:08,560 --> 00:07:10,560 itself you've got the master key which 195 00:07:10,560 --> 00:07:12,360 gives you full control over the app 196 00:07:12,360 --> 00:07:13,800 that's all of the individual functions 197 00:07:13,800 --> 00:07:16,960 underneath it has full control over that 198 00:07:16,960 --> 00:07:19,360 Azure resource the default key that's 199 00:07:19,360 --> 00:07:21,879 tied to the function app allows you to 200 00:07:21,879 --> 00:07:24,120 execute any of the functions underneath 201 00:07:24,120 --> 00:07:26,240 the function app you've got your 202 00:07:26,240 --> 00:07:27,759 function app and the individual 203 00:07:27,759 --> 00:07:30,199 functions underneath that under those 204 00:07:30,199 --> 00:07:31,879 individual functions you have function 205 00:07:31,879 --> 00:07:34,879 level keys and those have the ability to 206 00:07:34,879 --> 00:07:36,039 execute your 207 00:07:36,039 --> 00:07:38,240 functions all the way down there you can 208 00:07:38,240 --> 00:07:40,879 also have Anonymous functions as well 209 00:07:40,879 --> 00:07:43,080 you just set in your function. Json 210 00:07:43,080 --> 00:07:45,639 Anonymous as your type and then anybody 211 00:07:45,639 --> 00:07:48,240 can call those apis if you do have 212 00:07:48,240 --> 00:07:49,960 integrated authentication like Azure 213 00:07:49,960 --> 00:07:51,840 active directory or requirements for 214 00:07:51,840 --> 00:07:53,479 that that is going to mess with the 215 00:07:53,479 --> 00:07:55,960 anonymous side of things uh so that can 216 00:07:55,960 --> 00:07:57,720 potentially throw off some of the 217 00:07:57,720 --> 00:07:58,800 attacks that we're going to talk about 218 00:07:58,800 --> 00:08:00,400 today 219 00:08:00,400 --> 00:08:02,199 but if you need to front that with 220 00:08:02,199 --> 00:08:03,599 existing authentication you could 221 00:08:03,599 --> 00:08:06,240 potentially do that and last part of 222 00:08:06,240 --> 00:08:08,319 this which we'll pivot over Thomas here 223 00:08:08,319 --> 00:08:10,960 is that the service function apps is 224 00:08:10,960 --> 00:08:12,960 supported by another Azure service 225 00:08:12,960 --> 00:08:15,680 called storage 226 00:08:16,159 --> 00:08:18,800 accounts all right thank you Carl so 227 00:08:18,800 --> 00:08:20,240 this is where things get a little bit 228 00:08:20,240 --> 00:08:23,879 weird um so when you are prompted or 229 00:08:23,879 --> 00:08:25,520 when you do create a function app you're 230 00:08:25,520 --> 00:08:27,440 usually prompted to create a storage 231 00:08:27,440 --> 00:08:29,479 account along with that function app and 232 00:08:29,479 --> 00:08:31,319 basically the whole role of that storage 233 00:08:31,319 --> 00:08:33,080 account is to kind of Provide support 234 00:08:33,080 --> 00:08:34,880 for the function app and really what 235 00:08:34,880 --> 00:08:37,519 we're interested in here is blob storage 236 00:08:37,519 --> 00:08:40,679 and Azure file shares so um cues and 237 00:08:40,679 --> 00:08:43,039 tables are also used to a certain degree 238 00:08:43,039 --> 00:08:45,080 um with certain uh trigger types but 239 00:08:45,080 --> 00:08:46,959 really we're really just going to look 240 00:08:46,959 --> 00:08:50,320 at container files and uh Azure F share 241 00:08:50,320 --> 00:08:53,080 files so in terms of those container 242 00:08:53,080 --> 00:08:55,519 files that's really just used for you 243 00:08:55,519 --> 00:08:57,600 know saving State web jobs data and 244 00:08:57,600 --> 00:08:59,399 things like that but the thing things 245 00:08:59,399 --> 00:09:00,720 that we're really going to be looking at 246 00:09:00,720 --> 00:09:03,000 here is application and function keys 247 00:09:03,000 --> 00:09:05,360 and those are stored in encrypted format 248 00:09:05,360 --> 00:09:07,600 in host. Json so if you take a look at 249 00:09:07,600 --> 00:09:09,560 the screenshot over there you'll see two 250 00:09:09,560 --> 00:09:12,120 containers Azure web jobs hosts and 251 00:09:12,120 --> 00:09:14,800 Azure web job Secrets Azure web job 252 00:09:14,800 --> 00:09:16,880 Secrets is where that host. Json file 253 00:09:16,880 --> 00:09:18,519 lives and that's what we we're really 254 00:09:18,519 --> 00:09:20,880 going to be getting into here and then 255 00:09:20,880 --> 00:09:22,839 the other thing that's interesting is 256 00:09:22,839 --> 00:09:25,000 file share files this is going to be 257 00:09:25,000 --> 00:09:26,800 your application code you know your 258 00:09:26,800 --> 00:09:28,839 source code for triggers log files and 259 00:09:28,839 --> 00:09:31,240 things like that and this is going to be 260 00:09:31,240 --> 00:09:33,160 primarily used by default in your 261 00:09:33,160 --> 00:09:34,920 consumption in your premium plans and 262 00:09:34,920 --> 00:09:37,279 there's you know options to change that 263 00:09:37,279 --> 00:09:38,720 um but that's really what we're going to 264 00:09:38,720 --> 00:09:40,519 be looking at so and again qes and 265 00:09:40,519 --> 00:09:42,800 tables but not really what we're focused 266 00:09:42,800 --> 00:09:44,160 on 267 00:09:44,160 --> 00:09:47,000 here so that brings us to key decryption 268 00:09:47,000 --> 00:09:48,000 so when we're talking about key 269 00:09:48,000 --> 00:09:48,959 decryption we're talking about 270 00:09:48,959 --> 00:09:51,040 decrypting the access keys so your 271 00:09:51,040 --> 00:09:53,760 master system and kind of function level 272 00:09:53,760 --> 00:09:57,640 keys for your uh function app right and 273 00:09:57,640 --> 00:09:59,440 the interesting thing here is that those 274 00:09:59,440 --> 00:10:01,120 access keys can be decrypted within the 275 00:10:01,120 --> 00:10:02,880 function app container runtime while 276 00:10:02,880 --> 00:10:05,040 you're you're running triggers and 277 00:10:05,040 --> 00:10:07,680 offline this works with Windows or Linux 278 00:10:07,680 --> 00:10:09,560 with any runtime stack so it doesn't 279 00:10:09,560 --> 00:10:11,519 matter if it's python PS core anything 280 00:10:11,519 --> 00:10:14,680 like that you know if you have the 281 00:10:14,680 --> 00:10:16,519 decryption key you can really do 282 00:10:16,519 --> 00:10:19,240 whatever you want so that brings us to 283 00:10:19,240 --> 00:10:21,040 the two requirements here that you 284 00:10:21,040 --> 00:10:23,720 absolutely need to have so number one is 285 00:10:23,720 --> 00:10:25,680 access to that encrypted material which 286 00:10:25,680 --> 00:10:28,160 is kind of your encrypted master key uh 287 00:10:28,160 --> 00:10:29,640 function keys and things like that in 288 00:10:29,640 --> 00:10:31,440 host. Json so you need to be able to 289 00:10:31,440 --> 00:10:33,720 read that and then to actually do the 290 00:10:33,720 --> 00:10:35,560 decryption you need access to an 291 00:10:35,560 --> 00:10:37,120 environment variable within the function 292 00:10:37,120 --> 00:10:40,000 container so bottom line you need some 293 00:10:40,000 --> 00:10:42,200 sort of command execution to kind of get 294 00:10:42,200 --> 00:10:44,760 at that environment variable in the 295 00:10:44,760 --> 00:10:48,120 container we did report this to uh msrc 296 00:10:48,120 --> 00:10:50,000 and it was confirmed to be expected and 297 00:10:50,000 --> 00:10:52,040 documented Behavior so really what we're 298 00:10:52,040 --> 00:10:53,760 going to be talking about here is if an 299 00:10:53,760 --> 00:10:55,320 attacker is in this position where they 300 00:10:55,320 --> 00:10:56,920 have the read and write access to the 301 00:10:56,920 --> 00:10:58,800 corresponding storage account what can 302 00:10:58,800 --> 00:11:00,680 they do and how can they affect that 303 00:11:00,680 --> 00:11:03,079 function 304 00:11:03,160 --> 00:11:05,800 app so let's talk about permissions here 305 00:11:05,800 --> 00:11:07,240 and before we kind of get into that all 306 00:11:07,240 --> 00:11:08,720 of the permissions that you see here and 307 00:11:08,720 --> 00:11:10,079 that we're going to talk about as 308 00:11:10,079 --> 00:11:12,200 requirements these are all storage 309 00:11:12,200 --> 00:11:14,680 account specific permissions you do not 310 00:11:14,680 --> 00:11:17,839 need function app arbac permissions or 311 00:11:17,839 --> 00:11:20,120 whatever to affect or to perform these 312 00:11:20,120 --> 00:11:22,240 attacks right you just need storage 313 00:11:22,240 --> 00:11:25,360 account level permissions so even though 314 00:11:25,360 --> 00:11:26,639 you know the storage account is 315 00:11:26,639 --> 00:11:28,160 technically a different service from the 316 00:11:28,160 --> 00:11:29,839 function app you need to start thinking 317 00:11:29,839 --> 00:11:31,680 about storage accounts more of as like 318 00:11:31,680 --> 00:11:34,000 an extension of the function app itself 319 00:11:34,000 --> 00:11:35,639 rather than two separate 320 00:11:35,639 --> 00:11:38,079 things so you need read access to 321 00:11:38,079 --> 00:11:40,440 Containers specifically that host. Json 322 00:11:40,440 --> 00:11:42,320 blob which is contained in that Azure 323 00:11:42,320 --> 00:11:44,720 web job Secrets container and then you 324 00:11:44,720 --> 00:11:46,639 need write access to the file shares and 325 00:11:46,639 --> 00:11:49,320 specifically it's that source code or 326 00:11:49,320 --> 00:11:51,360 that uh defines the triggers right you 327 00:11:51,360 --> 00:11:53,880 need to be able to modify that and then 328 00:11:53,880 --> 00:11:55,040 the ways that you would kind of get 329 00:11:55,040 --> 00:11:56,680 access to those is you know in terms of 330 00:11:56,680 --> 00:11:58,720 arbac for example we have the storage 331 00:11:58,720 --> 00:12:01,079 account contributor uh definitions here 332 00:12:01,079 --> 00:12:03,680 for this rback role um and really the 333 00:12:03,680 --> 00:12:05,279 thing that's interesting here is that 334 00:12:05,279 --> 00:12:07,680 list Keys action permission and it's not 335 00:12:07,680 --> 00:12:09,839 specifically listed there but it's kind 336 00:12:09,839 --> 00:12:11,800 of contained under that wild card under 337 00:12:11,800 --> 00:12:13,760 storage account so be on the lookout for 338 00:12:13,760 --> 00:12:16,120 that because access to those keys will 339 00:12:16,120 --> 00:12:18,480 get you exactly what you need and then 340 00:12:18,480 --> 00:12:20,120 also look out for custom roles too 341 00:12:20,120 --> 00:12:21,480 because you never know what custom roles 342 00:12:21,480 --> 00:12:23,519 are going to have there and then the 343 00:12:23,519 --> 00:12:25,760 other two direct access methods are you 344 00:12:25,760 --> 00:12:28,120 know shared storage access keys and then 345 00:12:28,120 --> 00:12:31,040 SAS token SAS tokens Can Be Insidious 346 00:12:31,040 --> 00:12:33,279 because you know the expiration dates 347 00:12:33,279 --> 00:12:35,760 the permissions and there's not a really 348 00:12:35,760 --> 00:12:37,199 good way to track those ones they're 349 00:12:37,199 --> 00:12:39,240 kind of out in the wild so be on the 350 00:12:39,240 --> 00:12:41,800 lookout for 351 00:12:42,079 --> 00:12:45,079 those so that kind of brings us to how 352 00:12:45,079 --> 00:12:47,120 exactly are we going to kind of get this 353 00:12:47,120 --> 00:12:49,199 code on the function app so we can start 354 00:12:49,199 --> 00:12:51,560 executing our malicious code to either 355 00:12:51,560 --> 00:12:53,560 do decryption or return you know 356 00:12:53,560 --> 00:12:57,199 decryption keys right so this is kind of 357 00:12:57,199 --> 00:13:01,320 uh came from uh roier and I apologize if 358 00:13:01,320 --> 00:13:03,399 I'm mispronouncing your name but please 359 00:13:03,399 --> 00:13:05,279 go read his blog he has some great 360 00:13:05,279 --> 00:13:08,079 research on attacking storage accounts 361 00:13:08,079 --> 00:13:10,160 and in his blog he really covered the 362 00:13:10,160 --> 00:13:12,920 kind of overwriting of fil share uh 363 00:13:12,920 --> 00:13:15,000 files and specifically the source code 364 00:13:15,000 --> 00:13:17,160 for trigger so he was kind of inserting 365 00:13:17,160 --> 00:13:18,920 himself from backdooring existing 366 00:13:18,920 --> 00:13:20,680 functions so we're going to take that 367 00:13:20,680 --> 00:13:22,519 exact same concept and what we're going 368 00:13:22,519 --> 00:13:24,199 to do is instead of overwriting 369 00:13:24,199 --> 00:13:26,120 something we're going to create a new 370 00:13:26,120 --> 00:13:28,839 function and we're going to do this by 371 00:13:28,839 --> 00:13:30,600 basically just creating a new directory 372 00:13:30,600 --> 00:13:33,399 so under that SMB file share site www 373 00:13:33,399 --> 00:13:35,959 root we create a new directory name it 374 00:13:35,959 --> 00:13:37,519 whatever you like and then you're going 375 00:13:37,519 --> 00:13:39,720 to add your trigger code right under 376 00:13:39,720 --> 00:13:41,600 that so if we were going to add a PS 377 00:13:41,600 --> 00:13:44,199 core uh trigger um we're going to add 378 00:13:44,199 --> 00:13:46,920 run. PS1 function. Json and whatever 379 00:13:46,920 --> 00:13:49,000 else that you need to kind of make that 380 00:13:49,000 --> 00:13:50,759 trigger function and obviously this is 381 00:13:50,759 --> 00:13:52,480 going to vary by your programming 382 00:13:52,480 --> 00:13:54,120 language 383 00:13:54,120 --> 00:13:56,680 so and then what happens once you get 384 00:13:56,680 --> 00:13:58,199 everything uploaded there to that file 385 00:13:58,199 --> 00:14:00,880 share you just wait so the function app 386 00:14:00,880 --> 00:14:02,560 is going to kind of pull that storage 387 00:14:02,560 --> 00:14:03,920 account every once in a while depending 388 00:14:03,920 --> 00:14:05,600 on the state change and then it will 389 00:14:05,600 --> 00:14:07,480 kind of import that function depending 390 00:14:07,480 --> 00:14:09,079 on what it's you know seeing in its 391 00:14:09,079 --> 00:14:10,720 corresponding share 392 00:14:10,720 --> 00:14:13,880 files and in this case here we see in 393 00:14:13,880 --> 00:14:16,560 the function. Json it's Anonymous so we 394 00:14:16,560 --> 00:14:18,560 basically can just keep pinging it 395 00:14:18,560 --> 00:14:21,199 anonymously until it shows up if you 396 00:14:21,199 --> 00:14:23,199 have function level triggers we'll talk 397 00:14:23,199 --> 00:14:24,519 about that in a second requiring a 398 00:14:24,519 --> 00:14:26,320 function key to call that you wouldn't 399 00:14:26,320 --> 00:14:28,279 be able to actually call that but if 400 00:14:28,279 --> 00:14:30,920 it's not you're basically putting code 401 00:14:30,920 --> 00:14:32,880 that you can execute out on the internet 402 00:14:32,880 --> 00:14:35,600 out on an anonymous trigger so be 403 00:14:35,600 --> 00:14:37,680 careful with that but in our case we 404 00:14:37,680 --> 00:14:39,160 basically just wait for the thing to 405 00:14:39,160 --> 00:14:42,880 populate and then you can call 406 00:14:43,720 --> 00:14:46,759 it so we've got you know what we need 407 00:14:46,759 --> 00:14:47,880 how we're going to do it how we're going 408 00:14:47,880 --> 00:14:50,040 to kind of deliver this code to get us 409 00:14:50,040 --> 00:14:51,399 our decryption but how does this 410 00:14:51,399 --> 00:14:54,800 actually work so really the core here of 411 00:14:54,800 --> 00:14:57,199 how this all works is asp.net core data 412 00:14:57,199 --> 00:14:59,240 protection and that provides the apis 413 00:14:59,240 --> 00:15:02,079 for core cryptographic operations Key 414 00:15:02,079 --> 00:15:04,880 Management configuration and all of that 415 00:15:04,880 --> 00:15:06,839 and there's actually a specific Azure 416 00:15:06,839 --> 00:15:09,279 web data protector that's being used by 417 00:15:09,279 --> 00:15:12,519 the function apps for this purpose so um 418 00:15:12,519 --> 00:15:13,880 if you take a look at that code there 419 00:15:13,880 --> 00:15:15,199 and I didn't want to slap a whole bunch 420 00:15:15,199 --> 00:15:17,680 of code on a slide but I did it anyway 421 00:15:17,680 --> 00:15:19,839 um so if you look at line 51 there 422 00:15:19,839 --> 00:15:21,360 that's where you can kind of create your 423 00:15:21,360 --> 00:15:23,440 Azure data protector using that specific 424 00:15:23,440 --> 00:15:25,959 library and then use that function- 425 00:15:25,959 --> 00:15:28,000 Secrets kind of parameter there to 426 00:15:28,000 --> 00:15:31,040 create the specific Azure data protector 427 00:15:31,040 --> 00:15:32,680 for function apps and then you can 428 00:15:32,680 --> 00:15:36,279 unprotect that right there below so you 429 00:15:36,279 --> 00:15:38,639 can use this Library directly within an 430 00:15:38,639 --> 00:15:42,000 asp.net core um function app trigger 431 00:15:42,000 --> 00:15:44,120 which is pretty neat and it's actually 432 00:15:44,120 --> 00:15:45,600 available on gtho so you can go and take 433 00:15:45,600 --> 00:15:47,279 a look at that right under the Azure 434 00:15:47,279 --> 00:15:49,279 organization we have Azure website 435 00:15:49,279 --> 00:15:51,240 security and that is all the source code 436 00:15:51,240 --> 00:15:53,399 for those helpers there and this is 437 00:15:53,399 --> 00:15:56,000 important because this is used by kudu 438 00:15:56,000 --> 00:15:57,839 it's used by the actual function host 439 00:15:57,839 --> 00:15:59,839 itself so so it's a pretty important 440 00:15:59,839 --> 00:16:01,959 Library when you kind of get down to it 441 00:16:01,959 --> 00:16:04,639 and if you look at that social msdn post 442 00:16:04,639 --> 00:16:06,240 right there somebody actually tried to 443 00:16:06,240 --> 00:16:08,399 do this quite a while ago um and if you 444 00:16:08,399 --> 00:16:10,199 look at that URL there it contains the 445 00:16:10,199 --> 00:16:11,839 word link so that'll kind of give you a 446 00:16:11,839 --> 00:16:15,199 clue as to how old this post is right so 447 00:16:15,199 --> 00:16:17,040 the code there will fail but we're going 448 00:16:17,040 --> 00:16:18,800 to take those Core Concepts and apply 449 00:16:18,800 --> 00:16:20,639 them to our use case 450 00:16:20,639 --> 00:16:23,319 here so let's get down to it let's start 451 00:16:23,319 --> 00:16:26,000 decrypting those keys right 452 00:16:26,000 --> 00:16:28,000 so I'm not going to again I'm not going 453 00:16:28,000 --> 00:16:29,600 to show you all the source code here but 454 00:16:29,600 --> 00:16:31,000 please check out the corresponding blog 455 00:16:31,000 --> 00:16:32,639 and we'll post everything with the tool 456 00:16:32,639 --> 00:16:34,480 that'll actually com you know have some 457 00:16:34,480 --> 00:16:36,040 of this code that you can go and take a 458 00:16:36,040 --> 00:16:37,920 look at but basically what you want to 459 00:16:37,920 --> 00:16:39,160 do here is you're going to take that 460 00:16:39,160 --> 00:16:41,560 code which again you're not seeing but 461 00:16:41,560 --> 00:16:43,199 take the encrypted master key or 462 00:16:43,199 --> 00:16:44,839 whatever key you want from that host. 463 00:16:44,839 --> 00:16:47,399 Json throw that into the exploit code 464 00:16:47,399 --> 00:16:48,759 and then we're going to use that exact 465 00:16:48,759 --> 00:16:51,440 same kind of um overwrite or push to 466 00:16:51,440 --> 00:16:53,040 create a new function app within the 467 00:16:53,040 --> 00:16:55,959 storage account and then at that point 468 00:16:55,959 --> 00:16:57,160 the code should have access to 469 00:16:57,160 --> 00:16:58,920 everything it needs the decryption Keys 470 00:16:58,920 --> 00:17:00,639 within the environment variables so all 471 00:17:00,639 --> 00:17:02,920 you need to do is you know basically 472 00:17:02,920 --> 00:17:04,880 execute that trigger so you either wait 473 00:17:04,880 --> 00:17:07,559 for it with a timer use an hdp trigger 474 00:17:07,559 --> 00:17:08,760 and then that's how you get your 475 00:17:08,760 --> 00:17:10,880 decrypted keys or your unprotected 476 00:17:10,880 --> 00:17:12,520 Mastery Keys function level Keys 477 00:17:12,520 --> 00:17:14,439 whatever you want return it to your web 478 00:17:14,439 --> 00:17:16,880 server or return it via web response you 479 00:17:16,880 --> 00:17:17,880 know it doesn't really matter and you 480 00:17:17,880 --> 00:17:19,760 can kind of see in the screenshots here 481 00:17:19,760 --> 00:17:22,520 or just using an HTTP trigger firing 482 00:17:22,520 --> 00:17:24,760 that off to a burp collaborator and you 483 00:17:24,760 --> 00:17:26,799 can see that I know it's really tiny but 484 00:17:26,799 --> 00:17:30,400 these two values trust me they match 485 00:17:33,400 --> 00:17:35,480 all right so we can decrypt things 486 00:17:35,480 --> 00:17:36,760 within the container itself but what if 487 00:17:36,760 --> 00:17:39,280 we wanted to do it offline so the only 488 00:17:39,280 --> 00:17:41,200 thing that we really need here to do 489 00:17:41,200 --> 00:17:42,960 this decryption offline is that 490 00:17:42,960 --> 00:17:44,960 decryption key within one of those two 491 00:17:44,960 --> 00:17:47,039 environment variables so we were kind of 492 00:17:47,039 --> 00:17:48,480 digging through the source code there of 493 00:17:48,480 --> 00:17:50,480 that repo we were just talking about and 494 00:17:50,480 --> 00:17:52,559 in the constants CS file there's a lot 495 00:17:52,559 --> 00:17:55,120 of Clues as to you know the names of 496 00:17:55,120 --> 00:17:56,559 environment variables and how that 497 00:17:56,559 --> 00:17:58,960 decryption is actually happening so so 498 00:17:58,960 --> 00:18:00,640 what you need access to is one of those 499 00:18:00,640 --> 00:18:02,720 two environment variables there Azure 500 00:18:02,720 --> 00:18:04,320 web encryption key or machine key 501 00:18:04,320 --> 00:18:06,360 decryption key and depending on whether 502 00:18:06,360 --> 00:18:07,919 you're running on Windows or Linux 503 00:18:07,919 --> 00:18:09,480 you're going to need either of those to 504 00:18:09,480 --> 00:18:12,000 kind of do it but you just yeah those 505 00:18:12,000 --> 00:18:14,480 two should work for you so we modify our 506 00:18:14,480 --> 00:18:15,960 explay code and all we're going to do 507 00:18:15,960 --> 00:18:18,080 this time is just return that decryption 508 00:18:18,080 --> 00:18:20,120 key that's all we need then what you're 509 00:18:20,120 --> 00:18:21,880 going to do is you're going to pull down 510 00:18:21,880 --> 00:18:23,679 that GitHub repo set it up with your 511 00:18:23,679 --> 00:18:25,360 Visual Studio get your development 512 00:18:25,360 --> 00:18:27,760 environment running locally and you're 513 00:18:27,760 --> 00:18:29,480 going to take those two most important 514 00:18:29,480 --> 00:18:31,440 things right and you're in that test 515 00:18:31,440 --> 00:18:33,280 file there data protection provider 516 00:18:33,280 --> 00:18:35,400 tests you can just slap in and hardcode 517 00:18:35,400 --> 00:18:36,919 some of that data there in your local 518 00:18:36,919 --> 00:18:39,640 environment right so the Azure website's 519 00:18:39,640 --> 00:18:41,640 local encryption key you put that in as 520 00:18:41,640 --> 00:18:43,240 your you know decryption key up at the 521 00:18:43,240 --> 00:18:46,320 top I think line 18 and then in line 26 522 00:18:46,320 --> 00:18:47,799 that's where your encrypted material 523 00:18:47,799 --> 00:18:49,840 goes you run this test and it writes 524 00:18:49,840 --> 00:18:52,799 your unprotected keys out to a file so 525 00:18:52,799 --> 00:18:54,400 pretty cool because you can do that all 526 00:18:54,400 --> 00:18:56,320 that 527 00:18:56,320 --> 00:18:58,640 locally so to make this easy easier 528 00:18:58,640 --> 00:19:00,679 instead of actually running everything 529 00:19:00,679 --> 00:19:02,880 in Visual Studio or Visual Studio code 530 00:19:02,880 --> 00:19:04,799 whatever you want uh we actually just 531 00:19:04,799 --> 00:19:07,120 made a function app that does all of 532 00:19:07,120 --> 00:19:09,559 this decryption for you we pushed the 533 00:19:09,559 --> 00:19:11,840 Funko Pop uh GitHub repo we'll have 534 00:19:11,840 --> 00:19:13,960 Links at the end here out to the net spy 535 00:19:13,960 --> 00:19:15,960 GitHub probably a week ago so some of 536 00:19:15,960 --> 00:19:17,480 you might have seen that pop up on 537 00:19:17,480 --> 00:19:19,799 GitHub earlier tried to keep it kind of 538 00:19:19,799 --> 00:19:22,280 quiet but there's a nice deploy to Azure 539 00:19:22,280 --> 00:19:24,159 button that deploys out an arm template 540 00:19:24,159 --> 00:19:27,159 that deploys this function app into your 541 00:19:27,159 --> 00:19:29,080 environment now you canuse use this to 542 00:19:29,080 --> 00:19:30,840 decrypt these Keys assuming you get 543 00:19:30,840 --> 00:19:32,480 access to the encrypted key from the 544 00:19:32,480 --> 00:19:36,080 host. Json and get the 545 00:19:36,080 --> 00:19:39,159 uh encryption key out of the containers 546 00:19:39,159 --> 00:19:41,159 itself and you just feed it into this 547 00:19:41,159 --> 00:19:43,000 web application it's going to return it 548 00:19:43,000 --> 00:19:45,840 back to you here in the function out so 549 00:19:45,840 --> 00:19:48,600 uh along with that to help just make 550 00:19:48,600 --> 00:19:50,360 this process a little bit easier we 551 00:19:50,360 --> 00:19:53,600 created a Powershell function that uh 552 00:19:53,600 --> 00:19:56,480 helps you I guess automate the process 553 00:19:56,480 --> 00:19:58,360 of identifying storage accounts that 554 00:19:58,360 --> 00:20:00,880 have attached function apps it'll crawl 555 00:20:00,880 --> 00:20:02,280 through each of the storage accounts 556 00:20:02,280 --> 00:20:03,760 that you have access to with your 557 00:20:03,760 --> 00:20:07,320 existing a Powershell connected session 558 00:20:07,320 --> 00:20:09,039 and for each one that has a function app 559 00:20:09,039 --> 00:20:10,559 it will show you we'll see that in the 560 00:20:10,559 --> 00:20:12,880 demo here which function app is attached 561 00:20:12,880 --> 00:20:14,520 to it then you just select which ones 562 00:20:14,520 --> 00:20:16,400 you want to attack it goes through 563 00:20:16,400 --> 00:20:17,880 figures out which programming language 564 00:20:17,880 --> 00:20:20,080 is being used for each one deploys the 565 00:20:20,080 --> 00:20:23,200 appropriate payload and that will return 566 00:20:23,200 --> 00:20:25,520 the decryption key out of the container 567 00:20:25,520 --> 00:20:27,000 additionally if there's any attached 568 00:20:27,000 --> 00:20:28,960 managed identities we talked about those 569 00:20:28,960 --> 00:20:31,320 at the beginning it will generate tokens 570 00:20:31,320 --> 00:20:33,280 for those for three different Scopes 571 00:20:33,280 --> 00:20:36,000 graph management and key volt and give 572 00:20:36,000 --> 00:20:38,240 you those tokens back in the response 573 00:20:38,240 --> 00:20:39,720 you can use those tokens for other stuff 574 00:20:39,720 --> 00:20:41,480 we'll talk about that in a couple of 575 00:20:41,480 --> 00:20:43,720 slides here and that gives you all that 576 00:20:43,720 --> 00:20:45,200 back in the Powershell window here you 577 00:20:45,200 --> 00:20:46,960 can then feed all of the keys and 578 00:20:46,960 --> 00:20:49,679 encrypted data into the Funko Pop app 579 00:20:49,679 --> 00:20:54,640 good to go uh let's see so that kind of 580 00:20:56,200 --> 00:20:59,320 covers okay so it covers up so uh we're 581 00:20:59,320 --> 00:21:02,240 going to switch Windows here cuz it's a 582 00:21:02,240 --> 00:21:04,000 little bit easier to control the video 583 00:21:04,000 --> 00:21:06,159 that 584 00:21:07,960 --> 00:21:10,039 way okay so I'm going to do this from up 585 00:21:10,039 --> 00:21:11,720 here hopefully we got the camera on here 586 00:21:11,720 --> 00:21:15,520 so real quick we are signed in as the sa 587 00:21:15,520 --> 00:21:17,760 contributor we can see the two storage 588 00:21:17,760 --> 00:21:20,080 accounts we have access 589 00:21:20,080 --> 00:21:22,440 to we can also see that we don't have 590 00:21:22,440 --> 00:21:25,679 any function app level 591 00:21:25,840 --> 00:21:28,120 access and we'll show our I am 592 00:21:28,120 --> 00:21:30,520 permissions here show that we have 593 00:21:30,520 --> 00:21:32,000 storage account contributor with the 594 00:21:32,000 --> 00:21:33,440 user that we're logged 595 00:21:33,440 --> 00:21:35,919 into so from here we're going to hop 596 00:21:35,919 --> 00:21:37,720 over to Powershell and show that we 597 00:21:37,720 --> 00:21:39,320 don't have a current context we're going 598 00:21:39,320 --> 00:21:41,279 to connect a account with Device 599 00:21:41,279 --> 00:21:43,679 authentication use the device code back 600 00:21:43,679 --> 00:21:45,880 in the browser to log in as that browser 601 00:21:45,880 --> 00:21:47,840 authenticated user then we're going to 602 00:21:47,840 --> 00:21:51,400 run that invoke a function app takeover 603 00:21:51,400 --> 00:21:52,799 I don't remember the name I wrote it I 604 00:21:52,799 --> 00:21:54,799 should know the name of it but we're 605 00:21:54,799 --> 00:21:57,039 authenticating 606 00:21:57,039 --> 00:21:59,200 here and now that we're authenticated 607 00:21:59,200 --> 00:22:01,240 yep function app takeover I got to right 608 00:22:01,240 --> 00:22:03,279 with the verbose flag we're signed in as 609 00:22:03,279 --> 00:22:05,960 sa contributor we're going to select our 610 00:22:05,960 --> 00:22:07,640 subscription and it's going to start 611 00:22:07,640 --> 00:22:11,200 going through and identifying all of the 612 00:22:11,200 --> 00:22:12,880 storage accounts that have function apps 613 00:22:12,880 --> 00:22:16,200 tied to it going to pause here in just a 614 00:22:16,200 --> 00:22:17,880 quick 615 00:22:17,880 --> 00:22:20,679 second so it identified six different 616 00:22:20,679 --> 00:22:23,919 function apps in the there six different 617 00:22:23,919 --> 00:22:26,120 storage account function app combos here 618 00:22:26,120 --> 00:22:28,120 we're going to pick a specific one the 619 00:22:28,120 --> 00:22:30,600 Linux PS1 which is a Linux based 620 00:22:30,600 --> 00:22:32,799 Powershell function 621 00:22:32,799 --> 00:22:36,000 app and choose to exploit it now I did 622 00:22:36,000 --> 00:22:38,080 Fast Forward the demo video here just a 623 00:22:38,080 --> 00:22:41,640 bit because normally what will 624 00:22:41,640 --> 00:22:44,480 happen is once it's identified the 625 00:22:44,480 --> 00:22:47,200 language it publishes the payload up to 626 00:22:47,200 --> 00:22:50,240 the file share then Waits 60 seconds for 627 00:22:50,240 --> 00:22:52,080 everything to actually get kind of Spun 628 00:22:52,080 --> 00:22:53,880 up and recognized by the function app 629 00:22:53,880 --> 00:22:56,080 itself once we sleep for those 60 630 00:22:56,080 --> 00:22:58,480 seconds it will then just continue 631 00:22:58,480 --> 00:23:01,279 request the function until we get 632 00:23:01,279 --> 00:23:05,600 something back and there we go so we've 633 00:23:05,600 --> 00:23:08,360 got our encrypted master key our DEC or 634 00:23:08,360 --> 00:23:10,760 encryption key for that management Vault 635 00:23:10,760 --> 00:23:12,720 and graph tokens which then can all be 636 00:23:12,720 --> 00:23:15,360 used with rest apis for those specific 637 00:23:15,360 --> 00:23:17,960 apis we're going to go ahead and copy 638 00:23:17,960 --> 00:23:22,279 out our master key and the uh encrypted 639 00:23:22,279 --> 00:23:24,480 master key or the encryption key and the 640 00:23:24,480 --> 00:23:26,880 encrypted master key out of 641 00:23:26,880 --> 00:23:28,720 here 642 00:23:28,720 --> 00:23:30,480 and then pop that over to the function 643 00:23:30,480 --> 00:23:32,360 app that we wrote for this to automate 644 00:23:32,360 --> 00:23:34,559 the decryption for 645 00:23:34,559 --> 00:23:37,440 you and then that should return the 646 00:23:37,440 --> 00:23:39,279 decrypted key value down at the bottom 647 00:23:39,279 --> 00:23:41,200 and we'll compare those at the end to 648 00:23:41,200 --> 00:23:43,440 what's actually in the Azure portal so 649 00:23:43,440 --> 00:23:45,159 you can determine that yep it actually 650 00:23:45,159 --> 00:23:46,840 properly 651 00:23:46,840 --> 00:23:50,720 decrypted so 4 n 652 00:23:51,080 --> 00:23:53,799 y32 and if we bring it back over we can 653 00:23:53,799 --> 00:23:57,880 see that 4ny y32 is the master key for 654 00:23:57,880 --> 00:23:59,880 the function app that we attached so 655 00:23:59,880 --> 00:24:01,720 this totally shows that if you have 656 00:24:01,720 --> 00:24:03,640 storage account contributor or you know 657 00:24:03,640 --> 00:24:05,400 the ability to read and write files in a 658 00:24:05,400 --> 00:24:07,159 storage account that contains a function 659 00:24:07,159 --> 00:24:09,440 app totally take it over get the master 660 00:24:09,440 --> 00:24:11,600 key back and then use that master key to 661 00:24:11,600 --> 00:24:16,000 continue to persist in the function app 662 00:24:23,360 --> 00:24:26,440 itself there we go so uh these are the 663 00:24:26,440 --> 00:24:28,760 languages that we currently support now 664 00:24:28,760 --> 00:24:30,600 uh Java doesn't get much love from us 665 00:24:30,600 --> 00:24:32,440 cuz we don't do a lot of java stuff so 666 00:24:32,440 --> 00:24:34,279 if anybody wants to you know do a poll 667 00:24:34,279 --> 00:24:36,640 request and help us out that'd be cool 668 00:24:36,640 --> 00:24:38,440 but uh everything except for node we're 669 00:24:38,440 --> 00:24:39,919 able to return the managed identity 670 00:24:39,919 --> 00:24:42,159 tokens node's a little fussy with making 671 00:24:42,159 --> 00:24:45,240 those managed identity calls so that's 672 00:24:45,240 --> 00:24:47,840 what we currently support for 673 00:24:47,840 --> 00:24:50,399 functionality and post exploitation here 674 00:24:50,399 --> 00:24:52,360 uh once we have those tokens we can use 675 00:24:52,360 --> 00:24:54,919 those with the rest apis to take actions 676 00:24:54,919 --> 00:24:56,960 in those different things so if we get a 677 00:24:56,960 --> 00:24:58,640 key Vault token we can list out the 678 00:24:58,640 --> 00:25:01,279 available key BTS and potentially get 679 00:25:01,279 --> 00:25:03,200 access to keys and secrets anything else 680 00:25:03,200 --> 00:25:05,200 that might be in that key BT 681 00:25:05,200 --> 00:25:07,320 additionally with that function app key 682 00:25:07,320 --> 00:25:09,440 take a look at the XM cyber blog post 683 00:25:09,440 --> 00:25:11,360 that was mentioned at the very beginning 684 00:25:11,360 --> 00:25:12,760 they have a whole rundown of what you 685 00:25:12,760 --> 00:25:15,320 can do with an actual master key or 686 00:25:15,320 --> 00:25:18,000 other Keys within a function app that 687 00:25:18,000 --> 00:25:19,600 gives you kind of the full rundown of 688 00:25:19,600 --> 00:25:20,880 what you might want to do with that 689 00:25:20,880 --> 00:25:22,720 master 690 00:25:22,720 --> 00:25:25,159 key so we're going to change gears here 691 00:25:25,159 --> 00:25:28,200 a little bit talk about another part of 692 00:25:28,200 --> 00:25:30,960 function apps here called the VFS apis 693 00:25:30,960 --> 00:25:34,000 we put a blog post out uh back in March 694 00:25:34,000 --> 00:25:35,520 about this so some people may have seen 695 00:25:35,520 --> 00:25:37,039 this a little while ago but we'll talk 696 00:25:37,039 --> 00:25:39,760 about it here uh when you go to access 697 00:25:39,760 --> 00:25:42,399 files in the function app or within the 698 00:25:42,399 --> 00:25:44,720 functions under the function app there's 699 00:25:44,720 --> 00:25:47,200 an API that's called the VFS API that's 700 00:25:47,200 --> 00:25:49,520 used to read the files itself this used 701 00:25:49,520 --> 00:25:52,360 to be available to the reader role this 702 00:25:52,360 --> 00:25:54,080 was a great place for us to find stuff 703 00:25:54,080 --> 00:25:55,840 during pentest because people love to 704 00:25:55,840 --> 00:25:57,679 put credentials in here just 705 00:25:57,679 --> 00:25:59,640 credentials. Json and there's the 706 00:25:59,640 --> 00:26:01,480 service principal credential great 707 00:26:01,480 --> 00:26:03,799 database connection strings right there 708 00:26:03,799 --> 00:26:05,480 we can read them as the reader role 709 00:26:05,480 --> 00:26:07,520 which is often what we get during a 710 00:26:07,520 --> 00:26:09,120 cloud pen test because people don't want 711 00:26:09,120 --> 00:26:11,000 to give us contributor because then we 712 00:26:11,000 --> 00:26:12,360 can make changes in the environment and 713 00:26:12,360 --> 00:26:14,799 that's kind of dangerous these apis are 714 00:26:14,799 --> 00:26:16,600 still available for someone who has 715 00:26:16,600 --> 00:26:19,679 contributor so you could technically 716 00:26:19,679 --> 00:26:21,520 replicate the same attack but it's kind 717 00:26:21,520 --> 00:26:23,440 of a moot point there because you're 718 00:26:23,440 --> 00:26:25,520 already contributor and you can already 719 00:26:25,520 --> 00:26:26,640 access the things that you're going to 720 00:26:26,640 --> 00:26:28,159 try and access here 721 00:26:28,159 --> 00:26:30,240 but that's besides the point so uh 722 00:26:30,240 --> 00:26:31,640 there's two different spots the app 723 00:26:31,640 --> 00:26:34,159 files and the individual Code test here 724 00:26:34,159 --> 00:26:37,480 uh those both use that same 725 00:26:37,480 --> 00:26:40,320 API and if we deconstruct that API it's 726 00:26:40,320 --> 00:26:44,080 a management. azure.com API specifically 727 00:26:44,080 --> 00:26:46,799 the host runtime admin VFS for the 728 00:26:46,799 --> 00:26:49,440 function app itself the key thing here 729 00:26:49,440 --> 00:26:50,640 that we're going to care about is the 730 00:26:50,640 --> 00:26:53,159 relative path equals one if that's set 731 00:26:53,159 --> 00:26:54,399 to one that just gives you the 732 00:26:54,399 --> 00:26:56,159 application files that you normally see 733 00:26:56,159 --> 00:26:58,159 within the Azure portal if we change 734 00:26:58,159 --> 00:27:01,159 that to zero that gives us the root file 735 00:27:01,159 --> 00:27:03,679 system on the container VI windows or 736 00:27:03,679 --> 00:27:07,360 Linux so for the windows 737 00:27:07,360 --> 00:27:09,919 option we don't see a whole lot uh it's 738 00:27:09,919 --> 00:27:11,840 actually uh pretty quiet in the windows 739 00:27:11,840 --> 00:27:13,720 containers the worst of it is getting 740 00:27:13,720 --> 00:27:15,840 access to the data protection keys for 741 00:27:15,840 --> 00:27:18,200 the asp.net containers that's about the 742 00:27:18,200 --> 00:27:19,840 most sensitive thing you can get access 743 00:27:19,840 --> 00:27:22,320 to and even from then you still need 744 00:27:22,320 --> 00:27:24,240 encrypted data that's encrypted with 745 00:27:24,240 --> 00:27:25,679 that to actually decrypt anything so 746 00:27:25,679 --> 00:27:28,279 it's not hugely impactful this was 747 00:27:28,279 --> 00:27:29,440 actually the first thing that we 748 00:27:29,440 --> 00:27:32,279 reported from these apis to msrc and 749 00:27:32,279 --> 00:27:33,799 they eventually just wrote it off as 750 00:27:33,799 --> 00:27:36,960 info disclosure low because yeah I get 751 00:27:36,960 --> 00:27:39,200 it that's fair uh it's a pretty low 752 00:27:39,200 --> 00:27:41,440 impact if you're getting those keys 753 00:27:41,440 --> 00:27:44,279 however if we go to the Linux containers 754 00:27:44,279 --> 00:27:46,039 and use that relative path of zero and 755 00:27:46,039 --> 00:27:48,120 get to the root file system we can 756 00:27:48,120 --> 00:27:50,440 actually access the proc folder and for 757 00:27:50,440 --> 00:27:52,240 those that are not familiar with proc 758 00:27:52,240 --> 00:27:53,600 that's where all of the process 759 00:27:53,600 --> 00:27:56,799 information lives so proc self you can 760 00:27:56,799 --> 00:27:59,159 get your own current process IDs 761 00:27:59,159 --> 00:28:01,480 environmental variables the command line 762 00:28:01,480 --> 00:28:03,240 invocation that was used to run the 763 00:28:03,240 --> 00:28:05,880 command itself all sorts of good stuff 764 00:28:05,880 --> 00:28:08,279 uh we have a net Spy blog from quite a 765 00:28:08,279 --> 00:28:09,679 long time ago that gives you a full 766 00:28:09,679 --> 00:28:11,880 rundown out of about that go ahead and 767 00:28:11,880 --> 00:28:14,519 look that up that's really helpful but 768 00:28:14,519 --> 00:28:16,840 uh what we did is identified that we 769 00:28:16,840 --> 00:28:20,120 could kind of directory Traverse to the 770 00:28:20,120 --> 00:28:21,919 environmental variables for each of the 771 00:28:21,919 --> 00:28:24,360 process IDs and went through each of 772 00:28:24,360 --> 00:28:26,080 them and noticed that there was the 773 00:28:26,080 --> 00:28:28,919 container start context SAS URI and this 774 00:28:28,919 --> 00:28:30,799 is a storage account URL that points out 775 00:28:30,799 --> 00:28:32,159 to a storage account controlled by 776 00:28:32,159 --> 00:28:34,919 Microsoft it's SAS tokened which allows 777 00:28:34,919 --> 00:28:37,480 us to read the startup context 778 00:28:37,480 --> 00:28:40,559 configuration for the container itself 779 00:28:40,559 --> 00:28:42,679 also in that environmental variable 780 00:28:42,679 --> 00:28:45,159 section is the container encryption key 781 00:28:45,159 --> 00:28:48,039 used to decrypt that startup context 782 00:28:48,039 --> 00:28:50,399 file we go to the next one here yeah 783 00:28:50,399 --> 00:28:53,200 like two minutes okay uh we can see the 784 00:28:53,200 --> 00:28:55,159 encrypted context right up here that has 785 00:28:55,159 --> 00:28:57,000 the initialization Vector we use that 786 00:28:57,000 --> 00:28:58,559 with the key that we pulled from the 787 00:28:58,559 --> 00:29:00,960 environmental variables we can decrypt 788 00:29:00,960 --> 00:29:03,000 all of that startup context that 789 00:29:03,000 --> 00:29:06,000 includes the master key the function key 790 00:29:06,000 --> 00:29:07,559 any source code files that you might 791 00:29:07,559 --> 00:29:10,840 want as well as any uh app registration 792 00:29:10,840 --> 00:29:12,919 credentials that're tied to integrated 793 00:29:12,919 --> 00:29:15,360 Azure active directory off so really 794 00:29:15,360 --> 00:29:17,840 sensitive stuff and it allows us as a 795 00:29:17,840 --> 00:29:20,320 reader or previously allowed us before 796 00:29:20,320 --> 00:29:22,919 they fixed it at Microsoft to go from a 797 00:29:22,919 --> 00:29:25,000 reader on the function app to get access 798 00:29:25,000 --> 00:29:27,120 to the master key for the function app 799 00:29:27,120 --> 00:29:28,720 take over the entire function app at 800 00:29:28,720 --> 00:29:32,240 that point so we jump ahead here so 801 00:29:32,240 --> 00:29:34,000 Microsoft remediated it they didn't 802 00:29:34,000 --> 00:29:35,559 remove the API but restricted the 803 00:29:35,559 --> 00:29:37,480 permissions just your contributor so 804 00:29:37,480 --> 00:29:39,320 technically you can still replicate this 805 00:29:39,320 --> 00:29:40,880 we have some Powershell code right here 806 00:29:40,880 --> 00:29:42,360 that you could technically use to 807 00:29:42,360 --> 00:29:43,679 replicate the same thing at this point 808 00:29:43,679 --> 00:29:44,960 if you really wanted to follow along and 809 00:29:44,960 --> 00:29:48,200 do it but uh yeah if you have container 810 00:29:48,200 --> 00:29:49,679 command execution let's say you get 811 00:29:49,679 --> 00:29:51,440 command exec through one of the function 812 00:29:51,440 --> 00:29:53,240 apps you could technically replicate 813 00:29:53,240 --> 00:29:55,399 this as well and then get access to the 814 00:29:55,399 --> 00:29:56,320 master 815 00:29:56,320 --> 00:29:59,320 key 816 00:29:59,320 --> 00:30:02,000 so some quick best practice guidance 817 00:30:02,000 --> 00:30:04,039 here and we're going to upload this but 818 00:30:04,039 --> 00:30:06,720 you know in terms of just best practices 819 00:30:06,720 --> 00:30:08,799 here just lease privilege wherever you 820 00:30:08,799 --> 00:30:10,760 can apply it do it right because these 821 00:30:10,760 --> 00:30:12,840 two vulnerabilities that we've seen here 822 00:30:12,840 --> 00:30:14,519 they work in kind of weird ways and 823 00:30:14,519 --> 00:30:16,200 sorry one of them is a vulnerability the 824 00:30:16,200 --> 00:30:18,840 other one is expected behavior um but 825 00:30:18,840 --> 00:30:21,120 they behave in weird ways right so 826 00:30:21,120 --> 00:30:23,120 whenever you can limit Scopes limit 827 00:30:23,120 --> 00:30:25,000 permissions wherever you know make sure 828 00:30:25,000 --> 00:30:27,799 to do that right um protect storage 829 00:30:27,799 --> 00:30:31,039 accounts don't you know lose your shared 830 00:30:31,039 --> 00:30:32,919 access keys or sass tokens and store 831 00:30:32,919 --> 00:30:34,440 them in clear text cuz somebody will 832 00:30:34,440 --> 00:30:36,840 find them um limit permissions on 833 00:30:36,840 --> 00:30:38,720 function app identities you know and 834 00:30:38,720 --> 00:30:40,080 especially if you have something that's 835 00:30:40,080 --> 00:30:42,000 very highly privileged you know 836 00:30:42,000 --> 00:30:43,720 permissions that's granted to a function 837 00:30:43,720 --> 00:30:45,840 app make sure you protect that you know 838 00:30:45,840 --> 00:30:47,600 and that's almost keys to your kingdom 839 00:30:47,600 --> 00:30:50,159 there depending on how privileged it is 840 00:30:50,159 --> 00:30:51,720 um for your function apps and storage 841 00:30:51,720 --> 00:30:53,360 accounts make sure to use dedicated 842 00:30:53,360 --> 00:30:55,080 resource groups you don't want to be you 843 00:30:55,080 --> 00:30:57,360 know mixing some of your application 844 00:30:57,360 --> 00:30:59,440 function app uh you know assets and 845 00:30:59,440 --> 00:31:01,000 other things because if you're starting 846 00:31:01,000 --> 00:31:03,480 to Grant access at the resource Group or 847 00:31:03,480 --> 00:31:05,039 the subscription scope that's where 848 00:31:05,039 --> 00:31:05,960 you're going to start to get into 849 00:31:05,960 --> 00:31:08,039 trouble and then for logging make sure 850 00:31:08,039 --> 00:31:10,600 you've got those diagnostic logs enabled 851 00:31:10,600 --> 00:31:12,559 you know look at your control plane logs 852 00:31:12,559 --> 00:31:14,200 look at your data plane logs for you 853 00:31:14,200 --> 00:31:17,159 know uh activity like this and then 854 00:31:17,159 --> 00:31:19,240 Microsoft's official recommendations you 855 00:31:19,240 --> 00:31:21,200 can use key vaults to kind of store your 856 00:31:21,200 --> 00:31:23,120 keys so they're no longer within the 857 00:31:23,120 --> 00:31:24,679 storage account themselves which kind of 858 00:31:24,679 --> 00:31:26,440 starts to take away that vulnerability 859 00:31:26,440 --> 00:31:27,639 there if you're kind of storing them in 860 00:31:27,639 --> 00:31:29,919 key VA volts but if you still have right 861 00:31:29,919 --> 00:31:31,480 access to the file shares and you can 862 00:31:31,480 --> 00:31:33,840 get access to the managed identity then 863 00:31:33,840 --> 00:31:35,720 you kind of have the exact same issue 864 00:31:35,720 --> 00:31:37,840 right um You can also use v-net 865 00:31:37,840 --> 00:31:39,639 integration to kind of hide those 866 00:31:39,639 --> 00:31:41,919 storage accounts away um so you may not 867 00:31:41,919 --> 00:31:43,880 have direct access to them and take a 868 00:31:43,880 --> 00:31:45,639 look at all of these links here there's 869 00:31:45,639 --> 00:31:47,279 a lot of good recommendations from 870 00:31:47,279 --> 00:31:49,320 Microsoft in terms of you know how you 871 00:31:49,320 --> 00:31:51,200 can actually just protect your storage 872 00:31:51,200 --> 00:31:54,159 accounts from attacks like these 873 00:31:54,159 --> 00:31:56,120 right and in terms of you know 874 00:31:56,120 --> 00:31:57,679 disclosure timelines you can kind of see 875 00:31:57,679 --> 00:31:59,840 them there uh we try to make sure we go 876 00:31:59,840 --> 00:32:01,519 through responsible disclosure whenever 877 00:32:01,519 --> 00:32:03,399 we you know talk about stuff like this 878 00:32:03,399 --> 00:32:05,559 so this is just the timelines and the uh 879 00:32:05,559 --> 00:32:08,000 the reports that we've 880 00:32:08,000 --> 00:32:10,679 created all right and special thanks to 881 00:32:10,679 --> 00:32:12,320 everybody on that previous research 882 00:32:12,320 --> 00:32:14,799 slide seriously that's great work there 883 00:32:14,799 --> 00:32:17,279 please go and read those um and you know 884 00:32:17,279 --> 00:32:18,760 we wouldn't be here talking about some 885 00:32:18,760 --> 00:32:20,559 of this weird stuff without you know the 886 00:32:20,559 --> 00:32:22,240 previous research of everybody up on 887 00:32:22,240 --> 00:32:25,360 that slide so um yeah thank you to 888 00:32:25,360 --> 00:32:27,639 everybody uh for coming out and 889 00:32:27,639 --> 00:32:29,840 I think I'm not sure how we are on time 890 00:32:29,840 --> 00:32:31,320 but we will certainly be hanging around 891 00:32:31,320 --> 00:32:33,840 afterwards for some questions but yeah 892 00:32:33,840 --> 00:32:36,879 any thoughts 893 00:32:39,600 --> 00:32:42,120 yep we got two okay we could probably 894 00:32:42,120 --> 00:32:44,039 take a couple of quick questions here 895 00:32:44,039 --> 00:32:47,559 yep so you mentioned that uh Kudo is 896 00:32:47,559 --> 00:32:49,679 kind of the underlying tax back here 897 00:32:49,679 --> 00:32:52,360 that you're leveraging to run this 898 00:32:52,360 --> 00:32:55,760 script right underneath the power shell 899 00:32:55,760 --> 00:32:58,080 uh now what I look for for disabling 900 00:32:58,080 --> 00:33:01,320 Kudo under the mcsd it's very very 901 00:33:01,320 --> 00:33:03,240 difficult to actually find and how to do 902 00:33:03,240 --> 00:33:05,000 that that's something you might want to 903 00:33:05,000 --> 00:33:07,919 add for your slides that could eliminate 904 00:33:07,919 --> 00:33:09,720 that factor so the question was 905 00:33:09,720 --> 00:33:12,440 disabling kudu for the SC interface 906 00:33:12,440 --> 00:33:15,120 within app Services it's really hard to 907 00:33:15,120 --> 00:33:16,799 do we've worked with clients to help 908 00:33:16,799 --> 00:33:19,360 them disable it in the past uh that's 909 00:33:19,360 --> 00:33:20,639 definitely a recommendation we probably 910 00:33:20,639 --> 00:33:22,440 should have included along with protect 911 00:33:22,440 --> 00:33:23,480 your function app so they don't get 912 00:33:23,480 --> 00:33:25,360 command execution in the first place but 913 00:33:25,360 --> 00:33:27,559 yes very good point you can firewall 914 00:33:27,559 --> 00:33:30,200 them off you can also firewall that off 915 00:33:30,200 --> 00:33:33,360 uh on the kudu interface agre it's just 916 00:33:33,360 --> 00:33:36,600 uh if you have a public s a public pth I 917 00:33:36,600 --> 00:33:39,720 should say it's still there yes making 918 00:33:39,720 --> 00:33:41,279 sure that you are kind of you talk about 919 00:33:41,279 --> 00:33:43,120 your subdomain making sure that it's 920 00:33:43,120 --> 00:33:45,399 nonexistent so you can block it so 921 00:33:45,399 --> 00:33:48,080 somebody can't you very good point 922 00:33:48,080 --> 00:33:50,760 question uh from the perspective on the 923 00:33:50,760 --> 00:33:53,200 first scenario um if you're basically 924 00:33:53,200 --> 00:33:54,880 trying to enumerate all the storage keys 925 00:33:54,880 --> 00:33:55,919 and everything after you got on the 926 00:33:55,919 --> 00:33:57,279 master key and everything else you're 927 00:33:57,279 --> 00:33:59,399 still going to be associate with your uh 928 00:33:59,399 --> 00:34:00,960 identity with contributor role when 929 00:34:00,960 --> 00:34:02,159 you're trying to run those commands and 930 00:34:02,159 --> 00:34:03,880 everything else right so the question 931 00:34:03,880 --> 00:34:06,000 was from The Blue Team side detecting 932 00:34:06,000 --> 00:34:07,799 scanning all of those storage accounts 933 00:34:07,799 --> 00:34:09,480 for potential permissions and getting 934 00:34:09,480 --> 00:34:12,159 keys to go right to the function app 935 00:34:12,159 --> 00:34:14,719 directories correct uh effectively like 936 00:34:14,719 --> 00:34:16,119 once you go through the entire process 937 00:34:16,119 --> 00:34:18,359 and everything as a post exploitation 938 00:34:18,359 --> 00:34:19,839 activity and everything else you you try 939 00:34:19,839 --> 00:34:21,719 enumerate all the storage keys in the 940 00:34:21,719 --> 00:34:23,918 account and such yes that's can be tied 941 00:34:23,918 --> 00:34:25,320 to your contributor account that you're 942 00:34:25,320 --> 00:34:27,918 using right correct so question was if 943 00:34:27,918 --> 00:34:29,239 this would be tied to the account that 944 00:34:29,239 --> 00:34:30,960 we're running the Powershell script to 945 00:34:30,960 --> 00:34:33,159 do the actual execution on this yes that 946 00:34:33,159 --> 00:34:35,280 would be tied to that specific account 947 00:34:35,280 --> 00:34:38,399 however where it gets a little weird is 948 00:34:38,399 --> 00:34:40,719 the function apps really don't have any 949 00:34:40,719 --> 00:34:42,719 detections built in of like hey somebody 950 00:34:42,719 --> 00:34:45,320 added a new function to the storage 951 00:34:45,320 --> 00:34:47,159 account and we're now running it that's 952 00:34:47,159 --> 00:34:50,280 kind of a weird bypass um so the quk on 953 00:34:50,280 --> 00:34:52,679 that one is the U sign in logs and 954 00:34:52,679 --> 00:34:54,239 everything else for the things might be 955 00:34:54,239 --> 00:34:55,520 containing those records and everything 956 00:34:55,520 --> 00:34:56,520 when you're trying to enumerate the 957 00:34:56,520 --> 00:34:58,839 storage key so it's no longer associated 958 00:34:58,839 --> 00:35:00,000 with the function app and everything 959 00:35:00,000 --> 00:35:01,560 it's at the storage account level so 960 00:35:01,560 --> 00:35:03,119 correct yeah everything's tied to the 961 00:35:03,119 --> 00:35:05,240 storage account level and you know from 962 00:35:05,240 --> 00:35:08,200 a enumeration perspective we really just 963 00:35:08,200 --> 00:35:09,920 I guess we do list keys to actually get 964 00:35:09,920 --> 00:35:11,200 the files in there so yeah that's a good 965 00:35:11,200 --> 00:35:13,720 pointal pattern that if users kind of 966 00:35:13,720 --> 00:35:15,320 see like expect toy from them that 967 00:35:15,320 --> 00:35:18,119 success on it so 100% And you know for 968 00:35:18,119 --> 00:35:20,920 context uh Microsoft does seem to keep 969 00:35:20,920 --> 00:35:22,960 tabs on the microburst repo that we have 970 00:35:22,960 --> 00:35:24,880 and seem to add new detections every 971 00:35:24,880 --> 00:35:26,440 time we push a new script so I wouldn't 972 00:35:26,440 --> 00:35:28,160 be surpris Ur if this gets caught with 973 00:35:28,160 --> 00:35:30,000 Defender for cloud pretty soon so your 974 00:35:30,000 --> 00:35:31,520 mileage may 975 00:35:31,520 --> 00:35:33,480 vary I think we'll probably have to wrap 976 00:35:33,480 --> 00:35:34,560 up here but thank you very much 977 00:35:34,560 --> 00:35:37,000 everybody 978 00:35:37,160 --> 00:35:39,320 we'll we'll hang around we can answer 979 00:35:39,320 --> 00:35:40,720 some more questions out here so thank 980 00:35:40,720 --> 00:35:43,720 you