WEBVTT

00:00.000 --> 00:00.400
Okay.

00:00.400 --> 00:04.720
So Tote is going to be talking about Active Directory and something.

00:04.720 --> 00:05.940
So let's give him a welcome .

00:10.420 --> 00:11.280
Yeah .

00:11.280 --> 00:12.000
Wow.

00:12.660 --> 00:14.100
Hello, everyone.

00:14.660 --> 00:15.620
Welcome.

00:15.760 --> 00:17.460
Thank you so much for joining.

00:17.460 --> 00:21.840
So this is actually my first time talking.

00:21.840 --> 00:26.980
I mean, this is actually my first time actually being in an international conference.

00:27.740 --> 00:31.380
So talking in DEF CON feels like a dream.

00:31.380 --> 00:37.600
So anyway, today I'm going to talk about a vulnerability I found in Active Directory.

00:37.760 --> 00:46.020
And before we actually get to the vulnerability, let me start with some background.

00:46.020 --> 00:52.760
So I found this vulnerability while doing a research about DMSA.

00:53.300 --> 00:57.700
And three years ago I also did a research on GMSA.

00:58.200 --> 01:03.740
Now, there is just one thing that I couldn't figure out about MSA.

01:03.740 --> 01:11.300
Because I can, like, I mean, after I did research on both of them, I can say that I have a grasp of how they work.

01:11.300 --> 01:19.740
But the thing that I just couldn't figure out was why the D in DMSA and the G in GMSA are lower case.

01:19.800 --> 01:24.440
And the at first I thought this is just because I'm not an English speaker.

01:24.440 --> 01:31.460
So when I worked on GMSA, I asked like a ton of people why the G is lower case.

01:31.700 --> 01:44.120
And so I'm telling you this story just so you know that if at some point during the presentation you will ask yourself why it is written that way, I have no clue.

01:44.620 --> 01:48.500
And yeah, so I'm Yuval Gordon.

01:48.500 --> 01:51.120
I'm a security researcher at Akamai Technologies.

01:51.440 --> 01:58.280
And in the past decade or so, I've been working on different roles in cyber security.

01:58.280 --> 02:05.000
But the one domain that I keep coming back to is identity research and active directory.

02:05.100 --> 02:09.200
And so in Akamai, I'm now doing an offensive research.

02:09.200 --> 02:12.040
So that's how I got to this research.

02:12.380 --> 02:16.880
And that's my X handle over somewhere.

02:16.880 --> 02:19.680
So feel free to follow me or reach out to me.

02:20.900 --> 02:24.140
And okay, so let's get started.

02:24.500 --> 02:31.880
So we're going to start by with a quick introduction of service accounts.

02:32.160 --> 02:38.440
So this is just to make sure that everyone has some understanding of what service account is.

02:38.740 --> 02:41.960
And then I'm going to do a deep dive to GMSA.

02:41.960 --> 02:47.540
I'm going to explain exactly how they work and where I found the vulnerability.

02:48.400 --> 02:58.120
And after that, I will be talking about that successor, which is the name of the technique that we use to exploit this vulnerability.

02:59.300 --> 03:07.600
Okay, so in order to explain what a service account is, I'm going to use a story by Elad Shamir.

03:07.600 --> 03:13.140
So Elad Shamir is, I think, the VP research of Specter Ops.

03:13.140 --> 03:16.680
And he has some talks related to Kerberos.

03:16.680 --> 03:23.600
And in his talks, he has this concept to explain about Kerberos and different things in Kerberos.

03:23.600 --> 03:26.120
And I just really love his story.

03:26.120 --> 03:31.300
So I really recommend you guys to watch his talks.

03:31.300 --> 03:36.520
But for now, I will just summarize the relevant parts for us.

03:37.140 --> 03:42.640
So in his story, Elad is talking about this amusement park.

03:43.360 --> 03:47.980
And in this amusement park, there are, you know, visitors.

