WEBVTT

00:00.000 --> 00:12.100
Hi everyone and thank you very much for coming to our talk, Windows Epidemic, A Crash Course in Abusing RPC for Windows and Win DDoS.

00:12.200 --> 00:26.580
The theme for our talk today is going to be dumb ways to die for those of you who know it so I really hope that you'll appreciate the connection between the technical details and this funny little mobile game.

00:27.400 --> 00:31.800
My name is Or Yair, I'm the security research team lead at SafeBreach.

00:31.800 --> 00:53.620
I have more than seven years of experience in security research with past research on Linux embedded and Android systems and for more than four years now my main focus lies in vulnerability research in the Windows operating system and third party apps on it and it's also my second DEF CON talk here today.

00:56.020 --> 01:05.920
Hi everyone, my name is Shachak Morag, currently serving as research lead at SafeBreach with seven years of experience in security research.

01:05.920 --> 01:13.980
My background includes extensive expertise in Linux kernel and embedded systems with more than one year of focused research on Windows platforms.

01:18.750 --> 01:22.550
Okay, so let's see what we're going to discuss today.

01:22.610 --> 01:28.290
We're going to start with talking about the growing DDoS threat and denial of service in general.

01:28.470 --> 01:42.360
We'll then focus on one critical denial of service vulnerability that we managed to exploit called LDAP nightmare that was the gateway for this research.

01:42.820 --> 01:59.540
We'll then present our research goals, novel techniques that we invented that focus on developer's blind spots and see how they led us to come up with a new way to create DDoS and also with four new different denial of service vulnerabilities.

02:00.680 --> 02:06.780
But just before we start our journey, let's quickly be reminded of what is DDoS.

02:06.780 --> 02:19.440
So a DDoS is created when many computers try to flood a specific target server with a huge amount of requests in order to make it too busy and finally crash or at least to malfunction.

02:20.360 --> 02:25.540
And now we can start talking about the DDoS related growing risks that we now they see.

02:25.540 --> 02:40.760
So according to G Corrador there was a 56 percent increase in DDoS attacks in the second half of 2024 compared to the second half of 2023 and the same comparison for the first half of the year was 46 percent.

02:41.200 --> 02:52.100
Recently CloudFlare even reported the largest ever recorded DDoS attack with 7.3 terabits per second.

02:52.440 --> 02:58.420
Now creating denial of service has an obvious and large price of course.

02:58.420 --> 03:15.340
According to Perimeter 81 which is a company by checkpoint, each DDoS attack in 2023 cost organizations approximately $6,000 per minute with an average total cost of $486,000.

03:16.320 --> 03:31.040
Recently on January 1st while most of you here were probably hung over, Shahak and I published the first POC for a very hyped denial of service vulnerability called LDAP Nightmare.

03:31.600 --> 03:38.220
Although this vulnerability was fixed and this vulnerability was found by Yuki Chen.

03:38.220 --> 03:46.100
Now although this vulnerability was fixed Yuki did not publish the technical details about it and left us with passion to discover them.

03:46.760 --> 03:54.320
This vulnerability allowed to crash any domain controller without any need for authentication or user interaction.

03:55.760 --> 04:04.760
Our research revealed that domain controllers can be turned into LDAP clients or more specifically CLDAP clients.

04:04.760 --> 04:15.400
Apparently there is a specific RPC call named DSR get DC name EX2 that you can execute on domain controllers without needing to authenticate.

04:15.460 --> 04:27.660
Then this function in order to retrieve the information that it needs it leads the domain controller to become a CLDAP client and you can make it contact any CLDAP server that you want.

04:28.140 --> 04:35.540
Now for clarification CLDAP is just basically LDAP over UDP instead of LDAP over TCP.

04:36.200 --> 04:52.860
The rest of the exploitation chain of this vulnerability after the domain controller became our CLDAP client was returning a simple invalid value from the CLDAP server to the CLDAP client which was the victim domain controller.

04:53.280 --> 04:59.120
This caused the CLDAP client to crash which led the entire machine to crash as well.

04:59.820 --> 05:11.620
That was because the CLDAP client was located in the critical process and if it dies then it just reboots the entire machine.

05:11.780 --> 05:27.300
So even though this domain controllers are a critical component that is heavily researched for security issues then a blind spot in it was still discovered and that was in the LDAP client code.

05:28.240 --> 05:40.980
Out of this fact we extracted our research goals which were focusing on such developers blind spots and targeting them for more denial of service vulnerabilities.

