WEBVTT

00:00:01.080 --> 00:01:00.159
<v Spencer>A single dangerous permission in Active Directory could allow an ordinary compromised account to modify a privilege group and take over a domain controller, or take over the entire domain, or any number of things. It really is can be that simple, and many times, Brad, that's a lot of times how our internal pen tests go. Is like we find a insecure permission somewhere, and it allows us to elevate privileges, and then we get access to an admin group or we get access to a server, and then from there it's kind of like dominoes. So it's like it's like this objective of finding that one domino piece that starts the domino falling effect for like the whole castle to fall down, right? And many times, unfortunately, Active Directory is like a house of cards in that way, where it's just like one thing and it could just lead to utter destruction, if you will.

00:00:55.329 --> 00:01:02.609
<v Spencer>Not always the case, but many times it is. So that's what I wanted to talk about in this

00:01:02.700 --> 00:01:16.650
<v episode>is the risks of dangerous permissions in Active Directory, and kind of the the backstory around why dangerous permissions happen to begin with, what to look for, and some of the implications of that.

00:01:17.549 --> 00:01:46.000
<v Brad Causey>That makes perfect sense, and and that's been my experience too, right? Is is it's it you find that one thread that one thing, and then everything after that is is kind of the the blast radius, if you will. And and so yeah, dude, I think it's a it's a great topic, and I I think it's weirdly enough as basic as it sounds, it's a not simple to solve, right? And and B, I think it's commonly overlooked, right?

00:01:46.090 --> 00:02:02.400
<v Brad Causey>Everybody wants that next super sexy tool, that new WAF, that new PAM solution. None of that matters if you don't pay attention to this. So I'm going to get back on my blocking and tackling soapbox at some point today. But that's what this feels like, right?

00:02:03.150 --> 00:02:05.579
<v Spencer>It's like you know the thing that really triggered me.

00:02:05.939 --> 00:02:18.000
<v Spencer>I think it was it must have been today. It was a 16 z or something put out a post, and it's like what all the CISOs are like worried about, right? And it's like AI security and AI offensive and AI this and that.

00:02:16.289 --> 00:02:18.000
<v Spencer>Tired of

00:02:18.090 --> 00:02:19.199
<v Brad Causey>hearing about it, man. And so

00:02:19.500 --> 00:02:27.379
<v Spencer>I repost it. I'm like, yeah. If you're a bad CISO, you're only focusing on AI. But that's what this comes down to.

00:02:27.439 --> 00:02:29.840
<v Spencer>Is like, there's none of this has anything to do with AI.

00:02:30.919 --> 00:03:24.740
<v Spencer>There are AI components to that, right? And maybe we can talk about that. Of like, you know, your when your AI agent is doing things now, you know, there are inherent permissions that it has that you have to think about and consider, but it all goes back to these concepts. And what I really want to cover in this is the theory behind why this stuff happens, so that people who are looking for this, if you're an IT admin or an IT director or a security person or a pen tester, you can better you can know the rocks that you need to turn over, right? Because that's really what this is. It's like you got to know the rocks to turn over and what what looks interesting enough to pull at, or poke at. So I want to cover that first, and then we'll talk about some of the risks of dangerous permissions that I think probably everybody kind of knows, but maybe they're not clear on the downstream impact of those.

00:03:25.128 --> 00:03:34.639
<v Brad Causey>Yeah, no, it sounds great. And and man, this AI thing has such an unpopular opinion on it, and and I think you and I share a similar take.

00:03:30.558 --> 00:03:53.169
<v Brad Causey>But at the end of the day, it doesn't change anything. You know what I mean? So I don't want to get off on that. This is a totally different topic. But I agree with you, man. I'm so tired of hearing about AI, and I'm so frustrated that we're not talking about how to solve the basic problems. Because at the end of the day, that's that's what we need to be talking about. But yeah, man, absolutely.

00:03:53.500 --> 00:03:56.500
<v Spencer>Yeah, topic for another day. You and I can rant on that.

00:03:57.909 --> 00:04:42.910
<v Spencer>So why these permissions accumulate? So everybody who is managed Active Directory or Entra or any kind of identity system knows that you have people come and go. You have new systems that you deploy. You have new environments that you set up. So a lot of times, what happens is you set permissions up, you set accounts up, you set workflows up, and then when you get rid of those things, or you retire those things, or you move on to something else, many times the cleanup process of the things that came before that have not are not done. Right, they're kind of neglected, or we forget about them, or we're too busy to do it. Right, we think it's not a problem, but that's part and parcel of a big reason why we find dangerous permissions in Active Directory, in Antra, and all the other systems,