03:48.320 --> 03:53.160
And when a visitor enters the park, they get a daily ticket.

03:53.160 --> 03:58.180
So the daily ticket, it's like a TGT in Kerberos.

03:58.920 --> 04:02.820
And so in the park, we have a lot of different rides.

04:02.820 --> 04:06.780
So every ride, it's like a different service.

04:06.800 --> 04:10.240
And service, for example, can be a web application.

04:11.140 --> 04:17.620
So when the visitor wants to get on a ride, they need a ticket for that ride.

04:17.620 --> 04:25.120
So actually, the daily ticket that they got is not enough to get on a ride.

04:25.380 --> 04:29.500
Each ride requires a different ticket.

04:30.000 --> 04:40.760
So what the visitor has to do, they go to the ticket office once again, and they now ask for a ticket for the specific ride they want to get on.

04:41.600 --> 04:45.560
And so when they get the ticket, they will go to the ride operator.

04:47.980 --> 04:52.440
And this will be the main focus of our talk today.

04:52.480 --> 04:59.240
So they will go to the ride operator with this ticket, and they will hand it the ticket.

04:59.240 --> 05:02.920
So the ride operator will validate the ticket.

05:03.220 --> 05:08.460
They will, so the ticket has some information about the user.

05:08.460 --> 05:28.960
So it will include the age of the visitor and the height of the visitor and maybe the different membership, like maybe this is a premium user and the ride operator will validate it and decide whether the visitor should be allowed to get on the ride or not.

05:28.960 --> 05:34.780
So maybe it's like a premium ride and the visitor can't actually access it.

05:34.780 --> 05:38.780
So that's the purpose of service account, kind of.

05:38.780 --> 05:43.980
So there are different types of service accounts.

05:43.980 --> 05:51.840
We have the legacy type of service account, the unmanaged type, and we have the managed type.

05:51.840 --> 06:08.040
So actually the legacy service account, they had like a lot, they have a lot of security risks involved with them and the most major one is that they are a target for an attack called Kerberos thing.

06:08.040 --> 06:12.720
So this is a widely used attack, very common today.

06:12.720 --> 06:14.220
Attackers love it.

06:14.240 --> 06:30.520
And in 2008 and 2012, Microsoft introduced MSA and then GMSA and we will refer to both of them as MSA because for the sake of our talk, we don't really care about the differences between them.

06:30.520 --> 06:38.140
So MSA actually solved the security risks that were related to the legacy service account.

06:38.140 --> 06:49.920
But if that's the case, you might think that it's pretty weird that I'm still talking about legacy service accounts more than a decade after MSA were introduced.

06:49.920 --> 06:57.380
So the reason for that is that unfortunately, GMSA just didn't take over.

06:57.380 --> 07:01.340
So let's talk about why that is the case.

07:01.620 --> 07:10.540
So the first and I think most major problem with MSA is that they are just not fully supported.

07:10.620 --> 07:19.680
So for us to configure a service , to configure an MSA for a service, the service has to support MSA.

07:19.680 --> 07:27.680
And if the service doesn't support MSA, well, we can't just do it and then we have to use a legacy service account.

07:28.400 --> 07:43.040
And so the other problem is that even if the service does support MSA, so say we have an existing service that is running with a legacy service account because we have our environment for like decades.

07:43.040 --> 07:44.520
So it makes sense.

07:44.520 --> 07:47.440
We couldn't done anything before.

07:47.440 --> 07:54.120
So now we want to have this service that uses the legacy service account use MSA.

07:54.120 --> 07:56.560
Well, that's a pretty difficult task.

07:56.560 --> 08:00.620
It will require a lot of time and work from the IT team.

08:00.620 --> 08:08.480
And if they will have some mistake, if they will get something wrong, the results can be down time for the service.

08:08.480 --> 08:14.180
And some services are too critical to risk with this kind of risk.