05:41.580 --> 05:49.680
And of course as primary targets we chose to continue with domain controllers which are one of the key components in an active directory network.

05:49.980 --> 05:56.780
So if you deny service from domain controllers you can basically halt entire organizations.

05:58.580 --> 06:02.860
Okay, so let's see which developers blind spots we focus on.

06:02.860 --> 06:12.400
The first one was the one that we already saw which was client code that we can trigger remotely to communicate with us as its servers.

06:12.400 --> 06:15.020
But the second one was also interesting.

06:15.540 --> 06:22.980
We tried to understand how or where in server code developers can forget about certain security needs.

06:23.080 --> 06:41.860
Then we figured out that if the server code is transport agnostic, wrapped and uses heavy obstructions layers and directs the developers to only focus on the application's logic, then there's a higher chance for the developers to forget about certain security needs.

06:42.100 --> 07:00.340
Then we enumerated a few options and looking at Microsoft's definition of the RPC protocol we saw that Microsoft clearly states that RPC enables you to focus on the details of the application rather than the details of the network.

07:00.340 --> 07:02.540
Which was perfect for us.

07:02.540 --> 07:13.480
We realized that RPC which is one of the fundamental building blocks of Windows is actually a transport agnostic wrapped server.

07:13.840 --> 07:18.900
Now RPC does function in the form of a client and a server .

07:18.900 --> 07:22.180
It uses a variety of communication methods.

07:22.180 --> 07:30.800
However, developers of RPC functions that make an RPC interface do not handle the network communication.

07:30.800 --> 07:33.660
They do not handle any network aspects.

07:33.660 --> 07:35.540
They do not handle packets.

07:35.540 --> 07:46.000
They simply write functions that can be called remotely and these functions receive parameters as if these functions were called from the same process.

07:47.300 --> 08:00.060
So our assumption was that developers are more likely to forget about mitigating network related classic server risks when the servers that they develop are RPC servers.

08:01.460 --> 08:07.760
And once we defined our goals and the blind spots that we were looking for we were ready to start our research process.

08:08.020 --> 08:17.080
The first blind spot that we focused on was client code since it was the natural way to go and leverage knowledge that we already had in the area of LDAP nightmare.

08:17.300 --> 08:31.020
So as a reminder from LDAP nightmare we understood that we can turn domain controllers into our clients effortlessly and anonymously as they just trust any LDAP server that they are told to connect to.

08:31.460 --> 08:47.400
The client code that connected to us is the LDAP client code in Windows and that client code is implemented inside WLDAP32.dll and it supports both LDAP and CLDAP.

08:47.920 --> 09:00.200
Now talking a bit more technically about the exact bug that triggered the crash in LDAP nightmare, it was located in the LDAP client's logic for handling referrals.

09:00.700 --> 09:13.860
The code that parses a type of an LDAP packet named referral was flawed and crashed as a result of an invalid value in one of the packet's fields.

09:14.020 --> 09:34.580
So in LDAP there's a concept called LDAP referrals and this concept which is also a type of a packet as we just saw, enables LDAP or CLDAP servers to refer a client to a different LDAP server in case that the server does not have the needed information.

09:35.940 --> 09:42.920
Then when the client receives the referral it normally chases these referrals to get the answers that it needs.

09:44.220 --> 09:54.480
Okay, so even though the referral process didn't really happen in LDAP nightmare, it didn't really go through as part of the exploitation path.

09:54.540 --> 09:58.680
It was just a field in the LDAP referral packet that was invalid.

09:59.300 --> 10:07.000
Even though that was the case we still learned about the referral process that we didn't know before which gave us an idea.

10:07.500 --> 10:16.560
If we are the LDAP server and we can provide a referral, can we use that for something else other than just crashing?

10:17.560 --> 10:25.880
Maybe we can leverage domain controllers as LDAP clients instead of using that against them.

10:25.880 --> 10:32.500
It could be that we can harness their resources for a distributed denial of service.

10:33.500 --> 10:45.140
What if instead of returning an invalid value in the LDAP referral response, we'll return a completely valid one with referrals that point towards a DDoS victim.

10:45.540 --> 10:53.760
Then maybe we'll be able to trigger any domain controller that we want to be a bot in a DDoS botnet attack.

10:54.740 --> 11:08.160
So in a normal DDoS attack an attacker has their own personal computer of course that initiates the attack and communicates with a command and control server.

