[00:00.000 --> 00:06.480] Hey everyone, thanks for coming. Okay, so let's just get into it. Using Pareto's principle [00:06.480 --> 00:15.560] for securing AWS with SCPs. So, let me turn on my remote, that would help. Alright, cool. [00:15.560 --> 00:19.540] So a little about me, I like AWS, I've been doing security for a while, whatever, blah [00:19.540 --> 00:23.920] blah blah, I took some tests, that's not a big deal. I'm also really into coffee. This [00:23.920 --> 00:29.980] is my real coffee set at home. So if you want to talk about single origins and pour overs [00:29.980 --> 00:35.200] and recipes, I could talk ad nauseum about that. I also run a podcast called Getting [00:35.200 --> 00:40.280] into InfoSec and it's designed to help folks get into security and by interviewing folks [00:40.280 --> 00:44.540] that are out there and see how they got in, cause everybody's path into security is different. [00:45.120 --> 00:50.360] And then I also wrote a book as well because, well, you know, it's just kind of helping [00:50.360 --> 00:54.600] solve the problem as well. So, like if you sat down with me for like an hour over coffee, [00:54.600 --> 00:58.980] what would I tell you? This is what I would tell you. And I like Hawaiian shirts, so on [00:58.980 --> 01:03.260] Fridays at work, you see me, uh, I'll probably be wearing a Hawaiian shirt. So that's a little [01:03.260 --> 01:10.380] about me. Cool. So, uh, I have no idea about you guys. Uh, this is the first time that [01:10.380 --> 01:14.140] the Cloud Village existed, so I just want to get to know everyone out there a little [01:14.140 --> 01:21.480] bit. How many folks out there manage AWS accounts, uh, 10 or less? 10 or less AWS accounts? Okay. [01:21.480 --> 01:28.040] How many manage 25 or more accounts? All right. All right. And how many manage 75 or more [01:28.040 --> 01:34.720] accounts? All right. Very cool. Very cool. Okay. And how many of you guys are using AWS [01:34.720 --> 01:43.040] organizations and SCPs? Okay. Cool. Cool. So, um, what's Pareto's principle, right? [01:43.040 --> 01:48.060] The idea is that with just a little bit of work, you can accomplish a lot of work. Okay. [01:48.060 --> 01:55.500] Or a lot of results. So 20% of effort and you get 80% of the results. Um, and that's [01:55.500 --> 02:02.340] where SCPs come in. They're just beautiful. So with only a little bit of, um, code, right? [02:02.340 --> 02:06.440] A few lines of configuration, you can really apply a lot of security to a lot of your accounts. [02:06.560 --> 02:10.780] Uh, but there's a lot of steps that are required before that. And also we'll talk a little [02:10.780 --> 02:15.360] about cloud security issues for those that are, uh, you know, not too familiar about [02:15.360 --> 02:21.080] AWS. Again, just trying to level set here. So what are some common issues, right? IAM, [02:21.080 --> 02:29.060] having keys and source code, um, having really egregious permissions on, um, boxes, like [02:29.060 --> 02:33.940] for say, you know, EC2 star or IAM star, uh, storage, leaky buckets, right? We've heard [02:33.940 --> 02:41.720] too many stories. Logging, right? I mean, really what AWS is, is you're giving the like [02:41.720 --> 02:48.360] infinite amount of resources globally, right? To an engineer. And this is what you have, [02:48.360 --> 02:55.980] but this is what you end up with, right? Uh, it's just, it's, it's, um, you know, AWS has a [02:55.980 --> 03:00.540] shared security model. We all know about it, but still it makes it very easy for someone [03:00.540 --> 03:08.160] to just trip over themselves. And so, you know, we have leaky buckets. Uh, I think we all [03:08.160 --> 03:12.120] know, or we may know about all these leaky buckets that are out there. Uh, someone even [03:12.320 --> 03:17.300] created a GitHub page that lists all the S3 bucket leaks out there. Very convenient. If [03:17.300 --> 03:21.600] you're trying to prove your case or just keep track and they're just, you know, it goes on [03:21.600 --> 03:27.380] and on and on and on. And someone said that there was like 9 billion data records of S3, uh, [03:27.380 --> 03:34.160] from S3 bucket leaks. Same thing. IAM is the new perimeter. So, you know, no longer is it [03:34.160 --> 03:40.440] network security. It's more IAM. Um, everybody might've heard of a Capital One breach [03:40.440 --> 03:46.700] recently. So, um, you know, a lot of things went wrong there, but you know, we don't want [03:46.700 --> 03:53.060] permissions like EC2 star, IAM star. I have actually seen this out there. Um, I have seen [03:53.060 --> 03:59.420] public machines that are running WAFs with EC2 star on them and I'm like having a heart [03:59.420 --> 04:05.440] attack. Um, and you know, in this case, you know, I was at a company once where, uh, someone [04:05.440 --> 04:11.340] emailed their IAM keys to someone else and I'm not sure how the keys got compromised, but [04:11.860 --> 04:20.160] $40,000 later, uh, a lot of EC2 instances were deployed and, um, it was not, it was not fun. [04:20.160 --> 04:28.140] AWS did reverse it, but still we don't want to be in that situation. Yeah. Uh, who here has [04:28.140 --> 04:38.100] heard of Codespaces? Oh, alright. So, Codespaces was like a GitHub like, uh, company that [04:38.100 --> 04:43.900] provided, as you can see, rock solid and secure affordable hosting. So we all know it's secure [04:43.900 --> 04:54.740] because it says it's secure, right? So, um, this was their website on June 14th, 2014. This was [04:54.740 --> 05:03.480] their website on June 18th, 2014. Their root keys got compromised and the attacker basically [05:03.480 --> 05:08.040] deleted all their backups, all their instances, everything. And they literally went out of [05:08.040 --> 05:14.660] business overnight. Okay. So this is a target for us, for AWS folks, for cloud folks. This is our [05:14.660 --> 05:19.820] target. We need to know this. Uh, it's a part of our history. And so it's something that, uh, I [05:19.820 --> 05:24.440] recommend everyone go ahead and look up. I pulled this from, uh, archive.org and you can do [05:24.440 --> 05:33.460] that same as well. So, why AWS organizations and SCP? Okay. So, uh, the reason why AWS [05:33.480 --> 05:37.060] organizations and SCP? So basically with a few lines of configuration or quote unquote code, we [05:37.060 --> 05:43.680] can enable a lot of change and a lot of protection in our accounts. Um, but the reason I did this [05:43.680 --> 05:50.480] talk is because, so SCP has been around for a little bit and I'm still not seeing too many [05:50.480 --> 05:54.880] organizations taking, taking advantage of it, at least to their full extent. I think people are a [05:54.880 --> 06:02.660] little afraid of SCP. Um, but it's a really good way to guard your security, um, and, and [06:02.660 --> 06:11.760] protect yourself, uh, if you have things even securely configured properly. So I'll talk a [06:11.760 --> 06:19.560] little about multi-account strategy. It's kind of, uh, a foundation to this. So if you are, um, [06:19.560 --> 06:22.620] using multiple accounts, you want to take advantage of the multi-account strategy. You want to [06:22.740 --> 06:27.400] have a logging account for your, your logs to go to. Okay. Uh, you want to have a security [06:27.400 --> 06:31.880] account for your security ops and your tools to run from. Uh, you want to have, you know, [06:31.880 --> 06:36.680] networking where you can do your transit gateways and things like that, shared services and, and [06:36.680 --> 06:41.220] on and on and on. So it's really important to do, uh, take advantage of the multi-account [06:41.220 --> 06:48.660] strategy. Uh, AWS, you know, first started off, I don't think they realized how, how, how big this [06:48.660 --> 06:54.180] would explode. And so they've, you know, incorporated some multi-account stuff. It's still, [06:54.180 --> 06:59.740] um, you know, I would look it up. It's, it's, it's part of the well, well-architected [06:59.740 --> 07:06.360] framework. Um, I'm not going to talk anything negative right now. So, um, so once you have this [07:06.360 --> 07:12.260] set up, okay, then you can take advantage, full advantage of AWS organizations. So it kind of [07:12.260 --> 07:17.680] works on top of that. Uh, you have your master account. Um, if anyone's familiar with any sort [07:17.680 --> 07:22.920] of directory, you have different OUs and you could have sub-OUs and you could apply policies at [07:22.920 --> 07:33.140] the OU level. So this is really how, um, security control policies work. Okay. And so this is [07:33.140 --> 07:38.540] kind of a quick outline of what I'm going to talk about. Um, you know, if you're coming in [07:38.540 --> 07:47.120] starting with AWS organizations and SCPs from scratch, okay. So we have the master account. [07:47.120 --> 07:55.180] Everything starts with the master account. Um, how many, not to embarrass you, but how many, how [07:55.180 --> 08:00.040] many here have master accounts with resources in them? You don't have to raise your hand. It's [08:00.040 --> 08:09.000] okay. So, um, so having a master account with resources is bad. You don't want to do that. Um, [08:09.000 --> 08:13.140] why? Because when you're going to apply a policy, you don't want to apply the policy at the [08:13.140 --> 08:17.400] master level. You want to apply it at a different OU level. And so you want a master account [08:17.400 --> 08:23.900] that's empty and has no resources. So that's really your biggest step in all this is getting, [08:23.900 --> 08:27.940] uh, creating a master account, moving your consolidated billing to another, uh, to that [08:27.940 --> 08:35.240] account. Um, there's a few steps involved. Uh, one, call your rep, um, create the account, [08:35.240 --> 08:39.820] create an S3 bucket for that account where your consolidated billing reports can go to, uh, and [08:39.820 --> 08:45.300] create a support account. And if you have, if you're on an enterprise, uh, level support plan, [08:45.300 --> 08:49.560] then definitely your rep will take care of most of this for you. Um, in one organization, it [08:49.560 --> 08:54.600] took a month for us to get this done. Uh, we had to sign a new contract, had to go through [08:54.600 --> 08:58.900] legal, blah, blah, blah, blah, blah. I'm like, what is this? Why is this? And they had to sign [08:58.900 --> 09:05.040] it with ink. It wasn't DocuSign. I was like, really? So, um, it was quite interesting. Um, [09:05.040 --> 09:10.040] but after you have the new AWS account, then you can create the org and link and unlink [09:10.040 --> 09:16.640] accounts. And it's pretty straightforward from that, from there. And here you are. So, so now [09:16.640 --> 09:22.020] once you have your master account, you create the organization. Okay. Uh, organizations has [09:22.020 --> 09:26.660] two modes. Uh, there's billing mode and then the full access, the full features mode, which [09:26.660 --> 09:31.240] lets you take advantage of service control policies and, and everything I'm going to talk [09:31.240 --> 09:36.320] about today. So if you have an organization already and you have a master account with no [09:36.320 --> 09:41.420] resources, then go ahead and make sure your organizations is enabled for full features. It's [09:41.420 --> 09:46.480] just, uh, a really quick, uh, CLI command, or you can go into console and, and, and do it [09:46.480 --> 09:53.280] there as well. You also might need to increase your, um, limits on AWS organizations as well. [09:53.280 --> 10:00.400] So, um, I have 10 here because that's what I was doing in my experimental account. Um, but [10:00.400 --> 10:07.260] yeah, so you might want to look into that as well. Okay. So here I, I've created an [10:07.260 --> 10:12.120] organization. Um, I'm logged in. I created a couple of different OUs. It's like super easy. [10:13.160 --> 10:19.540] And hopefully everyone has a, uh, a dev staging and prod environment. Uh, and hopefully not [10:19.540 --> 10:25.620] everyone is doing everything in, in one account or, or prod, right? So, uh, this is the ideal [10:25.620 --> 10:30.920] way. Um, so I created a prod staging and dev account. I also created an other account [10:30.920 --> 10:35.980] because there's a few accounts that I just didn't know where they should go. So, um, you [10:35.980 --> 10:42.100] might have a subsidiary that you're, you know, they want to have their own, uh, deal with AWS [10:42.100 --> 10:45.800] and they don't want you messing with that. So, you know, other would might, might be a good [10:45.800 --> 10:50.380] place to put it. And you can have sub OUs. Uh, there's no need to create just three top [10:50.380 --> 10:54.980] level, um, OUs. You could have, uh, many different sub OUs. It's really up to you how [10:54.980 --> 10:59.340] complicated you want it to go. The only one that really would be outside is the, is your [10:59.340 --> 11:03.320] root account or your master account. And that would be in the root OU. Pretty [11:03.320 --> 11:08.560] straightforward. And then just go ahead and, and enable your service control policies. It's [11:08.560 --> 11:15.120] okay. Nothing's going to happen here. Just go ahead and enable it. All right. So applying [11:15.120 --> 11:28.190] SEPs. Okay. Be really careful about SEPs. Um, I did say it's okay to enable them. Yes. But [11:28.190 --> 11:32.190] when you're going to apply them, take the usual methods about applying into dev, applying [11:32.190 --> 11:37.550] into pro, uh, staging and then prod. Uh, you, these things are really powerful. Uh, they're [11:37.550 --> 11:42.510] instantaneous. And when you apply it at the OU level, it takes effect for all your accounts [11:42.510 --> 11:49.370] under your OU. So, you know, take that into consideration. Uh, and please for, for, please [11:49.370 --> 11:59.400] don't deploy things on Friday. Just, just don't do it. Okay. Um, okay. So in AWS organizations, [11:59.400 --> 12:04.240] this is not SEP directly, but when you have your master account set up, this is a really [12:04.240 --> 12:08.460] nice feature to take advantage of. Just create a cloud trail. If you don't have one already, [12:08.460 --> 12:13.260] create a cloud trail in your master account and it will automatically apply to all your, uh, [12:13.260 --> 12:17.820] your whole organization. So you will only see this configuration when you're doing it from [12:17.820 --> 12:23.780] your master account. And so of course, have that bucket in a separate account for logging. [12:23.780 --> 12:28.360] Okay. Uh, and the reason it's in a separate account for logging is for integrity purposes, [12:28.360 --> 12:32.580] limited access. You don't want everyone to have access to that, to that logging account. And [12:32.580 --> 12:39.360] so you go ahead and set this up and you remember the name of your cloud trail. And I'll, I'll [12:39.360 --> 12:44.840] the next one here, we have an SEP that now prevents anyone from stopping and deleting that [12:44.840 --> 12:50.100] trail. Okay. This is all available on, on AWS, uh, on their examples page, where you could [12:50.100 --> 12:56.580] also, you know, I'll publish the slides. But here, what I'm referring to is, uh, the specific [12:56.580 --> 13:02.180] cloud trail name that you specified. And the reason is that say you have other groups out [13:02.180 --> 13:08.320] there that maybe want to have their own cloud trail or want to do whatever. Um, and you can [13:08.320 --> 13:11.180] let them, they can create their own cloud trails if they want, they can delete it, they could do [13:11.180 --> 13:16.920] whatever, but don't touch this cloud trail. So, uh, with this SEP, it'll, it'll allow you to [13:16.920 --> 13:23.280] stop. And you can see here, uh, I'm logged in as, as root, as admin, and I'm trying to disable [13:23.280 --> 13:40.030] it. And it says, you know, unnecessary permissions. So it works. Yes. That's right. Yeah. I'll be [13:40.030 --> 13:50.530] happy to take questions at the end. So, uh, again, so, you know, we're trying, so VPC flow [13:50.530 --> 13:54.550] logs, right? You want to protect those, uh, possibly if you really rely on them from a security [13:54.550 --> 14:00.890] purpose. Um, so go, you know, this is, uh, um, a log group, uh, sorry, service control policy [14:00.890 --> 14:05.670] that will protect them and, and, and prevent someone from deleting them. And, you know, you [14:05.670 --> 14:10.670] could tune to your liking, right? Do you want to specify specific, uh, VPC flow log as you, you [14:10.670 --> 14:19.950] could, you could really play with it as much as you like. Okay. A lot of times you have [14:19.950 --> 14:26.470] resources only in US West and East, for example, or two or three regions. There's no reason to [14:27.190 --> 14:32.970] have all your regions enabled. And so this will kind of limit your attack surface on where [14:32.970 --> 14:38.250] regions would be set up and your attack could come from outside or inside. I mean, a lot of [14:38.250 --> 14:43.610] times employees, I don't want to say a lot of times, sometimes an employee could, uh, set up an [14:43.610 --> 14:50.130] instance in, I don't know, London or, or Asia, um, with GPU instances and just do some crypto [14:50.130 --> 14:55.010] mining and no one would know about it until much later. Um, you know, it really depends how good [14:55.010 --> 15:00.410] your monitoring is, how mature your environment is for, uh, for looking at resources outside [15:00.410 --> 15:07.390] your environment. So again, this is not rocket science, uh, but this will limit your, uh, attack [15:07.390 --> 15:14.310] surface. So it's a really good way to just, Hey, I don't think we'll ever have a need for US, [15:14.310 --> 15:21.610] uh, um, US West one or anything outside of the US, whatever you can use, you know, you could [15:21.610 --> 15:26.330] just play with this, uh, to your liking. I did have, oh, so one note is I put like easy to [15:26.330 --> 15:30.290] describe, for example. So if I want to have a tool or if there's a tool that's going to do [15:30.290 --> 15:35.170] easy to describe, uh, then I could run it and it won't break that tool. So if you have [15:35.170 --> 15:39.590] monitoring tools, then you want to add a couple not actions here, uh, so that your tools won't [15:39.590 --> 15:46.670] break something to take into consideration. And so this is an example of, uh, trying to [15:46.670 --> 15:55.250] launch something from a region that is not on that list. Uh, the next thing is limiting the [15:55.250 --> 16:00.170] type of instances that are running in your environment. And there's two ways to do it. You [16:00.170 --> 16:06.810] could do a permit list and I'll show you both. In this case, um, I am denying these particular [16:06.810 --> 16:12.030] instance types, right? Um, is there a need for your organization to use a P3 instance, right? [16:12.030 --> 16:18.350] With like four GPUs? I don't know. Um, probably not. So in this case, we're limiting the type [16:18.350 --> 16:24.530] of instances, uh, so that either accidentally or maliciously, we don't launch instances that [16:24.530 --> 16:32.130] are going to cost us thousands and thousands of dollars. And, and, and I want to, uh, draw [16:32.130 --> 16:38.830] attention to the string like, uh, condition here. It lets you use, um, it lets you use a, a [16:38.830 --> 16:45.110] wildcard condition. So it's, it's pretty, pretty versatile. Here's one of allowing it. So, you [16:45.110 --> 16:50.130] know, I'm limiting to just general purpose, uh, instances. So here we have a, a bunch of [16:50.130 --> 16:57.690] instances listed. We have A, T, M and, um, M5 and M4. And so, okay, that's all instances we [16:57.690 --> 17:03.130] need, right? It depends on your organization. You could actually, uh, add more to this. You [17:03.130 --> 17:07.410] could limit it to particular AMIs if you want. You could limit, you know, you could have, uh, [17:07.410 --> 17:13.090] you can make this as restrictive as you want. You can have multiple SCPs. So you have this one [17:13.090 --> 17:18.250] for, for instance types and then another one for AMI. And of course it takes, uh, the IAM [17:18.250 --> 17:23.150] precedence where it compiles all the permissions and takes the least, um, or the most [17:23.150 --> 17:31.630] restrictive permission out of everything. Here's a good one, uh, limiting root actions, right? You [17:31.630 --> 17:37.450] want to deny root actions across your, your accounts. Um, and so this is a really good way to [17:37.450 --> 17:45.110] do so. Uh, using the principle ARN and, um, you literally as root, you can't do anything. I'm [17:45.110 --> 17:49.730] logged in as root and I can't even do a describe on instances. I can't launch anything. I, I [17:49.730 --> 17:58.430] can't do a single thing. So it's really, really powerful. Um, this is one of my favorites. So, you [17:58.430 --> 18:03.750] know, if you have that founder that still has access to the root account, um, which happens a [18:03.750 --> 18:07.330] lot, right? The founder, because the email was created with their credit card and their email [18:07.330 --> 18:12.430] address. So, uh, I would, I would recommend, you know, you talk to them first before doing this. [18:12.430 --> 18:19.730] It might be a good idea. Um, you do want to keep your job. Here's another one. Uh, you want to [18:19.730 --> 18:25.290] enable encryption. So, uh, you know, you don't want to allow any objects to be put into your S3 [18:25.290 --> 18:31.050] buckets, uh, unless they're meeting this criteria. And in this case, the criteria is that it's [18:31.050 --> 18:41.750] encrypted with AES 256, for example. Same thing with S3, uh, public access. Uh, here's another [18:41.750 --> 18:50.690] one. So I'm still experimenting with this a little bit. So, um, but it, it seems to be working. [18:51.730 --> 18:59.330] Okay. So troubleshooting. Um, there's a lot of troubleshooting that I went through, um, in this. [18:59.330 --> 19:05.430] I definitely recommend you take a deep reading of IAM and IAM syntax, especially when you're [19:05.430 --> 19:12.370] looking at the conditional operators and, and trying to put a list of things. Um, so it's, it's [19:12.370 --> 19:17.770] quite tricky, um, especially in this condition map, trying to define it. Uh, but you know, it's, [19:17.770 --> 19:26.340] um, it's all based on IAM, so it's pretty straightforward. And you know, just some little like [19:26.340 --> 19:32.920] things, even I was trying to do a, uh, little Easter egg as far as a version number. And, uh, [19:32.920 --> 19:42.960] turns out that, you know, AWS doesn't like that. Does anyone know what that date is? Oh, right. [19:42.960 --> 19:47.440] Yeah. The date, it's supposed to be. Yes. But, uh, that day right there, November 5th, 1955. [19:47.440 --> 19:54.640] Does anybody know that date? Yes. Back to the future. Pretty good. Yeah. I was watching at the [19:54.640 --> 19:59.760] time. Actually, I have a few dates throughout the presentation. Um, little Easter eggs from [19:59.760 --> 20:09.420] different things throughout movie history. So, yeah. And then same thing here. Um, if you want [20:09.420 --> 20:15.180] to deny a role, uh, then you could specify the role. But then if you want to, uh, specify an [20:15.180 --> 20:21.900] actual IAM user, you will need to use the condition string not like. Um, that was quite annoying [20:21.900 --> 20:28.000] as well. So, that's something there. Uh, this is a really cool website I found after doing a lot [20:28.000 --> 20:34.380] of this stuff anyway. Um, it's asecure.cloud. Uh, uh, the person that's created this is amazing [20:34.380 --> 20:40.180] and, and, uh, they have, uh, service control policies, uh, fi- security groups, a lot of [20:40.180 --> 20:44.240] different things that will let you even, uh, put confirmation templates together and just [20:44.240 --> 20:51.920] deploy. Uh, of course, you know, deploy cautiously to, uh, dev. But, um, it's a good library of a [20:51.920 --> 20:55.700] lot of different service control policies. Uh, the ones I showed you are the ones that, that, that [20:55.700 --> 21:02.300] I created and kind of implemented. Um, but that person has a lot of ones like, uh, like, uh, [21:02.300 --> 21:08.460] preventing people from deleting KMS keys, for example, right? Uh, that's a really good one. Um, [21:08.460 --> 21:12.600] so, I mean, imagine if, if, if someone deleted your KMS keys, you can no longer, uh, decrypt [21:12.600 --> 21:18.640] your information. So, uh, it's quite, quite precarious. And that's about it. This is my contact [21:18.640 --> 21:25.800] info. Um, I blog about stuff on AWS, uh, quite some time, uh, you know, frequently. And, uh, I'd [21:25.800 --> 21:28.380] like to open up for questions if there's any questions. Yes? [21:28.380 --> 21:38.100] I thought the SCP about blocking, uh, but what do you do about the active applied SCPs? [21:38.100 --> 21:38.500] That's right. [21:38.620 --> 21:39.320] During, uh, [21:39.320 --> 21:44.280] Yeah. Yeah. Yeah. That's, that's exactly right. You'd have, so you'd have to take that into [21:44.280 --> 21:50.460] consideration, uh, for things. I mean, I think AWS is working solely to limit those root [21:50.460 --> 21:54.000] actions. I'm kind of annoyed that there are still things that you need root for, but yeah, [21:54.000 --> 21:55.880] that's exactly right. Yes? [21:55.900 --> 22:04.370] How do you handle issues where things might overrun information? Is there something which [22:04.370 --> 22:07.670] tells you, like, you have overrun the information or sends it to somebody? [22:08.590 --> 22:13.790] So the question is, uh, if I get it right, and the previous question was, um, do you have to, [22:13.790 --> 22:17.170] when you want to do things that require root action, uh, we, again, have to remove the [22:17.170 --> 22:20.730] service control policy. So that was a previous question. And this question is, what do you do [22:20.730 --> 22:22.010] about over-permissioning? [22:22.010 --> 22:32.980] Yeah. Like, how do you, like... [22:33.340 --> 22:38.480] Oh yeah. There are a few, uh, tools out there that would, that will give you, um, a list of [22:38.480 --> 22:42.160] permissions that are recently used by particular users. And AWS has some out of the box, [22:42.160 --> 22:43.880] actually, as well. Yes? [22:44.620 --> 22:52.440] Um, so you showed one of the slides here, the master account as well, as a trail. [22:52.440 --> 22:53.140] Yes. [22:53.220 --> 22:54.640] Every sub-member can... [22:54.640 --> 22:55.420] That's right. [22:55.420 --> 23:05.440] Does that mean that you can do, like, if you want to catch a contact or so on and so forth? [23:05.440 --> 23:07.120] It only applies to CloudTrail. [23:07.220 --> 23:08.780] Only CloudTrail? [23:08.780 --> 23:13.040] Only CloudTrail. So that, that screen there was a typical CloudTrail creation screen. Uh, but [23:13.040 --> 23:18.240] you only, you have that extra dialogue box for, um, when it's being done from the master [23:18.240 --> 23:21.820] account. And so all the settings that you have there are going to create a CloudTrail in each [23:21.820 --> 23:26.100] new account, or each account, uh, and any new accounts. [23:26.420 --> 23:27.740] Existing as well as new? [23:27.740 --> 23:28.340] That's right. [23:28.340 --> 23:30.040] All regions on all accounts? [23:30.040 --> 23:33.360] Well, depending on how you configure it. So if you configure for all regions, then yeah, that'll [23:33.360 --> 23:38.180] apply. But it'll apply for the same bucket. And, uh, the great part is for new accounts that are [23:38.180 --> 23:41.280] created later, which is, uh, like a, uh, a lifesaver. Yes. [23:41.280 --> 23:44.710] That bucket doesn't have to be the same. [23:44.890 --> 23:47.550] That's right. That's right. Yes. [23:47.610 --> 23:52.990] Um, one sort of observation we've, when we went to, uh, organizations, we also had to work [23:52.990 --> 23:58.210] with our procurement team to prevent anyone with a P-card from being able to pay for an AWS [23:58.210 --> 24:03.670] account. Because we had a couple hundred of those done scattered everywhere to pull them in. [24:03.670 --> 24:07.390] So if you're going to go organizations, make friends with procurement. [24:07.410 --> 24:12.070] Yes. Yes. Procurement is, uh, there are a couple of tools out there actually that I found, uh, [24:12.070 --> 24:17.490] that will, um, help you find shadow IT, uh, accounts out there. So they'll hook up into your [24:17.490 --> 24:24.550] Expensify and to your expensing tools and look at your credit card, uh, expenses and identify, [24:24.550 --> 24:29.130] oh, someone created an AWS account. Oh, look at this. And they'll identify this, uh, shadow IT [24:29.130 --> 24:33.790] stuff for you. So I find that. And it's, it's really interesting because, uh, we ran into [24:33.790 --> 24:38.150] issues where AWS didn't have permission to do things with that account. You probably ran into [24:38.150 --> 24:42.450] the same thing. Uh, and so you had to get the account owner to give you permission to handle [24:42.450 --> 24:44.170] that account. Yes. [24:44.310 --> 24:48.790] In situations where most of your developers share the same permissions level, how do you stop [24:48.790 --> 24:53.330] them or what mechanisms would you be able to use to stop them from just editing that and [24:59.910 --> 25:06.210] Oh yeah. Don't give them that permission. So that, that, that, that, that is, um, only that you [25:06.210 --> 25:11.250] can only do that from the master account. So in any case, you want to limit access to your master [25:11.970 --> 25:16.810] account to only limited few people who could apply those SAPs. So it's an administrative thing. [25:16.810 --> 25:20.970] So, you know, a limit, I mean, in general, a general rule of thumb is limit master account [25:20.970 --> 25:25.730] access to only a few admins. Is that, is that answer your question? [25:27.290 --> 25:32.970] The question was, how do you limit access from people changing the flags on SAPs? And the idea [25:32.970 --> 25:35.810] would be to limit access. Uh, yes. [25:41.830 --> 25:42.850] Say again? [25:45.190 --> 25:53.430] Oh, security hub. Um, I've played with it, um, with guard duty. I mean, I've used it. So, um, it [25:53.430 --> 26:00.410] won't monitor everything, but, um, in this, what I'm talking about, I guess is more prevention. [26:00.410 --> 26:04.550] So kind of setting up guardrails to prevent, uh, things from happening. So if you're noticing [26:04.550 --> 26:12.030] things, you could use SAPs to prevent things, but you want to get at the root cause of what's, [26:12.030 --> 26:28.340] what's happening in your environment. Yes. Privileged IAM accounts. So the question is, [26:28.340 --> 26:35.520] do you have, do you recommend any tools to, uh, manage privileged IAM accounts, um, in AWS? [26:35.520 --> 26:39.700] Uh, there's a couple, I mean, there's a couple tools out of the box, uh, from AWS that will [26:39.700 --> 26:44.660] have you run permissions and show you what permissions, uh, IAM users are using, [26:44.660 --> 26:51.940] uh, out of the box. And so you can, um, do an audit of that. Um, I recommend, you know, [26:51.940 --> 26:55.880] just as a best practice, having different roles. You know, you have a developer, [26:55.880 --> 27:03.080] maybe a super developer, uh, your network admin, uh, IAM admin, um, you know, a few, [27:03.080 --> 27:09.460] very few super admins, right? Um, and then try to use automation so that things are run and pushed [27:09.460 --> 27:15.420] through Terraform and GitHub so that there's an audit, audit log and audit trail of what's done. [27:15.480 --> 27:21.180] And so if you can see things done through a GitHub commit, um, and it's been approved, [27:21.180 --> 27:24.760] that PR has been approved, then you have some sort of audit trail and some permissions. [27:24.760 --> 27:42.040] Does that answer your question? Kind of, right? Yes. Uh, that could be a thing. [27:42.200 --> 27:44.700] That could be a thing. I haven't used it, but I think that could, that'd be a great, [27:44.700 --> 27:50.640] uh, that, I mean, the, I think the, the, you're unlimited in, in what you could do. Yes. [27:50.640 --> 27:56.780] Can you use SEPs to force tagging, uh, and like a tagging schema that you want to use? [27:57.600 --> 27:59.960] Um, I don't know. [28:01.720 --> 28:09.200] Or just in general for accounts for how folks are like, say, I want to always have an owner tag. [28:09.200 --> 28:18.480] I can imagine you can, I believe you must have an owner tag. You must have a description tag. [28:18.480 --> 28:23.700] Yeah. I, I, so the question is, can you use SEPs to enforce tags? I believe you can. Um, [28:23.700 --> 28:29.440] so basically what I would imagine is, uh, you know, when, when, when you have an EC2 run, [28:29.440 --> 28:34.140] uh, put a condition to require a tag, for example. Um, but I haven't created one, [28:34.140 --> 28:49.300] but yeah, I would imagine so. Yes. Um, so there's a few tools out there. Um, [28:49.300 --> 28:54.260] I guess ask me afterwards. I can, I can answer. There's a few out of the box from, uh, CloudTrail, [28:54.260 --> 28:58.460] I'm sorry, from AWS that will let you take a look at permissions. Are you talking about [28:58.460 --> 29:11.530] permissions? Permissions question? So if I understand the question, what tools are there [29:11.530 --> 29:16.310] available to take a look at permissions and audit, audit logs, or just permissions? So with audit [29:16.310 --> 29:21.190] logs, I mean, so CloudTrail you have now, uh, a lot of the IAM logs are going in CloudTrail. You [29:21.190 --> 29:26.310] could use any sort of tool, uh, Alex, Splunk, Sumo Logic. Uh, there's a few, there's a bunch [29:26.310 --> 29:48.330] out there. Um, yeah, I don't recommend specific vendors, uh, necessarily. So yeah, there are. [29:48.330 --> 29:52.950] So the question is, are there anomaly tools, uh, out there that look for anomalies? Well, [29:52.950 --> 29:57.630] there's GuardDuty out of the box, uh, for AWS. I don't work for AWS by the way. Um, [29:57.630 --> 30:02.190] there are other tools that will ingest your logs and look for anomalies. A lot of times you have [30:02.190 --> 30:07.250] to write, uh, those out. Uh, but yeah, I mean, security hub and GuardDuty and that whole like [30:07.250 --> 30:25.710] ecosystem, that's AWS's recommendation. Yes. Uh, yeah, I'm going to be posting these slides. So [30:25.710 --> 30:38.370] yeah, these slides will be posted. Yes. I have, um, but I say with a sigh. So, um, it's, it's, [30:38.370 --> 30:46.550] um, I don't know if I want to go on record, but yeah, I've used AWS. I've used AWS config. [30:46.550 --> 30:50.790] The question is, have you used AWS config and what are your thoughts on that? Um, I have thoughts [30:50.790 --> 30:58.830] on that. Um, I think, you know, it works for, for some organizations. Um, it's something good. [30:58.830 --> 31:04.710] I think it's better than nothing. Um, but I think with the convergence of a lot of tools that are [31:04.710 --> 31:09.470] coming out there, there's a lot of overlap that I'm seeing. So, and that's the hard thing with [31:09.470 --> 31:14.150] AWS is like, you know, you'll find someone that creates a tool, either open source or commercial. [31:14.150 --> 31:17.310] And then AWS comes with something, but then it's kind of half-assed like everything else that [31:17.310 --> 31:23.230] comes out of AWS when, you know, when it comes out, uh, it's kind of like, uh, AWS kind of beta [31:23.230 --> 31:27.250] tests things on, on the public. And then, you know, six months later, it's kind of better.