08:14.180 --> 08:16.660
So that's a problem .

08:16.660 --> 08:25.320
But luckily for us, just recently in 2025, Microsoft introduced a new kind of MSA , DMSA.

08:25.320 --> 08:28.820
So DMSA is delegated managed service account.

08:28.820 --> 08:36.900
It's a new type of MSA that has all of the advantages that the previous types of MSA had.

08:36.900 --> 08:40.980
But this time, the IT team can just lay back and relax.

08:40.980 --> 08:53.180
Because there is a really new cool migration process that let IT teams take an existing legacy service account and migrate it into a DMSA.

08:53.180 --> 08:59.000
And every service that uses the legacy service account will now use the DMSA.

08:59.000 --> 09:04.600
And it doesn't matter if the service supports MSA or not, it will work.

09:04.680 --> 09:10.180
And it doesn't require much work from the IT team.

09:10.180 --> 09:12.540
It's pretty straightforward.

09:12.540 --> 09:15.820
So they can't make any mistake there.

09:15.820 --> 09:18.340
So it's pretty amazing process.

09:19.420 --> 09:32.880
And one more thing about DMSA, Microsoft documentation says, I'm not sure if you can read the quote, but DMSA secret can be retrieved or found anywhere other than on the DC.

09:33.400 --> 09:38.120
So when I saw this sentence, it was pretty weird for me.

09:38.280 --> 09:49.400
And we will get to this sentence back later because I think that we can debate on if this statement is actually true or not.

09:49.400 --> 09:51.200
But that's for later.

09:51.200 --> 09:54.080
So let's talk about the migration process.

09:54.960 --> 10:00.740
So we can actually divide the migration process into three phases.

10:01.060 --> 10:04.020
At first we start the migration.

10:04.020 --> 10:06.040
Then we have to wait.

10:06.040 --> 10:08.580
And then we complete the migration.

10:08.920 --> 10:18.100
So before actually talking about each of those phases, let's start with how authentication looks like before we even start the migration.

10:18.220 --> 10:24.380
So we have a server on our left, an SQL server.

10:24.480 --> 10:28.700
And that server is running an SQL service.

10:28.800 --> 10:33.980
And we have configured a legacy service account for that service.

10:33.980 --> 10:37.500
So the name of the legacy service account is SBC SQL.

10:37.860 --> 10:48.600
And when the service will ‑‑ so the service needs to authenticate and for that it will request to authenticate as SBC SQL.

10:48.640 --> 10:52.080
And the DC will respond with a TGT.

10:52.680 --> 10:53.120
Okay.

10:53.120 --> 10:54.560
So that's nice.

10:54.560 --> 10:57.580
So now let's start the migration.

10:58.180 --> 11:03.860
So when we start the migration, what happens is we have now a new DMSA.

11:03.860 --> 11:05.040
I have created a DMSA.

11:05.040 --> 11:07.200
I called it DMSA dollar.

11:07.260 --> 11:09.340
And we started the migration.

11:09.340 --> 11:13.540
So what happens is the two accounts get automatically linked.

11:13.540 --> 11:16.540
So each account is pointing to the other.

11:16.640 --> 11:24.660
And also the legacy service account is granted the right permissions on a certain attribute on the DMSA.

11:24.780 --> 11:28.980
So this attribute is a pretty critical one.

11:28.980 --> 11:32.260
It controls who can authenticate as the DMSA.

11:32.260 --> 11:40.640
And I will explain why the legacy service accounts need these permissions in the next slide.

11:40.700 --> 11:46.960
So, okay, we have started the migration process and now we are entering the waiting phase.

11:46.960 --> 12:01.080
So what happens during this phase, so when the server is authenticating now, when the service will try to authenticate as SBC SQL, it will get a TGT in response once again.

12:01.420 --> 12:06.300
This time, however, the response will include some additional information.

12:06.300 --> 12:15.380
So the additional information will have a message saying that this user will be soon superseded by DMSA dollar.

