[00:00.820 --> 00:07.600] Hello everyone. Hello! Hi, so thanks for coming along today. We are here to talk about everyone's [00:07.600 --> 00:13.880] favourite subject from 25 years ago. So a friend of mine said this to me when I told [00:13.880 --> 00:20.060] him what our research was about. And yeah, it holds true. I mean, Windows has got some [00:20.060 --> 00:27.160] stuff going on. So let's find out exactly how broken it is. So real quickly, we're from [00:27.600 --> 00:33.640] there. That's a very accurate map. We're from the middle of Middle Earth, a little [00:33.640 --> 00:39.720] place called Wellington in New Zealand. And yeah, it was a long flight. It was too long. [00:39.720 --> 00:44.800] It was too long in economy. Anyway, a little bit about me. I've worked at a bunch of logos, [00:44.800 --> 00:49.860] which is very exciting. I actually had a life before hacking where I used to tour a lot [00:49.860 --> 00:54.360] of bands to New Zealand. So please don't ask me about the early 2000s, because I had PTSD [00:54.860 --> 01:00.680] and a lot of debt. I'm also a former software developer. I'm a relatively active security [01:00.680 --> 01:05.860] researcher. A few CBEs in various things. I'm a frequent flyer with Search New Zealand, [01:05.860 --> 01:10.540] which is the cybersecurity emergency response team. They love me. Please don't ask me about [01:10.540 --> 01:17.780] council software. And I'm Thomas. I have also worked at fewer logos than Jim. I'm a little [01:17.780 --> 01:25.300] bit younger than Jim. I also do some CTF stuff. And I'm also a senior security consultant. I [01:25.300 --> 01:32.200] also do research. I found a fun thing a few years ago in Kiteworks. Also did the Kramer [01:32.200 --> 01:37.000] thing with Jim a couple of slides ago. Don't know if you remember. And then also the Microsoft [01:37.000 --> 01:47.760] stuff in this talk. So this talk is about NTLM. NTLM is supposedly going away. Every NTLM [01:47.780 --> 01:53.520] bug we've seen has usually been a gateway bug to something better. Like usually it leads into [01:53.520 --> 01:59.820] something that's quite nice. Sometimes a bounty. It has been an absolute ride with the MSRC. They [01:59.820 --> 02:04.100] have a very hard job. We met with them the other day. And we did have to change some of our talk [02:04.100 --> 02:07.960] because it turns out they're actually quite nice. Yeah, when you like meet them and they've got [02:07.960 --> 02:15.180] faces and names, you kind of feel a little bad. Oops. Windows has an overwhelming desire to [02:15.180 --> 02:20.860] authenticate to everything that it can. It just likes sending hashes out like there's no [02:20.860 --> 02:30.800] tomorrow. And the Windows ecosystem is very vast and very fun. So, NTLM. We are not going to [02:30.800 --> 02:41.780] give it a stupid name. Someone called SQLI squealy and it still haunts you. It stands for New [02:41.780 --> 02:47.300] Technology Land Manager. There's something about calling things new in technology. That means [02:47.300 --> 02:55.280] it's going to be around forever. And it's up there with the simple in SNMP and lightweight in [02:55.280 --> 03:05.820] LDAP. So, NTLM was developed in the 90s, like a few of you here. It's preceded by LM. And this is [03:05.820 --> 03:12.420] finally completely removed in server 2025. So, it hasn't been removed yet. It was intended to [03:12.420 --> 03:16.580] provide authentication, integrity, and confidentiality. So far, so good. This is, you know, [03:16.580 --> 03:22.620] what you expect out of NTLM. They've recommended not to use it since 2010. Does anyone know what [03:22.620 --> 03:29.120] year we're in now? There was a 2011 DEF CON talk that I watched called, Nail the Coffin Shut, [03:29.120 --> 03:39.580] and NTLM is dead. It failed to die. So, are there a crap load of CDEs associated with this [03:39.580 --> 03:46.560] protocol? So, essentially at its core, it is a hash of a password, also called an NT hash. It's a [03:46.560 --> 03:51.300] challenge response mechanism. So, the client establishes a network path and negotiates. The [03:51.300 --> 03:55.620] server responds with a challenge message. The client responds with an authenticate message. And [03:55.620 --> 03:58.540] it does this using the NT hash. And there's a couple of different flavors that we're going to be [03:58.540 --> 04:04.100] talking about, which is mostly net NTLM v1 and net NTLM v2. So, on a network, essentially this [04:04.100 --> 04:10.880] lets you browse file shares and websites. So, some quick definitions before we get stuck into [04:10.880 --> 04:15.900] the bugs. A hash is data produced from one-way functions, so you don't have to pass your [04:15.900 --> 04:20.500] plaintext password around. I've been asked to localize my talk, so this is essentially the [04:20.500 --> 04:25.880] equivalent of turning a cow into a hot dog. It's expensive to get the hot dog back into the [04:25.880 --> 04:32.860] cow. So, UNC is the Universal Naming Convention, you know, slash slash thing. HTTP, [04:32.860 --> 04:40.400] Hypertext Transfer Protocol, and URI, the Uniform Resource Handler. So, what happens if you [04:40.400 --> 04:45.540] steal one? There's kind of three things. You can brute force it, turn it back into a [04:45.540 --> 04:49.940] plaintext password, talk to the password-cracking village about how quickly they can do it [04:49.940 --> 04:55.460] these days. You can also relay it and pretend to be that person. That's mainly with [04:55.860 --> 05:03.100] NTLM and NTLM v1. NTLM v2 does it sometimes, just for fun. And you can also just take a [05:03.100 --> 05:12.660] screenshot of it, report it to the MSRC, have a fun conversation with them. So, we did a [05:12.660 --> 05:17.280] few minutes of Googling, and these are all the bugs that we found in like three minutes [05:17.280 --> 05:22.680] about NTLM. There's also the MorpheSec talk that was yesterday. They went into some more [05:22.680 --> 05:28.720] NTLM stuff there, but it's a doozy. There was the MonikaLink one this year, the Windows [05:28.720 --> 05:33.860] themes file as well. You could just load a theme and it would send off your hash for fun. [05:34.040 --> 05:38.080] Outlook sound files, which was like a zero-click RCE, there was a bypass for that and then a [05:38.080 --> 05:44.780] bypass for that again, I think. And, yeah, some other ones. Everyone's favorite, Petit [05:44.780 --> 05:52.660] Patin. So, NTLM is just a host of vulnerabilities. A lot of it is just by design, [05:52.680 --> 06:00.420] we won't fix it. I mean, it's old. So, what they're doing is they're going to deprecate it and [06:00.420 --> 06:10.200] then eventually disable it, which is kind of fixing it, I guess. Given that like half of the [06:10.200 --> 06:16.100] environments in little old New Zealand still use NTLM v1, it's going to take a long time. [06:17.660 --> 06:22.700] So, we have a good authority, an anonymous source at Microsoft, who actually confirmed this [06:22.700 --> 06:28.360] for us. And he said to us when we met them, the runway for this is between 50 and 100 years. [06:29.800 --> 06:37.370] So, yeah. So, it's going to be disabled on a future version of Windows 11. This is great. [06:37.750 --> 06:41.510] And they have told us that they're stopping working on it. So, it's feature complete, [06:41.510 --> 06:46.450] apparently. So, now Windows will attempt to authenticate with Kerberos first, which is [06:46.450 --> 06:52.210] really secure and great. But it still falls back to NTLM if a Kerberos negotiation doesn't [06:52.210 --> 06:56.870] happen. And so, it's going to be disabled in a future release. And it can always be [06:56.870 --> 07:04.430] re-enabled, just like NTLM v1. So, one of the tools we've been using is a very, very well [07:04.430 --> 07:08.470] known tool. We're not going to go too much into it. This is Responder, the rogue authentication [07:08.470 --> 07:14.650] server developed by Elgandex. Please go and flick them some money for this great tool. The [07:14.650 --> 07:20.830] two ports that we are concerned with, port 80 and port 445, and it provides authentication [07:20.830 --> 07:25.150] challenges on these ports and a lot of others. It does some other cool stuff. It's a very [07:25.150 --> 07:28.730] valuable pen testing tool. If you've never heard of it, go run it in an internal network and [07:28.730 --> 07:35.090] frighten your SOC team. For our purposes, we're just going to use it to collect hashes. So, [07:35.090 --> 07:41.070] this current obsession with NTLM hashes started a couple of years ago. I was testing an [07:41.070 --> 07:47.470] ArcGIS application. For those of you not familiar with ArcGIS, it's mapping software beloved by [07:47.470 --> 07:54.190] local government. I asked my workmate, Amad, if he had any tricks. He was a very high ranked [07:54.190 --> 07:59.370] bug crowd guy, so of course he did. He suggested I run Responder on one of our servers for a [07:59.370 --> 08:08.010] blind SSRF that we had found. And we got a hash on port 80. But ArcGIS is running Java on IIS. [08:08.950 --> 08:14.570] So, now we wanted to speed run. In case you're wondering what RSS and ArcGIS looks like, you can [08:14.570 --> 08:24.430] specify an RSS URL for some obscure reason. So, yeah. Sorry about the NTLM bugs, everyone. [08:26.190 --> 08:31.850] So, Windows does want you to be safe. They do have some built in protections. One of them is [08:31.850 --> 08:36.270] Mark of the Web, which you might have seen before. If you were to download a file from the [08:36.270 --> 08:40.870] internet, it sets a little flag on the document, like a Word document or some other things as [08:40.870 --> 08:46.950] well. And basically it just says, nah, I'm not going to use all of the features. I'm just going [08:46.950 --> 08:51.810] to let you briefly look at it. You can click the little warning to make it go away, but it's [08:51.810 --> 08:58.950] safe. The WordPad issue that I mentioned earlier, that just bypassed it. I don't think they [08:58.950 --> 09:05.430] even had Mark of the Web on WordPad files. Oh, no. No. And also, if you get cloned something [09:05.430 --> 09:11.830] and there's a document in it, it also just doesn't set the flag. It's great. They also have [09:12.990 --> 09:20.350] this from, what, Windows NT days? They're called Safe Zones. This is a recent screenshot, [09:20.350 --> 09:24.630] Thomas. Yeah, this is from Windows 11, as you can see, with the little Xs in the top right [09:24.630 --> 09:31.870] hand corner. Yeah, you can see that because it says scripting of Java outlets, it's very [09:31.870 --> 09:37.150] up to date and protects you against many things. The little thing down the bottom with the [09:37.150 --> 09:44.270] user authentication, it stops some hashes over port 445, but that's about it. So, it's time [09:44.270 --> 09:49.950] to query some hashes from some software before MTLM goes away. So, we're going to talk about a [09:49.950 --> 09:57.550] few things. ImageMagick and GraphicsMagick, VLC media player, Aspos.net, HiQ PDF, the Q [09:57.550 --> 10:03.490] stands for quality, as we find out, Java on IIS and Windows, Calendars, NuGet and [10:03.490 --> 10:10.590] iCredential, RSS feeds and Outlook, MS Office, URI handlers and Outlook, and Git for Windows. [10:11.150 --> 10:17.030] So, GraphicsMagick is generally regarded as the safer one because it's a relatively fuzzed [10:17.030 --> 10:24.310] fork of ImageMagick. So, it's a massive attack surface. ImageMagick is generally associated [10:24.310 --> 10:29.770] with ImageTragic, which everyone will remember from a few years ago. But ImageMagick didn't [10:29.770 --> 10:36.510] leak a hash over port 445. So, it will leak a hash by SVG converting to anything via a [10:36.510 --> 10:42.910] UNC path href. And it's noted in the documentation as SSRF, but there is nothing about hashes [10:42.910 --> 10:51.890] or UNC paths. VLC player. So, you can just load a playlist file and it's got a UNC path in it [10:51.890 --> 10:57.150] and it will go away and fetch the hash. Our old workmate, Amit, he disclosed that and [10:57.150 --> 11:03.250] then VLC were like, it's a Windows problem. No, it's a VLC problem. I mean, it's also [11:03.410 --> 11:09.310] a Windows problem, but come on guys. You could also do it in iTunes and Windows Media Player. [11:09.310 --> 11:14.070] I'm sorry if you still use those programs. There's probably maybe six of you in the audience [11:14.070 --> 11:19.090] that still use Windows Media Player and iTunes for Windows. I'm sorry. There's also lots [11:19.090 --> 11:23.930] of other formats and protocols that may or may not support NTLM. I mean, I'd tell you to go [11:23.930 --> 11:32.870] and look at them, but VLC don't care. So, Aspose.net is a lovely piece of document processing [11:32.870 --> 11:36.670] software. Anyone who's ever spent any time on the red team or doing any kind of pen testing [11:36.670 --> 11:41.470] will know just how rich and intact surface document processing is. It has a few known [11:41.470 --> 11:47.810] documented security issues. SSRF, server side request forgery, NTLM hash leakage, file [11:47.810 --> 11:52.330] inclusion, and it's right there on their web application security when loading resources [11:52.330 --> 11:59.050] page. So, they know about them and they have front footed it. So, leaking hashes at port [11:59.050 --> 12:05.710] 4.5 is relatively abundant and low value within an ecosystem. So, port 4.5, any good system [12:05.710 --> 12:09.190] administrator will block this port on a firewall because there's no reason that it needs to [12:09.190 --> 12:14.850] talk to the internet. Port 80, however, is not as blocked. So, when Windows sees a UNC [12:14.850 --> 12:19.370] path, those little slashes we saw before, it only knows how to do one thing. And it [12:19.370 --> 12:25.930] takes a little bit of work to get it out by HTTP. So, let's try. So, I just wanted to [12:25.930 --> 12:31.350] look at the district plan for our city and not go to the cyber security emergency response [12:31.350 --> 12:36.950] team. So, there's a piece of software in Aotearoa, New Zealand called ISO plan developed by a [12:36.950 --> 12:41.370] company called ISOVIST. So, again, I alluded to not talking to you about council software. [12:41.370 --> 12:47.110] It's so niche and weird and the people who develop it know councils and local government, [12:47.110 --> 12:51.630] but they might not necessarily know security. And anyone who's ever spent time as a pen [12:51.630 --> 12:55.610] tester, so much of it is vibes based, you could tell that this thing had been pen tested [12:55.610 --> 13:04.650] before. Yeah, you could just tell. So, headless PDF generation is so dumb. This is not a talk [13:04.650 --> 13:09.850] about headless PDF generation. It's a well known and well documented tech surface within [13:09.850 --> 13:15.830] web applications, but sometimes you need to turn HTML into PDFs, which is, you know, [13:15.830 --> 13:20.310] there's a few well known places you can look for bugs, because basically HTML gives you a lot [13:20.310 --> 13:25.170] of primitives to do some fun and dangerous things, such as iframes, portals, embeds. So, [13:25.170 --> 13:30.570] these have all been blocked. There had been some hardening done, which is great. However, [13:30.570 --> 13:38.430] cat pictures were not blocked. So, I managed to get an image tag to give up an NTLM hash on [13:38.430 --> 13:49.750] port 80. So, my first question was, what even is this? So, we talked about HiQ PDF. Over a [13:49.750 --> 13:55.590] million downloads in NuGet for this package. NuGet is the package repo for .NET. It has a [13:55.590 --> 14:03.710] settings.xml file, and the default property for NTLM authentication is true. So, I guess I [14:03.710 --> 14:09.570] really just wanted to know how this happened. And then I looked into it a bit, and I figured [14:09.570 --> 14:15.830] out how it happened. You can tell it's really high quality by the 3D rendered box art. This is [14:15.830 --> 14:23.210] the very height of technology. So, the other thing we found is, because of all the ArcGIS stuff, [14:23.210 --> 14:29.830] Java on IIS is a lovely place to look. The HTTP URL connection function used to pass hashes by [14:30.050 --> 14:34.850] default. We're not entirely sure it does now. I tried a couple of test projects to see. It [14:34.850 --> 14:41.190] seems to be safe, but it is still out there causing issues. See GeoServer and ArcGIS. So, [14:41.190 --> 14:47.990] Java calls the underlying Win32 API, which is a WinHTTP request. And Blazor have a very good [14:47.990 --> 14:52.930] write up about coaxing things out on port 80, and they even made a stack overflow post [14:52.930 --> 15:02.070] proving it. We have to do a little Lord of the Rings meme. We're from New Zealand, we have to. [15:03.670 --> 15:11.570] So, they also have one other little security thing on Windows, and that's this prompt that comes up [15:11.570 --> 15:16.710] now and then. And it's like, please don't quit me, it's unsafe, do you really want to continue? [15:16.710 --> 15:21.290] Are you sure you want to get hacked? And I'm sure no one clicks yes ever, right? [15:21.290 --> 15:22.850] Yeah, it's a security control. [15:23.190 --> 15:27.270] I mean, it's fair. It's probably what their lawyers want. They want the functionality, [15:27.270 --> 15:31.590] but their lawyers are like, if you don't have this prompt, people will get angry and we could get [15:31.590 --> 15:39.250] sued. So, if you want to have a bug in a Microsoft product, you need to get past this. You need to [15:39.250 --> 15:44.150] have basically no warning that it's going to be fun and dangerous and you're going to get people's [15:44.150 --> 15:50.130] hashes or run some code. So, with that in mind, let's see what we can find in the Microsoft [15:50.130 --> 16:03.450] ecosystem. Enter iCredentials. So, it's just an interface, but it does some stuff. When we first [16:03.450 --> 16:11.010] got some hashes out on port 80, we started looking at the code and going, what is this? Why is this? [16:11.010 --> 16:18.910] Turns out it's not banana water. It's not gross and made up. It's just developers making logic [16:18.910 --> 16:24.010] errors, doing dumb things. It provides the base authentication interface for retrieving credentials [16:24.010 --> 16:32.550] for web client authentication. And it's used in .NET a lot. And some of the anti-patterns that [16:32.550 --> 16:40.670] it has are weird and they fall back to some dumb things. Like in NuGet. So, you've probably seen [16:40.670 --> 16:47.290] NuGet before if you've ever touched C Sharp. It's reasonably integral to the .NET ecosystem. [16:48.590 --> 16:54.690] And they have some very good advice for storing credentials. Just put them in the NuGet config [16:54.690 --> 17:00.830] file, it will encrypt it, it will be fine. But it also just falls back to NTLM sometimes. [17:00.830 --> 17:04.430] I would like 500 of my coworkers' hashes, please. [17:05.550 --> 17:12.350] It does it on NuGet restore, by the way. Which it does it when you get cloned something in like [17:12.350 --> 17:18.930] Visual Studio. And that bypasses all safety checks. There's no little don't click me button. [17:19.610 --> 17:23.690] So, Jim got a nice new e-bike from Microsoft. It's very zippy. [17:26.490 --> 17:29.710] Jim had to be very specific with Microsoft. [17:30.990 --> 17:34.970] Yeah, I had to make him a video with the breakpoint set. And I had to be like, [17:34.970 --> 17:39.230] it happens here. This is where it happens. It happens right here, Microsoft. Please believe me. [17:41.250 --> 17:47.830] So, just we had a random thought. Like, what if we reframe it as an SSRF problem? Like, [17:47.830 --> 17:51.490] what if instead of trying to get NTLM hashes out, we pretended it was a server [17:51.490 --> 17:56.590] and not a client anymore and we just thought it was just HTTP something? [17:56.590 --> 18:02.110] There's a lot of harmless HTTP interactions in Microsoft products like RSS, don't know why I'm [18:02.110 --> 18:08.710] mentioning that. URI schemes, don't know why I'm mentioning that either. And web service in Excel, [18:08.710 --> 18:14.030] I'm just mentioning that one. If you think of these interactions like a flavor of SSRF, you can [18:14.030 --> 18:22.750] just find some new cool things. Like, what if you just suddenly redirect a resource? So, we did that. [18:22.750 --> 18:31.730] We redirected things to a nice little UNC path and it just does things. It just happily switches [18:31.730 --> 18:38.310] protocols and tries to auth. Browsers don't do that. Browsers go like, where are you trying to [18:38.310 --> 18:46.650] go? This is a dangerous redirect. Yeah. But we wrote some quick little code and then started [18:46.650 --> 18:54.010] pointing things at it. So, this is Microsoft bug number two. So, we might have rabbit holed a [18:54.010 --> 18:58.830] little bit with the URI handlers. Quick recap, every time you install a program on Windows, [18:58.830 --> 19:03.250] it installs a URI handler which is a little scheme that you can embed in a website or something to [19:03.250 --> 19:09.450] allow that program to be opened automatically. So, I dumped every single URI scheme from my [19:09.450 --> 19:14.830] Windows machine and I wanted to see which one Outlook would warn on. And it was nearly all of [19:14.830 --> 19:20.670] them, except for the Microsoft URI schemes, which was very weird. And it just straight up opens [19:20.670 --> 19:27.230] words, Microsoft Word or Excel or PowerPoint or Access, if anyone still uses that, and fetches [19:27.230 --> 19:32.010] the remote resource. So, now we have a little bit of an idea what to do when we fetch remote [19:32.010 --> 19:39.450] resources. So, no warnings, one click, embedded in an email should be a relatively safe thing to do. [19:40.530 --> 19:44.950] So, they've asked us to not spill the beans. So, could everyone just, like, block their eyes [19:44.950 --> 19:52.650] and ears? Yeah. There are some security controls in place. All files will open in a preview mode, [19:52.650 --> 19:57.670] which is good. Mark of the web is on it. And you can't put UNC paths in the URI scheme, [19:57.670 --> 20:02.530] so you can't straight up convince someone to load a file, which is good. So, the URI handlers [20:02.530 --> 20:08.010] essentially look like this. MS Word, title of the thing you want to open, OFE, open for editing, [20:08.010 --> 20:13.310] short for URL, and then you just give it an HTTP link, and it'll rush off and fetch that. [20:13.650 --> 20:18.210] And you can also force a file extension change, which is quite fun. [20:19.790 --> 20:25.970] And here's a little video of this happening. So, essentially, we are spinning up our little [20:25.970 --> 20:30.390] redirector in the top right, and then we spin up everyone's favorite hacking tool, Responder, [20:31.290 --> 20:37.110] and then we just go into our email and click a link. I would click that link. [20:37.110 --> 20:40.830] I'll totally click that link. And then we link someone's hash. [20:46.150 --> 20:52.910] Thank you, everyone. So, there are some much better NTLM-related bugs than the ones we've [20:52.910 --> 20:58.730] been showing. Hafei Lee from Checkpoint Research discovered a bug called moniker link. [20:59.210 --> 21:03.850] And so, this technique allows for a different and usually blocked file extension to be loaded. [21:03.850 --> 21:11.110] So, a whole new class of bug comes into play. In 2024, moniker link came up. So, we have [21:11.770 --> 21:16.690] two things. We have test.rtf and an exclamation mark and something. So, we have the file moniker [21:16.690 --> 21:21.590] and the composite moniker. The Outlook talk yesterday covered this sort of stuff a little [21:21.590 --> 21:27.930] bit as well. So, the component object model will look up whatever is after the exclamation mark, [21:27.930 --> 21:31.330] which we now potentially control through a redirect. [21:31.950 --> 21:36.250] We have three days left until Patch Tuesday. So, have fun, everyone. [21:38.550 --> 21:47.370] So, we found some more stuff. We're still bored. You can also bypass existing CVEs with that same [21:47.370 --> 21:55.810] one weird trick. So, back in 2023, some researchers at Varonis discovered a nice little CVE. There's [21:55.810 --> 22:02.410] two email headers that were sort of affected. There's the content class sharing thing, like [22:02.410 --> 22:09.830] you're sharing a document or a calendar or an RSS feed, maybe. And then a X sharing content URL, [22:09.830 --> 22:17.870] which in their case, they used a UNC path. We gave it a little HTTP path. Microsoft's fix was [22:17.870 --> 22:22.670] to add a nice little warning. They love their warnings. The please don't click me little [22:22.670 --> 22:31.790] warning. Guess what happens if you just redirect it to a UNC path? Microsoft triages it. That's [22:31.790 --> 22:36.870] what happens. And this is essentially what it looks like. It's a Microsoft instruction telling [22:36.870 --> 22:42.690] you to click a link with no warnings. Seems kind of bad, right? I would add your calendar, though. [22:43.170 --> 22:51.770] I don't know. And then we dropped it to the MSRC, and we had a fun little journey. [22:53.030 --> 22:56.950] Hi, this is Clusters Important, and you've accepted it for immediate servicing. [22:56.950 --> 22:59.570] Can you please let me know if this is eligible for a bounty? [23:00.590 --> 23:08.270] No. It says here in the link you just said that it is in scope. [23:09.010 --> 23:15.750] Uh, it's a moderate, I guess? You just told me that it was important in the same email. [23:16.350 --> 23:22.830] No, we've reclassified it, sorry. Yeah, so it was fixed last patch Tuesday, [23:22.830 --> 23:31.930] and it was the only moderate. So this is my dog, Lupe. She recently had cruciate ligament surgery, [23:31.930 --> 23:37.090] and the amount of the surgery was the same amount that a bug bounty from Microsoft would have been. [23:37.610 --> 23:43.530] So, you know, thanks, Microsoft. Sorry again, MSRC team. You're very lovely people. [23:43.530 --> 23:47.790] It's so nice. Oh, they also said something about the bug before, that it's been feature flagged, [23:47.790 --> 23:54.210] so it's mostly fixed, but sort of not. Yeah, I had to say that, because I quite like them now. [23:57.310 --> 24:03.010] So RSS, for all six of you still using it in Outlook, we discovered something called an [24:03.390 --> 24:08.770] OPML file, which allows you to import an RSS feed, which is obviously critical functionality [24:08.770 --> 24:15.010] within Outlook and Microsoft. So interestingly, the web request had been made while the warning [24:15.010 --> 24:21.970] box was showing, so full marks to Microsoft for almost getting there. Outlook would also [24:21.970 --> 24:27.110] follow a redirect path to a UNC and link a hash, and we triaged it with Microsoft, [24:27.110 --> 24:31.230] and they initially said, yeah, it's moderate. I said, cool, yeah, that makes sense. [24:31.230 --> 24:38.130] But now we know about these cool Outlook headers. So what happens if we combine URI schemes with [24:38.130 --> 24:42.950] these cool new headers that we have? Outlook has a feed handler, which will open RSS feed [24:42.950 --> 24:48.750] directly in Outlook. Obviously, four slides back is how we know about the URI handlers. [24:49.230 --> 24:53.190] Under normal circumstances, it will prompt open Outlook and give a warning. [24:53.830 --> 24:59.650] However, if you embed it in a sharing header, it won't warn. It was initially deprioritized [24:59.650 --> 25:06.070] by Microsoft as several clicks were involved. One click. It's a bug, but moderate. [25:07.010 --> 25:10.090] And this is what it looks like. Again, Microsoft wording saying, [25:10.090 --> 25:14.450] please click this thing. Would you click that? I would so click to add your RSS feed. [25:14.450 --> 25:23.300] I love RSS. Enter Visual Studio. We went back to it again. [25:24.100 --> 25:29.800] It can git clone things. I don't know if you're familiar with git, but it's kind of like [25:29.800 --> 25:37.900] subversion or Maven. No, everyone knows git. You can git clone from a bunch of things, [25:37.900 --> 25:43.520] like SSH, which is one of the normal things. Same with unauth HTTP, which is a public GitHub [25:43.520 --> 25:49.200] repo and you've just copy pasted the link. Auth HTTP, like a private GitHub repo and you've [25:49.200 --> 25:55.680] copy pasted the link. You can also git clone from a file path or on Windows you can git clone from [25:55.680 --> 26:03.000] an SMB share, which is weird, but it's fine. I'm sure people do that. But we're just going to focus [26:03.000 --> 26:10.680] on the auth HTTP. So the command line, it's secure by default. It asks for auth, kind of. [26:11.720 --> 26:14.820] But what if we just, you know, don't put in a username or password? [26:14.820 --> 26:16.040] Yeah, what if, Thomas? Let's find out. [26:16.040 --> 26:18.160] Surely it just doesn't send a username. [26:18.160 --> 26:24.380] It won't send anything. So by default, it just sends a hash of your current account. [26:27.160 --> 26:32.640] But, like, it's fine. I can see the use cases for it. Like, say you're in an internal environment [26:32.640 --> 26:38.380] and you've got, like, some weird web server you git clone from. You probably want it most. [26:39.120 --> 26:45.160] But what it is, is it's promising. Like, maybe some other things, you know, [26:45.160 --> 26:51.400] they want to get your username and password and do stuff. Like, GUIs, how do they get credentials? [26:51.440 --> 26:52.840] They prompt you for them. [26:52.840 --> 26:58.920] Uh, yeah. Yep. No. So, Git Credential Manager, it will do things for you. [26:59.000 --> 27:02.780] It will, by default, pass a blank username and password. [27:04.260 --> 27:06.700] Visual Studio uses Git Credential Manager. [27:08.000 --> 27:12.140] So, on the right, our good old friend, Responder. [27:12.720 --> 27:17.960] That's just gonna nicely listen there and then we'll open some Visual Studio. [27:20.040 --> 27:25.100] And then, oh, my coworker sent me this cool link. I'm just gonna go git clone this. [27:25.100 --> 27:26.320] It's on the internet. [27:26.320 --> 27:30.940] I blindly clone things all the time. I'm a security professional, Thomas. [27:30.940 --> 27:32.780] I do too, but, like, seriously. [27:33.500 --> 27:39.000] And, whoa, what's that? That's an NTLM hash that it just sent. Yay. [27:41.640 --> 27:45.800] So, some fun side notes. It also works in Git submodules. [27:45.800 --> 27:50.440] So, you can't just trust GitHub because you could have a nice little link to [27:50.440 --> 27:55.240] some attacker's thing as a Git submodule, like, 10 folders deep. [27:55.240 --> 27:59.700] So, do you know what blindly clones submodules by default, Thomas? Do you have any idea? [28:00.160 --> 28:01.440] Visual Studio? [28:01.700 --> 28:02.640] You are correct, Thomas. [28:02.640 --> 28:06.440] Oh, wow. It also works in things like VC Package. [28:06.440 --> 28:10.840] You can point to a Git URL and it will just also download it. [28:10.840 --> 28:13.040] NPM, also, for funsies. [28:13.780 --> 28:19.480] And other IDEs, like JetBrains and then, like, GitHub Desktop, they don't do this. [28:19.820 --> 28:23.340] So, we told Microsoft and then they came back with this fun response. [28:23.340 --> 28:25.640] We'll just give you a minute to digest this. [28:26.020 --> 28:29.820] Actually, I'll cut out the, like, extra words. [28:30.620 --> 28:35.600] Git cloning from an untrusted source is the same as browsing an untrusted SMB share. [28:36.060 --> 28:37.500] Oh, is it Microsoft? [28:37.640 --> 28:39.620] Yeah, I do that all the time, browsing un... [28:39.620 --> 28:40.100] Same. [28:40.100 --> 28:40.680] Yeah. [28:41.580 --> 28:48.500] So, we tried to find where the security boundary was after they came back. [28:48.520 --> 28:51.100] And we were like, okay. [28:51.100 --> 28:54.260] So, it's not a Visual Studio problem because they said no. [28:54.260 --> 28:56.900] So, maybe it's a Git Credential Manager problem. [28:57.340 --> 29:00.940] But then, a Credential Manager uses Git. [29:00.940 --> 29:06.120] But Git uses libcurl, which is compiled with the use-ntln flags. [29:06.260 --> 29:08.020] But it's actually a Visual Studio problem. [29:08.020 --> 29:11.840] Oh, we don't know where the problem is. [29:11.840 --> 29:13.500] It's sort of everywhere but nowhere. [29:13.500 --> 29:16.680] And no one wants to take blame for it, really. [29:17.640 --> 29:21.640] Microsoft will patch anything that you can prove that it's in their products. [29:22.660 --> 29:23.920] Anything else? [29:24.560 --> 29:25.900] That's a Windows problem. [29:25.900 --> 29:27.520] I just like the VLC team. [29:29.940 --> 29:35.220] You can use that on your next red team, I guess, if you want to hack some developers. [29:38.020 --> 29:45.340] So, where we ended up was we have four bugs reported to MS. [29:45.860 --> 29:47.800] Two bounties and one swag. [29:47.800 --> 29:50.200] I'm so sorry to my dog from the previous slides. [29:50.200 --> 29:53.240] Your surgery came later than expected for some weird reason. [29:53.760 --> 29:55.800] One, not a bug, which is Git. [29:57.120 --> 29:59.980] One, yes, it's a bug, but it's not a priority. [30:00.260 --> 30:01.080] I mean, that's fair. [30:01.080 --> 30:01.920] It's RSS. [30:02.800 --> 30:07.740] And, you know, to get to this point, we have a very, very rigorous methodology, obviously. [30:08.020 --> 30:10.180] I mean, I have a spreadsheet. [30:10.800 --> 30:13.280] It's actually a text file on my desktop. [30:16.850 --> 30:19.870] So, yeah, this is basically how we found all these bugs. [30:19.870 --> 30:24.730] Anywhere you see an HTTP, just put a responder URL and see what Windows does, [30:24.730 --> 30:27.090] and you will be delighted with the results. [30:27.090 --> 30:28.730] Image tag, do it. [30:28.730 --> 30:30.610] Sharing tag, do it. [30:30.610 --> 30:31.490] RSS. [30:31.950 --> 30:33.190] Who uses RSS? [30:33.190 --> 30:34.310] No one uses RSS. [30:36.010 --> 30:38.210] So, where to next? [30:38.650 --> 30:41.410] There are a lot of places this could be a thing. [30:41.410 --> 30:43.390] And, I mean, it's just HTTP. [30:43.510 --> 30:47.950] So, like, build servers, they can have links. [30:48.270 --> 30:48.890] Yeah. [30:50.710 --> 30:52.550] Pipelines, they could have links. [30:52.550 --> 30:56.010] Document processing things, like, I don't know, PDF generators. [30:56.150 --> 30:58.030] Yeah, they could do it, too. [30:58.650 --> 31:00.190] Maybe Word has it. [31:00.190 --> 31:01.530] Maybe Teams has it. [31:01.730 --> 31:02.870] No one uses Teams, though, so... [31:02.870 --> 31:03.850] No one uses Teams. [31:03.850 --> 31:04.370] No. [31:04.890 --> 31:06.090] Maybe video games. [31:06.090 --> 31:06.490] I don't know. [31:06.490 --> 31:07.690] Maybe drop a link in chat. [31:08.210 --> 31:10.770] Yeah, I reckon video games is something I want to look at, [31:10.770 --> 31:13.090] because I like playing video games for research. [31:13.090 --> 31:14.830] Yeah, I should do that in work time. [31:15.550 --> 31:16.610] Our boss is here. [31:18.650 --> 31:22.490] Basically, anywhere you could put a URL in is probably a good place to start. [31:22.510 --> 31:24.710] But also, we want to talk to you folks as well, [31:24.710 --> 31:27.590] because there's probably a lot of people out there who have some great ideas [31:27.590 --> 31:30.190] of where to look, so we would like to hear from them. [31:31.170 --> 31:34.210] Yeah, and just go turn NTLM off if you can. [31:34.210 --> 31:36.530] It probably will break everything, but turn it off. [31:36.530 --> 31:39.230] Turn it off and then turn it back on immediately when someone screams. [31:39.570 --> 31:42.210] Yeah, use Kerberos, because that's more secure. [31:43.650 --> 31:45.510] Anyway, this is the end of our talk. [31:45.510 --> 31:48.250] We had speedrun it, much like our NTLM bugs. [31:48.730 --> 31:50.650] But finding bugs doesn't happen in isolation, [31:50.650 --> 31:53.050] so a big thank you to everyone named. [31:54.090 --> 31:57.170] Yeah, and thank you for the MSRC for listening and meeting with us. [31:57.170 --> 31:59.170] They are genuinely good folks who... [31:59.170 --> 32:01.750] They need more of them, because there's only 30 of them, [32:01.750 --> 32:03.110] apparently, which is not nearly enough. [32:03.110 --> 32:05.350] And thanks for inviting us to your party as well. [32:05.350 --> 32:06.030] That was fun. [32:06.030 --> 32:07.150] Yeah, that was good. [32:07.210 --> 32:09.190] And thank you for everyone who has published their research. [32:09.190 --> 32:10.930] This is something I don't say lightly. [32:11.550 --> 32:14.270] Every piece of research published leads to more research, [32:14.270 --> 32:16.870] so please keep disclosing, please keep blogging. [32:16.870 --> 32:19.370] It's so good reading it. [32:20.610 --> 32:22.970] And also thank you for the DEF CON organizers. [32:23.130 --> 32:24.170] You guys are awesome. [32:24.170 --> 32:25.330] And hacking is a team sport. [32:25.330 --> 32:27.590] And please come up to us afterwards if you have any ideas [32:27.590 --> 32:29.390] where to get hashes out of. [32:29.490 --> 32:30.650] We want to know. [32:30.790 --> 32:33.170] We want more moderates that we don't get bounties for. [32:33.170 --> 32:33.930] Perfect. [32:41.380 --> 32:45.440] There is a microphone there for tall people who can ask questions. [32:57.500 --> 32:58.200] All right. [32:58.200 --> 32:59.240] Thanks, everyone. [33:00.040 --> 33:01.140] Thank you.