00:04:43.209 --> 00:04:43.300
<v Unknown>is

00:04:43.689 --> 00:05:11.730
<v Spencer>because it just accumulates. You know, like we as IT professionals, security people don't go do a good job cleaning up after ourselves many times for all the reasons I just mentioned. You know, and so we set up access, and we don't really think about the decommission. Or the pulling back or tightening the reins on those permissions specifically when we get rid of those systems, or we offboard users, or when things change.

00:05:12.959 --> 00:05:18.930
<v Brad Causey>Yeah, and you you hit on it. The thing that I've seen the most of is when you decommission a system, right?

00:05:19.620 --> 00:06:07.649
<v Brad Causey>And you know everybody's hyper focused on that box, the storage of that box, whatever infrastructure it lives on. What about the peripheral impact of the components that it was using, right? And so, if it did have Active Directory permissions, are you going back and looking at those accounts, disabling those accounts? But it's not just decommissioning, right? As you upgrade systems, and so I've got one particular story that stands out to me that I'll that I'll tell at some point in this episode. But when you upgrade a system, or when that system has a major revision change, it changes how it operates. It may not need those permissions anymore. So it could be over permission for its latest version or role or whatever have you, and so you know I see that a lot where they're like, oh, we haven't used that account in six years.

00:06:07.800 --> 00:06:11.850
<v Brad Causey>Why is it still there? Well, it's because we didn't clean up on the last migration.

00:06:13.079 --> 00:06:51.339
<v Spencer>Yeah, and you know this is something that I think everybody can relate to in that you know when you set up these systems, right? Many times, if you're an IT department, right, you have a vendor come in and they help you, or you have an MSP come in and you know support some of the migration or something like that. And then what ends up happening is those accounts, those systems, that access becomes kind of a permanent remnant in your environment rather than kind of a temporary thing, we often forget to clean those things up and remind ourselves to go through that that restricting process at the end of those.

00:06:52.000 --> 00:06:57.879
<v Brad Causey>Yeah, yeah, I completely agree with that. And and you need to check too, like from a HR perspective, right?

00:06:57.970 --> 00:07:16.079
<v Brad Causey>Part of offboarding an employee should always be back, you know, working back through all the systems that they have access to, because it's not always just Active Directory; it can be anything, right? Especially like SaaS services that are not SSOed, things like that. So, yeah, absolutely. The

00:07:16.230 --> 00:07:45.910
<v Spencer>other reason why I believe permissions accumulate, we have these situations where you have you know dangerous permissions and attack paths and control paths, is because many times IT admins and I've done this myself, security people, we will provision access based on too broad of groups, meaning we're not honoring or adhering to the principle least privilege, right? So for file shares, example, this is something we see all the time.

00:07:41.740 --> 00:07:55.149
<v Spencer>Is that you know we'll get into an internal pen test and then we'll go crawling the file shares and we'll see that all of the file file shares allow everyone access just by default.

00:07:52.300 --> 00:07:55.149
<v Spencer>Everyone can read everything.

00:07:55.689 --> 00:08:30.529
<v Spencer>But then even worse is that some file shares have you know domain users with the ability to modify all the files or full control, right? And now it could be some sort of like software deployment share that only IT uses. But now an attacker who's compromised an account in a machine in that environment could modify those files. And I just had ChatGPT pop up on me, so sorry. I'm, I'm. We can keep this in. I'm working on updating some tooling, and you know how ChatGPT can like take over your computer and like click on things for you.

00:08:31.009 --> 00:08:31.189
<v Brad Causey>Yes.

00:08:31.670 --> 00:08:38.090
<v Spencer>Well, I had it like updating a tool for me, and it literally like went flashed on my screen. I'm like, no, ChatGPT, you gotta wait. Yeah.

00:08:38.480 --> 00:08:53.139
<v Brad Causey>Yeah. Pause. Pause for a second. It does it to me all the time with like when I'm having it do UAT with like with with websites and stuff. Like if I push a new update and and it'll pop up and be like, oh, and it's clicking through like right in front of me. I'll be sharing my screen and all of a sudden a browser will pop up. So no, I feel you