12:15.560 --> 12:36.180
So when the Kerberos client, which actually handles all of the authentication for the SQL service, so when the Kerberos client will see this message, it will automatically send an LDAP modification request to the DC requesting to allow SQL server, which is the server we are currently running on,

12:36.180 --> 12:39.500
to be able to authenticate as the DMSA.

12:39.500 --> 12:51.760
So we are, so the Kerberos client is doing that to make sure that the server will be able to use the DMSA after the migration will be completed.

12:51.780 --> 12:56.180
And this is why the waiting phase is actually there.

12:56.180 --> 13:13.540
So we want every server that is currently using this service, this service account, sorry, to authenticate with the service account and get the permissions to actually access the DMSA for the moment that we will complete the migration.

13:13.900 --> 13:16.840
So at this point, we need to wait.

13:16.840 --> 13:19.840
So, okay, we are waiting for about a week.

13:19.840 --> 13:22.340
Then we complete the migration.

13:22.500 --> 13:26.740
And when we complete the migration, we have the legacy service account.

13:26.740 --> 13:29.560
And it gets automatically disabled.

13:29.620 --> 13:33.660
And some Kerberos configurations are being copied to the DMSA.

13:34.440 --> 13:39.440
Okay, so let's look at what happens during authentication now.

13:39.700 --> 13:45.280
So once again, the service is configured to run with SVC SQL.

13:45.280 --> 13:57.440
So it will try to authenticate as SVC SQL, but this time the DC will respond with an error because, and then the error will have some additional information.

13:57.440 --> 14:06.620
So the error was because the user is disabled, but the additional information will say that this user is superseded by DMSA dollar.

14:06.900 --> 14:14.680
So when the Kerberos client sees this message, it will just try to authenticate automatically as DMSA dollar.

14:14.680 --> 14:24.540
And because we allowed SQLSRV to authenticate as the DMSA, it will work and the DC will reply with a TGT.

14:24.960 --> 14:26.760
So that's great.

14:26.760 --> 14:32.960
And almost everything I just showed is from Microsoft documentation about DMSA.

14:32.980 --> 14:37.840
But there was this one thing that they didn't mention at all.

14:37.840 --> 14:42.000
So it really bothered me because it's a really critical thing.

14:42.000 --> 14:45.300
So this thing is privileges.

14:45.540 --> 14:58.920
So we have a legacy service account and we have a DMSA and I said that there is a really cool new migration process that, you know, migrate the service account to the DMSA.

14:58.920 --> 15:09.240
But I expected the permissions of DMSA to be the same as the legacy service account.

15:09.240 --> 15:13.940
But the process was pretty weird.

15:14.000 --> 15:21.260
So in order to understand what happens, let's talk a bit about Kerberos privileges.

15:21.440 --> 15:34.360
So in Kerberos, in Kerberos TKET, we have a structure that is called the pack and our privileges in the domain are determined by the pack when we authenticate with Kerberos.

15:34.560 --> 15:44.120
So in the pack, we have some information about the user and also a list of every group that the user is a member of.

15:44.120 --> 15:51.520
So we had the legacy service account and they were a member of several groups.

15:52.340 --> 15:57.640
And so that was like their privileges in the domain.

15:57.640 --> 15:59.740
And now I've created a new DMSA.

15:59.740 --> 16:06.720
I completed the migration process and I checked whether the DMSA is a member of the same groups.

16:06.780 --> 16:10.280
And well, the DMSA is not a member of any group.

16:10.360 --> 16:17.100
So by this logic, I can expect the pack of the DMSA to look like this.

16:17.700 --> 16:32.080
But if that's the case, that's a huge problem because it means that those two users don't have the same privileges in the domain and therefore the service wouldn't work as expected.

16:32.320 --> 16:45.200
So I guess Microsoft engineers have watched Dragon Ball, same as me, because they too knew that when a problem is just too big, there is only one solution, which is fusion.