11:08.240 --> 11:27.220
This command and control server communicates with many different bots that the attacker has managed already to compromise probably and it commands them to send a big amount of requests towards a single victim in order to flood it and this victim is the DDoS victim.

11:28.180 --> 11:45.880
However, if we affect different domain controllers worldwide to connect to our LDAP server and use LDAP referrals to refer them to a single victim server, then this would not require us to compromise many different potential bots.

11:45.960 --> 11:52.480
And then we also don't need to have any footprint on the bots that we're using.

11:54.080 --> 12:02.920
So the first thing that we want to do if we want to supply a long list of many referrals is to remove any size limitations that we have.

12:03.580 --> 12:14.800
So far the domain controller is connected to us via CLDAP which is LDAP over UDP but UDP has a packet size limit that we do not want to have.

12:15.320 --> 12:22.240
So in order to solve this, what we can do is to start with a referral to our own LDAP server.

12:22.880 --> 12:35.940
Apparently when the CLDAP client in Windows receives a referral, it contacts the referral, it chases the referral via LDAP instead of CLDAP.

12:36.100 --> 12:40.200
So this way we can switch from UDP to TCP.

12:41.180 --> 12:45.660
And now we can try to send our referral list to our domain controllers.

12:45.660 --> 12:47.940
However, it's still not that simple.

12:49.100 --> 13:05.300
Inside wldap32.dll which is the Windows LDAP client, in the function that chases referrals that is called LDAP chase referrals, there's a call to a function that checks for duplicate referrals.

13:05.380 --> 13:08.480
This function is called check for existing referral.

13:08.700 --> 13:19.060
So in case the LDAP client encounters a referral that was already chased before, it stops chasing the referral and ends the process completely.

13:19.060 --> 13:21.980
It doesn't chase any other referrals.

13:22.200 --> 13:30.140
So does that mean that we cannot implement our idea since we cannot provide two of the same LDAP referral URLs?

13:31.640 --> 13:34.160
Well no, that's not true.

13:34.160 --> 13:50.280
We found out that even though the LDAP client validates there are no duplicate referrals, it does that only for the URLs themselves and the client does not verify that the URLs are not resolved to the same IP.

13:50.660 --> 14:01.440
So to exploit this logic, all that we needed to do was to configure one subdomain wildcard record in a domain that we own to lead to the victim's IP.

14:02.100 --> 14:12.040
This completed everything that we needed for our innovative DDoS attack that we named Win DDoS.

14:12.040 --> 14:15.400
So now let's fully understand how it works.

14:15.780 --> 14:25.680
So the attacker starts by recruiting worldwide public domain controllers by sending them the RPC call that triggers them to become the attacker's CLDAP client.

14:26.580 --> 14:33.920
The domain controllers then send the CLDAP request to the attacker's CLDAP server.

14:34.760 --> 14:48.140
The attacker's CLDAP server returns a CLDAP referral response that refers the domain controllers to the attacker's LDAP server this time in order to switch from UDP to TCP.

14:49.120 --> 15:09.020
The domain controllers sends the LDAP query now to the attacker's LDAP server over TCP and the attacker responds with an LDAP referral response containing a huge list of LDAP referral URLs all pointing to a single port on a single IP.

15:10.220 --> 15:21.760
The domain controllers then send an LDAP query to that port and the attacker sends a port on that IP and that port can be a port of a server that is a web server for example.

15:22.480 --> 15:34.660
Then due to the fact that web servers do not expect LDAP packets, which are not valid HTTP packets of course, then most of them just close the TCP connection as a result of that.

15:35.860 --> 15:45.240
Once the TCP connection was aborted, the domain controllers continue to the next referral on the list which points them to the same server again.

15:45.240 --> 15:52.460
And this behavior repeats itself until all the URLs in the referral list are over.

15:52.900 --> 15:57.700
So, without further ado, let's see a demonstration of that.

15:57.700 --> 16:19.120
So in this video we'll see how an attacker initiates the Win DDoS attack in order to harness and recruit the resources of three different domain controllers to flood a specific victim server, victim dummy server that we set up as you can see in the preview for the video.

16:19.120 --> 16:20.780
So let's watch it.

16:22.380 --> 16:25.260
So we have our server up and running.

16:25.260 --> 16:36.460
We initiate the attack and we can see that the domain controllers just flood the target victim servers with many, many different requests.

16:37.220 --> 16:38.840
All LDAP.

16:42.120 --> 16:43.000
Okay, cool.