00:08:53.649 --> 00:09:20.309
<v Spencer>love it. So file shares. A lot of times we assign permissions to broad groups like domain users or everyone or authenticated users, we just give everyone access, broad access to the environment, and you know, being the IT guy, I understand, right? You want everybody to have access, so it's less of a burden on IT, fewer help desk tickets, fewer support calls, but by doing so, you kind of increase the attack surface internally. Should somebody get access to that environment?

00:09:21.089 --> 00:09:56.379
<v Brad Causey>Yeah, yeah, and I mean, look, why would we do that? It's easy, right? The easiest thing in the world is giving full access to domain users on a share like that, or or over permissioning because, like you said, and a lot of times it's just to get it working. And you kind of touched on this earlier, where it's like it's meant to be a temporary solution because I'm troubleshooting something and I'm like I don't want to worry about permission right now. Let me give this service account domain admin so we can do what it needs to do, and then we never undo it because the risk of undoing it is breaking it potentially if I don't spend the time to figure out what permissions it actually needs.

00:09:56.798 --> 00:10:50.948
<v Brad Causey>But here's the other thing that I've seen often is. Vendors setting up on-prem applications in your environment, and then requesting that level of privilege, either for service accounts or temporary access, and then it just never goes away. That's actually the war story that I wanted to tell. Is is we were we were building out a Citrix environment. This is a long, long time ago, and that Citrix and the the wizard had to be run as domain admin, and so it was a requirement. You had to actually give it domain admin creds, and then it would provision all the components and build everything out kind of automatically. Like you've ever promoted an Active Directory domain controller, it's that same process, right? And it ended up creating a whole bunch of stuff in Active Directory that was way over-permissioned and it was overlooked until we had an internal engagement where somebody came in did a pen test and was able to escalate privileges. So yeah,

00:10:51.129 --> 00:11:06.450
<v Spencer>yep, that was exactly going to be my next point. Is like we set up SQL servers, we set up backup systems, we set up all these things, and many times, and I know, and I know you know, because we've done this. Is like we just set it up, like just to make sure it works.

00:11:04.200 --> 00:11:17.850
<v Spencer>Like we're just going to use this account. We'll we'll just use the domain admin account for now, you know, just to get it up and running. You know, make sure everything works, and and we'll change it later on. We never change it, right? Like it never gets changed. Nope,

00:11:17.999 --> 00:11:19.469
<v Brad Causey>we get busy with the next thing, you know.

00:11:20.038 --> 00:11:42.099
<v Spencer>And even worse is you know IT admin Joe like sets up the thing, gives it you know the sets it up with the domain admin account, and then he leaves or he retires right, and now he's the only one that knew about that system and how it was set up. There isn't good documentation, and now it's even more risky to change it, right?

00:11:38.989 --> 00:11:52.178
<v Spencer>Because you have no knowledge of that system, right? If somebody coming in behind him, so the organizational change and the turnover and like the tribal knowledge is also another reason why these permissions accumulate.

00:11:52.750 --> 00:12:31.700
<v Brad Causey>Yeah, yeah, absolutely, man. And and the longer your system has been in existence, right, the longer you've had Active Directory on prem, the more likely you are to have stuff like this, and we talk about this with clients all the time. It's like you know, what what was your original version of Active Directory? You know, was it was it like 2005, 2010? You know, and and so the longer you continue to promote and drag though that old baggage with you, the more likely. And here's the thing, man. To your point, when when are you going to make time to just go back through Active Directory and audit and inventory what you're not, dude. You're not going to do it, and so you're going to have things like this floating around out there.

00:12:32.448 --> 00:12:38.749
<v Spencer>And that's why we focus so much on it during our internal pen tests. You know, we have kind of three core parts of

00:12:38.808 --> 00:12:59.589
<v our internal pen tests>it's the endpoint evaluation, and then Active Directory in the network, and then the security monitoring, threat detection portion, and the Active Directory portion. During that section of our internal pen test, we're looking at all of the delegations that you've created, all the custom delegations that clients have created in their environment.

00:12:56.798 --> 00:13:16.019
<v our internal pen tests>We're looking at the OUs, we're looking at the permissions on on those, we're looking at permissions on security groups, the individual objects, certificate services, group policies. We're looking specifically for all these permissions so that we can find these dangerous permissions.