16:45.760 --> 16:50.420
So the pack of the DMSA actually looks like this.

16:50.420 --> 16:58.600
So what this is doing, when we authenticate as a DMSA, it will build a pack for the DMSA just as we can expect.

16:58.600 --> 17:03.460
But then it will also check if the DMSA is linked to another account.

17:03.840 --> 17:25.740
If so, the DC will also generate a pack for the other account and will just merge the two together and that way we will have a pack that has, I mean, that way the DMSA will have the privileges of SVC, SQL and the exact same privileges.

17:26.080 --> 17:45.340
Okay, so when we saw that, we thought that this is like really interesting because I have never heard of any mechanism in Active Directory that just let you copy the privileges of one user, give it to another and without changing any group membership or something like that.

17:45.340 --> 17:51.380
So I thought this was really cool and I wanted to know whether I can abuse it or not.

17:51.660 --> 17:54.540
So, spoiler alert, I did abuse it.

17:54.540 --> 18:03.300
But before actually talking about how I abused it, let's talk about how the migration process, like how we start the migration process.

18:03.700 --> 18:11.760
So, Microsoft documentation says that in order to start a migration process, we need to execute this partial commandlet.

18:12.220 --> 18:23.320
Now, if you will try to execute this partial commandlet as a non-domain admin, well, it will fail because Microsoft probably thought about it.

18:23.320 --> 18:30.460
They don't want regular users to just migrate a legacy service to DMSA.

18:30.460 --> 18:31.540
It's problematic.

18:31.540 --> 18:33.120
Okay, that makes sense.

18:33.120 --> 18:37.520
So, let's understand like why it is failing.

18:37.520 --> 18:40.480
What is happening when we execute this command?

18:40.560 --> 18:47.040
So, apparently this command is just a wrapper for an LDAP operation.

18:47.460 --> 18:53.140
So this is just basically a request that we send to the DC to invoke some functionality.

18:53.720 --> 19:04.460
And, well, if you will try to manually send this LDAP operation, this request to the DC as a non-domain admin, it will fail.

19:04.700 --> 19:07.200
Yeah, sorry, forgot the animation.

19:07.200 --> 19:21.200
So, what happens is that on the DC side, there is a verification and the DC checks if the color of this LDAP operation is a domain admin or not.

19:21.200 --> 19:24.300
And if we're not a domain admin, it will just fail.

19:24.300 --> 19:25.700
So, again, it makes sense.

19:25.700 --> 19:31.380
Microsoft don't want us to just migrate services, service accounts.

19:31.380 --> 19:40.600
So, at this point, let's understand what the DC is doing when this functionality gets invoked.

19:40.600 --> 19:45.780
So, what the DC is doing is actually just changing some attributes.

19:45.780 --> 19:51.620
So, it changes attributes on both the DMSA and the superseded user.

19:51.700 --> 20:18.380
So, at this point, what we want to check if, like, if we have control over the DMSA, maybe even if we don't have domain admin rights, maybe we can just write to the same attributes and, like, you know, mimic the migration process and apparently that just worked.

20:18.380 --> 20:26.120
So, if we change an attribute on the DMSA, that DMSA is now linked to whatever account we want.

20:26.120 --> 20:28.040
There is no protection from that.

20:28.040 --> 20:39.280
So, even if the account is in the protected users group or, like, I don't know, there is the account sensitive and, like, cannot be configured for delegation.

20:39.280 --> 20:41.800
So, that won't work as well.

20:41.800 --> 20:50.440
I mean, I can link the DMSA to any account I want and just copy the privileges of that account to my DMSA.

20:50.960 --> 20:53.560
So, that leads us to bad success.

20:55.180 --> 20:55.920
Okay.

20:55.920 --> 20:58.320
So, let's go over the attack flow.