16:43.000 --> 16:46.880
So Win DDoS can be an ideal DDoS attack.

16:46.880 --> 16:53.800
It has a very high bandwidth as it can use the power of tens of thousands of domain controllers around the world.

16:53.800 --> 17:04.340
It does not require purchasing anything and it does not require that the attackers will breach into any devices.

17:04.340 --> 17:07.540
So no footprint is left on the bots.

17:08.720 --> 17:22.400
We believe that if Win DDoS would not have been fixed, such an attack would have dramatically lowered the bar for attackers to conduct a DDoS attack.

17:22.400 --> 17:26.340
It can be done from anywhere in a click of a button.

17:27.560 --> 17:29.580
But there is even more.

17:29.580 --> 17:32.000
There was more to exploit in this behavior.

17:32.000 --> 17:36.820
There was a Win DDoS to find, not just Win DDoS.

17:37.860 --> 17:48.500
After understanding that we can send tens of thousands of referrals, we thought what will happen if we just send too many more?

17:51.250 --> 18:04.450
As we already saw earlier, there is a limit if we use CLDAP because using CLDAP limits us to a referral list of about 64 kilobytes maximum which is the packet size limit for UDP.

18:04.470 --> 18:06.450
So we must use TCP.

18:06.510 --> 18:08.910
But is there any other limit?

18:10.590 --> 18:16.610
How many referrals would you allow if you were Microsoft in this flow?

18:17.250 --> 18:18.490
Ten?

18:19.290 --> 18:20.870
A thousand?

18:21.490 --> 18:22.970
Ten thousand?

18:23.250 --> 18:27.830
Well, there's no really specific number that should make sense, right?

18:28.530 --> 18:34.930
So we can see the proof of it in the fact that it's really all you can eat.

18:35.010 --> 18:42.030
As far as we tested, Microsoft did not set any limit on the referral size nor on the length of a single referral.

18:42.030 --> 18:48.190
When we tried to provide a huge list of referrals, it just took too much time on our side.

18:48.190 --> 18:50.090
Our side was the bottleneck.

18:50.790 --> 18:55.850
So if we provide huge lists, we can create huge allocations.

18:55.850 --> 18:57.830
But there is even more to that.

18:57.830 --> 19:06.570
That is because apparently the LDAP client does not release any referral URL from the list until it hits the end of the list.

19:06.670 --> 19:17.290
That means that the longer the referral list that we provide, the longer the allocation stays in the domain controller's heap memory which can be a very, very long time.

19:17.290 --> 19:19.550
It can be a few hours even.

19:21.230 --> 19:33.510
This widens the gap between allocations and releases and therefore returning a huge list of referrals if done multiple times leads to this.

19:43.350 --> 19:44.790
Cool.

19:45.170 --> 19:48.090
So another denial of service.

19:48.110 --> 19:57.490
The result was that we either saw Elsa crashing, forcing a reboot or else we saw a blue screen of death.

20:02.420 --> 20:04.040
Thank you.

20:04.580 --> 20:05.300
Okay.

20:05.300 --> 20:07.160
But there is even more.

20:07.160 --> 20:16.480
Because if we can create denial of service in domain controllers, leveraging classic server risks, then we can maybe do that in other attack surfaces.

20:16.480 --> 20:21.600
Such as the other blind spot that we talked about.

20:21.600 --> 20:28.600
Which is RPC, the transport agnostic wrapped server that we discussed about.

20:28.700 --> 20:35.600
And with this shift, I'll hand over the mic to Shachak.

20:39.830 --> 20:41.270
Thanks dude.

20:41.430 --> 20:44.230
Now let's move into the second part of our talk.

20:44.270 --> 20:48.750
One of the blind spot we identified earlier has already led to a denial of service.

20:48.870 --> 20:51.090
Now we'll explore the next blind spot.

20:51.090 --> 20:54.070
Transport agnostic wrapped RPC servers.

20:55.130 --> 20:58.070
First we look for potential RPC interfaces.

20:58.070 --> 21:01.230
We search for RPC over TCP or SMB pipes.

21:01.410 --> 21:04.730
Then checks whether each interface could be accessed remotely.

21:04.730 --> 21:06.490
Lacking the local only flag.

21:06.530 --> 21:09.970
This flag restricts the RPC end point to local transport.

21:10.090 --> 21:11.710
Blocking remote access.

21:11.710 --> 21:20.310
To have the same huge impact as referral overflow, we focus on interfaces that require minimal privileges as usually have no security callbacks.