00:13:12.839 --> 00:14:20.759
<v our internal pen tests>Because not only do these permissions accumulate, but they oftentimes remain hidden until you kind of know what to look for, or you go looking, or you know, heaven forbid, you have an incident or something breaks and you have to go troubleshoot why it's broken. A lot of times these go overlooked because of that. And one of the big reasons that I see is inherited permissions. So in other words, you have like think of Active Directory, a tree in Active Directory, you have multiple OUs, and then inside of that OU, you have some sort of inherited permissions. Well, if you just look at that one OU, for example, and you don't look at anything above that, you might not realize that those permissions are inherited, and you could fix it at that OU level, right? But it might still be dangerous or broken all the way above that, and still cause risk to the environment. And so many times when we do an internal pen test and a debrief, even with the client, they're like, "Huh, I didn't even know that was out there. Like, I we had no, I had no idea that was that was set that way, or I have no idea how that happened." And that's many times because of these inherited permissions and just the way Active Directory works.

00:14:21.870 --> 00:14:58.809
<v Brad Causey>Yeah, no, of course. Well, and it's it's also just incredibly difficult to to visually look at and determine, you know, kind of the net permissions of something when it's in a nested scenario like that, right? And and and the irony of the whole thing is Microsoft best practice is exactly that, right? Is to nest these, is to nest them. Is to use these security groups for that purpose. But if you don't know exactly what you're doing, it is way too easy to make a mistake, and then you will never see it. There's no like you used to say something that was like there's no pop up in Active Directory that says hey that's a bad idea, right? It's just you just do whatever you want.

00:14:59.349 --> 00:15:14.428
<v Spencer>Yep. Yeah, Active Directory is is an administrative interface, not a security interface or a security control panel by any means. So yeah, you can just add domain users to the domain admins group, and it doesn't bat an eye. It's like yeah, sure, you have to do

00:15:14.460 --> 00:15:21.019
<v Brad Causey>whatever you. It just assumes that you that you're a Microsoft MVP in AD security, no matter what you do,

00:15:21.889 --> 00:15:31.549
<v Spencer>so nested groups is the other issue that kind of like plays or goes along with the inherited permissions. Is that we've seen I've seen some crazy things with with nested groups.

00:15:31.610 --> 00:16:08.009
<v Spencer>I've even seen like recursive groups where one group references the group that was that group was a member of kind of thing. So you have this weird nested group thing, but also like multiple layers of nested groups. I think I've seen I don't know the most I've seen maybe five or six layers of nested groups that ultimately result in some sort of elevated privileged access in the environment. So think of something like you know Susie is a member of some like accounting group, which is a member of like accounting managers group, which is a member of like, you know, accounting SQL Server managers or some chain like that.

00:16:08.788 --> 00:16:08.818
<v Unknown>The

00:16:09.328 --> 00:16:15.568
<v Spencer>nested groups. Once you get to a certain level, you could inadvertently add a group.

00:16:12.778 --> 00:16:22.038
<v Spencer>Like if you could add server managers right to an administrative group, but who's in server managers, and then who's in the group below that?

00:16:22.129 --> 00:16:42.399
<v Spencer>Below that, so many times nested groups actually become very dangerous as well because you don't have the full visibility when you're adding it in Active Directory, right? It's just that group name. It doesn't show you the whole chain. It doesn't show you the impact or anything like that. And if you just use Active Directory or PowerShell commandlets, you really have no idea what the impact is of those changes?

00:16:43.298 --> 00:16:52.989
<v Brad Causey>Yeah, and and this is especially common when you get to like mid-level IT. And what I mean by that is like help support account support groups.

00:16:49.808 --> 00:17:22.159
<v Brad Causey>So where you're you know you're you're going to give IT support maybe a low-level server management position, right? And so you nest their group within that group, so you can assign permissions to it, and then later on, you're like, okay, well, this is only server administrators. Surely, it's a restricted group, so I can safely add this into you know domain wide power server user group, whatever that may be, right? And then before you know it, you've given Susie and accounting domain admin, and it's so easy to do, man. It's so easy to do it wrong.

00:17:23.150 --> 00:17:27.769
<v Spencer>Yeah, the other reason why these a lot of these dangerous permissions remain hidden is because of ownership.