20:58.320 --> 21:06.820
So, we have an attacker and that attacker has a control over a DMSA and their goal is to achieve domain admin privileges.

21:07.080 --> 21:13.440
So, what the attacker will do is they will just simulate the DMSA migration.

21:13.700 --> 21:27.320
So, they will link the DMSA to another user, a domain admin, and then what they have to do is to authenticate as a DMSA and the DC will just grant them the privileges.

21:27.420 --> 21:29.160
So, okay, that's nice.

21:29.160 --> 21:32.760
The attacker achieved their goals and that's pretty bad.

21:32.760 --> 21:44.420
But, actually, I mean, the starting point, that's not trivial at all because, I mean, first of all, DMSA is a brand new feature.

21:44.420 --> 21:47.980
So, I mean, most organizations don't use it.

21:47.980 --> 21:52.460
So, gaining control over an existing DMSA is a pretty difficult task.

21:52.460 --> 22:01.340
But, also, the DMSA by default are being created in a container called a managed service account container.

22:01.340 --> 22:15.960
So, this container is highly restrictive and if we're not like tier zero accounts, we probably don't have control over this container or any object inside which includes the DMSA.

22:15.960 --> 22:21.360
So, okay, that's not like a really strong attack.

22:21.360 --> 22:32.720
But then we figured that while DMSA by default are being created in the managed account, in the managed service account container, they don't have to be created there.

22:32.720 --> 22:37.340
So, apparently, we can create DMSA in any OU.

22:37.340 --> 22:46.220
So, OU is organizational unit and basically this is like a folder in active directory.

22:46.220 --> 23:07.160
And so, some folders may be considered like as, you know, less important because maybe they don't have any important object inside and maybe there is a team that consistently annoys the IT team in requesting to do stuff in that OU.

23:07.160 --> 23:11.960
So, the IT team will just grant this team permissions over the OU.

23:11.960 --> 23:19.640
I mean, it's their OU so they can just manage it and what's the worst that can happen, right?

23:19.640 --> 23:22.300
So, that's the worst that can happen.

23:22.300 --> 23:34.380
So, now the attacker has control over an OU and they will just create a DMSA there and the rest of the attack flow will be the exact same.

23:35.180 --> 23:38.640
So, now let's see a demo of this attack.

23:40.040 --> 23:40.720
Okay.

23:40.720 --> 23:48.800
So, we are running as a weak user and we will try to add ourselves to the managed meals but we fail because we don't have permissions.

23:49.080 --> 23:58.000
So, now we see that we have privileges to create an object inside of the temp OU and we will create a DMSA in that OU.

23:58.860 --> 24:03.740
And now we will link this DMSA to the administrator account.

24:04.580 --> 24:05.000
Okay.

24:05.000 --> 24:08.980
So, the DMSA is linked and now we need to authenticate as the DMSA.

24:08.980 --> 24:11.040
We will use Rubius for that.

24:13.000 --> 24:16.800
So, now we can see that we are authenticated as the DMSA.

24:16.800 --> 24:18.980
We will try to add ourselves to the managed meals once again.

24:18.980 --> 24:22.860
This time we succeed as we are running with administrator privileges.

24:33.180 --> 24:33.880
Right.

24:33.880 --> 24:37.480
That was a great time for drinking water.

24:37.560 --> 24:37.920
Okay.

24:37.920 --> 24:48.080
So, we have reported this vulnerability to Microsoft and they agreed with us that this is actually a vulnerability.

24:48.720 --> 25:03.760
And so, they said that if we have an attacker and that attacker has a control over an OU and from that they can just gain the privileges of any account in the domain and basically just own the domain.

25:03.760 --> 25:06.860
This is a moderate severity vulnerability.

25:07.100 --> 25:12.660
And because of that, it does not meet the bar for immediate servicing .

25:13.240 --> 25:18.240
But, however, they did say that they will fix it in the future.

25:18.280 --> 25:20.200
So, yeah.