21:21.690 --> 21:23.990
Finding an interface is not enough.

21:23.990 --> 21:26.310
We need to add something important.

21:26.410 --> 21:28.590
Crushing a random process does little.

21:28.590 --> 21:33.570
So we focused on RPC interfaces that runs inside critical processes like Elsos.

21:33.570 --> 21:39.350
If Elsos dies, the old machine stops, login fails and the OS restarts.

21:40.470 --> 21:41.950
Think for a second .

21:41.950 --> 21:47.270
If one RPC call uses a lot of memory, you'll need way fewer calls to cause major damage .

21:47.490 --> 21:51.110
So we filter for function with large controllable parameters.

21:51.210 --> 21:57.190
Simple function without sized input wouldn't allocate enough memory to crush anything quickly.

21:57.190 --> 21:58.610
Remember OS point.

21:58.610 --> 22:03.710
Widening the gap between allocations and deallocations make resources pile up faster.

22:04.470 --> 22:08.390
We try to call RPC methods that match this criteria.

22:08.390 --> 22:10.750
But our naive approach wasn't enough.

22:10.750 --> 22:16.770
Simply calling RPC calls that we thought would be memory consuming for the denial of service attack took ages.

22:17.090 --> 22:21.350
At first, triggering candidate calls show only a small memory increase.

22:21.690 --> 22:23.970
Far too slow to trigger a crash.

22:24.270 --> 22:26.870
We needed a faster way to burn for memory.

22:27.590 --> 22:31.930
But before first optimization, we must understand the RPC bind.

22:32.110 --> 22:33.990
The bind is the handshake.

22:34.050 --> 22:38.350
The client tells the server which interface it wants by sending the interface UUID.

22:38.530 --> 22:42.050
Then the server can accept or reject with the bind acknowledgement.

22:43.190 --> 22:49.510
According to Windows RPC documentation, the client must wait for the server bind up before sending the RPC call.

22:49.770 --> 22:52.170
But waiting wastes critical time.

22:52.210 --> 22:55.210
What if we use the time to send even more packets?

22:55.530 --> 23:01.830
Maybe RPC isn't really stateful and we can send the bind and the call together without waiting for the hack.

23:03.350 --> 23:04.770
What do you think?

23:04.770 --> 23:05.970
Will it work?

23:06.310 --> 23:12.070
We tested it by sending bind and calling a single packet and saw that the server accepts it.

23:12.070 --> 23:13.550
It actually works.

23:13.770 --> 23:15.890
We call this the status RPC technique.

23:16.030 --> 23:18.590
This technique gives us three main wins.

23:18.930 --> 23:21.270
First, one pre-built packet.

23:21.270 --> 23:23.210
No need to rebuild each time.

23:23.470 --> 23:25.990
Second is bind and call in one shot.

23:26.090 --> 23:28.750
And lastly, no need to wait for any replies.

23:28.750 --> 23:30.910
You can send the next packet right away.

23:32.330 --> 23:34.190
And the impact is remarkable.

23:34.230 --> 23:36.610
Our call per second rate skyrocketed.

23:36.610 --> 23:39.690
Lowering the attacker's effort for a denial of service attack.

23:40.530 --> 23:44.150
And to show this, let's dive into our first RPC function.

23:44.150 --> 23:46.590
It's in the NetLogon interface in Asus.

23:46.850 --> 23:50.690
This call translates a list of socket addresses into site names.

23:50.690 --> 23:54.070
It's available in domain controller and is unauthenticated.

23:54.950 --> 23:59.570
The parameter entry count can be up to 32,000 which is perfect for us.

23:59.650 --> 24:01.370
A large numeric parameter.

24:03.070 --> 24:05.010
But is it really perfect?

24:05.310 --> 24:13.070
The Microsoft documentation says that the maximum value of, the maximum value for entry count is 32,000.

24:13.070 --> 24:18.350
The limit was chosen to prevent clients from being able to force large memory allocations on servers.

24:19.150 --> 24:21.190
So, should we give up?

24:23.050 --> 24:24.810
Well, no.

24:27.530 --> 24:34.510
So, let's take a look at another RPC function.

24:35.210 --> 24:43.550
We managed to exploit the exact entry count parameter that Microsoft claimed was protected.

24:43.830 --> 24:47.070
Each call allocates at least eight times the entry count in bytes.