00:17:28.880 --> 00:18:01.529
<v Spencer>And so you could be looking for you know full control or write all properties or you know some other dangerous permissions, right? You could be intentionally looking for those, but if you skip over ownership, then you might still miss things because ownership provides a certain level level of ability to modify the properties or the attributes or the permissions even of that object in Active Directory. So, keeping in mind ownership of certain Active Directory objects is also really important,

00:18:02.250 --> 00:18:13.829
<v Brad Causey>and then when you stack these, it gets insane, right? Where where where you've got nested groups as owners of objects with inherited, like, dude,

00:18:14.759 --> 00:18:14.819
<v Spencer>yeah,

00:18:16.529 --> 00:18:28.819
<v Brad Causey>it's insane. It's it's impossible. It's nearly impossible to look at the properties of a singular object in Active Directory and accurately get a picture of its effective permissions in the environment.

00:18:29.839 --> 00:19:21.180
<v Spencer>Yeah, and that's why you know it's it can be so surprising when you run tools like Bloodhound or something like that that shows like attack paths and it can say like you know 40,000 different attack paths. It's because each permission could have its own implications. So, for example, if you have full control on an Active Directory object, that could be one, you know, attack path. If you just have write property on, you know, a certain attribute in Active Directory, that could be an individual attack path. So it depends how it's classified, but that's why there can be so many different attack paths or control paths in the environment. Because even if you fix one permission, there could be still you know 17 other dangerous permissions that haven't been addressed, and those are permission entries.

00:19:17.490 --> 00:19:23.359
<v Spencer>Those are like aces in the DACL essentially or Active Directory.

00:19:24.319 --> 00:19:26.509
<v Brad Causey>Yeah, you're not making it sound any easier, dude.

00:19:27.170 --> 00:19:43.960
<v Spencer>Yeah, no, it's and and what's funny is like I'll I'll have debates about this on on on X about like what's harder, right? Active Directory or Entra, and it's funny because I'll be like you know talking about permissions and like dangerous permissions and stuff.

00:19:41.440 --> 00:20:18.000
<v Spencer>Like, wow, it sounds so difficult. But then you think about like Entra, and you think about like all of the the graph permissions and all of the scopes for Graph API and everything in between all of that, and like it'll make your head spin. And the reality. Is like they're both hard. Like identity in and of itself is difficult, and that's why we're seeing a lot of the texts we see now. Is like it's hard. Like identity is very difficult to get right and to do it well, and to allow people to still continue to work and be productive.

00:20:18.420 --> 00:20:31.279
<v Brad Causey>So I would I would say we're asking the wrong question, right? And and maybe maybe that's an entire episode on its own because I don't think I don't think asking what's hard or easy is the way that we get to a more secure world, right?

00:20:31.400 --> 00:21:16.109
<v Brad Causey>And so the question from my perspective is how big is the attack surface and how much control do I have over that attack surface with Active Directory, and and I'm not a proponent of either, right? So I'm I'm totally neutral here. No dog in the fight with Active Directory. I can point to a physical device that has Active Directory on it, and I have complete control over that environment. I can change it if I want to. There are things in the Entrez you cannot fix. There are actively exploited vulnerabilities that Microsoft has said we don't care, and we use them every week on external pen tests. Those graph API, like all of these things, and they change every day. At least with Active Directory, is only changing what I change, right?

00:21:12.809 --> 00:21:26.089
<v Brad Causey>So I have a kind of a single what do they call a single throat to choke, if you will, where you can go to one place and you can you can actually affect material change on your attack surface. I can't say that about Entre.

00:21:26.630 --> 00:21:36.650
<v Spencer>Yep. Yeah, it's it's a it is very much like a whole nother conversation in itself.

00:21:31.069 --> 00:22:11.400
<v Spencer>So the risk of dangerous permissions. So kind of we covered kind of some of the theory, right? Like why permissions accumulate, why they remain hidden. I think that's really the core of what I wanted to get across for this to help people understand kind of the the red flags for this, or the warning signs, or kind of the the things to look for to mitigate or prevent those things from happening in the first place. Next, to kind of close out the episode, I just want to talk about some of the risks that we see as a downstream impact from not doing those things or not identifying those things. So, I think first and

00:22:11.430 --> 00:22:39.440
<v foremost is pretty obvious>privilege escalation, right? So this is like when a low privilege user has dangerous permissions on a privileged resource in Active Directory, then that low privileged account or user has the ability to do things that are dangerous. That might be reset a password. It might be enroll in a certificate template. It might be you know add members to a security group.