25:21.020 --> 25:24.780
But that's actually not the end of it.

25:25.580 --> 25:31.700
So, when I started with the research, I saw this structure.

25:31.700 --> 25:37.080
So, this structure is a structure that, okay.

25:37.080 --> 25:47.760
So, the TGTs for DMSA includes this structure and this structure holds two very important fields.

25:47.760 --> 25:51.820
It holds the current keys and previous keys of the DMSA.

25:51.820 --> 26:00.260
So, in the current keys and previous keys, there are the Kerberos keys for the DMSA, which are basically credentials.

26:00.440 --> 26:05.140
So, we can think about it as the password hash of the DMSA.

26:05.300 --> 26:14.340
And when I saw it at first, I thought it makes, I mean, I thought this is, I mean, it makes sense.

26:14.340 --> 26:20.260
The machine actually needs the credentials of the DMSA to do different stuff.

26:20.900 --> 26:26.640
And I didn't give it any attention until I saw this response.

26:26.720 --> 26:30.580
So, I hope you guys can actually see it.

26:30.580 --> 26:34.660
But what happens here is we have a decoded response.

26:34.660 --> 26:38.340
So, this is the Kerb DMSA key package structure.

26:38.340 --> 26:42.040
And we have the current keys and previous keys.

26:42.040 --> 26:47.800
So, in the current keys, we have the existing Kerberos keys of the DMSA.

26:47.800 --> 26:53.700
I have just created and simulated the migration linked to the administrator account.

26:53.760 --> 26:57.520
And we also have the previous keys.

26:57.520 --> 27:04.700
So, that's pretty weird because this account is, I have just created it.

27:04.700 --> 27:08.380
It doesn't suppose to have a previous password.

27:08.380 --> 27:13.060
So, that's weird, but I actually didn't notice that.

27:13.060 --> 27:22.380
What I did notice is that the value in the previous keys, and again, maybe you can't actually see it, but that's okay.

27:22.380 --> 27:24.540
It's just an NTLM hash.

27:24.540 --> 27:36.460
And usually I wouldn't recognize a specific NTLM hash, but I did recognize this specific NTLM hash because that's the NTLM hash of that password.

27:36.460 --> 27:39.920
And this is the password that I always use.

27:40.060 --> 27:42.360
I mean, in my lab environment, yeah?

27:42.360 --> 27:52.020
So, when I saw the NTLM hash of that password, I immediately recognized it and I thought it's, it was like really weird.

27:52.020 --> 28:00.580
Why the DMSA that I have just created and DMSA is this, you know, it's so secure and it has like randomly generated password.

28:00.660 --> 28:08.300
So, why does it have a previous password that is AA126, my default password?

28:08.300 --> 28:20.980
So, apparently what happens is when we link a DMSA to another account, we are not only stealing their privileges, we are also getting their credentials as well.

28:20.980 --> 28:24.580
So, that's pretty cool, I think.

28:24.580 --> 28:29.760
And that, of course, was the password that I configured for the administrator account.

28:29.860 --> 28:31.940
As again, I always use it.

28:31.940 --> 28:45.780
So, I created a tweet about it and in this tweet I show a video and I'm running this script and it will just dump the credentials of every user and computer in the domain.

28:45.880 --> 28:53.380
And we also have here the credentials of which is, I think, the most critical account in the domain.

28:53.380 --> 28:56.720
If you have it, you can craft golden tickets.

28:57.600 --> 29:06.180
Yeah, so, I'm showing this because there was this one comment that I think summarized this whole thing perfectly.

29:06.300 --> 29:09.960
So, it seems quite moderate.

29:10.560 --> 29:11.320
Yeah.

29:12.120 --> 29:13.080
Okay.

29:13.080 --> 29:15.120
So, that's about it.

29:15.120 --> 29:16.480
That's the attack.

29:16.560 --> 29:19.560
And now, let's talk about detection.