24:47.070 --> 24:53.090
At the maximum value of 32,000 entries, that's at least 256 kilobytes per call.

24:53.270 --> 24:59.090
And using our stateless RPC technique, we could send a 30,000 time packet.

24:59.090 --> 25:04.130
Repeating this call at scale exhausts memory faster than it freezes, causing the DC to crash.

25:05.150 --> 25:09.630
With this, we've added another unauthenticated denial of service attack.

25:09.730 --> 25:11.170
Another Windows.

25:11.330 --> 25:14.130
This time via RPC instead of LDAP.

25:14.490 --> 25:16.910
So, great, another new vulnerability.

25:17.110 --> 25:20.510
But we couldn't crash with other RPC calls quickly enough.

25:20.770 --> 25:23.110
Stateless RPC alone wasn't enough.

25:23.110 --> 25:25.070
We needed new crash methods.

25:26.030 --> 25:35.450
So, given our DDoS discussion and the fact that we limit ourselves to only one computer, we wondered, could we create a DDoS-like attack from a single machine?

25:35.610 --> 25:41.870
What stopped one computer from opening thousands of connection to overwhelm the target like a real DDoS?

25:42.850 --> 25:48.630
And to answer that, we identified the entire bottleneck, which is everything before the RPC call.

25:49.010 --> 25:51.190
First is sending the bind packet.

25:51.690 --> 25:56.250
Second is waiting for the bind acknowledgement , as we know from the stateless RPC technique.

25:56.630 --> 25:59.330
And third is the processing time on the target.

26:00.870 --> 26:03.670
So, we know the RPC call raises memory.

26:03.750 --> 26:06.270
Our plan is to split the attack into two phases.

26:06.290 --> 26:11.530
The first one, open thousands of connections by sending all the bind packets up front.

26:11.630 --> 26:16.110
And the second, flounder simultaneously with RPC call to spike memory.

26:16.630 --> 26:19.350
But binding so many packets takes minutes.

26:19.350 --> 26:23.530
So, how long does the server keep those idle bindings before dropping them?

26:25.350 --> 26:29.070
We wanted to know how many bindings we can send in the first phase.

26:29.070 --> 26:33.430
Remember, the more bind requests we can send, the more effective the attack will be.

26:33.710 --> 26:41.670
In our tests, Windows RPC servers can bind only connection open for 10 minutes, at least without timing out.

26:41.850 --> 26:47.410
That gives the attacker plenty of time to complete thousands of bind and shake before unleashing the flood of RPC calls.

26:48.510 --> 26:53.510
This means attackers can queue bind operation and then unleash a sudden flood of RPC calls.

26:53.510 --> 26:55.890
By passing all pre-call over it.

26:55.890 --> 27:00.490
And in simple terms, bind everything first, then flood with RPC calls later.

27:00.710 --> 27:04.630
Because this attack has an effect like a DDoS, we call it torpedoes.

27:04.630 --> 27:06.650
A single computer DDoS.

27:08.610 --> 27:15.490
On Windows end point, SMB RPC pipes limit 20 simultaneous binding, which is bad for torpedoes.

27:15.590 --> 27:18.450
Only small amount of bind only connection allowed.

27:18.830 --> 27:24.210
However, TCP interfaces have no such limit, making torpedoes very effective.

27:24.470 --> 27:29.530
No common DDoS mitigation as per IP rate limits or aggressive timeout apply.

27:30.790 --> 27:32.850
Let's see torpedoes in action.

27:32.930 --> 27:35.110
We use the network on interface in LSAS.

27:35.110 --> 27:38.870
This call is the first step of the secure channel session key negotiation.

27:38.910 --> 27:41.670
It's available on DCs, unauthenticated.

27:41.830 --> 27:44.250
Anyone with network access can trigger it.

27:44.350 --> 27:47.650
We focus on the unlimited computer name input parameter.

27:49.090 --> 27:55.850
Reversing network on DLL shows that calling this RPC allocates memory via NL insert challenge, which solve the challenges.

27:56.090 --> 28:00.390
With no input validation on the challenge size, we can trigger massive allocations.

28:00.470 --> 28:03.270
Tens of megabytes of memory in a single call.

28:04.230 --> 28:06.330
Our enemy is challenge cleaning.

28:06.350 --> 28:12.810
NL scavenger challenges run only every two minutes, cleaning challenges other than two minutes when a new one arrives.

28:12.890 --> 28:16.970
That window lets us build up a location like with referral overflow.