00:22:37.099 --> 00:22:56.470
<v foremost is pretty obvious>It could be any number of things. But the first, foremost, and most dangerous kind of downstream impact of not doing this is privilege escalation, and it can be as simple as just changing a password, like resetting a password for a domain admin account. It could be that simple, yeah, that dangerous.

00:22:57.819 --> 00:23:18.690
<v Brad Causey>Yeah, and and I have to I want to ask this: like, how often do you see built-in security groups like domain users, like everyone, misused? Maybe is the right, like, like over-permissioned from a, you know, from an object perspective in Active Directory.

00:23:19.140 --> 00:23:31.160
<v Spencer>Yeah, that's one of the biggest flaws I would say, or mistakes is assigning broad groups, which I would include like domain users, everyone authenticated users, domain computers. It's what I would call broad groups. But that's a

00:23:31.250 --> 00:23:47.170
<v big mistake>is assigning broad groups access to a large number of resources or misconfiguring their access to begin with, right? So, like the file share example I shared earlier of like everybody gets access, everybody can modify files.

00:23:47.529 --> 00:23:47.589
<v Brad Causey>Yeah,

00:23:47.890 --> 00:23:58.569
<v Spencer>we just use domain users or these broad groups because it's easier, and that's probably one of the biggest like egregious mistakes I would say when it comes to like least privilege that I see on internal pentests.

00:23:59.049 --> 00:24:02.099
<v Brad Causey>Yeah, and and pro tip, that is not best practice.

00:24:02.490 --> 00:24:06.450
<v Brad Causey>The built-in groups are not designed to be security groups.

00:24:06.599 --> 00:24:10.890
<v Brad Causey>They are actually designed to be containers, or not containers.

00:24:10.890 --> 00:24:15.329
<v Brad Causey>The wrong word. What does Microsoft call though? They're not security groups. It's something else. Like I guess just built-in groups.

00:24:16.019 --> 00:24:33.619
<v Spencer>Yeah, there's different types of groups. There's like there's distribution groups, there's security groups, and then within security groups, there's like security global groups and different types of of security groups that you can assign. Microsoft does have a certain guidance of like what you assign where and how and that and that kind of thing.

00:24:34.009 --> 00:24:41.500
<v Spencer>Yeah, my general advice is like domain users is fine, authenticated users is fine.

00:24:38.809 --> 00:24:45.069
<v Spencer>That's like where users get created and added to by default.

00:24:41.559 --> 00:25:18.089
<v Spencer>But when you're assigning access to a resource, it should be specific to that resource. So a file share, for example, if it's the accounting share, you should have a accounting read only file share access security group, and everybody who needs access to the accounting share. It's dropped into that read-only group, and if they need write access or some other level of access, you create a specific security group for that level of access, and then you add people to that group as needed. So you end up having kind of these discrete security groups for different levels of access in the environment for different resources.

00:25:18.630 --> 00:25:20.960
<v Brad Causey>Yeah, love it. And then this is

00:25:21.680 --> 00:25:45.039
<v Spencer>yeah unauthorized access. Again, kind of a given, but you can see where if we give broad groups access to file shares, for example, they would then potentially have access to information they are not authorized to have. So maybe it's HR documents, maybe it's company financial documents, salary information. We see this a lot with law firms, right?

00:25:45.099 --> 00:26:31.880
<v Spencer>Where they have a document management system, and everybody just has access to everything because it's difficult to restrict, you know, cases for just the people who need to work on it. Those systems aren't very well designed from a like a RBAC, least privilege, zero trust perspective, and more often than not, when we do a pen test on a law firm and we get access to the DMS, we find credentials in there. We find credit card numbers, social security numbers, we find all sorts of PII and sensitive information that our user should not have access to, despite being you know set up like an attorney or paralegal or some other kind of staff member at that firm, we shouldn't have access to that level of information that we have, and that's because overly broad permissions.

00:26:33.319 --> 00:26:34.369
<v Brad Causey>Yeah, absolutely.

00:26:33.319 --> 00:26:48.369
<v Brad Causey>And I think I think unauthorized, even even though they're they're technically privilege escalation, unauthorized access, or in a similar vein, I think the effective downstream is is important enough that we separate the two, right? Because they they do technically mean different things. Yeah,

