1 00:00:00,359 --> 00:00:01,160 all right folks we're going to get 2 00:00:01,160 --> 00:00:02,360 started here in a 3 00:00:02,360 --> 00:00:05,600 sec looks like the line is died down can 4 00:00:05,600 --> 00:00:07,040 you hear me in the 5 00:00:07,040 --> 00:00:09,679 back all right we got thumbs up good 6 00:00:09,679 --> 00:00:11,880 going have to be real close to the mic 7 00:00:11,880 --> 00:00:14,799 some of you in the in the far reaches of 8 00:00:14,799 --> 00:00:17,160 the uh this is an auditorium it's not 9 00:00:17,160 --> 00:00:19,600 really a room we got curtains whatever 10 00:00:19,600 --> 00:00:21,640 this is we're going to try and talk loud 11 00:00:21,640 --> 00:00:24,039 enough so that you can hear 12 00:00:24,039 --> 00:00:27,199 us for those of you who can't quite see 13 00:00:27,199 --> 00:00:28,599 in the back there's going to be a QR 14 00:00:28,599 --> 00:00:31,160 code available we have a couple of um QR 15 00:00:31,160 --> 00:00:33,000 codes that are kind of strewn across 16 00:00:33,000 --> 00:00:34,480 very safe for those of you who haven't 17 00:00:34,480 --> 00:00:36,640 heard this yet um there's nothing that 18 00:00:36,640 --> 00:00:38,160 could go wrong with putting QR codes at 19 00:00:38,160 --> 00:00:42,000 a hacker com but if you need the slides 20 00:00:42,000 --> 00:00:43,480 uh we have those available for folks in 21 00:00:43,480 --> 00:00:44,879 the back that can't 22 00:00:44,879 --> 00:00:47,840 see all right let's get started so up 23 00:00:47,840 --> 00:00:51,360 next we've got Felipe sposito and Lucas 24 00:00:51,360 --> 00:00:53,520 Ki I actually didn't ask I'm sorry I 25 00:00:53,520 --> 00:00:54,680 didn't ask how your last name we did 26 00:00:54,680 --> 00:00:56,359 good we did it all right cool there are 27 00:00:56,359 --> 00:00:57,920 two security researchers with close to 28 00:00:57,920 --> 00:01:00,199 two decades uh of experience in security 29 00:01:00,199 --> 00:01:01,320 and in this talk they're going to 30 00:01:01,320 --> 00:01:03,399 explore privilege escalation mechanisms 31 00:01:03,399 --> 00:01:05,479 within Oracle Cloud the title of their 32 00:01:05,479 --> 00:01:08,360 talk is the Oracle awakens demystifying 33 00:01:08,360 --> 00:01:10,040 privilege escalation in the cloud I love 34 00:01:10,040 --> 00:01:11,840 that name by the way please welcome 35 00:01:11,840 --> 00:01:14,439 Filipe and 36 00:01:16,040 --> 00:01:18,600 Lucas thank you guys thank you for 37 00:01:18,600 --> 00:01:21,439 coming uh let's 38 00:01:21,439 --> 00:01:25,040 begin so who am I I'm Philip posito also 39 00:01:25,040 --> 00:01:28,799 know as proos this is my nickname uh I'm 40 00:01:28,799 --> 00:01:31,720 being security researcher back in Brazil 41 00:01:31,720 --> 00:01:35,680 over 10 two decades but okay I still a 42 00:01:35,680 --> 00:01:38,960 bit old but nice and I'm the head of 43 00:01:38,960 --> 00:01:41,560 research at in security and security 44 00:01:41,560 --> 00:01:43,880 startup focused on cloud security and 45 00:01:43,880 --> 00:01:46,840 third party risk management and 46 00:01:46,840 --> 00:01:48,840 basically that's why we do research at 47 00:01:48,840 --> 00:01:52,920 this G so yeah hi guys I'm Lucas I also 48 00:01:52,920 --> 00:01:56,039 work at T as a security researcher and 49 00:01:56,039 --> 00:02:00,159 I'm also a master student 50 00:02:01,960 --> 00:02:04,560 so this is our agenda for today so we 51 00:02:04,560 --> 00:02:06,759 have a motivation so why we do this kind 52 00:02:06,759 --> 00:02:09,479 of research we do have uh what is 53 00:02:09,479 --> 00:02:12,480 privilege scalation 101 so basic stuff 54 00:02:12,480 --> 00:02:14,920 about this and we also talk about how 55 00:02:14,920 --> 00:02:17,319 Oracle I am works and this is really 56 00:02:17,319 --> 00:02:20,519 important to understand how Oracle uh 57 00:02:20,519 --> 00:02:22,040 how privileg escalation can work in 58 00:02:22,040 --> 00:02:25,319 Oracle and how they 59 00:02:25,319 --> 00:02:29,160 uh do the things in how Works actually 60 00:02:29,160 --> 00:02:31,480 so and then we're going to talk about 61 00:02:31,480 --> 00:02:34,200 the paths to be the chosen one or AK 62 00:02:34,200 --> 00:02:36,599 become administrator and then some 63 00:02:36,599 --> 00:02:39,800 conclusions we also have some uh how to 64 00:02:39,800 --> 00:02:41,599 fix these or how to prevent how uh 65 00:02:41,599 --> 00:02:44,680 privileged colle in cloud and one thing 66 00:02:44,680 --> 00:02:46,920 that I'm curious here is how many of you 67 00:02:46,920 --> 00:02:52,040 guys uh words or had head touch AAL 68 00:02:52,040 --> 00:02:57,200 Cloud nice nice so one one might be easy 69 00:02:57,200 --> 00:03:00,159 for you guys but this is part to to 70 00:03:00,159 --> 00:03:04,239 explain how things work right so what is 71 00:03:04,239 --> 00:03:06,480 motivation first of all we all know 72 00:03:06,480 --> 00:03:09,799 there has paths to privilege Cal in AWS 73 00:03:09,799 --> 00:03:13,360 because in 2019 Richard Spencer uh did 74 00:03:13,360 --> 00:03:15,879 the research about this for Hol Labs we 75 00:03:15,879 --> 00:03:18,760 know have a Azure privilege scalation as 76 00:03:18,760 --> 00:03:21,480 well and we know that has gcp privilege 77 00:03:21,480 --> 00:03:24,000 excal techniques as well and we are 78 00:03:24,000 --> 00:03:26,200 thought thinking well might be some 79 00:03:26,200 --> 00:03:29,879 paths to become to prival article to but 80 00:03:29,879 --> 00:03:32,080 no about researched about this so we 81 00:03:32,080 --> 00:03:38,000 decide to di him so uh there's a xtg 82 00:03:38,000 --> 00:03:40,400 Comics here basically explain how the 83 00:03:40,400 --> 00:03:43,439 resarch brain works basically when you 84 00:03:43,439 --> 00:03:45,400 get stuck with something you go go go go 85 00:03:45,400 --> 00:03:47,760 and try to research uh and figure out 86 00:03:47,760 --> 00:03:50,640 how things works even if a boss a bus 87 00:03:50,640 --> 00:03:53,120 comes across Us in the middle of the the 88 00:03:53,120 --> 00:03:56,720 the paths right and well the second 89 00:03:56,720 --> 00:03:58,640 motivation for this is to help our 90 00:03:58,640 --> 00:04:00,519 customers because we have a thir party 91 00:04:00,519 --> 00:04:04,560 to and also because it's cool right the 92 00:04:04,560 --> 00:04:07,799 did we can do it let's be the 93 00:04:07,799 --> 00:04:10,560 first so what is privilege 94 00:04:10,560 --> 00:04:12,959 escalation uh privilege escalation is 95 00:04:12,959 --> 00:04:17,079 basically any our uh Act of exploiting a 96 00:04:17,079 --> 00:04:20,759 bug a design floor or configuration or 97 00:04:20,759 --> 00:04:23,479 misconfiguration uh that enables a 98 00:04:23,479 --> 00:04:25,479 regular user to become to get more 99 00:04:25,479 --> 00:04:27,360 privilege than they had before not 100 00:04:27,360 --> 00:04:29,720 actually become always the time become 101 00:04:29,720 --> 00:04:31,320 administrator but if you don't have a 102 00:04:31,320 --> 00:04:34,440 permission to uh get an object on the 103 00:04:34,440 --> 00:04:36,520 object storage and then you figure it 104 00:04:36,520 --> 00:04:38,000 out a way to get 105 00:04:38,000 --> 00:04:41,600 this Object Store you get you escalate 106 00:04:41,600 --> 00:04:44,400 privileges right so don't always think 107 00:04:44,400 --> 00:04:46,880 about BEC administrator become because 108 00:04:46,880 --> 00:04:50,240 in Cloud not always possible but if you 109 00:04:50,240 --> 00:04:51,680 have more privilege than before you 110 00:04:51,680 --> 00:04:54,680 privilege cated 111 00:04:55,080 --> 00:05:00,680 right so article I am 10 how it works 112 00:05:00,680 --> 00:05:05,000 in so as any cloud provider we have our 113 00:05:05,000 --> 00:05:07,560 users the people who can access the the 114 00:05:07,560 --> 00:05:10,759 cloud uh control 115 00:05:10,759 --> 00:05:13,840 plane uh in a you can group those users 116 00:05:13,840 --> 00:05:16,400 in a of 117 00:05:16,400 --> 00:05:19,639 users and then we have identity domains 118 00:05:19,639 --> 00:05:21,400 and identity domains is what article 119 00:05:21,400 --> 00:05:22,600 uses for 120 00:05:22,600 --> 00:05:26,919 authentication and right policies and 121 00:05:26,919 --> 00:05:29,800 authorizations and in article you can 122 00:05:29,800 --> 00:05:34,400 complete uh your sub environments of as 123 00:05:34,400 --> 00:05:36,880 compartments what GC in gcp work is 124 00:05:36,880 --> 00:05:40,160 called project in AWS would be uh a 125 00:05:40,160 --> 00:05:44,199 separate AWS account for this right and 126 00:05:44,199 --> 00:05:47,680 in aure would be different 127 00:05:48,160 --> 00:05:51,039 subscriptions and all of this is inside 128 00:05:51,039 --> 00:05:52,680 attendance and attendance is your own 129 00:05:52,680 --> 00:05:54,880 account on 130 00:05:54,880 --> 00:05:58,479 Oracle and any of this uh small pieces 131 00:05:58,479 --> 00:06:01,319 can have a policy and a policy is what 132 00:06:01,319 --> 00:06:05,800 defines the authorization in Oracle 133 00:06:05,919 --> 00:06:09,880 right so let's do a quick one-onone how 134 00:06:09,880 --> 00:06:12,280 the IM 135 00:06:12,280 --> 00:06:15,720 Works uh the Articles uses a syntax that 136 00:06:15,720 --> 00:06:19,319 much much easier to understand than AWS 137 00:06:19,319 --> 00:06:21,280 it looks like a natural language 138 00:06:21,280 --> 00:06:25,560 approach much similar to SQL so the over 139 00:06:25,560 --> 00:06:28,120 syntax is something like this allow one 140 00:06:28,120 --> 00:06:31,120 identity domain in a subject to and a 141 00:06:31,120 --> 00:06:34,680 verb uh and this verb is an action The 142 00:06:34,680 --> 00:06:37,319 Source type in a specific location in 143 00:06:37,319 --> 00:06:39,160 where where you can put some conditions 144 00:06:39,160 --> 00:06:42,639 just like SQL right uh so in general uh 145 00:06:42,639 --> 00:06:44,720 it makes really easy for us to 146 00:06:44,720 --> 00:06:46,960 understand what the policy does but it's 147 00:06:46,960 --> 00:06:49,120 kind of harder to par this in computer 148 00:06:49,120 --> 00:06:51,080 in Computing program software 149 00:06:51,080 --> 00:06:54,599 programming right so in to make things 150 00:06:54,599 --> 00:06:57,160 even harder to understand you can have 151 00:06:57,160 --> 00:06:59,680 some Advanced statements like you can 152 00:06:59,680 --> 00:07:03,479 find a group a variable and then uh 153 00:07:03,479 --> 00:07:05,840 assign uh o 154 00:07:05,840 --> 00:07:10,319 oci uh you basically get an ID um for 155 00:07:10,319 --> 00:07:12,360 this variable and then reuse this 156 00:07:12,360 --> 00:07:14,120 variable whenever you want in your 157 00:07:14,120 --> 00:07:17,800 policies right so for us to write a c 158 00:07:17,800 --> 00:07:22,160 code to figure it out this it's kind of 159 00:07:22,479 --> 00:07:26,319 mess so I told youn you told you about 160 00:07:26,319 --> 00:07:28,800 the verbs right so there are actually 161 00:07:28,800 --> 00:07:31,520 Four permission level in Disorder so you 162 00:07:31,520 --> 00:07:32,360 have the 163 00:07:32,360 --> 00:07:34,919 inspect and it only allows you to get 164 00:07:34,919 --> 00:07:36,960 metadata from the resort that you want 165 00:07:36,960 --> 00:07:38,000 to 166 00:07:38,000 --> 00:07:40,680 inspect the read and the read 167 00:07:40,680 --> 00:07:42,800 permissions you you accumulate to 168 00:07:42,800 --> 00:07:44,599 inspect so you can inspect you as you 169 00:07:44,599 --> 00:07:46,919 can read this would allow you to get 170 00:07:46,919 --> 00:07:49,000 objects and object storage and things 171 00:07:49,000 --> 00:07:52,560 like this the use allows you to inspect 172 00:07:52,560 --> 00:07:55,280 read and use so you can if you have 173 00:07:55,280 --> 00:07:58,440 permissions to use an instit instance 174 00:07:58,440 --> 00:08:01,000 you can use an instance and manage 175 00:08:01,000 --> 00:08:04,720 allows you to the same inspect reach use 176 00:08:04,720 --> 00:08:07,039 and manage all the things that you can 177 00:08:07,039 --> 00:08:12,830 do on that subject right so uh they are 178 00:08:12,830 --> 00:08:15,639 [Music] 179 00:08:15,639 --> 00:08:18,639 progressive 180 00:08:23,360 --> 00:08:26,560 and it's new it's new well this is the 181 00:08:26,560 --> 00:08:30,680 new SL I wasn't expecting this there was 182 00:08:30,680 --> 00:08:33,198 to be 183 00:08:33,440 --> 00:08:36,320 hidden was supposed to be a sorry for 184 00:08:36,320 --> 00:08:39,799 that so uh and how does oracle knows 185 00:08:39,799 --> 00:08:41,679 which permissions instance for instance 186 00:08:41,679 --> 00:08:45,839 can run it has to know it in AWS you 187 00:08:45,839 --> 00:08:49,640 have the instance profiles and roles for 188 00:08:49,640 --> 00:08:53,240 Azure kind of stuff but in in Oracle it 189 00:08:53,240 --> 00:08:55,800 works like Dynamic groups so we create a 190 00:08:55,800 --> 00:08:58,600 dynamic group and if an instance is 191 00:08:58,600 --> 00:09:01,519 inside that group instantly Oracle knows 192 00:09:01,519 --> 00:09:03,519 and allows that policies for that group 193 00:09:03,519 --> 00:09:05,959 to that 194 00:09:05,959 --> 00:09:08,560 instance so we're going to talk about 195 00:09:08,560 --> 00:09:11,320 now the paths to become the one paths to 196 00:09:11,320 --> 00:09:13,390 escalate privilege 197 00:09:13,390 --> 00:09:15,040 [Music] 198 00:09:15,040 --> 00:09:18,880 right well we figured it out there's 199 00:09:18,880 --> 00:09:21,640 actually four ways to privil colage in 200 00:09:21,640 --> 00:09:25,480 Oracle for generic ways privileg 201 00:09:25,480 --> 00:09:28,480 colage uh the first one would be exploit 202 00:09:28,480 --> 00:09:32,519 or use a privilege resources to steal or 203 00:09:32,519 --> 00:09:35,000 use their credentials that kind of the 204 00:09:35,000 --> 00:09:38,200 basic one the second one was to use the 205 00:09:38,200 --> 00:09:40,160 privilege that you already have to Grant 206 00:09:40,160 --> 00:09:43,000 more privileges to yourself the third 207 00:09:43,000 --> 00:09:45,519 one would be Grant resources or 208 00:09:45,519 --> 00:09:48,040 something else more privileged and then 209 00:09:48,040 --> 00:09:50,720 use that resources and the fourth one 210 00:09:50,720 --> 00:09:54,040 exploit unque flaws on AIM systems but 211 00:09:54,040 --> 00:09:55,440 we couldn't figure it out you couldn't 212 00:09:55,440 --> 00:10:00,519 found any flaws on oraco yet 213 00:10:03,360 --> 00:10:07,079 so uh on the first category of privilege 214 00:10:07,079 --> 00:10:10,040 cating we have three possibilities here 215 00:10:10,040 --> 00:10:13,040 the first one would be litim access and 216 00:10:13,040 --> 00:10:16,360 Ence with higher privileges so you were 217 00:10:16,360 --> 00:10:21,399 developer I like it's dark nice so and 218 00:10:21,399 --> 00:10:22,959 you guys can see this light better don't 219 00:10:22,959 --> 00:10:26,720 you good so 220 00:10:26,720 --> 00:10:30,120 uh sorry about this uh if you're a 221 00:10:30,120 --> 00:10:31,959 developer and you have access to an 222 00:10:31,959 --> 00:10:33,720 instance who has more privilege than you 223 00:10:33,720 --> 00:10:36,480 already have you can enter in that 224 00:10:36,480 --> 00:10:38,839 instance and get privilege from them is 225 00:10:38,839 --> 00:10:40,519 still instance credentials using any 226 00:10:40,519 --> 00:10:43,480 kind of remote code execution or is 227 00:10:43,480 --> 00:10:45,440 still instance credentials using service 228 00:10:45,440 --> 00:10:47,920 sign request 229 00:10:50,160 --> 00:10:54,079 for uh you might not uh realized but we 230 00:10:54,079 --> 00:10:57,880 teamed all all our slides with the 231 00:10:57,880 --> 00:11:02,160 Matrix team thing so every single 232 00:11:02,160 --> 00:11:04,320 Technique we got a we we figured out 233 00:11:04,320 --> 00:11:06,120 words and phrases from the article from 234 00:11:06,120 --> 00:11:08,800 The Matrix and the name is the Technics 235 00:11:08,800 --> 00:11:11,399 about this so the first one that we got 236 00:11:11,399 --> 00:11:13,920 uh you got the gift and basically is 237 00:11:13,920 --> 00:11:15,760 that first one that we talked about 238 00:11:15,760 --> 00:11:18,160 earlier so if you're a user or a 239 00:11:18,160 --> 00:11:20,320 developer uh that has access to an 240 00:11:20,320 --> 00:11:22,040 instance with higher privilege than you 241 00:11:22,040 --> 00:11:24,360 you just enter that instance and get the 242 00:11:24,360 --> 00:11:26,959 The Tokens The the credentials and use 243 00:11:26,959 --> 00:11:31,040 them right so all the instance uh 244 00:11:31,040 --> 00:11:33,279 authentication in Oracle using is using 245 00:11:33,279 --> 00:11:36,760 by SSH keys so you have to have access 246 00:11:36,760 --> 00:11:40,800 to that SSH keys and they cannot be 247 00:11:40,800 --> 00:11:43,200 easily modified so you should be careful 248 00:11:43,200 --> 00:11:45,680 when handling SSH keys in whatever 249 00:11:45,680 --> 00:11:48,279 environment you 250 00:11:48,320 --> 00:11:51,200 are uh the second technique that we 251 00:11:51,200 --> 00:11:54,760 figured it out is uh cookies need love 252 00:11:54,760 --> 00:11:57,240 so if you figure it if you find any 253 00:11:57,240 --> 00:12:00,560 application in an instance that has a 254 00:12:00,560 --> 00:12:04,200 remote code execution uh you can remote 255 00:12:04,200 --> 00:12:05,800 code execution that machine that 256 00:12:05,800 --> 00:12:09,040 instance and steal the credentials or do 257 00:12:09,040 --> 00:12:10,360 something on Oracle with this 258 00:12:10,360 --> 00:12:12,360 credentials basically you only have to 259 00:12:12,360 --> 00:12:15,600 run that comment over there like oci 260 00:12:15,600 --> 00:12:19,079 something something DH dash off and use 261 00:12:19,079 --> 00:12:21,720 the instance principle now this D Das 262 00:12:21,720 --> 00:12:24,760 off instance principle we talk we take 263 00:12:24,760 --> 00:12:27,040 we call to the oci that it has to use 264 00:12:27,040 --> 00:12:29,959 the instance the the the 265 00:12:29,959 --> 00:12:32,880 permissions of that 266 00:12:35,079 --> 00:12:36,839 instance 267 00:12:36,839 --> 00:12:39,720 uh before we talk about ssrf 268 00:12:39,720 --> 00:12:41,560 vulnerabilities we have to talk about 269 00:12:41,560 --> 00:12:44,079 the metadata right so there's actually 270 00:12:44,079 --> 00:12:48,000 two versions of em emds V1 metadata the 271 00:12:48,000 --> 00:12:53,160 msv1 emds V2 the MDS V1 doesn't have 272 00:12:53,160 --> 00:12:55,079 protections against service High request 273 00:12:55,079 --> 00:12:58,120 forgers so and it's enabled by default 274 00:12:58,120 --> 00:13:01,040 so that's the main problem about the 275 00:13:01,040 --> 00:13:04,480 Oracle uh C fores they are enabled by 276 00:13:04,480 --> 00:13:07,639 the fall and EMD sv2 is protect against 277 00:13:07,639 --> 00:13:09,880 some some kind of request Fortress but 278 00:13:09,880 --> 00:13:12,720 if you figured out a way to inject 279 00:13:12,720 --> 00:13:15,160 headers on those S side request Fortress 280 00:13:15,160 --> 00:13:19,760 You' be able to bypass the the sv2 as 281 00:13:22,600 --> 00:13:26,519 well so this is a a a screenshot uh 282 00:13:26,519 --> 00:13:29,240 acing the oci metadata and as you you 283 00:13:29,240 --> 00:13:31,480 can see just the same IP address of 284 00:13:31,480 --> 00:13:36,360 every called provider the 169 254 169 285 00:13:36,360 --> 00:13:40,040 254 the path is different from AWS and 286 00:13:40,040 --> 00:13:44,639 for JCPS as well but this is the the 287 00:13:44,639 --> 00:13:47,519 information that you can 288 00:13:48,240 --> 00:13:53,639 get so and by this the third technique 289 00:13:53,639 --> 00:13:58,040 that we have is take a cook uh and we we 290 00:13:58,040 --> 00:13:59,639 thought that would be the first one to 291 00:13:59,639 --> 00:14:02,040 figure out this technique but SS offers 292 00:14:02,040 --> 00:14:04,480 are common right we know about SS 293 00:14:04,480 --> 00:14:08,240 vulnerability AWS and kind of stuff so 294 00:14:08,240 --> 00:14:10,560 we did we dig a little bit more deeper 295 00:14:10,560 --> 00:14:12,240 and we figured it out that Oracle 296 00:14:12,240 --> 00:14:14,360 security did a previous research about 297 00:14:14,360 --> 00:14:18,120 this so they they not uh thought about 298 00:14:18,120 --> 00:14:20,320 other method of privilege colal as we 299 00:14:20,320 --> 00:14:23,480 did but they described this uh in a blog 300 00:14:23,480 --> 00:14:28,680 post so and basically uh you've used the 301 00:14:28,680 --> 00:14:29,959 SS 302 00:14:29,959 --> 00:14:34,320 SF to steal certificates that are in 303 00:14:34,320 --> 00:14:37,440 that instance 304 00:14:42,000 --> 00:14:43,880 right 305 00:14:43,880 --> 00:14:47,199 and those this finishes the first uh 306 00:14:47,199 --> 00:14:49,279 General generic ways to privil 307 00:14:49,279 --> 00:14:52,320 escalation then we go to the second one 308 00:14:52,320 --> 00:14:55,600 so there are two two possibilities here 309 00:14:55,600 --> 00:14:58,680 the first one is to ID yourself in a 310 00:14:58,680 --> 00:15:00,680 group with higher privileges if you have 311 00:15:00,680 --> 00:15:03,800 the permission to do so or create an API 312 00:15:03,800 --> 00:15:07,839 key for another user with higher 313 00:15:07,839 --> 00:15:11,040 privileges how it works uh we call this 314 00:15:11,040 --> 00:15:14,560 tenet noset so if you user on article 315 00:15:14,560 --> 00:15:16,120 and you have the permissions to use 316 00:15:16,120 --> 00:15:18,639 groups and use users privileges you can 317 00:15:18,639 --> 00:15:22,320 modify any group add remove members of 318 00:15:22,320 --> 00:15:24,600 that group and if you have permissions 319 00:15:24,600 --> 00:15:27,920 to add uh anyone in which group if you 320 00:15:27,920 --> 00:15:29,680 find a group with Mar Mission then you 321 00:15:29,680 --> 00:15:32,480 have you can just yourself that group 322 00:15:32,480 --> 00:15:34,759 and then you have those privileges right 323 00:15:34,759 --> 00:15:38,279 so kind of kind of easy uh and there is 324 00:15:38,279 --> 00:15:41,790 two print screens so showing how we do 325 00:15:41,790 --> 00:15:45,120 [Music] 326 00:15:46,600 --> 00:15:49,240 this the 327 00:15:49,240 --> 00:15:54,759 are uh about this generic group is we 328 00:15:54,759 --> 00:15:56,279 have if you have the manag user 329 00:15:56,279 --> 00:15:59,440 permissions you basically create uh uh 330 00:15:59,440 --> 00:16:01,920 API keys for other users than you so if 331 00:16:01,920 --> 00:16:04,040 you figure out there is an administrator 332 00:16:04,040 --> 00:16:05,880 or any user with higher privilege than 333 00:16:05,880 --> 00:16:07,720 you you can just create keys and 334 00:16:07,720 --> 00:16:10,360 impersonate the user so if you use that 335 00:16:10,360 --> 00:16:12,839 API Keys you can use as if you are that 336 00:16:12,839 --> 00:16:15,639 guy and it returns you for any blank 337 00:16:15,639 --> 00:16:18,959 that the the API 338 00:16:21,399 --> 00:16:25,800 Keys um and the third one be smell good 339 00:16:25,800 --> 00:16:29,279 on they and you can see that you can 340 00:16:29,279 --> 00:16:32,680 configuration profile on o c commments 341 00:16:32,680 --> 00:16:35,880 using this knowing Flags like Das dash 342 00:16:35,880 --> 00:16:39,880 off API key D- profile D- config file 343 00:16:39,880 --> 00:16:42,360 and the PA to config file basically how 344 00:16:42,360 --> 00:16:45,360 to you configure the oci to run with 345 00:16:45,360 --> 00:16:48,079 that API 346 00:16:54,560 --> 00:17:00,839 Keys um and look as workers here I 347 00:17:03,640 --> 00:17:06,079 okay so look at my cor here's going to 348 00:17:06,079 --> 00:17:08,039 talk about the other two 349 00:17:08,039 --> 00:17:09,959 possibilities and then we're going to 350 00:17:09,959 --> 00:17:12,880 speak about uh a project that we have 351 00:17:12,880 --> 00:17:15,720 that will be available on G Hub that 352 00:17:15,720 --> 00:17:17,400 explains all those techniques and 353 00:17:17,400 --> 00:17:21,880 terraforms for you guys to practice 354 00:17:27,720 --> 00:17:30,840 so oh 355 00:17:40,360 --> 00:17:42,039 oh 356 00:17:42,039 --> 00:17:46,400 hi so moving on we also have two 357 00:17:46,400 --> 00:17:49,039 techniques that are related to creating 358 00:17:49,039 --> 00:17:50,720 privileged Resources with your 359 00:17:50,720 --> 00:17:52,600 permissions that you can then 360 00:17:52,600 --> 00:17:56,080 use so let's 361 00:17:56,080 --> 00:17:59,919 go first one uh um when we're talking 362 00:17:59,919 --> 00:18:02,320 about instances and dynamic groups there 363 00:18:02,320 --> 00:18:03,880 are two ways that you can put an 364 00:18:03,880 --> 00:18:07,000 instance into a into a dynamic group so 365 00:18:07,000 --> 00:18:10,000 the first one is an open uh inclusion 366 00:18:10,000 --> 00:18:12,360 pattern which is like if this instance 367 00:18:12,360 --> 00:18:14,520 is in this compartment it will belong to 368 00:18:14,520 --> 00:18:17,360 this Dynamic group and the other one is 369 00:18:17,360 --> 00:18:20,080 you can add a specific instance using 370 00:18:20,080 --> 00:18:22,039 its ID so there are only those two 371 00:18:22,039 --> 00:18:24,440 methods right so if you are in an 372 00:18:24,440 --> 00:18:26,919 environment where they have configured 373 00:18:26,919 --> 00:18:29,600 this open method right 374 00:18:29,600 --> 00:18:32,760 and if this Dynamic group has some nice 375 00:18:32,760 --> 00:18:34,679 privileges like higher privileges than 376 00:18:34,679 --> 00:18:38,440 you already have then it is possible if 377 00:18:38,440 --> 00:18:40,840 you also have the Privileges to create 378 00:18:40,840 --> 00:18:43,880 an instance into that compartment then 379 00:18:43,880 --> 00:18:46,960 that instance will automatically uh be 380 00:18:46,960 --> 00:18:48,840 belong to that Dynamic group and then it 381 00:18:48,840 --> 00:18:50,400 will automatically have those 382 00:18:50,400 --> 00:18:51,490 permissions 383 00:18:51,490 --> 00:18:54,480 [Music] 384 00:18:54,480 --> 00:18:58,000 okay okay then you can just log into the 385 00:18:58,000 --> 00:19:02,520 instance and run commands from there 386 00:19:02,520 --> 00:19:04,720 so what 387 00:19:04,720 --> 00:19:06,880 do 388 00:19:06,880 --> 00:19:08,799 no 389 00:19:08,799 --> 00:19:12,200 no so after you create the instance you 390 00:19:12,200 --> 00:19:14,240 log into it and then you just have to 391 00:19:14,240 --> 00:19:17,480 install the oci CLI it's very easy it's 392 00:19:17,480 --> 00:19:19,799 just like two little lines over there 393 00:19:19,799 --> 00:19:21,840 and then you can start running commands 394 00:19:21,840 --> 00:19:25,840 into oci using that Dynamic uh group 395 00:19:25,840 --> 00:19:27,480 privileges 396 00:19:27,480 --> 00:19:31,440 okay uh um and lastly if you have access 397 00:19:31,440 --> 00:19:34,640 to an instance and you have access uh to 398 00:19:34,640 --> 00:19:38,880 use Dynamic groups then you can modify 399 00:19:38,880 --> 00:19:40,679 an existing Dynamic groups with 400 00:19:40,679 --> 00:19:42,720 privileges to include your instance okay 401 00:19:42,720 --> 00:19:45,280 so like this is a different scenario uh 402 00:19:45,280 --> 00:19:47,960 there is a Dy a dynamic group maybe it's 403 00:19:47,960 --> 00:19:52,039 like using specific IDs to check for 404 00:19:52,039 --> 00:19:55,400 for if the instance belongs to it then 405 00:19:55,400 --> 00:19:57,120 you can create an instance and then you 406 00:19:57,120 --> 00:19:59,520 put it into Dynamic group you you 407 00:19:59,520 --> 00:20:01,520 inherit all those Privileges and you can 408 00:20:01,520 --> 00:20:05,280 use them on your instance okay so very 409 00:20:05,280 --> 00:20:09,760 very simple but yes it requires some uh 410 00:20:09,760 --> 00:20:11,760 prives privileges 411 00:20:11,760 --> 00:20:14,880 beforehand so now let's talk about how 412 00:20:14,880 --> 00:20:16,520 can we prevent those things right 413 00:20:16,520 --> 00:20:18,440 because as you've seen these are mostly 414 00:20:18,440 --> 00:20:20,880 IM am related issues like there's no big 415 00:20:20,880 --> 00:20:24,000 zero days here you need uh previous 416 00:20:24,000 --> 00:20:26,039 access to some things you need some 417 00:20:26,039 --> 00:20:28,159 conditions to be able to execute these 418 00:20:28,159 --> 00:20:31,080 attacks and they all come from uh let's 419 00:20:31,080 --> 00:20:33,360 say a bad I am configuration right 420 00:20:33,360 --> 00:20:35,240 someone has priv privileges they 421 00:20:35,240 --> 00:20:37,039 shouldn't have something is not that 422 00:20:37,039 --> 00:20:38,679 well organized so we're going to give 423 00:20:38,679 --> 00:20:41,400 you some tips on how you can like better 424 00:20:41,400 --> 00:20:43,679 organize your oci environment to avoid 425 00:20:43,679 --> 00:20:44,480 these 426 00:20:44,480 --> 00:20:48,520 things so okay first of all don't Grant 427 00:20:48,520 --> 00:20:50,280 stuff to people that don't need stuff 428 00:20:50,280 --> 00:20:52,320 okay this is basic I am hygiene always 429 00:20:52,320 --> 00:20:56,559 try to keep it up uh there are more best 430 00:20:56,559 --> 00:20:59,200 practices that Oracle published and a 431 00:20:59,200 --> 00:21:02,840 document and it's it's mostly basic I 432 00:21:02,840 --> 00:21:04,760 everyday things there are just a few 433 00:21:04,760 --> 00:21:07,360 kvat that you should be aware of so 434 00:21:07,360 --> 00:21:10,279 Oracle recommends you to create separate 435 00:21:10,279 --> 00:21:13,080 identity domains for categories of users 436 00:21:13,080 --> 00:21:15,960 and for environments so if you recall 437 00:21:15,960 --> 00:21:17,919 from the previous slides your identity 438 00:21:17,919 --> 00:21:19,720 domain is like where the accounts are 439 00:21:19,720 --> 00:21:21,320 actually stored at so they are 440 00:21:21,320 --> 00:21:23,000 recommending you to like create 441 00:21:23,000 --> 00:21:25,559 different accounts for uh the prod 442 00:21:25,559 --> 00:21:27,320 environment and for the dev environment 443 00:21:27,320 --> 00:21:30,240 like people shouldn't be having access 444 00:21:30,240 --> 00:21:32,200 to different environments with the same 445 00:21:32,200 --> 00:21:33,840 account yes they should have like a 446 00:21:33,840 --> 00:21:38,480 separate identity just for that okay um 447 00:21:38,480 --> 00:21:40,600 they also recommend not using the 448 00:21:40,600 --> 00:21:42,840 theault domain admin group for basically 449 00:21:42,840 --> 00:21:44,720 anything but yeah that's kind of basic 450 00:21:44,720 --> 00:21:47,260 but worth 451 00:21:47,260 --> 00:21:49,400 [Music] 452 00:21:49,400 --> 00:21:53,279 mentioning sorry okay so there also some 453 00:21:53,279 --> 00:21:57,080 more advanced am IM am uh techniques 454 00:21:57,080 --> 00:21:59,360 let's say that you can use to to improve 455 00:21:59,360 --> 00:22:02,039 your environment so let's talk about 456 00:22:02,039 --> 00:22:04,159 conditions okay because conditions allow 457 00:22:04,159 --> 00:22:06,159 you to introduce higher granularity to 458 00:22:06,159 --> 00:22:10,120 your I am controls okay uh as you've 459 00:22:10,120 --> 00:22:13,799 seen a basic policy looks like this 460 00:22:13,799 --> 00:22:17,120 allow something to Something in in a 461 00:22:17,120 --> 00:22:20,559 compartment and the problem here is uh 462 00:22:20,559 --> 00:22:23,320 when you say manage groups okay that 463 00:22:23,320 --> 00:22:25,720 verb manage it's very permissive and 464 00:22:25,720 --> 00:22:28,600 there are only four verbs right like uh 465 00:22:28,600 --> 00:22:30,640 inspect read use and manage if you need 466 00:22:30,640 --> 00:22:32,679 something in between you're going to 467 00:22:32,679 --> 00:22:35,000 have to use conditions to get that okay 468 00:22:35,000 --> 00:22:36,840 because they're too broad if you need 469 00:22:36,840 --> 00:22:38,159 something more specific you're going to 470 00:22:38,159 --> 00:22:40,240 need to use conditions and the same goes 471 00:22:40,240 --> 00:22:42,600 for the resources okay uh if you're 472 00:22:42,600 --> 00:22:44,919 saying groups it's all the groups if you 473 00:22:44,919 --> 00:22:47,039 want to a subset of the groups you're 474 00:22:47,039 --> 00:22:48,760 also going to need to use conditions all 475 00:22:48,760 --> 00:22:50,320 right 476 00:22:50,320 --> 00:22:53,320 so uh conditions come after this like 477 00:22:53,320 --> 00:22:56,080 where in the end and it looks like SQL 478 00:22:56,080 --> 00:23:00,000 like so uh he can do that where you know 479 00:23:00,000 --> 00:23:02,840 uh the permission for the request is not 480 00:23:02,840 --> 00:23:05,320 group delete so like we're granting him 481 00:23:05,320 --> 00:23:07,640 manage permissions but he can't delete 482 00:23:07,640 --> 00:23:10,960 the group so you're uh creating a a 483 00:23:10,960 --> 00:23:13,240 subset of the the Privileges that are 484 00:23:13,240 --> 00:23:15,159 allowed okay there also many other 485 00:23:15,159 --> 00:23:16,919 variables you can use here like Source 486 00:23:16,919 --> 00:23:20,440 IP time of day qfa status G location 487 00:23:20,440 --> 00:23:22,919 resarch TXS you're going to have to dig 488 00:23:22,919 --> 00:23:24,760 into them to figure out what's best for 489 00:23:24,760 --> 00:23:29,240 you okay so just another another example 490 00:23:29,240 --> 00:23:31,960 here like so policy a allows this 491 00:23:31,960 --> 00:23:33,799 Dynamic group to manage everything in 492 00:23:33,799 --> 00:23:36,799 the compartment while the second one it 493 00:23:36,799 --> 00:23:39,480 only allows uh access to a specific 494 00:23:39,480 --> 00:23:41,080 bucket and you can see that because of 495 00:23:41,080 --> 00:23:43,640 the target bucket name and only for a 496 00:23:43,640 --> 00:23:45,720 specific action so this is something 497 00:23:45,720 --> 00:23:47,960 that you should probably be 498 00:23:47,960 --> 00:23:50,640 using 499 00:23:50,640 --> 00:23:55,120 oh okay uh and finally reviewing access 500 00:23:55,120 --> 00:23:57,279 okay reviewing access in Oracle is very 501 00:23:57,279 --> 00:24:00,039 hard so that natural language approach 502 00:24:00,039 --> 00:24:02,400 it comes back to bite you in the ass 503 00:24:02,400 --> 00:24:04,240 it's very hard to parse but you have 504 00:24:04,240 --> 00:24:05,960 three three options okay you can either 505 00:24:05,960 --> 00:24:08,279 do it manually and you get your army of 506 00:24:08,279 --> 00:24:10,840 interns and set them lose on your 507 00:24:10,840 --> 00:24:13,919 policies you can use Oracle access 508 00:24:13,919 --> 00:24:15,640 governance which we're going to be 509 00:24:15,640 --> 00:24:17,480 talking about in a little while or you 510 00:24:17,480 --> 00:24:19,200 can like create some sort of natural 511 00:24:19,200 --> 00:24:21,919 language parser based on oci's policy 512 00:24:21,919 --> 00:24:24,200 language to analyze you're going to have 513 00:24:24,200 --> 00:24:26,399 to like parse this natural language and 514 00:24:26,399 --> 00:24:28,640 treat it and there's nothing that can do 515 00:24:28,640 --> 00:24:31,399 actually uh it's hard to do as far as we 516 00:24:31,399 --> 00:24:34,159 seem so this is a nice future work if 517 00:24:34,159 --> 00:24:36,240 anyone want to come talk about this next 518 00:24:36,240 --> 00:24:38,559 year we would be very happy to see 519 00:24:38,559 --> 00:24:42,039 something like this so a quick uh note 520 00:24:42,039 --> 00:24:44,480 about Oracle access governance right so 521 00:24:44,480 --> 00:24:47,440 it's marketed as an IM analyzer for all 522 00:24:47,440 --> 00:24:50,720 things Oracle it comes in three licenses 523 00:24:50,720 --> 00:24:53,399 okay so there's like a basic license a 524 00:24:53,399 --> 00:24:55,880 workloads license and a premium license 525 00:24:55,880 --> 00:24:57,080 it's not that 526 00:24:57,080 --> 00:25:00,320 expensive uh setting up is very easy it 527 00:25:00,320 --> 00:25:04,159 takes less than five minutes but uh the 528 00:25:04,159 --> 00:25:07,039 results are not that great like you can 529 00:25:07,039 --> 00:25:09,080 see for example the policies that affect 530 00:25:09,080 --> 00:25:11,399 the user so yeah that helps but you can 531 00:25:11,399 --> 00:25:14,480 see uh exactly like okay but which 532 00:25:14,480 --> 00:25:17,679 resources does the user have access to 533 00:25:17,679 --> 00:25:20,120 uh you can see informations about like 534 00:25:20,120 --> 00:25:21,960 instance principles Dynamic groups 535 00:25:21,960 --> 00:25:24,840 there's a lot of things that are not 536 00:25:24,840 --> 00:25:28,360 entirely there okay so it's better than 537 00:25:28,360 --> 00:25:29,919 than manually verifying everything by 538 00:25:29,919 --> 00:25:31,799 hand but it's it's still not a complete 539 00:25:31,799 --> 00:25:33,360 solution so yeah you're going to have 540 00:25:33,360 --> 00:25:36,320 some you're going to have some some hard 541 00:25:36,320 --> 00:25:39,200 work when reviewing your IM IM policies 542 00:25:39,200 --> 00:25:41,919 for Oracle okay um there's also 543 00:25:41,919 --> 00:25:43,640 something called adaptive Security in 544 00:25:43,640 --> 00:25:46,760 Oracle where it's like a a little risk 545 00:25:46,760 --> 00:25:51,039 score thingy so you can uh assign scores 546 00:25:51,039 --> 00:25:53,799 to suspicious behavior and if it goes 547 00:25:53,799 --> 00:25:55,600 above a threshold you can like block 548 00:25:55,600 --> 00:25:59,279 logins and stuff uh it's it's bundle 549 00:25:59,279 --> 00:26:03,159 with Oracle uh maybe try it out maybe it 550 00:26:03,159 --> 00:26:04,580 will help your 551 00:26:04,580 --> 00:26:06,960 [Music] 552 00:26:06,960 --> 00:26:12,000 scenario sorry is that console conso set 553 00:26:12,000 --> 00:26:14,159 oh this is all in the console it's in 554 00:26:14,159 --> 00:26:17,799 the like U uh authentification the main 555 00:26:17,799 --> 00:26:19,480 something like that we can talk about it 556 00:26:19,480 --> 00:26:20,919 later no 557 00:26:20,919 --> 00:26:24,559 worries so also be very aware of 558 00:26:24,559 --> 00:26:26,559 managing access to instances as we' 559 00:26:26,559 --> 00:26:29,760 prively mentioned like 560 00:26:29,760 --> 00:26:32,120 uh inance I have no permissions by 561 00:26:32,120 --> 00:26:33,840 default you can grant them access 562 00:26:33,840 --> 00:26:36,919 through Dynamic groups and afterwards 563 00:26:36,919 --> 00:26:38,559 the permissions of that instance can be 564 00:26:38,559 --> 00:26:40,399 used by anyone have access to it and 565 00:26:40,399 --> 00:26:42,399 this is by Design 566 00:26:42,399 --> 00:26:45,679 okay uh and this sucks 567 00:26:45,679 --> 00:26:48,960 because it's very hard to manage access 568 00:26:48,960 --> 00:26:51,200 to the instances all right because you 569 00:26:51,200 --> 00:26:53,600 create the SS Keys when you're creating 570 00:26:53,600 --> 00:26:56,080 the instance and then afterwards if you 571 00:26:56,080 --> 00:26:57,480 if you want to modify those keys you 572 00:26:57,480 --> 00:26:59,480 have to log into the instance like there 573 00:26:59,480 --> 00:27:02,840 is no SSH management built into the 574 00:27:02,840 --> 00:27:05,720 console like gcp has or AG has it's very 575 00:27:05,720 --> 00:27:08,679 like raw you know 576 00:27:08,679 --> 00:27:11,240 so you create a key and then you send it 577 00:27:11,240 --> 00:27:13,240 to the user but like if he copies the 578 00:27:13,240 --> 00:27:15,720 key or sends it to someone else and then 579 00:27:15,720 --> 00:27:18,159 it's everything is loose it's it's hard 580 00:27:18,159 --> 00:27:20,080 to manage those things all right so be 581 00:27:20,080 --> 00:27:22,799 very careful of how you manage access to 582 00:27:22,799 --> 00:27:24,520 your instance and if if you can use like 583 00:27:24,520 --> 00:27:26,679 an external key Vault or something 584 00:27:26,679 --> 00:27:28,840 that's highly recommended in scenario 585 00:27:28,840 --> 00:27:29,919 all 586 00:27:29,919 --> 00:27:31,480 right 587 00:27:31,480 --> 00:27:34,919 so final conclusions most methods depend 588 00:27:34,919 --> 00:27:37,240 on IM am so Ure you're managing your 589 00:27:37,240 --> 00:27:40,360 aess and prives correctly okay as you've 590 00:27:40,360 --> 00:27:43,320 seen Oracle IM is really hard to manage 591 00:27:43,320 --> 00:27:45,240 so the best thing here is to keep it as 592 00:27:45,240 --> 00:27:47,600 simple as possible use external tools to 593 00:27:47,600 --> 00:27:51,000 help whenever you can all right uh some 594 00:27:51,000 --> 00:27:53,720 methods are not so obvious so be careful 595 00:27:53,720 --> 00:27:55,519 when messing with anything related to 596 00:27:55,519 --> 00:27:57,720 groups D groups instances those things 597 00:27:57,720 --> 00:27:58,840 are 598 00:27:58,840 --> 00:28:01,440 tricky uh and oci's default permissions 599 00:28:01,440 --> 00:28:03,640 are pretty secure just be aware of a 600 00:28:03,640 --> 00:28:06,919 little few caveats like the the IMD sv1 601 00:28:06,919 --> 00:28:09,720 thing like that's the opposite of AWS 602 00:28:09,720 --> 00:28:11,320 and 603 00:28:11,320 --> 00:28:14,919 gcp um and finally we will'll be 604 00:28:14,919 --> 00:28:18,120 releasing in the in the sooner rather 605 00:28:18,120 --> 00:28:21,120 than later future uh a blog post about 606 00:28:21,120 --> 00:28:23,600 this like with all the details so you 607 00:28:23,600 --> 00:28:26,880 can go through it more uh calm and 608 00:28:26,880 --> 00:28:29,039 patience and we we also want to release 609 00:28:29,039 --> 00:28:31,600 like uh a few reproducible Labs of these 610 00:28:31,600 --> 00:28:32,919 things so you can practice these 611 00:28:32,919 --> 00:28:34,880 techniques on your own and maybe do some 612 00:28:34,880 --> 00:28:37,480 more research on this and that's sort of 613 00:28:37,480 --> 00:28:39,200 thing okay 614 00:28:39,200 --> 00:28:41,799 fish yeah that's all uh thank you all 615 00:28:41,799 --> 00:28:45,080 for coming I hope you liked it 616 00:28:45,080 --> 00:28:50,199 um thank you guys thank you for coming