28:18.230 --> 28:23.470
Without torpedoes, we have a tight two-minute window to crash via resource exhaustion.

28:23.630 --> 28:28.390
But since binding don't create challenges, NL scavenger challenges never runs.

28:28.850 --> 28:32.990
We can send much more calls in the same two-minute window.

28:33.110 --> 28:35.550
And this is our second network back.

28:39.730 --> 28:40.770
Okay.

28:41.690 --> 28:44.890
Now we add a new unauthenticated windows to our arsenal.

28:46.170 --> 28:49.450
But as always, we wanted to dream even bigger.

28:50.210 --> 28:53.170
So far, we achieved denial of service for every DC.

28:53.450 --> 28:57.370
What if we could crash anything, including Windows endpoints?

28:58.510 --> 29:03.370
But as far as we could find, all RPC interfaces on endpoints required authentication.

29:04.350 --> 29:08.230
With this constraint, we returned to our first generic Windows attempt.

29:08.290 --> 29:11.150
We found an RPC in WK SSVC DLL.

29:11.150 --> 29:16.490
It reports currently enabled transport protocols for the SMB redirector on a remote computer.

29:16.830 --> 29:22.230
The preferred maximum parameter lets us allocate up to four gigabytes of memory in one call.

29:22.390 --> 29:24.990
We don't need to use a torpedo zero.

29:24.990 --> 29:30.110
We could force the computer to allocate hundreds of gigabytes of memory with only a few calls.

29:30.110 --> 29:31.990
Sounds like the dream, right?

29:32.310 --> 29:36.750
However, the computer didn't crash, and we wanted to understand why.

29:38.710 --> 29:43.710
Reversing the library shows it's called local alloc with LMM zero in it and our parameter.

29:44.530 --> 29:47.990
We simulated this call in Python, allocating two gigabytes.

29:48.250 --> 29:58.290
Then we used virtual query, a Windows API function that retrieved information about range of pages to inspect the memory region, confirming it was committed with the mem commit flag.

29:58.510 --> 30:03.210
Microsoft docs explained mem commit assigned physical pages only on first access.

30:03.230 --> 30:05.030
And that's why it didn't crash.

30:05.030 --> 30:07.710
The pages weren't accessed.

30:08.830 --> 30:12.130
Still, this confirmed our second blind spot hypothesis.

30:12.270 --> 30:16.810
Developer may over trust RPC and forget about resource abuse risks.

30:18.370 --> 30:21.310
We searched for other ways, but we were stuck.

30:21.450 --> 30:24.830
So what do we do when we don't have any lead to denial of service?

30:25.630 --> 30:27.570
We go to the pool.

30:27.870 --> 30:29.390
Oh, shoot, I mean the spool.

30:31.290 --> 30:38.890
An interesting RPC in spool SV enumerates printers, servers, domains and providers, but it requires credentials.

30:39.730 --> 30:44.310
This limitation still allow any domain user to call it remotely on any computer.

30:44.430 --> 30:50.830
But authenticated RPC becomes stateful, packet after the binder signed, and we know that signing takes time.

30:52.130 --> 30:54.990
This will break the status of RPC and Torpedoes technique.

30:55.990 --> 31:00.770
We sneaked into Rshark and saw that the NTLM signing adds a major delay.

31:00.770 --> 31:02.990
And we produced the following solution.

31:03.330 --> 31:09.950
Pre-bind, capture the needed values, pre-sign the hard-coded packet and then keep using it.

31:10.070 --> 31:13.370
And that's restored Torpedoes even with authentications.

31:13.990 --> 31:19.670
We tested the impact and we saw that in authenticated cases, Torpedoes is even more relevant.

31:19.670 --> 31:25.270
We exploited the name parameter and with pre-binding and signing, crashed the end point.

31:37.310 --> 31:41.910
Now a single user can crash all Windows machine in a domain .

31:43.110 --> 31:47.670
And without further ado, let's see how to crash Windows 11 with Windows.

31:48.610 --> 31:51.970
So first let's see the target IP of the remote computer.

31:54.820 --> 31:59.040
And now we'll try to ping this IP in order to see that the computer is still alive.

31:59.720 --> 32:01.960
And we can see that the computer is alive.

32:02.940 --> 32:05.280
Now we'll attack the computer with Torpedoes.

32:05.280 --> 32:08.400
We can see the pre-bindings happening right now.

32:08.700 --> 32:10.500
And the computer is still alive.