00:26:48.489 --> 00:26:57.368
<v Spencer>because you know you don't necessarily have to get domain admin to hurt an organization, right? You don't necessarily have to. Not if all you need is

00:26:57.519 --> 00:27:00.130
<v Brad Causey>domain users to get access to all the things you need, right?

00:27:01.059 --> 00:27:27.680
<v Spencer>There are a number of threat reports that you can point to, real threat reports that indicate a threat threat actor got access to the environment and just downloaded everything from the file shares and then extorted the the firm, right? Like they didn't deploy ransomware, they don't need to run Mimikatz or any payload, they just download everything from the file share or from SharePoint or whatever else, and then they extort the the firm from there. So you don't need a high level of access to cause a lot of harm in an organization.

00:27:28.009 --> 00:27:47.529
<v Spencer>Case in point, we did a pen test I don't know a couple years ago, and we didn't get access to domain admin. Like we didn't do any privilege escalation in the environment. There were no attack paths that led us there, but we did get access to the CFO's email Microsoft 365 account because one, he was using a weak password, and two, he didn't have MFA.

00:27:48.369 --> 00:27:48.640
<v Brad Causey>Nice.

00:27:49.359 --> 00:27:57.400
<v Spencer>Literally, the CFO of that big, big organization, we got access to his email and his SharePoint and all that his documents.

00:27:57.849 --> 00:27:59.049
<v Brad Causey>I don't see a problem. It's fine.

00:27:59.470 --> 00:28:00.809
<v Spencer>We didn't need domain admin for that.

00:28:01.230 --> 00:28:01.289
<v Brad Causey>Yeah.

00:28:03.390 --> 00:28:37.849
<v Spencer>So the next is lateral movement. Later. So this is the case where the permissions allow you to move to different resources in the environment. So this might be where you know Susie in accounting is a member of like accounting managers, and accounting managers has like local admin on a server, for example, because they you know have some accounting software installed there. Well, that allows for lateral movement because if I'm a threat actor and I compromise Susie's machine, I can then access that accounting server, right? So dangerous permissions can also allow for lateral movement in that way.

00:28:38.779 --> 00:28:38.900
<v Brad Causey>Yep.

00:28:40.460 --> 00:29:06.930
<v Spencer>It also allows for service abuse. That one kind of self-explanatory. But if you compromise a service account or a SQL account or something like that, you would then have access to elevated resources and information as well. But the biggest thing that I want to stress from this section, before we kind of wrap up and talk about the last section, is the attack surface.

00:29:07.410 --> 00:29:07.470
<v Brad Causey>Yeah,

00:29:07.980 --> 00:29:16.319
<v Spencer>this to me, and you you pointed this out earlier when it was like you know talking about the wrong question is like, this is about attack surface. This is about making it more difficult.

00:29:16.349 --> 00:29:18.329
<v Spencer>It's about making your environment harder to attack.

00:29:19.200 --> 00:29:36.950
<v Spencer>All of this, the whole goal of this is to restrict what's available to somebody who is unauthorized in that environment and make it more difficult. And that, to me, is is attack surface, right? Like restricting the attack surface such that that compromised account can only do so much.

00:29:38.930 --> 00:29:42.849
<v Brad Causey>Yeah, yeah, yeah, 100%, dude. And and that and that's really what the ultimate goal of all of this is, right?

00:29:42.940 --> 00:29:56.829
<v Brad Causey>Is just to reduce that attack surface, and and and to have knowledge where where those weak spots are. If you can't fix them, if you can, great. But but just just knowing what that is, and and that's the biggest challenge in any of these games, right?

00:29:57.910 --> 00:29:58.480
<v Spencer>Exactly. So

00:29:58.509 --> 00:29:58.930
<v Brad Causey>what should we do?

00:29:59.619 --> 00:31:18.839
<v Spencer>Yeah. Question. So, number one is kind of going through the advice that we shared in the beginning of this episode of like why these permissions accumulate and why they remain hidden. And I think there's a lot of things that people can take away to go and look for in their environment from that point. But the main thing that I always recommend in this situation first and foremost, is look for where broad groups have dangerous permissions. So you can use a tool that the tool I like to recommend is a deleg, an adeleginator. A delegate is a tool that I wrote, which is just a wrapper around a deleg, which is an Active Directory delegation management tool. It sounds kind of like a mouthful, but essentially it will show you all the dangerous permissions that you have in your environment. The one caveat is you just have to know what to look for, and so that's what a delegator does. It automates it for you and finds the dangerous things that you should care about. But you can use tools like Pink Castle or Purple Knight or Bloodhound. There's a number of tools that you can use to find these dangerous permissions in your environment, but I would first and foremost focus on those broad groups like domain users, authenticated users, domain computers, everyone, and look specifically at your tier zero resources or your privileged resources in Active Directory or Entra first.

