1 00:00:00,000 --> 00:00:04,620 Thank you for being here. As you probably suspect by now I'm going to 2 00:00:04,620 --> 00:00:11,960 be talking about UPnP and UPnP mapping. This is a turbo talk so obviously this is 3 00:00:11,960 --> 00:00:17,320 going to be a little fast. I'm going to try to go into as much details 4 00:00:17,320 --> 00:00:24,100 as I can but any other questions or whatever you can just go to the Q&A and I'll answer 5 00:00:24,100 --> 00:00:29,940 any questions. So let's do a brief introduction. Who am I? 6 00:00:30,080 --> 00:00:35,000 Not very important but I'm a security researcher. I started working with security at the tender 7 00:00:35,000 --> 00:00:46,500 age of 14. I used to hang out on the internet and work with ISPs back in the Dominican Republic 8 00:00:46,500 --> 00:00:52,360 which is where I'm from. Cable companies and all that. So that's that. 9 00:00:54,100 --> 00:01:01,620 What is UPnP? UPnP is Universal Plug and Play. Universal Plug and Play is a technology made 10 00:01:01,620 --> 00:01:11,980 by the UPnP forum which is a code name for Microsoft. They made it back in 1999 and the 11 00:01:11,980 --> 00:01:18,220 name probably gave it away that it was something made by Microsoft. The point of UPnP is to 12 00:01:18,220 --> 00:01:24,080 make devices work seamlessly. Be it on the internet, be it on the internet, be it on 13 00:01:24,100 --> 00:01:31,420 connectivity devices or networking devices or media devices. There are also other devices 14 00:01:31,420 --> 00:01:38,660 that can be used but mostly that's what UPnP is used for. So as you probably suspect, 15 00:01:39,180 --> 00:01:46,020 making devices work seamlessly is not a very good idea or it's a good idea but it's not 16 00:01:46,020 --> 00:01:54,080 very plausible. We're going to talk about specifically IGDs or the part of UPnP that 17 00:01:54,100 --> 00:02:04,520 works with networking devices. As you probably suspect, to make the network devices work 18 00:02:04,520 --> 00:02:12,700 seamlessly you need NAT traversal. How many of you raised your hands if you were in the 19 00:02:12,700 --> 00:02:24,080 Dan Kaminski talk? All right. So you probably get the idea or the basic idea. Basically a device on the land uses UPnP 20 00:02:24,100 --> 00:02:34,060 to automatically add port mappings on the device so that one device can access the 21 00:02:34,060 --> 00:02:45,640 land which is a great idea but as you will see it's not that great if you make it like UPnP does. So IGDs are 22 00:02:45,640 --> 00:02:54,080 basically found mostly on DSLs and some other devices. Cable monoms, not that much because 23 00:02:54,100 --> 00:03:03,860 cable moms usually are bridged but if something is routing and doing PPP, it's probably doing IGD. 24 00:03:04,400 --> 00:03:13,660 So big question and I've been working with Dan Kaminski on this one, on how many IGD 25 00:03:13,660 --> 00:03:23,180 devices are online and a shed load. I mean, it's amazing. We have, we thought we would have minority of the devices 26 00:03:24,100 --> 00:03:32,020 on the net, but I have personally seen half a million devices across different countries 27 00:03:32,020 --> 00:03:42,140 open and accepting UPNP requests. So let me first of all explain a little bit 28 00:03:42,140 --> 00:03:47,460 of how UPNP works briefly. Basically you start with a discovery process 29 00:03:47,460 --> 00:03:56,520 which relies on multicast UDP. It sends multicast UDP and any device listening replies back 30 00:03:56,520 --> 00:04:03,040 with a unicast UDP. This unicast UDP, probably you can't read it very well, but it's in the 31 00:04:03,040 --> 00:04:11,520 white paper. It describes or points out a location, which is just an XML file describing 32 00:04:11,520 --> 00:04:17,100 the different services and devices available to execute on that UPNP device. 33 00:04:17,740 --> 00:04:24,000 After you get that unicast, which is the blue part, the yellow part, you get to the 34 00:04:24,000 --> 00:04:35,720 green part, which is unicast TCP. Basically it's SOAP requests and after that, after you 35 00:04:35,720 --> 00:04:41,300 get the SOAP request, the description of the device through XML, you get send a SOAP request, 36 00:04:41,380 --> 00:04:46,640 which maps the port. You probably can't see it either, but over here you have different 37 00:04:46,640 --> 00:04:47,220 arguments. 38 00:04:47,220 --> 00:04:54,300 So you can use, like, least duration of the port mapping, internal client, external port, 39 00:04:54,420 --> 00:04:59,480 and remote host. Basically your basic port mapping arguments. 40 00:04:59,900 --> 00:05:10,940 So let's do a bit of the UPNP hacking timeline. It started in 2001. It came from FDU security. 41 00:05:11,200 --> 00:05:17,120 He found a couple of denial of service attacks for the Windows XP stack. 42 00:05:17,120 --> 00:05:24,840 Obviously, UPNP was implemented in Windows XP first. Microsoft wanted to promote the 43 00:05:24,840 --> 00:05:31,880 technology. Then in 2001, again, EI published buffer flows for the same stack. You probably 44 00:05:31,880 --> 00:05:40,640 remember that one. It was pretty popular. Then in 2003, Bjorn Stikler talked about UPNP 45 00:05:40,640 --> 00:05:47,020 information disclosure. Now, there's not a lot of information that's being thrown out, 46 00:05:47,120 --> 00:05:55,760 by UPNP, but it's enough. It's not that good. You'll see with the demo how much information 47 00:05:55,760 --> 00:05:56,320 we can get. 48 00:05:56,900 --> 00:06:04,800 And then in 2006, Armin Schirmerl, that's a typo, where the R is missing, he started 49 00:06:04,800 --> 00:06:13,280 publishing UPNP facts on the site upnphacks.org. And he's basically, let's say, like, one of 50 00:06:13,280 --> 00:06:17,100 the fathers of UPNP hacking. He has access to a lot of information. He has access to 51 00:06:17,100 --> 00:06:25,560 a lot of code. He has access to data. And the data that he is able to utilize, he's 52 00:06:25,560 --> 00:06:25,720 able to understand it. 53 00:06:25,720 --> 00:06:34,940 Then in 2008, we had an attack by New Citizen, which was pretty smart. It basically relied 54 00:06:34,940 --> 00:06:44,320 on the clients of the network sending SOAP through JavaScript. And basically, the purpose 55 00:06:44,320 --> 00:06:47,080 of that was opening the web administrator. 56 00:06:47,080 --> 00:06:55,620 administration port of clients that access sites and such. So, what are the main problems 57 00:06:55,620 --> 00:07:00,700 of UPnP? Well, first of all, it uses the word plug and play. I don't know if you guys remember 58 00:07:00,700 --> 00:07:07,540 Windows 98 and plug and play and the whole idea. It didn't work. I mean, it's not rocket 59 00:07:07,540 --> 00:07:12,000 science. And every time I see plug and play anywhere, I just have to look it up because 60 00:07:12,000 --> 00:07:17,100 I don't want to go through the same nightmares that we went through in the early or late 61 00:07:17,100 --> 00:07:23,840 90s. So, the other thing with plug and play, it's a pretty nice idea. We would love to 62 00:07:23,840 --> 00:07:30,500 have things plug and play, but it doesn't work good with security. I mean, you can't 63 00:07:30,500 --> 00:07:37,560 have secure devices plug and play, being plug and play. I mean, you need to authenticate 64 00:07:37,560 --> 00:07:40,780 something. You need to ask questions and all that. 65 00:07:40,960 --> 00:07:41,980 Well, that's the main problem. 66 00:07:42,000 --> 00:07:45,880 That's one of the main problems of UPnP, too. UPnP has no authentication whatsoever 67 00:07:45,880 --> 00:07:57,060 at all. In fact, the only way they consider an entity that could actually execute commands 68 00:07:57,060 --> 00:08:04,420 is just if they have an IP assigned, which is ridiculous. I mean, it's like DEF CON sitting 69 00:08:04,420 --> 00:08:09,260 down and saying, well, how are we going to let people in? How do we know who we would 70 00:08:09,260 --> 00:08:11,980 let in? And then someone says, well, we're going to let you in. 71 00:08:11,980 --> 00:08:20,020 said, if they exist, they can't come in. Which is ridiculous. I mean, don't even go through 72 00:08:20,020 --> 00:08:31,060 it. After that, the other problems are that most stacks do not validate data. And what 73 00:08:31,060 --> 00:08:37,760 we mean by this is that, first of all, UPnP was made or designed for land use only. And 74 00:08:37,760 --> 00:08:45,340 that's not true, unfortunately. But not only that. Port mappings were designed to work 75 00:08:45,340 --> 00:08:51,100 for internal hosts that wanted to traverse the net and add port mappings. So in this 76 00:08:51,100 --> 00:09:01,040 case, most stacks, or a lot of stacks, do not check if the internal IP is actually on 77 00:09:01,040 --> 00:09:07,640 the LAN or internal. So what that actually allows us is to stick 78 00:09:07,640 --> 00:09:14,140 any IP that we want in that port mapping. So if I want to, say, add a port mapping at 79 00:09:15,360 --> 00:09:23,500 the device pointing to Amazon IP port 80, it's doable in most devices, which is also 80 00:09:24,060 --> 00:09:31,260 a little bit weird. The other problem is, as I was saying, UPnP 81 00:09:31,260 --> 00:09:37,620 was designed for LAN use, and most or a lot of devices use or actually use LAN. And that's 82 00:09:45,300 --> 00:09:52,540 not true, unfortunately. So what else, is it the other problem that some beekeeping 83 00:09:52,540 --> 00:09:52,900 is doing? Nar Geoffri 84 00:09:52,900 --> 00:09:53,620 Yeah, that was your question? 85 00:09:53,620 --> 00:10:07,180 No. OK. gates are easy to search, but there is a challenge. The popped in name that... 86 00:10:07,640 --> 00:10:14,680 sentence on caps, so I guess they're making a better point now. And on the other hand, 87 00:10:15,180 --> 00:10:22,220 we have devices that don't even log UPnP requests. I mean, we can play with it, do whatever we 88 00:10:22,220 --> 00:10:27,160 want with it, and no one will ever see it because the device doesn't have the capacity 89 00:10:27,160 --> 00:10:36,640 of logging in, which is also a bit weird. There's also a ton of other problems. We have 90 00:10:36,640 --> 00:10:44,000 command execution on some stacks, and as you saw, denial of service and buffer rule flows. 91 00:10:44,300 --> 00:10:49,380 In fact, denial of service is so bad that when I was programming UMAP or the tool I'm going 92 00:10:49,380 --> 00:10:55,740 to showcase, I accidentally crashed my modem like a thousand times. I didn't even do anything, 93 00:10:55,840 --> 00:11:04,080 I'm just sending bad requests and the device will go dead. So the devices affected so far, 94 00:11:04,220 --> 00:11:06,620 we don't know yet how many devices are 95 00:11:06,620 --> 00:11:12,360 are affected, but obviously some vendors have taken into account what's been going on. 96 00:11:12,740 --> 00:11:18,000 And we have Linksys, Edimax, Sitecom, Broadcom, which is not listed here. 97 00:11:18,400 --> 00:11:25,000 But the most common stack on the net which is vulnerable is the SpeedTouch or Thomson 98 00:11:25,000 --> 00:11:27,700 or now Technicolor stack. 99 00:11:27,700 --> 00:11:34,360 We have devices roaming around the net on big amounts. 100 00:11:36,720 --> 00:11:39,660 So UMAP, the tool, what is it? 101 00:11:39,960 --> 00:11:48,060 First of all, it's a SOX proxy server that forwards or pipes the request through UPnP devices. 102 00:11:48,480 --> 00:11:54,420 I'm going to explain it a little bit better and a little bit further down the road. 103 00:11:55,100 --> 00:11:57,680 It's also a TCP UDP scanner for host devices. 104 00:11:59,200 --> 00:12:07,340 Basically, we can scan the services of the host inside the net from outside. 105 00:12:08,460 --> 00:12:12,260 And also a manual port mapper for UPnP devices. 106 00:12:15,020 --> 00:12:16,380 So how does it work? 107 00:12:16,580 --> 00:12:22,440 As I explained in the first part of the presentation, UPnP relies on multicast. 108 00:12:22,620 --> 00:12:26,940 So that is not a very good scenario for a one request. 109 00:12:27,700 --> 00:12:31,960 Obviously, we can't use multicast on the one. 110 00:12:32,340 --> 00:12:35,220 So basically what we do is we skip that part completely. 111 00:12:35,300 --> 00:12:40,100 And we just go on to fetching the XML description files, so the locations. 112 00:12:41,040 --> 00:12:42,440 It's pretty simple. 113 00:12:42,560 --> 00:12:45,120 It's like fetching HTTP files. 114 00:12:46,120 --> 00:12:47,680 Not that big of a deal. 115 00:12:48,060 --> 00:12:55,500 And then it also uses a control part of the UPnP protocol, which is actually what executes 116 00:12:55,500 --> 00:12:57,180 the actions. 117 00:12:57,180 --> 00:12:59,520 Or the commands that UPnP allows on devices. 118 00:13:03,760 --> 00:13:09,480 So here's a flow diagram of more or less how U-MAT works. 119 00:13:10,120 --> 00:13:16,760 It basically takes a list of IPs and starts scanning for open control points or UPnP 120 00:13:16,760 --> 00:13:17,140 devices. 121 00:13:17,880 --> 00:13:27,160 Once it receives a SOX request, if it has a positive UPnP device, it attempts to look 122 00:13:27,160 --> 00:13:28,160 at the port mapping. 123 00:13:28,500 --> 00:13:36,780 Then it opens the connection and pipes the connection through to the SOX request or the 124 00:13:36,780 --> 00:13:38,660 client that's making the SOX request. 125 00:13:40,420 --> 00:13:44,000 And after that, it attempts to delete the port mapping. 126 00:13:44,440 --> 00:13:54,900 And this is very needed on UPnP because UPnP does not allow an infinite amount of port 127 00:13:54,900 --> 00:13:55,220 mappings. 128 00:13:55,760 --> 00:13:56,060 Actually. 129 00:13:56,060 --> 00:13:59,560 Some devices allow as little as ten port mappings at a time. 130 00:14:00,040 --> 00:14:07,220 So if we actually did a port mapping for every connection, we wouldn't have a very accurate 131 00:14:07,220 --> 00:14:09,080 or a very good connection. 132 00:14:09,740 --> 00:14:16,000 So we also have the part of scanning the internal host. 133 00:14:16,160 --> 00:14:19,860 And basically it also checks for open control points. 134 00:14:20,140 --> 00:14:20,660 Um. 135 00:14:22,160 --> 00:14:22,840 Uh. 136 00:14:23,700 --> 00:14:31,220 Then it tries to guess the IP or the internal LAN block that's being used. 137 00:14:31,600 --> 00:14:35,560 It adds a port mapping for each IP, internal IP. 138 00:14:35,880 --> 00:14:41,360 Let's say if I want to scan port 21 of all the hosts on the inside of the LAN, it starts 139 00:14:41,770 --> 00:14:49,000 adding port mappings for 10.0.0.1 and 21 and then tries to map it to an external port. 140 00:14:49,140 --> 00:14:52,560 And then the program tries to check if that port is open. 141 00:14:52,560 --> 00:14:54,660 And the external port on the one IP. 142 00:14:54,960 --> 00:15:01,760 If it's open, obviously you can establish a connection for the internal host and the 143 00:15:01,760 --> 00:15:02,480 internal services. 144 00:15:02,800 --> 00:15:07,800 And also it does the deletion of the port mapping. 145 00:15:13,320 --> 00:15:15,920 So what are the cons with UPnP mapping? 146 00:15:16,200 --> 00:15:16,740 A lot. 147 00:15:17,040 --> 00:15:19,840 First of all, UPnP stacks are buggy and unstable. 148 00:15:20,460 --> 00:15:21,040 Um. 149 00:15:21,980 --> 00:15:26,840 It was kind of hard, or not that hard, programming UMAP. 150 00:15:27,040 --> 00:15:32,200 The one being distributed on the CDs are very, it's very buggy. 151 00:15:32,280 --> 00:15:37,360 So I would suggest just downloading the new version when I release it tonight on the site. 152 00:15:38,440 --> 00:15:45,080 But basically UPnP stacks, even though they're supposed to be in a standard, they don't behave 153 00:15:45,460 --> 00:15:46,220 on the standard. 154 00:15:46,300 --> 00:15:48,240 And they have minor differences. 155 00:15:49,220 --> 00:15:50,520 The other thing is that. 156 00:15:50,520 --> 00:15:52,340 Obviously we have limited bandwidth. 157 00:15:53,680 --> 00:15:56,980 Because we're relying on the upload bandwidth of the devices. 158 00:15:59,480 --> 00:16:06,520 And also we have problems with protocols that have heavy amount of connections. 159 00:16:06,980 --> 00:16:14,920 I mean we can use UPnP mapping for maybe mapping ports for SSH, maybe some web requests. 160 00:16:15,260 --> 00:16:19,740 But if you get something like torrent or whatever, obviously it won't work that well. 161 00:16:19,900 --> 00:16:20,140 I mean. 162 00:16:20,140 --> 00:16:25,960 If we have only a limit of 150 or 200 mappings at a time, it's just not going to work. 163 00:16:29,560 --> 00:16:34,360 And the other thing is that some devices, even though they report that they opened 164 00:16:34,360 --> 00:16:36,200 the port, they don't. 165 00:16:36,460 --> 00:16:40,460 They say everything's okay, 200 okay and everything in the reply. 166 00:16:40,740 --> 00:16:44,360 But when you go and try to connect to the port, you have nothing. 167 00:16:45,560 --> 00:16:49,320 So that's obviously not very good. 168 00:16:52,240 --> 00:16:55,400 So let's do a little demo on UMAP. 169 00:16:55,900 --> 00:17:00,280 And let's go for the proxy mode. 170 00:17:01,020 --> 00:17:03,380 Let's see if I can get this to work. 171 00:17:06,300 --> 00:17:11,960 I had to modify UMAP so that the real IPs don't show. 172 00:17:12,140 --> 00:17:14,960 Because I don't want my ass thrown in jail and raped. 173 00:17:15,300 --> 00:17:22,040 So when you get the real version, though, you can have all the fun you want. 174 00:17:22,340 --> 00:17:23,400 It shouldn't matter. 175 00:17:23,560 --> 00:17:32,540 In fact, there's also an issue on if this is, it's obviously maybe could be illegal, 176 00:17:32,640 --> 00:17:33,500 but not that much. 177 00:17:33,620 --> 00:17:36,260 Because it's the same idea of an open proxy. 178 00:17:36,440 --> 00:17:42,060 It's just someone that has a badly configured device on the net that's allowing people to 179 00:17:42,060 --> 00:17:42,540 forward traffic. 180 00:17:42,920 --> 00:17:45,280 Obviously, you're not authorized for a proxy. 181 00:17:45,300 --> 00:17:47,380 You're not authorized for doing port mappings. 182 00:17:47,480 --> 00:17:49,780 But it's not actually breaking into the device. 183 00:17:51,260 --> 00:17:55,100 So maybe I won't get my ass thrown in jail. 184 00:17:55,700 --> 00:17:58,980 So here we go. 185 00:17:59,100 --> 00:18:02,720 I'm just going to scan a standard IP block. 186 00:18:03,280 --> 00:18:05,780 And it should start running right away. 187 00:18:07,820 --> 00:18:09,780 I don't know if you can see it back there. 188 00:18:10,940 --> 00:18:11,700 Can you? 189 00:18:12,760 --> 00:18:13,540 All right. 190 00:18:14,260 --> 00:18:18,680 So on the right hand here, we have the positive IPs. 191 00:18:19,000 --> 00:18:23,200 And as you can see here, we have a lot of details that come out from the device. 192 00:18:23,420 --> 00:18:30,380 First of all, we can get the serial number from the device, the model number, who makes 193 00:18:30,380 --> 00:18:33,220 it, and the MAC address of the device. 194 00:18:33,480 --> 00:18:41,900 This obviously would help also for those devices that come with WEP keys tied to the serial 195 00:18:41,900 --> 00:18:42,680 number and all that. 196 00:18:42,680 --> 00:18:45,280 So that's not good either. 197 00:18:45,620 --> 00:18:51,780 So not only that, we also have a group of commands that we can execute on any device. 198 00:18:52,140 --> 00:18:59,080 And let me remind you that we are scanning a random block somewhere. 199 00:18:59,320 --> 00:19:02,960 And it's not, I mean, we're not doing any tricks. 200 00:19:04,040 --> 00:19:06,240 So here are the commands that we can execute. 201 00:19:07,480 --> 00:19:10,120 There are not a lot of interesting commands. 202 00:19:10,320 --> 00:19:11,100 Well, maybe. 203 00:19:11,200 --> 00:19:11,920 Or maybe not. 204 00:19:12,680 --> 00:19:14,780 We have the first part that's not on bold. 205 00:19:15,100 --> 00:19:19,900 And those are the commands that are actually advertised by the device. 206 00:19:20,840 --> 00:19:26,900 Now the ones that are on the bottom are the ones that are not advertised by the device. 207 00:19:27,180 --> 00:19:31,740 Obviously, we wanted to try just in case, as every hacker would do. 208 00:19:31,900 --> 00:19:32,860 And it works. 209 00:19:33,120 --> 00:19:38,880 I mean, even if the device doesn't advertise this command, you can still execute the command. 210 00:19:39,220 --> 00:19:42,660 So for example, if I want to check out this device. 211 00:19:42,660 --> 00:19:46,560 And I want to check out what's the upload and download bandwidth for this device, I 212 00:19:46,560 --> 00:19:48,600 could just execute and here we go. 213 00:19:48,740 --> 00:19:56,000 We get that this device is running upstream of 350-something and downstream of two megs, 214 00:19:56,000 --> 00:20:01,020 which is pretty convenient if you want to use for a SOX proxy and you want to know 215 00:20:01,020 --> 00:20:04,780 what kind of bandwidth or latency you want to, you've been using. 216 00:20:06,240 --> 00:20:09,020 And we also have other commands. 217 00:20:11,560 --> 00:20:12,640 Like 4x4. 218 00:20:12,640 --> 00:20:13,240 Force termination. 219 00:20:13,740 --> 00:20:18,260 I assure you, force termination is not for a contract or anything. 220 00:20:18,680 --> 00:20:21,780 It will actually close down the device and close down the connection. 221 00:20:22,080 --> 00:20:27,580 So I don't think denial of service is even a big deal, because if you have a command 222 00:20:27,580 --> 00:20:30,880 that actually turns off the device, what's the point? 223 00:20:31,140 --> 00:20:34,380 I mean, we don't need denial of service. 224 00:20:34,580 --> 00:20:35,740 We just have to turn it off. 225 00:20:36,060 --> 00:20:41,820 So we also have other commands, like add port mapping, which is basically what we're 226 00:20:41,820 --> 00:20:42,620 doing. 227 00:20:42,640 --> 00:20:45,060 And this is actually what uMap uses for connections. 228 00:20:45,500 --> 00:20:50,220 We also have these other commands like get username and get password. 229 00:20:50,400 --> 00:20:51,520 And they actually work. 230 00:20:53,580 --> 00:20:59,160 Now on the bright side, the username and the password they're talking about is not 231 00:20:59,160 --> 00:21:04,940 the administration interface, but the PPP authentication username and password. 232 00:21:05,200 --> 00:21:10,380 Now, this is maybe not that bad for some guys. 233 00:21:10,720 --> 00:21:12,360 Because, I mean... 234 00:21:12,360 --> 00:21:12,620 Yeah. 235 00:21:12,640 --> 00:21:15,100 and there's not much you can do with it. 236 00:21:15,360 --> 00:21:19,260 But unfortunately, some providers use the customer number 237 00:21:19,260 --> 00:21:20,900 as a username for the PPP device. 238 00:21:21,140 --> 00:21:25,200 So that would also do something that you don't want to 239 00:21:25,200 --> 00:21:28,300 and get you some information that you shouldn't have. 240 00:21:31,040 --> 00:21:32,580 Let me hit another command. 241 00:21:32,680 --> 00:21:34,760 Let's see if the username works. 242 00:21:35,060 --> 00:21:35,800 There you go. 243 00:21:35,860 --> 00:21:38,480 That's a username for the PPP of that device, 244 00:21:38,740 --> 00:21:40,880 which is also very weird. 245 00:21:40,880 --> 00:21:45,800 So on to the more important stuff. 246 00:21:46,060 --> 00:21:47,560 Let's go for... 247 00:21:47,980 --> 00:21:51,460 What I set up is this UMAP is actually scanning, 248 00:21:51,600 --> 00:21:55,260 and it opens up SOCKS port, 249 00:21:55,800 --> 00:21:57,620 and you can send the request, 250 00:21:57,800 --> 00:22:00,200 and it will map it through to that IP that I have selected. 251 00:22:00,700 --> 00:22:02,260 We can test it right here. 252 00:22:02,840 --> 00:22:09,160 I've set up a page to show this mapping. 253 00:22:09,220 --> 00:22:09,980 Let's see if it works. 254 00:22:10,880 --> 00:22:15,480 Remember that UPnP usually is very buggy and unreliable. 255 00:22:15,680 --> 00:22:16,780 And there it goes. It works. 256 00:22:17,120 --> 00:22:21,140 Now we have a very disturbing image of Bill Gates over there. 257 00:22:23,800 --> 00:22:27,100 But as you can see, we have the IP over there. 258 00:22:27,160 --> 00:22:30,200 You can test that URL out if you want to, 259 00:22:30,260 --> 00:22:34,300 and you can see that it will point out the IP you're working at. 260 00:22:34,660 --> 00:22:37,980 If you can see in UMAP, this is the IP we have selected. 261 00:22:38,360 --> 00:22:40,320 Now if I want to just use... 262 00:22:40,880 --> 00:22:45,820 another device, like the one below, 244.6, 263 00:22:46,500 --> 00:22:48,600 then it should work, too. 264 00:22:48,700 --> 00:22:49,240 Let's see. 265 00:22:50,300 --> 00:22:51,080 There we go. 266 00:22:51,540 --> 00:22:54,780 In fact, we can go on Google. 267 00:22:55,160 --> 00:22:56,220 I'll show you. 268 00:22:56,240 --> 00:22:58,260 You should go to Google for the Dominican Republic, 269 00:22:58,400 --> 00:23:00,220 as this is a device for the Dominican Republic. 270 00:23:02,000 --> 00:23:05,160 Now, as you probably suspect, this is pretty bad. 271 00:23:05,420 --> 00:23:10,600 I mean, we have devices like this going on in the Dominican Republic, 272 00:23:10,880 --> 00:23:14,900 Colombia, Thailand, a lot of countries. 273 00:23:15,120 --> 00:23:18,700 And a lot of devices are going on like that. 274 00:23:21,840 --> 00:23:25,400 We also have another functionality of the UMAP, 275 00:23:25,560 --> 00:23:27,980 which is scanning for internal hosts. 276 00:23:28,200 --> 00:23:31,900 Now, I don't want to do live scanning of the host, 277 00:23:32,060 --> 00:23:38,820 because most hosts nowadays are using other gateway devices, 278 00:23:38,940 --> 00:23:40,740 like Linksys, Wireless. 279 00:23:40,880 --> 00:23:44,280 Routers and all that, which block all the WAN requests. 280 00:23:44,680 --> 00:23:49,180 But if there are devices that have direct connections 281 00:23:49,180 --> 00:23:53,360 to other devices or PCs, then we could actually map. 282 00:23:53,720 --> 00:23:56,980 Let me show you a couple of mappings I did earlier on. 283 00:24:03,820 --> 00:24:08,420 Now, don't laugh at my lead smudging skills from GIMP. 284 00:24:08,740 --> 00:24:09,420 . 285 00:24:11,540 --> 00:24:14,500 So, basically, what I want to show you here is UMAP, 286 00:24:14,500 --> 00:24:17,540 and this number up here on the total positives. 287 00:24:18,300 --> 00:24:20,980 This scan was running for a couple of days, 288 00:24:21,060 --> 00:24:27,900 and we got 88,000 devices with open UPNP ports, which is ridiculous. 289 00:24:29,920 --> 00:24:34,140 And this is actually a port mapping. 290 00:24:34,340 --> 00:24:38,080 As you can see, the smart part is the external IP address 291 00:24:38,080 --> 00:24:38,920 and the external port. 292 00:24:39,120 --> 00:24:39,680 . 293 00:24:40,300 --> 00:24:40,860 . 294 00:24:40,880 --> 00:24:44,840 We have the internal IP address, which the mapping has been made for. 295 00:24:45,220 --> 00:24:49,820 We also have another example of, in this case, for example, 296 00:24:49,840 --> 00:25:00,340 I just set it to run for that IP, and we got Windows IP 1005 for 139 and 445. 297 00:25:00,780 --> 00:25:06,680 Now, this is maybe a bigger problem, because obviously, 298 00:25:06,740 --> 00:25:09,340 you can traverse an app from the WAN, which is something you don't want. 299 00:25:09,500 --> 00:25:10,040 . 300 00:25:10,040 --> 00:25:10,320 . 301 00:25:10,860 --> 00:25:15,680 And we have all the possibilities. 302 00:25:16,080 --> 00:25:22,780 Now, we can't use this sometimes on some protocols, let's say, 303 00:25:22,880 --> 00:25:28,720 because we have to map these ports on some of the higher ports. 304 00:25:29,040 --> 00:25:31,740 We can't use the same 139 or the 445. 305 00:25:32,180 --> 00:25:37,900 So that could make things a little bit more difficult, but it still works. 306 00:25:38,060 --> 00:25:39,740 And obviously, you have an SSH border 307 00:25:39,740 --> 00:25:41,560 and HTTP port. 308 00:25:41,680 --> 00:25:42,840 It won't matter that much. 309 00:25:45,240 --> 00:25:45,840 . 310 00:25:53,940 --> 00:25:55,440 Let's keep on working here. 311 00:25:56,980 --> 00:25:57,580 . 312 00:26:05,400 --> 00:26:07,500 So that's the internal LAN scanning tool. 313 00:26:07,660 --> 00:26:08,260 . 314 00:26:10,180 --> 00:26:12,620 And how do we fix this? 315 00:26:13,160 --> 00:26:14,320 I don't know. 316 00:26:16,240 --> 00:26:21,180 There's no real solution or the best solution. 317 00:26:21,460 --> 00:26:25,440 First of all, we need to get everyone to be aware of this 318 00:26:25,440 --> 00:26:29,860 and start configuring their devices for UPnP, 319 00:26:30,020 --> 00:26:33,800 only accepting the action from the LAN side. 320 00:26:34,040 --> 00:26:38,220 Now, unfortunately, some devices, even after you configure them, 321 00:26:38,260 --> 00:26:43,100 to accept the action from the LAN side, they just don't work. 322 00:26:43,280 --> 00:26:46,760 I mean, you can configure them, and they will keep on working on the one side, 323 00:26:46,880 --> 00:26:48,500 which is pretty bad, too. 324 00:26:49,360 --> 00:26:58,180 We also could work with ISPs, which could do some base configuration 325 00:26:58,180 --> 00:27:03,000 to disable by default the UPnP1 request. 326 00:27:05,240 --> 00:27:08,140 Now, this is a big problem, because most ISPs just say, 327 00:27:08,260 --> 00:27:09,220 that's not my problem. 328 00:27:09,380 --> 00:27:10,900 That's a customer's problem. 329 00:27:11,120 --> 00:27:15,200 I don't want to, you know, it's an industry problem, 330 00:27:15,380 --> 00:27:18,020 which is, yeah, deplorable. 331 00:27:20,560 --> 00:27:24,000 And on some cases, if you don't have any other choice, 332 00:27:24,120 --> 00:27:29,920 you could just disable UPnP all the way, which is not good. 333 00:27:30,080 --> 00:27:33,260 I don't know if you guys have used UPnP that much, 334 00:27:33,300 --> 00:27:37,620 but I'm a gamer, and you can't play with PlayStation, 335 00:27:37,620 --> 00:27:42,660 and Xbox without UPnP, unless you have some kind of DMC 336 00:27:42,660 --> 00:27:45,840 or an external IP address pointing directly at your device. 337 00:27:47,060 --> 00:27:50,160 So mitigation is going to be a little difficult. 338 00:27:50,380 --> 00:27:53,540 But most people can just configure their devices 339 00:27:54,520 --> 00:27:57,240 so that they can block the request from the one. 340 00:27:58,340 --> 00:28:01,540 As Dan Kaminski was saying at a previous talk, 341 00:28:04,120 --> 00:28:05,820 it's like having a firewall, 342 00:28:05,820 --> 00:28:10,220 asking people if they want to block or unblock, 343 00:28:10,480 --> 00:28:14,560 which is kind of weird, because, I mean, what should you ask? 344 00:28:14,800 --> 00:28:17,880 Obviously, if you configure it, you shouldn't be asking. 345 00:28:21,320 --> 00:28:23,000 And that's about it. 346 00:28:23,120 --> 00:28:25,620 I have any questions or... 347 00:28:30,760 --> 00:28:31,460 I'm sorry? 348 00:28:36,180 --> 00:28:36,520 Thank you.