[00:00.000 --> 00:01.200] All right, thanks Jeff. [00:01.700 --> 00:05.040] We're here to talk about temporary credentials, right? [00:05.280 --> 00:06.400] Here's a little bit about me, [00:06.400 --> 00:08.940] but problem is I've got about four hours of workshop content [00:08.940 --> 00:10.940] that I squeezed into 32 minutes of talk, [00:10.940 --> 00:12.100] and we got 29 now, [00:12.100 --> 00:14.240] because Jeff took a minute out of my time. [00:14.240 --> 00:14.900] Thanks a lot. [00:14.900 --> 00:16.460] So I'm gonna talk at one and a half speed, right? [00:16.460 --> 00:18.780] So listen quickly, you know, wake up. [00:18.780 --> 00:20.820] If you leave in the middle, I'm gonna be pissed, right? [00:21.140 --> 00:23.260] All right, so let's get to it. [00:23.260 --> 00:25.140] Basically, to understand temporary credentials, [00:25.140 --> 00:27.260] let's just jump into a simple attack scenario. [00:27.340 --> 00:29.280] So I've got a recorded video. [00:29.280 --> 00:30.600] Let's just go through that. [00:30.620 --> 00:31.920] Then let's switch to defender viewpoint [00:31.920 --> 00:34.360] and see what the heck difference it makes, right? [00:34.360 --> 00:36.180] And the whole premise is it makes some difference. [00:36.180 --> 00:38.100] Both sides need to consider it. [00:38.100 --> 00:40.460] And then we'll wrap up with do's and don'ts, all right? [00:40.660 --> 00:42.360] So here's the basic scenario. [00:42.360 --> 00:43.380] Nothing super fancy. [00:43.380 --> 00:45.080] All you guys, I'm sure, have encountered worse [00:45.080 --> 00:46.180] or done worse, [00:46.180 --> 00:49.240] but we're basically gonna start with a compromise key. [00:49.240 --> 00:51.160] We're gonna generate a temporary credential, [00:51.160 --> 00:52.380] more for backdoor access, [00:52.380 --> 00:54.060] though I could use it right off the bat. [00:54.360 --> 00:55.980] Then I'll use that to escalate privileges [00:55.980 --> 00:58.740] and get access to a bucket, right? [00:58.740 --> 01:01.060] Okay, so let's move on. [01:01.060 --> 01:04.100] So here we'll start the demo and I'll talk you through it. [01:04.100 --> 01:06.000] Promise it's not huge. [01:06.000 --> 01:07.480] We'll start with credentials. [01:07.480 --> 01:08.680] And as we all know, [01:08.680 --> 01:11.220] it's not hard to find credentials these days. [01:11.520 --> 01:13.380] Whether you're on Pastebin, [01:13.380 --> 01:15.180] you got GitHub check-ins, [01:15.180 --> 01:16.420] you've got Gist, [01:16.420 --> 01:19.100] and of course you're harvesting or taking them, right? [01:19.100 --> 01:21.080] Plenty of malware still doing that. [01:21.080 --> 01:23.240] So that's not a problem. [01:23.240 --> 01:24.580] We've got a temporary credential. [01:24.580 --> 01:27.760] And for those of you who've worked with access keys, [01:27.760 --> 01:29.360] API keys, it's pretty much the same. [01:29.360 --> 01:30.500] I said environment variables, [01:30.500 --> 01:32.020] cause I'm gonna show CLI, [01:32.020 --> 01:36.240] but this is my compromised credential and starting point. [01:36.240 --> 01:37.800] All right, so let's continue on. [01:37.940 --> 01:39.780] So first thing I'm gonna do, [01:39.780 --> 01:41.900] I'm gonna immediately generate some temporary credentials. [01:41.900 --> 01:43.900] This'll make more sense as we get into the fact [01:43.900 --> 01:46.480] on the defensive side. [01:46.840 --> 01:48.600] I'm showing command line. [01:49.320 --> 01:51.300] Normally I'd run some Python code, [01:51.300 --> 01:52.320] but command line's good, [01:52.320 --> 01:54.800] nice and concise and fairly descriptive, right? [01:54.800 --> 01:57.420] So get session token off the STS service. [01:57.820 --> 01:59.860] If you can read the JSON, [01:59.860 --> 02:01.900] just two fields are what you expect. [02:01.900 --> 02:04.540] You get an access key ID and you get the secret, [02:04.540 --> 02:07.640] which is what a normal access key looks like. [02:07.640 --> 02:09.600] Then you've got the session token and expiration. [02:09.780 --> 02:12.700] When I called it into the API, I set the expiration time. [02:12.700 --> 02:14.240] We'll get into what those are, [02:14.240 --> 02:17.740] but it can be up to 36 hours, minimum 15 minutes. [02:17.980 --> 02:18.320] All right? [02:18.320 --> 02:20.520] So right now at this stage as an attacker, [02:20.520 --> 02:23.140] I've got backdoor access and we'll see why it's hard [02:23.140 --> 02:25.520] to control and manage this from the blue side, right? [02:25.520 --> 02:26.600] But I've got another credential. [02:26.600 --> 02:28.100] I've got two, the compromised one, [02:28.100 --> 02:30.640] and then right off the bat, I generated another one. [02:30.640 --> 02:32.600] And functionally, it's pretty much the same. [02:32.600 --> 02:35.900] 99% privileges access, right? [02:36.460 --> 02:39.220] All right, so let's continue on. [02:41.480 --> 02:43.560] And well, I don't know anything about the environment, [02:43.560 --> 02:44.980] so let's do a little bit of discovery. [02:44.980 --> 02:48.180] So again, we're going to do a very simplified version. [02:48.180 --> 02:49.320] Let me pause this here. [02:49.740 --> 02:52.980] Bunch of CLI commands are very oriented to IAM. [02:52.980 --> 02:56.040] I want to find out what user IAM, what groups, [02:56.040 --> 02:58.300] what roles, what policies apply to me, [02:58.300 --> 03:00.220] because I'm looking for escalation privilege, right? [03:00.220 --> 03:01.060] Pretty basic. [03:01.120 --> 03:02.740] I would normally enumerate a lot more. [03:02.740 --> 03:04.100] Do I know EC2 instances? [03:04.100 --> 03:05.400] Do I know what buckets are there? [03:05.400 --> 03:06.440] Blah, blah, blah. [03:06.520 --> 03:10.480] And so a lot of code out there to check yourself [03:10.480 --> 03:13.100] as well as to utilize if you're on the red team side, right? [03:14.540 --> 03:16.400] So nothing big and fancy. [03:16.900 --> 03:18.280] I'm going to take a look at the output [03:18.280 --> 03:20.380] and pull just some of the salient pieces. [03:20.840 --> 03:23.660] And so I can barely read my screen, [03:23.660 --> 03:26.280] but at the top, right, I had an access key. [03:26.280 --> 03:27.880] Oh, it's JenkoTempUser. [03:27.880 --> 03:29.160] That's the actual username. [03:29.160 --> 03:31.220] I've got the account ID, super useful. [03:31.220 --> 03:32.900] I'm going to be exploring the environment. [03:32.900 --> 03:35.140] I'm going to need this in other API calls. [03:35.420 --> 03:37.600] Basically, I start to look through this, [03:37.600 --> 03:40.080] and I mean, no one reads JSON in their sleep. [03:40.080 --> 03:41.840] This is a pain in the ass, basically, right? [03:41.840 --> 03:43.260] But the point is I'm looking [03:43.260 --> 03:46.220] for what policies are attached right off. [03:46.220 --> 03:47.800] And boom, I start to see stuff [03:47.800 --> 03:50.780] that hints at bucket roles, right? [03:50.780 --> 03:52.000] And assuming bucket roles, [03:52.000 --> 03:53.900] which is an elevation, right? [03:53.900 --> 03:58.020] It's our cloud version of sudo wrapped in some other stuff. [03:58.020 --> 03:59.920] So let's just keep going and taking a look, [03:59.920 --> 04:02.520] because basically at the end, [04:03.040 --> 04:04.640] there's a lot of verbose information, [04:04.640 --> 04:07.060] but basically I can assume a role, right? [04:07.060 --> 04:08.900] The user that I've compromised credentials [04:08.900 --> 04:10.680] can assume this bucket role, [04:10.680 --> 04:13.860] which has a policy and there's a JenkoBucket6. [04:13.860 --> 04:15.540] And so I'm happy. [04:15.540 --> 04:17.120] Man, this looks interesting. [04:17.120 --> 04:18.180] Now it's only one bucket. [04:18.180 --> 04:19.140] You can see the policy, [04:19.140 --> 04:20.300] but it's a little bit wide open [04:20.300 --> 04:22.840] because it's S3 colon star. [04:22.980 --> 04:25.260] So you could argue Blue Team's done [04:25.260 --> 04:28.300] maybe a little bit bad of a job here, [04:28.300 --> 04:29.280] but it's not horrible. [04:29.280 --> 04:31.400] It's one bucket and all the objects there, all right? [04:31.400 --> 04:33.940] Maybe it's a support guy that I got keys off of [04:33.940 --> 04:35.960] or something like that, a dev engineer. [04:36.460 --> 04:38.100] All right, so now that I've got [04:38.500 --> 04:40.520] a little bit more information, [04:40.520 --> 04:43.860] basically all that JSON I've tried to distill, [04:43.860 --> 04:45.900] what are the important relationships, right? [04:46.460 --> 04:48.020] You think our discovery tools [04:48.020 --> 04:49.740] could visualize a little bit better. [04:49.740 --> 04:52.080] Basically we're saying, look, I've got a compromise key. [04:52.080 --> 04:54.980] I'm going to call it A instead of the 50 characters. [04:54.980 --> 04:56.520] So we all know what we're talking about. [04:56.520 --> 04:58.320] That key that was compromised, [04:58.320 --> 05:00.180] I found on, let's say, Pastebin. [05:00.180 --> 05:04.980] I used, and I know it relates to JenkoTempUser. [05:04.980 --> 05:07.660] It was created underneath that user. [05:07.800 --> 05:11.400] It happens to be able to assume role, right? [05:11.440 --> 05:12.920] To a bucket role. [05:12.920 --> 05:13.920] Man, these guys are next door. [05:13.920 --> 05:15.420] We got to tell them to be quiet. [05:16.000 --> 05:20.360] And that has access to this bucket, JenkoBucket6, right? [05:20.460 --> 05:24.760] That's basically the path that we're going to exploit, right? [05:25.100 --> 05:26.800] With what looks like to be a hole [05:26.800 --> 05:29.240] in escalation of privileges here. [05:29.240 --> 05:31.280] So just to test though, [05:32.380 --> 05:34.900] I did try to access the bucket directly [05:34.900 --> 05:36.680] with my compromised credentials, right? [05:36.680 --> 05:38.680] There's a hint that I have to escalate privileges, [05:38.680 --> 05:40.280] but let's just make sure that bucket's not public [05:40.280 --> 05:41.560] to begin with, right? [05:41.560 --> 05:43.040] I mean, so why bother? [05:43.040 --> 05:43.680] Let's go after it. [05:43.680 --> 05:48.220] But I can't, I got an error just doing an LS on the bucket. [05:48.220 --> 05:50.920] So great, let's then think about the exploits. [05:50.920 --> 05:52.160] So taking that relationship, [05:52.160 --> 05:55.300] the actual exploits more in terms of API and flow [05:55.300 --> 05:56.940] more looks like this, right? [05:56.940 --> 05:59.520] You're basically going to make a call [06:00.160 --> 06:04.620] to the STS service doing an assume role. [06:04.620 --> 06:06.420] And the way that works is you receive [06:06.420 --> 06:09.420] yet another new temporary credential, [06:09.420 --> 06:12.380] which when used takes that assumed role [06:12.380 --> 06:15.140] in terms of permissions, right? [06:15.540 --> 06:18.740] Then you're going to use that with your regular API calls. [06:19.040 --> 06:20.740] Great, pretty easy. [06:20.740 --> 06:22.420] Sounds pretty straightforward to me. [06:22.660 --> 06:25.700] Real scenarios, there's a million of things, right? [06:25.700 --> 06:27.580] We might be going after EC2 instances. [06:27.580 --> 06:28.940] We might go after logs. [06:28.940 --> 06:30.980] We might be putting in lambdas. [06:31.000 --> 06:32.220] We'd be doing a bunch of things. [06:32.220 --> 06:33.560] Right now it's super simple, [06:33.560 --> 06:36.280] but everything we talk about today should apply, right? [06:36.560 --> 06:38.280] In terms of temporary tokens. [06:38.280 --> 06:39.320] So let's keep going. [06:41.740 --> 06:47.740] So next thing I'm going to do is actually assume role, right? [06:47.740 --> 06:49.080] So if you can make out the command line, [06:49.080 --> 06:53.480] basically another call to STS and assume role. [06:53.480 --> 06:55.780] And what I get back, again, [06:55.780 --> 06:58.780] just looks like another temporary credential, right? [06:58.780 --> 07:00.560] Same thing as my first attempt. [07:00.560 --> 07:02.700] My first attempt gave me a little backdoor count. [07:02.700 --> 07:05.380] Now I have assumed role and I get another temporary credential. [07:05.380 --> 07:07.760] Let me call it A prime because I used, [07:07.760 --> 07:10.740] you know, the original compromised credential A [07:10.740 --> 07:11.960] and that I'm calling A. [07:11.960 --> 07:14.680] And this gives me an A prime with elevated privileges. [07:14.800 --> 07:17.460] Great. Set some environment variables if I want to use it, [07:17.460 --> 07:21.720] but for the actual next step, copy, paste. [07:21.720 --> 07:23.140] I'm going to use a CLI. [07:23.140 --> 07:27.680] And now when I do the actual bucket command, [07:27.680 --> 07:29.320] boom, comes back, right? [07:29.320 --> 07:30.260] Makes sense? [07:30.260 --> 07:34.020] Basically on the left, I've just fulfilled that whole path. [07:34.040 --> 07:36.080] So no big deal. [07:36.080 --> 07:39.200] And unfortunately, it's like, if you want to do CLI, [07:39.200 --> 07:40.580] it's not that bad to do it. [07:40.580 --> 07:43.740] If you're doing Python, you'd wrap in a few Python commands. [07:43.740 --> 07:45.840] And all we've shown is that we started [07:45.840 --> 07:47.780] with compromised credentials and we escalated. [07:47.780 --> 07:51.700] So, so far, nothing big, strange and new, right? [07:51.700 --> 07:53.660] I did generate temporary tokens. [07:53.920 --> 07:57.180] So we're going to now flip to the defender side [07:57.180 --> 07:59.600] to see what difference this all makes, okay? [08:02.740 --> 08:03.180] So... [08:03.800 --> 08:04.600] Ahem. [08:08.800 --> 08:10.220] Sorry, reset here. [08:10.220 --> 08:12.520] So let's go to the defender viewpoint. [08:13.200 --> 08:15.940] So basically, put on your blue hat for a minute. [08:15.940 --> 08:19.220] We've had an incident like we just went through, right? [08:19.220 --> 08:20.340] You're catching up with it. [08:20.340 --> 08:21.600] You're at least 20 minutes late [08:21.600 --> 08:23.460] because we all know CloudTrail has a lag [08:23.460 --> 08:24.800] that they document, right? [08:24.800 --> 08:26.720] 15 minutes to get the API logged [08:26.720 --> 08:28.440] and five minutes at least to get to the bucket. [08:28.440 --> 08:29.100] You're already late [08:29.100 --> 08:31.360] by the time you pick it up out of CloudTrail. [08:31.620 --> 08:32.240] Okay. [08:33.080 --> 08:36.100] But your team is not terrible. [08:36.100 --> 08:37.720] You've got AWS experience. [08:38.160 --> 08:41.220] You've got logging in place, some kind of alarms, [08:41.220 --> 08:43.300] CloudWatch, your SIM, whatnot. [08:43.520 --> 08:44.640] You got a little bit of a gap though. [08:44.640 --> 08:46.460] You haven't really studied up on temporary credentials. [08:46.460 --> 08:48.260] So we're going to go through and sort of, [08:48.260 --> 08:51.360] with me and you putting on your hats, [08:51.360 --> 08:53.280] try to see what effect this makes. [08:53.480 --> 08:54.700] So what's our starting point? [08:54.700 --> 08:56.540] Well, you know, two obvious ones. [08:56.540 --> 08:59.700] Someone tells you from outside that your data's up on GIST [08:59.700 --> 09:02.260] or whatever financial information or something, right? [09:02.260 --> 09:03.140] That happens. [09:03.140 --> 09:06.420] Or maybe our venting is good enough that you get alarms. [09:06.420 --> 09:07.880] So let's just say we're competent enough [09:07.880 --> 09:08.960] that we actually picked this up [09:08.960 --> 09:10.720] in a reasonable point of time. [09:10.860 --> 09:14.740] So let's go back to the same kind of flow and architecture [09:14.740 --> 09:17.340] and try to, let's go through a reasonable scenario [09:17.340 --> 09:20.380] from the blue team side while we're catching up. [09:20.380 --> 09:21.480] Did we detect it? [09:21.480 --> 09:23.180] Well, yeah, we probably did. [09:23.180 --> 09:26.580] Maybe the data exfil stage was a reasonable point, right? [09:26.580 --> 09:29.200] I think maybe the action of copying [09:29.200 --> 09:31.040] however it was done was suspicious [09:31.040 --> 09:33.260] and you had filters on that. [09:33.260 --> 09:35.560] Maybe the destination was definitely suspicious, [09:35.560 --> 09:37.900] either another bucket that you weren't expecting [09:37.900 --> 09:39.340] or an IP address that was strained. [09:39.340 --> 09:40.760] So I think that's reasonable. [09:40.900 --> 09:42.880] Maybe you did pick up the privilege escalation, [09:42.880 --> 09:44.840] but I would say in this case, it's hard [09:44.840 --> 09:47.700] because the sort of scenario I painted was [09:47.700 --> 09:50.520] there's a valid maybe support role [09:50.520 --> 09:54.540] that could be assumed to maybe support that bucket, right? [09:54.540 --> 09:56.300] The problem really is compromised credentials. [09:56.300 --> 09:59.140] It wasn't that this role shouldn't be there, right? [09:59.140 --> 10:00.600] So I'm gonna say two is questionable [10:00.600 --> 10:02.860] whether you picked up the privilege escalation. [10:02.860 --> 10:03.840] That might be hard. [10:03.840 --> 10:06.180] Of course, you might not be just looking at events. [10:06.180 --> 10:09.280] You might have correlation anomaly detection in place. [10:09.280 --> 10:10.020] I think that's fair. [10:10.020 --> 10:12.100] That might've picked up some strange behavior. [10:12.280 --> 10:14.360] But either way, we're off to a decent start [10:14.360 --> 10:18.120] in that we were reacting reasonably fast. [10:18.820 --> 10:21.380] All right, where does it start getting interesting? [10:21.380 --> 10:24.060] So one, we're starting with the logs. [10:24.060 --> 10:26.860] That's pretty much our main starting point with anything. [10:27.040 --> 10:28.680] And so as we pour through the logs [10:29.060 --> 10:31.760] to try to catch up with some notification we got [10:31.760 --> 10:33.540] that something suspicious is going on, [10:33.540 --> 10:34.840] here's CloudTrail. [10:34.860 --> 10:36.980] I added some highlighting so we could all talk about it. [10:36.980 --> 10:39.580] Up top is what I call access key A. [10:39.580 --> 10:41.000] That's the one I started with, [10:41.000 --> 10:42.780] the compromised credential, right? [10:43.140 --> 10:45.420] This is when I use it to assume role [10:45.420 --> 10:48.020] and get back another temporary key [10:48.480 --> 10:49.600] with an elevated privilege. [10:49.600 --> 10:50.980] So you see assume role. [10:51.060 --> 10:55.060] And then in the response, you see that temporary token, [10:55.060 --> 10:57.640] which I'm calling A prime, right? [10:58.360 --> 11:01.080] Okay, this is where you're starting to look at [11:01.080 --> 11:02.600] what the heck's going on, right? [11:02.600 --> 11:05.300] And you're trying to go back and trace to the source [11:05.300 --> 11:07.520] and shut off every little gateway. [11:08.020 --> 11:11.600] So really, your analysis might, I think, [11:11.600 --> 11:13.240] reasonably lead to, look, the roles [11:13.240 --> 11:15.540] and the bucket access was okay. [11:15.780 --> 11:19.280] I'm gonna drill that user, Jenko, whatever his name is, [11:19.280 --> 11:21.880] and say, look, are you doing something bad [11:21.880 --> 11:23.480] or are you just careless and losing your key? [11:23.480 --> 11:25.100] And let's just say it was carelessness [11:25.860 --> 11:26.760] through the interview. [11:26.760 --> 11:28.660] And we say, look, it's a compromised key issue. [11:28.660 --> 11:30.240] Let's handle it that way, right? [11:30.240 --> 11:31.680] So we move on to mitigation. [11:31.840 --> 11:35.040] We delete that access key, which was the one that I got, [11:35.040 --> 11:36.320] or make it inactive. [11:37.220 --> 11:39.560] Maybe set him, if he deserves it, [11:39.560 --> 11:40.480] set him up with a new key, [11:40.480 --> 11:43.880] but really focus on key rotation and other practices. [11:43.940 --> 11:45.500] Definitely change the console password [11:45.500 --> 11:48.160] and send that guy to training, right? [11:48.160 --> 11:49.960] Or whatever is appropriate, right? [11:49.960 --> 11:52.960] Maybe these are parts of a reasonable step. [11:53.640 --> 11:56.860] So, you know, GUI has it, CLI, no big deal. [11:56.860 --> 11:58.500] This is probably in your playbook. [11:58.540 --> 12:02.180] Now the problem is we close off this incident, [12:02.180 --> 12:03.960] but we're smart enough to keep looking through the logs [12:03.960 --> 12:06.020] because we're just wondering what the heck happened. [12:06.020 --> 12:09.400] So we pick up another event and here it gets interesting. [12:09.400 --> 12:11.860] Here's where sort of blue thinks this might be different [12:11.860 --> 12:13.340] than what they've seen before. [12:13.340 --> 12:14.820] Maybe, but they don't really know. [12:14.820 --> 12:15.820] They see get session token. [12:15.820 --> 12:16.880] What the heck is that? [12:16.920 --> 12:17.980] Not too familiar with it. [12:17.980 --> 12:19.940] It's a STS, gotta go read up on it. [12:20.120 --> 12:21.820] This is the part in the text scenario [12:21.820 --> 12:24.280] where second step or first step, [12:24.280 --> 12:27.020] I just generated backdoor set of credentials, right? [12:27.020 --> 12:28.560] I'd probably do it for 36 hours. [12:28.560 --> 12:29.880] And the demo is 900 seconds [12:29.880 --> 12:31.080] because I don't trust any of you guys [12:31.080 --> 12:33.100] just in case you're logged in, right? [12:33.100 --> 12:34.740] To try to see if it's active, right? [12:34.740 --> 12:37.520] But really I would have given myself 36 hours, right? [12:38.080 --> 12:40.980] Here, defender might not be an expert, [12:40.980 --> 12:42.680] but this is raising their hackles. [12:42.680 --> 12:45.240] They read up quickly in five minutes, STS doc. [12:45.240 --> 12:47.720] This is another access key, A prime. [12:47.860 --> 12:49.260] The heck, I shot one off. [12:49.260 --> 12:50.540] Now I gotta go worry about another one. [12:50.540 --> 12:53.040] Hey boss, not quite over yet, right? [12:53.040 --> 12:54.440] We're still working it. [12:54.720 --> 12:57.440] So let's just pause for a minute [12:57.440 --> 12:59.820] and explain any differences with temporary tokens. [12:59.820 --> 13:02.500] You read up another hour on this if it's first time [13:02.500 --> 13:06.180] or two or three, because the doc is pretty messy. [13:06.980 --> 13:10.560] It's 15 minutes to 36 hours, which is an eternity. [13:11.020 --> 13:12.480] On top of that, you're late [13:12.480 --> 13:16.580] because CloudTrail is not anywhere near real time. [13:16.580 --> 13:20.440] You're 20 minutes, I think, if you're lucky on top of that. [13:20.440 --> 13:21.540] So they've got a headstart. [13:21.540 --> 13:23.000] If they're smashing and grabbing, [13:23.000 --> 13:26.440] they're maybe done by the time you see the event, right? [13:26.440 --> 13:27.300] If they know what they needed, [13:27.300 --> 13:29.160] they don't care if you pick it up. [13:30.220 --> 13:31.640] There are some nuances. [13:31.640 --> 13:34.180] Temporary credentials are used when you start up services, [13:34.180 --> 13:36.980] often passing, assuming a role for an EC2 instance [13:36.980 --> 13:40.040] to get proper privileges and AWS manages that. [13:40.040 --> 13:41.620] So those tend to be an hour. [13:41.620 --> 13:43.200] But if you compromise an EC2 instance [13:43.200 --> 13:44.580] and grab that temporary token, [13:44.580 --> 13:46.660] you more have an hour timeframe, [13:46.660 --> 13:48.320] but it gets refreshed automatically. [13:48.320 --> 13:50.320] So if they haven't detected you, you just keep grabbing it. [13:50.320 --> 13:52.860] So there's all these nuances. [13:52.860 --> 13:56.340] API access, 99% the same as a permanent access key. [13:56.420 --> 13:57.320] A little bit of a difference. [13:57.320 --> 13:59.840] You can't regenerate a new temporary token [13:59.840 --> 14:01.620] off of a temporary token, right? [14:01.620 --> 14:05.080] They're not quite that loose on the AWS side, [14:05.080 --> 14:07.360] but you can, and you have to assume roles. [14:07.360 --> 14:08.780] So escalation of privilege is key [14:08.780 --> 14:13.080] to sort of long-term use of temporary tokens for that. [14:13.080 --> 14:16.000] As we said, assuming roles and escalation of privilege [14:16.000 --> 14:18.400] is not a big barrier. [14:18.760 --> 14:20.960] The infrastructure is way too complicated. [14:21.180 --> 14:23.960] And if you need some thinking on that, [14:23.960 --> 14:26.160] love Rhino, they share a lot. [14:26.160 --> 14:28.440] There's plenty of things on their blog [14:28.440 --> 14:31.500] about the next dozen escalation of privileges. [14:31.780 --> 14:33.500] And it's pretty, pretty scary [14:33.500 --> 14:34.900] when it goes through other services [14:34.900 --> 14:36.080] that you're not even thinking about, [14:36.080 --> 14:38.400] like DynamoDB, hey, we never deployed that. [14:38.400 --> 14:38.760] What do you mean? [14:38.760 --> 14:40.960] You can go through that and maybe escalate privileges. [14:40.960 --> 14:44.260] Okay, now that we're a little bit more knowledgeable [14:44.260 --> 14:46.000] on the blue side about temp tokens, [14:46.000 --> 14:47.640] let's revisit our whole process [14:47.640 --> 14:48.960] and just see where we're short. [14:48.960 --> 14:51.440] Because I still have an active key out there, right? [14:51.440 --> 14:55.060] Maybe it hasn't been used, or maybe it is being used. [14:55.060 --> 14:56.560] Either way, I gotta do something about it. [14:56.560 --> 14:57.900] I mean, I'm aware of it [14:57.900 --> 15:00.040] because of one event in CloudTrail. [15:00.420 --> 15:01.600] Here's the problem. [15:01.820 --> 15:03.700] Number one, it's untracked. [15:03.740 --> 15:05.900] What I mean by that is there is no listing [15:05.900 --> 15:08.580] of currently active or even historically generated [15:09.100 --> 15:12.340] temporary tokens, at least not easily [15:12.340 --> 15:13.800] in a form that you can do. [15:13.800 --> 15:16.480] Your best bet is you could parse it out of CloudTrail. [15:16.960 --> 15:21.060] But really what you want is a listing somewhere in the GUI [15:21.060 --> 15:23.480] or the CLI and API call to say, [15:23.480 --> 15:26.300] what the heck, temporary tokens have been generated. [15:26.380 --> 15:27.840] When do they expire? [15:27.840 --> 15:29.480] Click, cancel. [15:29.480 --> 15:31.280] You don't have that, all right? [15:31.280 --> 15:32.920] So bad news. [15:32.920 --> 15:35.880] We're not getting a good feeling as we think about this. [15:35.880 --> 15:36.920] Let's think about detection [15:36.920 --> 15:38.960] because we are in CloudTrail land. [15:39.440 --> 15:40.840] Number one thing you gotta do, [15:40.840 --> 15:43.620] you're able to deal with it because you do get logs, [15:43.620 --> 15:45.820] but it's a little obscure and confusing. [15:45.820 --> 15:47.340] Focus on creation of tokens [15:47.340 --> 15:49.160] because you just don't want tokens out there [15:49.160 --> 15:50.580] that you never knew about. [15:50.580 --> 15:52.720] So creation is looking for get session token, [15:52.720 --> 15:55.780] which is what I did in the first step, [15:55.780 --> 16:00.500] or any assume role will generate tokens underneath. [16:00.500 --> 16:03.320] The problem is assume role happens all over the place. [16:03.460 --> 16:06.160] So when you have federated identity, single sign-on, [16:06.160 --> 16:07.840] you got temporary tokens. [16:07.840 --> 16:09.420] So the problem is it's noisy. [16:09.420 --> 16:12.040] So false positives are gonna kill you, right? [16:12.040 --> 16:13.760] Get session token is gonna be rare. [16:13.760 --> 16:14.980] Focus on that. [16:14.980 --> 16:19.020] Assume role, boy, if you can escalate privileges, [16:19.420 --> 16:22.120] on the red side, you're hiding, right? [16:22.220 --> 16:27.300] But basically get your tracking with CloudTrail, [16:27.300 --> 16:28.920] CloudWatch, your SIEM, [16:28.920 --> 16:30.720] and make sure you got your filters on. [16:30.720 --> 16:33.220] Focus on the usage, of course, as well. [16:33.220 --> 16:34.860] This is not clear at all. [16:36.160 --> 16:38.900] When you look at the JSON minus my red highlight, [16:38.900 --> 16:41.160] there's no obvious attributes saying [16:41.160 --> 16:42.760] this is a temporary token. [16:43.080 --> 16:44.160] But there is a naming convention [16:44.160 --> 16:46.140] if you've been good enough to find it. [16:46.140 --> 16:49.820] It took me a long time, but AWS says [16:49.820 --> 16:53.120] if it begins with Asia, A-S-I-A, it's temporary. [16:53.120 --> 16:54.860] A-K-I-A is permanent. [16:54.860 --> 16:57.640] So you can do a regex or glob in your filter. [16:57.640 --> 16:58.400] Do it. [16:59.460 --> 17:02.840] And they publicize it, so hopefully it's at least stable [17:02.840 --> 17:04.320] and they won't break that, right? [17:04.320 --> 17:05.740] You gotta know when they're used. [17:05.740 --> 17:06.800] You can figure out what to do with it, [17:06.800 --> 17:08.240] but you gotta have some eyesight. [17:08.440 --> 17:10.660] So let's keep going here. [17:11.220 --> 17:13.960] Really, being aware of it's one issue, [17:13.960 --> 17:16.000] you've got some ability through logs, [17:16.000 --> 17:17.320] you gotta do something about it. [17:17.320 --> 17:20.000] Here is where it gets worse and worse, okay? [17:20.000 --> 17:22.020] So let's think about our normal reaction [17:22.020 --> 17:24.480] when we did the permanent compromise key. [17:25.000 --> 17:26.660] Let's delete it, make it inactive. [17:26.660 --> 17:27.620] You cannot. [17:27.800 --> 17:31.500] You can't even see it in the console, [17:31.500 --> 17:32.700] so you're not gonna do it there. [17:32.700 --> 17:34.880] And there is no CLI API command [17:34.880 --> 17:38.100] to revoke or delete a temporary credential. [17:38.100 --> 17:39.340] There is not. [17:39.340 --> 17:42.600] And I think AWS is even public about that. [17:42.940 --> 17:44.220] What do they recommend? [17:44.220 --> 17:47.300] Number two, restrict the role [17:47.300 --> 17:49.320] that governs that temporary credential, [17:49.320 --> 17:51.300] which is the Django temp user, [17:51.300 --> 17:54.380] like reduce their permissions or blow them away. [17:56.060 --> 17:58.700] If it's one user, sure. [17:58.960 --> 18:01.740] If it's a lot of tokens that you're using [18:01.740 --> 18:04.920] because IOT uses temporary tokens, [18:05.860 --> 18:07.880] what's the impact on the organization [18:07.880 --> 18:10.860] that's running an app with thousands of endpoints [18:10.860 --> 18:13.780] and clients that are suddenly invalidated [18:13.780 --> 18:16.900] because you blew away a user account or role? [18:17.360 --> 18:18.760] It doesn't make it easy. [18:18.760 --> 18:20.820] You have things, but you have to think about it. [18:20.820 --> 18:23.180] So really, number three is, [18:23.180 --> 18:25.320] there's some things imperfect, [18:25.320 --> 18:27.140] but they're not nice and clean, [18:27.140 --> 18:29.380] but you gotta rethink your playbook. [18:29.380 --> 18:31.720] You got probably a playbook for compromised accounts, [18:31.720 --> 18:35.600] both console login and permanent access keys. [18:35.600 --> 18:38.120] You gotta see if you've got one for temporary tokens. [18:38.140 --> 18:39.100] And you gotta go through that [18:39.100 --> 18:40.580] and see what the implications are. [18:40.580 --> 18:42.540] Because if you end up at number two, [18:42.540 --> 18:44.600] that's not something you wanna do in the middle of the night, [18:44.600 --> 18:45.820] in the middle of an incident, right? [18:45.820 --> 18:48.580] Hey, let's see what this does. [18:48.760 --> 18:51.640] You know, stop the bleeding, but the patient's gone anyway. [18:51.640 --> 18:53.100] So what the heck, right? [18:53.540 --> 18:55.740] There is some hope. [18:55.780 --> 18:58.720] You're not completely without means. [18:59.000 --> 19:01.520] So if it was an assume role action, [19:01.520 --> 19:03.220] which we did in this scenario, [19:03.220 --> 19:05.180] that elevated role, [19:05.180 --> 19:09.120] you have an ability to cancel or revoke active sessions. [19:09.620 --> 19:14.720] So it's in the GUI, it's a fifth tab, it's right here, okay? [19:14.780 --> 19:16.920] It's sort of faking it, I gotta admit, [19:16.920 --> 19:21.800] in the sense that it doesn't really revoke the token. [19:21.900 --> 19:24.100] It puts in place a deny policy, [19:24.100 --> 19:25.700] look, it's all wildcarded, [19:25.700 --> 19:29.220] with a condition that keys off of an attribute, [19:29.220 --> 19:31.680] and finding those attributes, of course, is impossible. [19:32.100 --> 19:36.160] But there's a creation time on the temporary token, [19:36.160 --> 19:38.880] and you basically put in today's date [19:38.880 --> 19:40.640] at the time you're looking at it. [19:40.640 --> 19:42.980] And basically, the thing that was created in the past [19:42.980 --> 19:47.120] by the attacker will be denied by this policy. [19:47.600 --> 19:49.780] So hey, it's good for mitigation, [19:49.780 --> 19:51.180] but it doesn't solve it, right? [19:51.180 --> 19:51.980] Because guess what? [19:51.980 --> 19:54.400] The temporary token still works. [19:54.540 --> 19:56.640] And if they can find another way to assume role [19:56.640 --> 19:58.060] and escalate privilege again, [19:58.060 --> 19:59.600] they're gonna be in your face, [19:59.600 --> 20:00.680] and you're gonna have to come back again [20:00.680 --> 20:02.660] and update this policy, right? [20:02.820 --> 20:05.680] But hey, we'll take what we can get, right? [20:05.820 --> 20:07.280] Let's not deny that. [20:07.280 --> 20:10.480] So let's try to step away from the fire drill. [20:10.480 --> 20:12.760] Let's just say, for better or worse, [20:12.760 --> 20:16.440] we're able to nail or restrict this temporary credential [20:16.960 --> 20:18.080] that's been hanging around. [20:18.080 --> 20:20.140] So we got a minute to pause, but we're not feeling good. [20:20.140 --> 20:21.080] How do we actually prevent this [20:21.080 --> 20:22.780] from happening in the first place, right? [20:23.240 --> 20:25.480] Well, your first thought, at least mine is, [20:25.480 --> 20:27.700] can't we just lock down in some permission schemes [20:27.700 --> 20:30.980] and use all API calls that create temporary credentials? [20:30.980 --> 20:32.400] You can't with GetSessionToken. [20:32.600 --> 20:34.880] You can do stuff with assume role, [20:34.880 --> 20:37.320] but you cannot do it with GetSessionToken. [20:37.420 --> 20:40.860] And clearly, it's not just me saying that and testing it, [20:40.860 --> 20:44.680] which is true, it's an AWS by design thing. [20:45.220 --> 20:47.680] Some engineers thought hard about this, [20:47.680 --> 20:49.780] and they said, look, GetSessionToken [20:50.240 --> 20:52.560] is a part of our authentication, [20:52.560 --> 20:53.580] and nothing restricts that. [20:53.580 --> 20:56.180] You gotta let people attempt to log in. [20:56.180 --> 20:57.380] Doesn't make any sense to me, [20:57.380 --> 21:00.040] but that's what you find in the doc, all right? [21:00.040 --> 21:02.440] So if your boss needs an explanation on BlueSide, [21:02.440 --> 21:04.620] you can go point him, yeah, that's what our CSPs know. [21:04.620 --> 21:06.400] They took their shared responsibility. [21:06.780 --> 21:11.280] Okay, sorry, was that a bad burn there? [21:11.280 --> 21:14.080] Okay, so we can't prevent GetSessionToken. [21:14.080 --> 21:15.020] How about MFA? [21:15.020 --> 21:16.380] Same reason, can't do it. [21:16.380 --> 21:17.760] Can't restrict with MFA. [21:18.180 --> 21:20.680] They consider this like the first step of the auth. [21:21.180 --> 21:22.840] You can't do permission boundaries, [21:22.840 --> 21:24.980] which specify max permissions [21:24.980 --> 21:29.380] for, right, the sort of maximum permissions [21:29.380 --> 21:31.560] could be assigned to an IAM user. [21:31.560 --> 21:33.040] Try it, doesn't work. [21:33.040 --> 21:35.720] I mean, they'll allow you to enter it, won't do anything. [21:36.720 --> 21:39.960] If it's assume role, you can restrict that. [21:39.960 --> 21:43.640] It's post-authentication in their minds, and you should. [21:43.640 --> 21:45.180] And we did in that scenario. [21:45.180 --> 21:46.980] We restricted it to some support guy, [21:46.980 --> 21:49.020] Django temp user, and he blew it. [21:49.040 --> 21:51.800] So you should still do it, minimal privileges, [21:51.800 --> 21:54.440] but again, this is not a silver bullet. [21:55.060 --> 21:59.700] And you do have the revoke active sessions for any role. [21:59.700 --> 22:01.460] Again, assume role path, [22:01.460 --> 22:05.360] but that's really mitigation, my, my, not really prevention. [22:05.360 --> 22:09.400] So the problem is, we've got a temporary token feature, [22:09.400 --> 22:11.940] which is sort of obscure to detect in the first place. [22:11.940 --> 22:13.060] And while it's being used, [22:13.060 --> 22:15.420] you don't have a direct way to cancel it. [22:15.540 --> 22:16.880] But in your mitigation procedures, [22:16.880 --> 22:19.120] you have some in some cases. [22:19.160 --> 22:22.180] And then in terms of lockdown and prevention for the user, [22:22.180 --> 22:25.060] you also don't quite have stuff. [22:26.000 --> 22:27.780] So this is what you're dealing with, right? [22:27.780 --> 22:32.300] This, this is sort of the story with temp tokens. [22:32.600 --> 22:35.460] And I guess I've been talking at 1.5x speed. [22:35.460 --> 22:38.140] So we got about seven minutes, Jeff, by my time. [22:38.140 --> 22:39.580] So I've got two more slides. [22:39.580 --> 22:41.340] So we might even be able to squeeze in a question. [22:41.340 --> 22:42.780] Otherwise, out, out front, [22:42.780 --> 22:46.960] I'd be happy to pursue more, more discussion. [22:46.960 --> 22:49.360] So let's, let's talk about sort of the wrap [22:49.360 --> 22:50.800] of do's and don'ts. [22:51.480 --> 22:54.480] And for anyone who's red teaming, [22:55.160 --> 22:56.960] pentesting, researching anything, [22:56.960 --> 23:00.520] my view is why not generate temp credentials [23:01.080 --> 23:03.900] immediately for every account you have access to, [23:03.900 --> 23:05.620] at a minimum for backdoor access. [23:05.620 --> 23:08.720] It's true, if they're savvy, they might pick that up, [23:08.720 --> 23:10.500] your get session token call. [23:11.120 --> 23:12.540] That's okay. [23:14.780 --> 23:17.360] What's more interesting is not just using [23:17.360 --> 23:18.800] those temp credentials, [23:19.660 --> 23:21.980] but combining it with all the other techniques [23:21.980 --> 23:24.040] you might use on the red team sign. [23:24.040 --> 23:26.200] So pre-signed URLs are nothing super fancy. [23:26.200 --> 23:28.440] If you use them, you wrap in a URL, [23:28.440 --> 23:30.220] it's pre-signed and you can download, [23:30.220 --> 23:32.080] but also upload data to a bucket. [23:32.080 --> 23:33.440] It's just the convenience. [23:33.520 --> 23:36.440] Instead of having, you know, two or three lines of code, [23:36.440 --> 23:37.540] you can have a URL. [23:37.600 --> 23:39.900] But I sort of wonder, well, hey, [23:39.900 --> 23:42.380] how about a phishing campaign with a bunch of URLs [23:42.380 --> 23:46.040] that mucks with buckets of, you know, some, some account. [23:46.040 --> 23:47.680] That might be sort of an interesting thing [23:47.680 --> 23:49.720] and more a distraction to obfuscate [23:49.820 --> 23:51.160] a bunch of other activity. [23:51.340 --> 23:54.280] Lambdas, certainly the point is, [23:54.280 --> 23:56.620] whether you attack logs or use lambdas, [23:56.620 --> 23:59.900] the trail will end up at a temporary credential, [23:59.900 --> 24:03.200] which if my premises holds water, [24:03.200 --> 24:05.620] it's going to be harder to deal with temporary credentials [24:05.620 --> 24:06.700] for the most part. [24:06.700 --> 24:08.500] So why not add an extra layer of friction [24:08.500 --> 24:10.460] to the whole thing, confusion. [24:10.740 --> 24:12.680] But another way to look at it too, [24:12.680 --> 24:14.500] is you could use something like lambdas [24:14.500 --> 24:19.160] to facilitate persistence of your temporary credentials, [24:19.160 --> 24:19.320] right? [24:19.320 --> 24:22.060] It expires in 36 hours, the max. [24:22.060 --> 24:24.920] If you do escalate privileges and have access to lambdas, [24:24.920 --> 24:27.780] why not put a hook in to create user, [24:27.780 --> 24:30.380] modify user somewhere in there. [24:30.420 --> 24:32.320] And every time that happens, [24:32.320 --> 24:33.560] generate new temporary credentials [24:33.560 --> 24:36.860] and put it to a public bucket that you pick up later, right? [24:36.860 --> 24:38.140] Just why not? [24:38.140 --> 24:41.320] And it just, just makes everything more obscure, [24:41.320 --> 24:43.460] harder to track, harder to figure out. [24:44.500 --> 24:47.220] For sure, in your discovery, [24:47.220 --> 24:48.500] you're probably looking at logs [24:49.070 --> 24:51.480] and you could ascertain whether [24:51.480 --> 24:54.300] they're specifically looking for temporary credentials. [24:54.300 --> 24:57.980] If they're that knowledgeable and ready, [24:57.980 --> 24:59.980] I mean, nothing lost, but you at least know. [24:59.980 --> 25:00.900] And if they aren't, [25:00.900 --> 25:03.160] well then everything above first three bullet points [25:03.160 --> 25:07.040] is just going to be easier, more impactful, right? [25:07.040 --> 25:09.860] So that's the sort of, you know, [25:09.860 --> 25:12.520] attack mindset with temporary tokens. [25:12.520 --> 25:15.580] Now let's try to end up on the blue side [25:15.580 --> 25:16.760] and see where we're at. [25:16.760 --> 25:19.560] So number one, no matter what you take away from this talk [25:19.560 --> 25:23.120] is if you never heard of temporary tokens, [25:23.120 --> 25:24.100] I don't want to say that in a bad way. [25:24.100 --> 25:27.000] If you haven't spent time on it, do it, [25:27.000 --> 25:28.760] get your plan in place, just revise it. [25:28.760 --> 25:30.720] If you have, good for you, [25:30.720 --> 25:33.700] but I would still suggest reviewing it [25:34.480 --> 25:36.500] because the APIs change all the time. [25:36.500 --> 25:37.900] And, you know, you're not sure [25:37.900 --> 25:40.500] what tools are available for you. [25:40.500 --> 25:41.100] Who knows? [25:41.100 --> 25:44.180] We'll probably get a revoke token API call at some point, [25:44.180 --> 25:46.560] right, if there's enough abuse. [25:46.560 --> 25:47.720] Talk about prevention. [25:47.720 --> 25:49.240] A lot of things I already covered. [25:49.340 --> 25:51.200] Yeah, you're going to lock down access keys. [25:51.200 --> 25:52.980] You can't prevent the temporary credentials, [25:52.980 --> 25:54.460] but you can try to minimize the impact [25:54.460 --> 25:57.020] once they're used or in your environment. [25:57.020 --> 25:58.820] So minimal privileges everywhere. [25:59.300 --> 26:00.480] You could isolate, [26:00.480 --> 26:03.180] if you have to use temporary credentials for some reason, [26:03.180 --> 26:04.900] like some business application reason, [26:04.900 --> 26:06.100] isolate in a separate account [26:06.100 --> 26:08.000] because cross-account access [26:08.000 --> 26:11.100] can be controlled no matter what, right? [26:11.100 --> 26:13.380] So that's a way to sort of, [26:13.380 --> 26:16.460] because it comes through an assume role path, right? [26:16.460 --> 26:19.300] So thinking about your org structure, [26:19.300 --> 26:20.840] your account and org structure [26:20.840 --> 26:24.000] is pretty important to dealing with messy stuff [26:24.000 --> 26:25.680] like temporary credentials. [26:25.680 --> 26:27.380] Minimal privileges, so on. [26:27.380 --> 26:28.440] Detection. [26:28.440 --> 26:29.460] We went through that. [26:29.460 --> 26:31.080] Focus on get session token. [26:31.080 --> 26:33.920] Think about assume role, if that's noisy or not. [26:33.980 --> 26:37.720] Pick up the usage with the ID scheme, [26:37.720 --> 26:41.140] the ASIA, and obviously harden like heck [26:41.140 --> 26:43.300] and test your logging, [26:43.300 --> 26:45.300] because if you're hosed on logging, [26:45.300 --> 26:46.440] then all of this doesn't matter. [26:46.440 --> 26:48.380] You have a lot worse problems. [26:48.380 --> 26:49.560] Mitigation remediation. [26:49.560 --> 26:51.080] The hardest part last. [26:51.080 --> 26:52.220] You don't have great things, [26:52.220 --> 26:54.280] but review your playbook. [26:54.500 --> 26:57.480] Don't use get session token if you don't need to, [26:57.480 --> 27:00.100] because then it's easy to pick up true positives [27:00.100 --> 27:01.600] out of the logs. [27:01.600 --> 27:03.100] Any use of get session token [27:03.100 --> 27:06.220] is immediately worth investigating, right? [27:07.720 --> 27:09.840] Use assume role because you can control it, [27:09.840 --> 27:11.620] but it's really noisy, right? [27:11.900 --> 27:14.320] But it allows you to revoke those active sessions, right? [27:14.320 --> 27:16.320] Gives you some mitigation means. [27:17.320 --> 27:18.940] Recovery, I can't stress enough [27:18.940 --> 27:23.040] because I think we may be focused on mitigation. [27:23.260 --> 27:24.520] You guys are probably better, [27:24.520 --> 27:27.560] but it's great even if you can manage [27:27.560 --> 27:30.080] and kill and restrict the temporary tokens, [27:30.080 --> 27:32.580] but how do you get the apps back and running? [27:32.580 --> 27:34.680] Because you might have blown away user accounts. [27:35.320 --> 27:38.640] And then finally, last step is really first, [27:38.640 --> 27:39.620] probably in your process, [27:39.620 --> 27:41.920] it's before you get into real-time ops, [27:41.920 --> 27:44.020] it's more did you plan and provision [27:44.020 --> 27:45.440] and manage your inventory? [27:45.780 --> 27:48.200] I think if you do have a good business case [27:48.200 --> 27:51.160] of creating temporary tokens for some application, [27:52.280 --> 27:54.900] then you're in control and you should log it, [27:54.900 --> 27:57.280] even if not log it, you should put in a database, [27:57.280 --> 27:59.020] even if AWS doesn't, [27:59.020 --> 28:01.020] because then you'll know what you've created [28:01.700 --> 28:04.560] and you'll have more context at a minimum [28:04.560 --> 28:07.700] when they're abused or compromised. [28:07.860 --> 28:09.960] But you're not in control of everything, [28:09.960 --> 28:12.820] so assume role and what AWS does, [28:12.820 --> 28:15.460] when you run an EC2 instance and pass along a role, [28:15.460 --> 28:17.740] boom, there's a temporary token created, [28:17.740 --> 28:21.080] it's in the user metadata of the EC2 instance, [28:21.080 --> 28:24.200] you didn't create it and people exploit it all the time. [28:24.200 --> 28:26.600] So there, your only choice is to go to the logs [28:26.600 --> 28:29.940] to see, look at, assume role creation [28:29.940 --> 28:34.580] as well as usage and see that key pop up, that ASIA key. [28:34.720 --> 28:37.400] But again, that would be valid activity in a lot of cases, [28:37.400 --> 28:39.240] so imperfect, right? [28:39.380 --> 28:45.560] So net-net, I don't have all the answers by any means, [28:45.560 --> 28:47.240] I have more questions than that, [28:47.240 --> 28:49.820] but I think it's to elevate the importance of this [28:49.820 --> 28:53.080] as whatever perspective, you gotta pay attention, [28:53.080 --> 28:54.220] even if you haven't been paying attention, [28:54.220 --> 28:55.560] you gotta re-look at it. [28:56.900 --> 28:57.780] Thanks. [28:57.780 --> 28:58.800] Thank you. [28:58.800 --> 28:59.620] Thank you.