00:31:15.150 --> 00:31:22.819
<v Spencer>You know, global admins look at those first to make sure there's nothing that has inherent control over those,

00:31:23.299 --> 00:31:23.480
<v Unknown>right?

00:31:23.900 --> 00:31:28.039
<v Spencer>Or that can elevate privileges to become a domain admin, for example.

00:31:28.910 --> 00:31:53.980
<v Brad Causey>Yeah, no, that makes perfect sense. And and you and that was actually going to be my takeaway. Is like when when I was first reading the show notes, I was like, all right, cool, audit your AD environment. We're not doing that by hand, folks. Just want to be really clear about that, right? There are no great tools that are built in. You're not going to do that with ADUC, you know. So, so yeah, you're going to have to get some tools involved in this. And as you said, there are some really good ones out there, including that.

00:31:55.240 --> 00:31:59.289
<v Brad Causey>And there are a couple others that we we talk about pretty pretty frequently in the same vein. Yeah.

00:32:00.250 --> 00:32:37.339
<v Spencer>And some of you listening might have third-party tools. You might have Netrics or some Chaosoft stuff, or some Paris, or you might have some third-party tools already that can help facilitate this as well. So I would encourage folks to use that. What you don't need to do is you don't need to go out and buy a bunch of tools right now to get started doing this. Start with the free tools, the stuff on GitHub, the stuff that I recommend. Start there, and you can get a lot of the low-hanging fruit knocked out of the way. And then, if you want something that's more continuous or more robust or feature-rich, that's where you can look at third-party, you know, commercial software. But you don't have to start there.

00:32:38.059 --> 00:32:38.869
<v Brad Causey>Agreed. Agreed.

00:32:39.769 --> 00:32:41.619
<v Spencer>And that's it, really.

00:32:39.769 --> 00:33:11.490
<v Spencer>It's like audit your environment. Look for broad groups that have dangerous access. Fix it. You know, document it, remediate it in your environment. And I promise you, if you just do that for the next couple months, a little bit by little, day after day, you know, week after week, just work on it little by little. In a year, if you've done that for a couple times a week, or a couple times a month, a couple times a quarter, your environment will be much harder to attack because you'll have eliminated a lot of that low-hanging fruit.

00:33:11.970 --> 00:33:29.779
<v Brad Causey>Yeah, and and make no mistake about it, threat actors know this stuff too, and so they're going straight for your Active Directory as soon as they get a foothold in your environment because they know it's logical, they know that that's where the opportunities for provascular lateral movement exist, and so you need to get ahead of that.

00:33:30.710 --> 00:33:49.480
<v Spencer>And you know, even when we put AI into the mix, and we'll kind of maybe wrap on this, is like even with AI in the mix, let's say there's some super AI, you know, a Russian APT that's using like AI, like scaled out the moon, right? Just like autopon you, right? What do we think they're going to use?

00:33:50.109 --> 00:33:57.430
<v Spencer>They're going to look for dangerous permissions. They're going to look for certificate templates. They're going to look for all of the things that we know are being attacked now.

00:33:58.390 --> 00:34:08.309
<v Spencer>They're just going to do it with the help of like their robot, right? And so we have to fix those things outside of those systems to have a have a chance, right? To defend.

00:34:09.780 --> 00:34:24.530
<v Brad Causey>Yeah, dude. Look, at the end of the day, AI is just doing the same stuff you and I do every single day at speed, which means if those vulnerabilities don't exist, it's just going to fail at speed, which is what we want at the end of the day, so cool. All right, folks, that's all we have

00:34:24.590 --> 00:34:46.449
<v for you today. Quick reminder>we do internal penetration testing. That's part of one of the things that if you if you are concerned about your Active Directory environment, if this is something that keeps you up at night, we know a guy, and his name is Spencer. So reach out to us if that's something you're interested in, otherwise share, like, subscribe. All really helps the channel out, and we'll see you guys next week.