32:13.290 --> 32:16.810
Now we'll attack it again and fast forward a little bit.

32:18.070 --> 32:21.370
We can see that the computer don't respond to our pings anymore.

32:26.120 --> 32:28.500
And wow, the computer is crashed.

32:28.620 --> 32:30.860
And we reach the blue screen of death.

32:37.670 --> 32:41.130
Here's our final Windows 11, Windows vulnerability.

32:41.410 --> 32:43.210
The last one in this talk.

32:43.990 --> 32:46.650
Let's look up all our denial of service attacks.

32:46.730 --> 32:49.830
We found four new remote trigger denial of service attacks.

32:50.090 --> 32:54.730
The first vulnerability used both for denial of service and distributed denial of service.

32:54.890 --> 32:59.330
We started with this and ended up with any Windows end point.

32:59.390 --> 33:04.950
All the DC attacks are unauthenticated and any domain user can crash any machine in the domain.

33:05.630 --> 33:09.470
Microsoft fixed everything and we want to thank them for cooperation.

33:10.930 --> 33:13.710
We want to emphasize that these attacks are critical.

33:13.710 --> 33:19.190
They can alter organization, damage medical equipment, or even frame governments for cyber attacks.

33:19.430 --> 33:22.650
Now we'll get back to Or for research takeaways.

33:28.850 --> 33:33.990
Thank you Shachak for all of these very interesting technical details.

33:33.990 --> 33:35.930
I hope you enjoyed them.

33:36.810 --> 33:46.390
But we still have one more important thing to talk about when we conduct such a research and see its results.

33:46.390 --> 33:48.130
And that's the takeaways.

33:48.250 --> 34:03.230
So the first takeaway that we have from this research is that if code can be triggered remotely then you should prepare for worst case scenario concurrency and resource usage.

34:03.290 --> 34:06.950
And you should ensure robust security measures.

34:07.150 --> 34:12.470
In MSRPC the most likely scenario is usually one client.

34:12.470 --> 34:20.530
However in the worst case scenario there could be a limitless number of clients causing unexpected loss.

34:20.550 --> 34:25.750
That's also true when talking about the LDAP client in domain controllers.

34:25.770 --> 34:38.510
Their LDAP client can be directly triggered by a remote attacker that aims to exhaust the LDAP client's resources and exhaust the entire machine finally.

34:39.490 --> 34:54.110
Our second takeaway is that organizations must assume that all their servers and end points can be targeted by DDoS attacks whether they are public facing or not.

34:54.930 --> 35:06.350
Therefore they should set up proper mitigations for such attacks in their infrastructures including both defending assets but also quickly identifying a single source creating such attacks.

35:06.490 --> 35:18.850
DDoS attacks or DDoS like attacks can be single sourced and come from within your organization or in our words torpedoes.

35:20.210 --> 35:36.510
And our last and third takeaway is that the fact that some forms of servers can be turned into clients can be leveraged by attackers for crafting and presenting a false image of reality for various types of purposes.

35:36.510 --> 35:41.770
Or alternatively harness resources that they do not possess for malicious purposes.

35:42.230 --> 35:59.310
For example, attackers could use our WIND DDoS vulnerability in order to trigger domain controllers from a certain country to attack a different country in order to incriminate a certain government or organization for political purposes.

36:01.110 --> 36:16.790
And with this last takeaway we want to share with you that we believe that the WIND DDoS epidemic has just begun and we think that these techniques are just the first steps towards many more vulnerabilities in RPC.

36:16.990 --> 36:22.470
We really recommend that you stay tuned for upcoming conferences, wink, wink.

36:22.690 --> 36:36.470
And generally we encourage you to try to implement our ideas to find more of these vulnerabilities so they can be fixed before real attackers take advantage of them.

36:37.190 --> 36:41.170
So thank you everyone for joining us.

36:41.170 --> 36:49.330
This would be the QR code for the WIND DDoS repository that will go live right after this talk.

36:49.330 --> 36:51.990
Just ten minutes and we'll release it.

36:51.990 --> 36:57.430
You can have the social media details of both myself and Shachak.

36:57.430 --> 37:02.030
You can contact us if you like that and we'll be here for questions as well.

37:02.030 --> 37:03.850
So thank you everyone.

37:06.550 --> 37:10.290
And we'd love to take a selfie with you if that's okay.

37:10.790 --> 37:11.850
Cool.

37:11.850 --> 37:12.830
Let's do.

37:12.850 --> 37:13.970
Thank you.