29:19.940 --> 29:29.520
So, I will talk just about detection and not mitigation at all because we will wait for Microsoft to patch it for the mitigation.

29:30.680 --> 29:32.320
But, yeah.

29:32.320 --> 29:40.620
So, for detection, when we execute the successor, there are a couple of logs that will be logged.

29:40.720 --> 29:47.460
So, we have a log for creation but for this log we have to configure a cycle.

29:47.460 --> 29:49.940
Cycle is system ACL.

29:49.980 --> 29:58.160
So, you need to configure a cycle to actually log every time that a new DMSA will be created.

29:58.500 --> 30:01.340
The next one is DMSA linkage.

30:01.340 --> 30:13.360
So, again, configure a cycle and then every time that the attribute that controls the link will be, every time that it will be modified, the log will be generated.

30:14.040 --> 30:18.680
And the next one, I think it's pretty interesting.

30:19.020 --> 30:23.440
So, this is actually a log for DMSA.

30:23.760 --> 30:33.840
And so, this log is for when you fetch a password for the DMSA, this log will be logged.

30:33.840 --> 30:48.320
So, and you will have the caller seed and caller IP and they will hold the seed that actually fetched the password and IP that the request was originating from.

30:48.320 --> 31:12.880
But when I authenticated as a DMSA, this log and this exact log has been generated and the weird thing about it is that in the caller seed, instead of like, I'm not sure what because I'm just authenticated as a DMSA, but the caller seed that we can see here is the seed of anonymous log on.

31:13.880 --> 31:25.620
So, that's pretty weird and I think that it might be, like, it might be worth to take another look at it, but I haven't got the chance to do it yet.

31:25.620 --> 31:26.820
So, maybe later.

31:26.820 --> 31:31.120
But it will also include a blank in the caller IP.

31:31.280 --> 31:34.040
So, that's pretty interesting, I think.

31:34.360 --> 31:43.260
And anyway, I, MSRC were great to work with.

31:43.280 --> 31:50.520
I mean, we did disagree on the vulnerability severity, but other than that, they were great.

31:50.520 --> 31:54.180
So, I sent them the presentation before this talk.

31:54.180 --> 32:02.540
I asked if they want to include any official statement and so they said that this is their official statement.

32:02.540 --> 32:07.000
We are aware of this report and we'll be addressing it in an upcoming update.

32:07.000 --> 32:08.600
So, stay tuned.

32:10.680 --> 32:13.660
So, let's talk about conclusions.

32:14.340 --> 32:20.960
So, first of all, DMSA is like a new security feature.

32:20.960 --> 32:23.680
It was designed with security in mind.

32:23.680 --> 32:26.120
It actually solves a lot of problems.

32:26.440 --> 32:36.860
And it doesn't mean that the feature itself is necessarily secured just because they made it with, like, security in mind.

32:37.400 --> 32:55.440
And so, the second point is to never skip the obvious because when I saw the whole pack merging thing and I talked with my manager about it and he said, well, maybe you can just try to change the attribute that control the link.

32:55.620 --> 32:58.740
And I was like, no, that would be, like, way too easy.

32:59.160 --> 33:03.260
But it apparently just worked and it was that easy.

33:03.520 --> 33:04.520
So, yeah.

33:04.800 --> 33:08.980
Next point is to log in the layer on DMSA links and creation.

33:09.240 --> 33:09.880
Yeah.

33:10.520 --> 33:16.960
And the final one is that DMSA is a great new feature.

33:16.960 --> 33:17.500
I really love DMSA.

33:17.520 --> 33:25.420
When Microsoft will patch it, I think it will be really worth for organizations to actually use this feature.

33:25.760 --> 33:27.140
And, yeah.

33:27.140 --> 33:28.520
So, that was it.

33:28.520 --> 33:29.660
And hope you enjoyed.

33:29.660 --> 33:30.700
Thank you so much.

