1 00:00:00,000 --> 00:00:00,780 All right. 2 00:00:00,820 --> 00:00:03,540 Without further ado, a man who needs no introduction. 3 00:00:08,090 --> 00:00:09,350 Hello, everyone. 4 00:00:11,810 --> 00:00:13,530 How is everybody doing? 5 00:00:13,910 --> 00:00:15,050 Come on, DEF CON. 6 00:00:15,270 --> 00:00:16,570 Hey, my name is Guillermo. 7 00:00:16,570 --> 00:00:17,270 I'm 22. 8 00:00:17,270 --> 00:00:20,650 It's my first time in DEF CON, first time speaking to so many people. 9 00:00:20,750 --> 00:00:24,090 So I think the Irish are going to be good for this. 10 00:00:26,050 --> 00:00:29,610 So today I'm going to talk to you about Wi-Fi hacking. 11 00:00:31,550 --> 00:00:32,990 So... yeah. 12 00:00:34,150 --> 00:00:37,770 So I have a bachelor's degree in the University of Chile. 13 00:00:37,770 --> 00:00:39,390 I'm Chilean, by the way. 14 00:00:41,050 --> 00:00:43,270 I'm one year until I get my majors. 15 00:00:43,610 --> 00:00:48,510 So this... I'll talk a little bit about me. 16 00:00:48,810 --> 00:00:52,130 So I'm into scrappers or crawlers. 17 00:00:52,130 --> 00:00:53,550 I don't know if you guys know them. 18 00:00:53,690 --> 00:00:54,370 Yep. 19 00:00:55,090 --> 00:01:00,410 So I really like automation about things, like things you shouldn't do manually. 20 00:01:00,410 --> 00:01:07,190 You should tell the PC or the machine to do it again and again. 21 00:01:07,190 --> 00:01:14,610 So I helped create the genealogy tree for Chile, the biggest genealogy tree in Chile. 22 00:01:15,370 --> 00:01:23,210 I did an HTR, it's handwritten text recognition research in Guatemala last year. 23 00:01:23,210 --> 00:01:26,690 So I'm into AI as well, as most of you guys are. 24 00:01:28,630 --> 00:01:35,330 And I went to DEF CON China on June, this last DEF CON on China, first one. 25 00:01:35,590 --> 00:01:37,150 We did a workshop. 26 00:01:37,670 --> 00:01:41,610 In my second internship, I did Wi-Fi hacking. 27 00:01:41,610 --> 00:01:43,910 So that's what we presented for DEF CON China. 28 00:01:43,910 --> 00:01:49,030 And this is going to be the same workshop, just the talk. 29 00:01:50,670 --> 00:01:55,190 So I don't know if you guys saw, the slides are going to be in that link. 30 00:01:55,450 --> 00:01:58,150 The slides are really similar to the workshop ones. 31 00:01:58,150 --> 00:02:08,630 So if you want to take a look, there's going to be, on the second link over there, there's going to be some code for everything we're going to talk about. 32 00:02:10,470 --> 00:02:12,830 You got your pictures? 33 00:02:16,820 --> 00:02:19,260 All right, so Wi-Fi. 34 00:02:19,260 --> 00:02:20,700 Who knows here Wi-Fi? 35 00:02:20,700 --> 00:02:22,380 Everybody knows Wi-Fi, right? 36 00:02:22,520 --> 00:02:23,940 So what is it? 37 00:02:23,940 --> 00:02:25,240 What is Wi-Fi? 38 00:02:25,760 --> 00:02:28,300 Wi-Fi is a radio frequency. 39 00:02:28,340 --> 00:02:29,780 What does it do though? 40 00:02:29,800 --> 00:02:32,580 So the idea of Wi-Fi is communicating. 41 00:02:32,760 --> 00:02:37,160 You have an ISP that connects to the World Wide Web. 42 00:02:37,160 --> 00:02:46,460 And you have a router that gives you the communication between the Web and your machines or cell phones. 43 00:02:48,480 --> 00:02:52,420 So I'm going to talk about a little brief history of Wi-Fi. 44 00:02:52,960 --> 00:02:59,820 So on 97, the IEEE LAN protocol... I'm sorry, man. 45 00:02:59,980 --> 00:03:01,460 I'm so sorry. 46 00:03:03,600 --> 00:03:07,460 The IEEE LAN protocols were defined. 47 00:03:07,920 --> 00:03:12,880 And at first, they only supported two megabytes links. 48 00:03:12,880 --> 00:03:15,300 So that wasn't good enough for Wi-Fi. 49 00:03:15,920 --> 00:03:19,680 That was 802.11a. 50 00:03:19,740 --> 00:03:25,680 And then once in year 99, 802.11b came around. 51 00:03:25,680 --> 00:03:29,400 And it was like 10, 15, 20 megabytes per link. 52 00:03:29,400 --> 00:03:30,960 So that was good for Wi-Fi. 53 00:03:30,960 --> 00:03:35,120 So that's when Web came in in 99. 54 00:03:36,740 --> 00:03:39,220 Two years later, Web got exploited. 55 00:03:39,220 --> 00:03:41,080 So Web, so bad. 56 00:03:41,880 --> 00:03:45,280 In 2003, WPA came across. 57 00:03:45,740 --> 00:03:47,940 And 2006, WPS. 58 00:03:47,940 --> 00:03:51,280 We're going to talk a little bit about WPS. 59 00:03:52,680 --> 00:03:56,800 In 2011, we got WPS vulnerable. 60 00:03:57,060 --> 00:04:00,120 So does anybody here know WPS? 61 00:04:00,120 --> 00:04:01,120 Yep. 62 00:04:01,120 --> 00:04:01,740 Yep. 63 00:04:01,740 --> 00:04:02,960 There you go. 64 00:04:04,340 --> 00:04:08,040 2017, we got WPA2 cracked. 65 00:04:08,520 --> 00:04:13,140 And 2018, we got WPA3. 66 00:04:13,600 --> 00:04:17,340 And one year later, it's got already five vulnerabilities. 67 00:04:17,340 --> 00:04:20,120 So it's not going to be implemented, I think. 68 00:04:21,380 --> 00:04:21,900 Yep. 69 00:04:21,900 --> 00:04:23,220 Thanks for nothing. 70 00:04:25,120 --> 00:04:30,200 So what are the attacks I'm going to talk to you about today? 71 00:04:30,260 --> 00:04:32,520 We're going to attack WPS. 72 00:04:32,540 --> 00:04:34,000 We're going to attack Web. 73 00:04:34,100 --> 00:04:36,400 And WPA, WPA2. 74 00:04:36,820 --> 00:04:39,520 We're going to talk about men in the middle. 75 00:04:39,760 --> 00:04:42,600 How can we do that and how effective is it? 76 00:04:43,680 --> 00:04:46,320 Denial of service, just one slide. 77 00:04:46,620 --> 00:04:48,820 And DNS hijacking. 78 00:04:49,540 --> 00:04:51,580 So, WPS. 79 00:04:51,580 --> 00:04:54,380 Well, what is it, first of all? 80 00:04:55,880 --> 00:05:02,180 WPS was implemented for the non-geeky people to connect to the Wi-Fi really easy and quick. 81 00:05:03,380 --> 00:05:08,260 And, yeah, it has a single hard-coded value. 82 00:05:08,260 --> 00:05:12,280 So only one value doesn't change unless you change it manually. 83 00:05:13,120 --> 00:05:15,420 On 2011, it was cracked. 84 00:05:15,420 --> 00:05:16,760 Brute force attack. 85 00:05:16,760 --> 00:05:22,620 So you can spoof all the traffic on WPS. 86 00:05:23,660 --> 00:05:26,220 So WPS has eight numbers. 87 00:05:26,520 --> 00:05:30,660 And those eight numbers give you 10 to the 8th combinations. 88 00:05:31,120 --> 00:05:35,060 So that's a really big key space for... 89 00:05:35,060 --> 00:05:40,180 I mean, you look at that number, you say, wow, how can WPS be vulnerable? 90 00:05:40,560 --> 00:05:43,700 But the last digit is a text sum. 91 00:05:43,700 --> 00:05:46,360 So that's one less, 10 to the 7th. 92 00:05:46,360 --> 00:05:52,300 And you get four, the first four digits are going to do a text sum. 93 00:05:52,300 --> 00:05:55,160 And then the next three digits are going to do a different text sum. 94 00:05:55,180 --> 00:05:58,660 So you actually get 10 to the 4th plus 10 to the 3th. 95 00:05:58,660 --> 00:06:01,080 You only get a key space of 11,000. 96 00:06:01,080 --> 00:06:05,100 So from that millionaire key space, you only get 10,000. 97 00:06:05,100 --> 00:06:06,720 So that's why it's vulnerable. 98 00:06:11,600 --> 00:06:14,780 So I'm going to go over the commands really quickly. 99 00:06:14,780 --> 00:06:21,180 First, you're going to want to put your monitor mode, what's it called? 100 00:06:21,180 --> 00:06:23,160 The Wi-Fi antenna? 101 00:06:24,780 --> 00:06:25,780 Somebody? 102 00:06:26,760 --> 00:06:27,860 The alpha? 103 00:06:27,860 --> 00:06:28,620 Nobody? 104 00:06:28,880 --> 00:06:29,760 What's it called? 105 00:06:29,760 --> 00:06:32,880 What's the term for your antenna? 106 00:06:33,360 --> 00:06:34,260 What's that? 107 00:06:35,440 --> 00:06:37,620 No, no, no, just the device. 108 00:06:37,620 --> 00:06:38,820 How do you call it? 109 00:06:40,800 --> 00:06:41,740 Adapter, yeah. 110 00:06:41,740 --> 00:06:43,360 I was looking for that. 111 00:06:43,360 --> 00:06:46,800 So you put your adapter in monitor mode. 112 00:06:47,360 --> 00:06:54,660 And you can use the wash command to look at all the WPS around you. 113 00:06:55,920 --> 00:06:58,820 And so you're going to brute force it with reaver. 114 00:06:59,020 --> 00:07:00,040 That's how I did it. 115 00:07:00,040 --> 00:07:01,880 That's how I'm going to show you today. 116 00:07:02,180 --> 00:07:06,180 So that simple command is going to brute force attack it. 117 00:07:06,180 --> 00:07:07,540 You don't have to do anything at all. 118 00:07:07,540 --> 00:07:10,440 You just reaver it and it's going to crack. 119 00:07:10,440 --> 00:07:15,440 And the fourth command, you can authenticate to the Wi-Fi using the pin. 120 00:07:20,180 --> 00:07:25,980 So I'm going to show you, I know you can't see that well, but... 121 00:07:25,980 --> 00:07:29,360 Okay, so first you put your monitor mode interface. 122 00:07:30,240 --> 00:07:33,840 Then what you'll do is check its monitor mode. 123 00:07:34,160 --> 00:07:38,460 Then you use wash to check all the WPS around you. 124 00:07:38,460 --> 00:07:41,800 You're going to see all of them showing up. 125 00:07:42,600 --> 00:07:46,320 So you're going to pick your target and we're going to attack it. 126 00:07:46,720 --> 00:07:50,300 Yeah, we chose WPS. 127 00:07:51,560 --> 00:07:55,560 We get the MAC address and the interface. 128 00:07:55,800 --> 00:07:57,800 And we start reaving it. 129 00:07:58,580 --> 00:08:00,700 I don't know if that's a thing, start reaving. 130 00:08:00,800 --> 00:08:02,080 You reaver it. 131 00:08:02,120 --> 00:08:06,940 So what you can see right there, it's going to start using pins. 132 00:08:07,760 --> 00:08:09,360 Like random pins. 133 00:08:09,360 --> 00:08:11,260 And it's going to try to authenticate. 134 00:08:12,000 --> 00:08:13,480 I can't, sorry. 135 00:08:14,140 --> 00:08:15,180 I tried. 136 00:08:16,260 --> 00:08:18,260 So you can see... 137 00:08:19,560 --> 00:08:23,100 You can see right there it's like M1, M2, M3, M4. 138 00:08:23,200 --> 00:08:25,240 So it's going to go through a process. 139 00:08:25,300 --> 00:08:28,000 Like it's going to try pin 11111. 140 00:08:28,000 --> 00:08:31,040 And it's going to go through the packages. 141 00:08:31,160 --> 00:08:33,540 And it's going to be like, ah, this is not the pin. 142 00:08:33,540 --> 00:08:34,600 Okay, next pin. 143 00:08:34,600 --> 00:08:39,260 And reaver is going to go brute force attack it with the 11,000 key space combinations. 144 00:08:39,260 --> 00:08:40,080 So... 145 00:08:41,700 --> 00:08:43,500 So yeah, that's WPS. 146 00:08:43,500 --> 00:08:45,060 Really easy to crack. 147 00:08:45,280 --> 00:08:51,160 First, if you're trying to hack Wi-Fi, that's the first thing you're going to have to try. 148 00:08:51,160 --> 00:08:54,320 Like, you see WPS, okay, let's attack it. 149 00:09:01,110 --> 00:09:04,330 So, WPS has three versions. 150 00:09:04,390 --> 00:09:06,810 Zero, no version, one, and two. 151 00:09:08,810 --> 00:09:09,290 Version... 152 00:09:09,290 --> 00:09:14,890 I was only successful with version zero, with the no version. 153 00:09:14,890 --> 00:09:15,270 Why? 154 00:09:15,270 --> 00:09:20,970 Because the routers were so old, they didn't lock after trying a lot of pins. 155 00:09:20,970 --> 00:09:24,470 So you can attack it and it won't lock. 156 00:09:24,570 --> 00:09:30,750 Versions one and two, they have, after several failed attempts, they'll get locked. 157 00:09:30,750 --> 00:09:38,150 So the solution there is going to be either the owner of the router has to reset it. 158 00:09:38,150 --> 00:09:40,510 I'm sorry. 159 00:09:40,830 --> 00:09:52,110 And it's not going to be that fast, because if you're going to start attacking, I don't know, 10 pins, he's going to restart the router, and 10 pins, you're never going to get the 11,000, you know? 160 00:09:52,110 --> 00:09:54,150 So that's a slow solution. 161 00:09:54,210 --> 00:09:56,550 So there's the Pixie Dust script. 162 00:09:56,650 --> 00:10:04,670 I wasn't successful running it, but I've read a lot about people being successful running that Pixie Dust. 163 00:10:04,670 --> 00:10:10,770 So the way to solve the locks is using Pixie Dust. 164 00:10:12,750 --> 00:10:18,190 Yeah, so you have to be really close to the AP, to the access point, to crack WPS. 165 00:10:18,190 --> 00:10:20,970 If you're too far away, you just won't get it. 166 00:10:22,590 --> 00:10:29,470 And there's a list of 175 devices that are vulnerable by WPS. 167 00:10:30,670 --> 00:10:34,110 So if you got the link from the presentation, you can access that link. 168 00:10:44,350 --> 00:10:49,630 So now that we got WPS out of the way, we're going to start talking about encryption methods. 169 00:10:50,010 --> 00:10:52,070 And so I have a question for you guys. 170 00:10:52,070 --> 00:10:53,410 Why do we need encryption? 171 00:10:53,970 --> 00:11:02,790 All right, so the first reason is that when you send data over the Internet, you have no power over the data. 172 00:11:02,790 --> 00:11:06,290 So once you send it, anybody can take that packet. 173 00:11:06,290 --> 00:11:08,330 Anybody can do anything with that data. 174 00:11:08,330 --> 00:11:14,130 So as users, we do not want to have our data out in the wild. 175 00:11:15,110 --> 00:11:17,070 So encryption methods. 176 00:11:18,670 --> 00:11:21,190 First, in 99, it was WEP. 177 00:11:21,230 --> 00:11:25,170 Then in WPA, WPA2, and WPA3. 178 00:11:25,430 --> 00:11:28,570 So we're going to talk about all of them four. 179 00:11:29,370 --> 00:11:31,790 Maybe not a lot about WPA3. 180 00:11:33,470 --> 00:11:35,910 So WEP, web. 181 00:11:36,130 --> 00:11:38,510 Has anybody used web here? 182 00:11:39,350 --> 00:11:40,170 Yep. 183 00:11:40,370 --> 00:11:42,030 Since how long? 184 00:11:42,030 --> 00:11:43,790 Yeah, a while back. 185 00:11:43,830 --> 00:11:49,250 So you're not going to be using WEP if you are here in DEF CON, you know. 186 00:11:49,250 --> 00:11:55,970 But you can still check, you can still find WEP in the wild. 187 00:11:55,970 --> 00:12:03,750 So if, I don't know why people are not up to date, but they should really stop using WEP. 188 00:12:04,050 --> 00:12:09,230 So WEP has 64 and 128 bit key sizes. 189 00:12:09,570 --> 00:12:13,790 It uses String Cypher RC4 for cyphering. 190 00:12:14,830 --> 00:12:18,510 Which is actually a pretty good method, cypher method. 191 00:12:18,510 --> 00:12:22,150 But the vulnerabilities is not going to be the cyphering. 192 00:12:22,150 --> 00:12:25,350 The key is static and is entered manually. 193 00:12:25,350 --> 00:12:30,210 So if you're using WEP, you're going to have to type in or randomly generate the key. 194 00:12:30,310 --> 00:12:32,450 And it's going to stay the same all around. 195 00:12:33,670 --> 00:12:37,870 So in 2001, it was compromised and it is very easy to crack. 196 00:12:39,450 --> 00:12:43,630 To crack it, you're going to have to have some traffic through the network. 197 00:12:43,630 --> 00:12:45,670 And I'm going to explain to you why. 198 00:12:52,230 --> 00:12:54,370 So why is WEP vulnerable? 199 00:12:54,370 --> 00:12:59,570 The packets are encrypted by the pre-shared key. 200 00:12:59,750 --> 00:13:06,390 So when you enter the password of the WEP, that key is going to be used all throughout the packets. 201 00:13:06,390 --> 00:13:11,810 So every packet I send to the internet is going to be encrypted by the same key. 202 00:13:11,810 --> 00:13:24,030 So if you intercept, let's say, 10,000 packets, you're going to be able to decipher the password. 203 00:13:25,530 --> 00:13:27,490 Mathematicians are so cool to do this. 204 00:13:27,490 --> 00:13:29,990 I don't know how it does it work behind the scenes. 205 00:13:30,090 --> 00:13:32,750 But if it works, don't break it. 206 00:13:33,290 --> 00:13:38,510 So the vulnerable thing here is that IVs are going to be repeated. 207 00:13:38,510 --> 00:13:41,130 The IVs is an initialization vector. 208 00:13:41,130 --> 00:13:44,650 Once you send the packet, the encryption takes an IV. 209 00:13:44,670 --> 00:13:50,050 And since IVs are not infinite, we are going to have like an overflow. 210 00:13:50,050 --> 00:13:52,390 And you're going to have repeated IVs. 211 00:13:52,530 --> 00:13:59,090 So with 24 bits, you're going to have that 16 million amount of IVs. 212 00:13:59,090 --> 00:14:09,670 So once you start sending data through the network, once you reach over that 16,700,000, it's going to go back to 1. 213 00:14:09,670 --> 00:14:14,350 And it's going to re-utilize the same IV used for a packet I sent a while ago. 214 00:14:14,610 --> 00:14:20,570 So I can compare both IVs, and mathematicians are cool, so it works. 215 00:14:22,530 --> 00:14:28,370 You can run all of the IVs in about 5 hours if you're patient. 216 00:14:28,370 --> 00:14:30,570 You can get a web cracked in 5 hours. 217 00:14:30,570 --> 00:14:33,570 Usually it's not that long, usually it takes about half an hour. 218 00:14:35,470 --> 00:14:36,930 And some commands. 219 00:14:36,970 --> 00:14:40,230 So once again, you're going to put your interface in monitor mode. 220 00:14:40,610 --> 00:14:43,570 Then you're going to look for the target with AirDump. 221 00:14:44,910 --> 00:14:47,230 All of you guys know the tools I'm using, right? 222 00:14:47,230 --> 00:14:49,670 Like you've been to the village. 223 00:14:50,650 --> 00:14:58,750 After you search for your target, we are going to start doing a specific scan on that same target. 224 00:14:58,750 --> 00:15:03,190 Using the BSSID, like the MAC address, and the channel, it's on that AP. 225 00:15:04,290 --> 00:15:08,430 And in another terminal, we're going to start de-authenticating him. 226 00:15:08,810 --> 00:15:13,670 Why do we need to de-authenticate the user, or the clients? 227 00:15:13,670 --> 00:15:19,750 Because when the client connects to the network, it's going to go through the IVs. 228 00:15:19,750 --> 00:15:22,870 And it's going to send packets to the network. 229 00:15:23,070 --> 00:15:26,630 And it's going to be like, hey, I'm the user for this AP. 230 00:15:26,630 --> 00:15:29,870 And IVs generated, and then you get the... 231 00:15:29,870 --> 00:15:37,810 Since you are looking for the number 3 step, the AirDump, you're going to start getting all those packets. 232 00:15:38,730 --> 00:15:47,030 So it's very important for you to start to keep those packets saved somewhere. 233 00:15:47,030 --> 00:15:49,150 So then you can crack it with AirCrack. 234 00:15:49,150 --> 00:15:59,730 Usually, if you have about 10,000 packets, which is maybe 10 minutes of listening into the Wi-Fi, you can crack it. 235 00:16:04,390 --> 00:16:04,830 So... 236 00:16:07,070 --> 00:16:09,870 First, we're going to put our interface in... 237 00:16:09,870 --> 00:16:11,490 Okay, I skipped that step. 238 00:16:12,010 --> 00:16:15,230 So I went directly to the AP I wanted to crack. 239 00:16:15,610 --> 00:16:19,410 Right now, we are watching for the AP. 240 00:16:19,410 --> 00:16:21,890 We can see we have a client connected back there. 241 00:16:21,890 --> 00:16:22,830 It's a station. 242 00:16:23,330 --> 00:16:25,490 So if... 243 00:16:25,490 --> 00:16:29,490 I know you can't see that well, but here in the data column... 244 00:16:29,490 --> 00:16:31,730 I can't see either. 245 00:16:31,730 --> 00:16:35,030 In the data column, you're going to start generating packets. 246 00:16:35,030 --> 00:16:37,190 And those are the important packets. 247 00:16:37,670 --> 00:16:41,570 So once you get a lot of packets, you're going to start cracking it. 248 00:16:41,690 --> 00:16:48,750 You can see that this station right here is generating a lot of packets, because it's maybe downloading something from the web. 249 00:16:48,990 --> 00:16:51,430 Or streaming, I don't know. 250 00:16:54,750 --> 00:16:55,230 Oh. 251 00:16:56,750 --> 00:16:58,050 Oh, I'm sorry. 252 00:17:03,170 --> 00:17:05,870 Oh, I can't... 253 00:17:11,280 --> 00:17:15,120 I can't go forward, but... 254 00:17:15,120 --> 00:17:22,260 I want you guys to see how it got the password, like, after you air-crack it. 255 00:17:27,090 --> 00:17:30,170 Yeah, we're going to stay here for a minute, okay? 256 00:17:33,510 --> 00:17:37,630 So there you can see I got a lot of packets in the data column. 257 00:17:51,540 --> 00:17:56,480 So when I decide to say it's enough packets, I'll air-crack it. 258 00:17:56,480 --> 00:17:58,440 I'll just go ahead and do it. 259 00:17:58,700 --> 00:18:03,280 You can start running on a second terminal, the air-crack command. 260 00:18:03,360 --> 00:18:07,900 And it's going to go... so the first air-crack is going to ask for 5,000 IVs. 261 00:18:08,160 --> 00:18:10,940 If it doesn't get it, it's going to wait until you get 10,000. 262 00:18:10,940 --> 00:18:15,260 So you can have this in a parallel terminal, having the air-crack command. 263 00:18:15,360 --> 00:18:18,880 And when it detects it's 5,000, it's going to go air-crack it. 264 00:18:18,880 --> 00:18:21,240 And when it's 10,000, it's going to try again. 265 00:18:21,960 --> 00:18:25,840 So there you just saw it was really, really, really fast. 266 00:18:25,840 --> 00:18:29,300 Like, I ran the command, and it just instantly cracked it. 267 00:18:29,960 --> 00:18:35,920 I think I had about 20,000 packets in my CAP files, so that's a pretty good number. 268 00:18:35,920 --> 00:18:38,940 About 10,000 is a good number for start-cracking it. 269 00:18:41,860 --> 00:18:45,380 So, what's the conclusion about WEP? 270 00:18:45,380 --> 00:18:46,940 Do not use WEP. 271 00:18:46,940 --> 00:18:48,620 It's really easy to crack. 272 00:18:48,900 --> 00:18:58,520 The encryption... so all your traffic is going to be unencrypted if you get the password. 273 00:18:59,680 --> 00:19:02,900 So we're going to go into WPA. 274 00:19:03,360 --> 00:19:06,960 WPA has two types of ciphering. 275 00:19:06,960 --> 00:19:11,540 It's got TKIP and PSK, also known as AES. 276 00:19:12,900 --> 00:19:17,460 It's got 128 and 256-bit keyphrases. 277 00:19:17,900 --> 00:19:24,060 And the difference between TKIP, it's going to go packet to packet. 278 00:19:24,580 --> 00:19:30,080 It's going to create dynamically... what's it called? 279 00:19:30,340 --> 00:19:31,520 It's a pre-shared key. 280 00:19:31,520 --> 00:19:32,960 It's a PSK. 281 00:19:32,960 --> 00:19:36,560 It's going to create it dynamically for every packet you're going to encrypt. 282 00:19:37,360 --> 00:19:43,200 And AES is a stronger ciphering method. 283 00:19:43,820 --> 00:19:50,640 If you want to crack AES, it's going to take you millions of years, so it's a really strong ciphering method. 284 00:19:50,920 --> 00:19:54,820 And it was adopted by the US government in about 2006. 285 00:19:56,640 --> 00:20:01,500 So WPA and WPA2 are really similar between each other. 286 00:20:01,500 --> 00:20:09,520 The only thing that changes is that it's going to always use AES. 287 00:20:09,520 --> 00:20:12,580 It's not going to let it use the TKIP. 288 00:20:12,880 --> 00:20:22,420 So the problem with WPA is that the TKIP is really similar to the RC4 stream ciphering that we saw in WEP. 289 00:20:22,420 --> 00:20:25,360 And that is not going to be good since WEP is cracked. 290 00:20:25,360 --> 00:20:29,040 So WPA TKIP is going to be really similar to WEP. 291 00:20:29,040 --> 00:20:32,660 So it's as vulnerable as WEP. 292 00:20:33,800 --> 00:20:38,220 So AES is the best ciphering method. 293 00:20:38,220 --> 00:20:40,420 It's the most safe. 294 00:20:41,620 --> 00:20:46,600 Well, how can you create the PSK, the pre-shared key? 295 00:20:46,600 --> 00:20:52,760 You take a passphrase, and it's going to go through a function. 296 00:20:53,400 --> 00:20:55,660 I don't remember the name of the function. 297 00:20:58,250 --> 00:21:02,190 The function is called PasswordBaseKeyDerivationFunction. 298 00:21:02,290 --> 00:21:06,090 It creates a key. 299 00:21:07,570 --> 00:21:10,210 That's what it does, that function. 300 00:21:11,170 --> 00:21:16,830 So once you get the passphrase through that function, you are going to get the PSK. 301 00:21:16,930 --> 00:21:20,450 Once you get the PSK, you're going to generate the PMK. 302 00:21:20,450 --> 00:21:28,550 Which is going to be the... I can't remember what it stands for. 303 00:21:31,670 --> 00:21:33,750 I can't remember the PMK. 304 00:21:34,230 --> 00:21:35,910 PairwiseMasterKey, there it is. 305 00:21:35,910 --> 00:21:40,110 So once you get the PairwiseMasterKey, you're going to combine it with a value. 306 00:21:40,110 --> 00:21:41,510 Actually, two values. 307 00:21:41,510 --> 00:21:49,050 The MAC address of the AP and the MAC address of the client. 308 00:21:49,050 --> 00:21:56,690 So you're going to combine the pre-shared key, the PairwiseMasterKey, with all these four values. 309 00:21:56,690 --> 00:21:59,870 And you're going to get the master key. 310 00:22:04,440 --> 00:22:07,160 Okay, that looks very bad. 311 00:22:07,580 --> 00:22:12,660 Okay, so you can see how the client and the router is going to be communicating. 312 00:22:12,660 --> 00:22:19,540 First, the router is going to send an anon, which is the first value of... 313 00:22:20,120 --> 00:22:27,960 It's going to be the first value that the client is going to use to create the PMK. 314 00:22:28,440 --> 00:22:34,760 So once the AP sends that, the client is going to send back the PMK. 315 00:22:34,940 --> 00:22:41,920 Once it's sent, the router is going to say, Ah, okay, so you're okay until this point. 316 00:22:41,980 --> 00:22:44,040 And it's going to send back another packet. 317 00:22:51,620 --> 00:22:54,340 Yeah, so you can see it's a four-way handshake. 318 00:22:54,340 --> 00:22:56,820 Does everybody know what the four-way handshake is, right? 319 00:22:57,340 --> 00:22:58,060 Yep. 320 00:22:58,560 --> 00:23:00,380 We're going to go over it a little bit. 321 00:23:01,280 --> 00:23:05,320 So what's the vulnerabilities here in WPA? 322 00:23:05,320 --> 00:23:07,240 The thing is that... 323 00:23:07,240 --> 00:23:14,100 Okay, so the pairwise master key is composed of four different sections. 324 00:23:14,400 --> 00:23:23,540 And the algorithm only checks the KCK, part of the PTK. 325 00:23:23,880 --> 00:23:25,040 Why does that? 326 00:23:25,040 --> 00:23:31,480 Because the chances of getting a KCK correct... 327 00:23:31,480 --> 00:23:38,640 is the probability of getting a correct KCK with PTK correct is nearly zero. 328 00:23:38,640 --> 00:23:43,280 It's 1 over 3 to the 10 to the 38. 329 00:23:43,280 --> 00:23:44,280 Yeah , it's zero. 330 00:23:44,600 --> 00:23:49,240 So the algorithm is only going to check the KCK part. 331 00:23:50,600 --> 00:23:53,700 So why do we need to know that? 332 00:23:53,820 --> 00:23:58,520 So the way to crack it is analyzing the four-way handshake. 333 00:23:58,520 --> 00:24:04,000 Once you understand the four-way handshake, you know what to look for. 334 00:24:04,080 --> 00:24:07,100 So in the first step... 335 00:24:07,100 --> 00:24:10,840 I already explained this, so I'm going to go fast. 336 00:24:18,740 --> 00:24:36,960 Yeah, so finally in the fourth step of the four-way handshake, the AP is going to tell the client, hey, your numbers match, my numbers match, you're a good host, come inside my network. 337 00:24:40,240 --> 00:24:46,120 So for a little bit of commands, first you're going to put your monitor mode interface. 338 00:24:46,120 --> 00:24:54,400 As always, you're going to look for the target with AirDump and specify the target with AirDump and specify the channel on the BSSID. 339 00:24:55,100 --> 00:24:59,480 In another terminal, you're going to want to de-authenticate the clients. 340 00:25:00,380 --> 00:25:05,240 So in this step, you need to have clients inside the network. 341 00:25:05,320 --> 00:25:05,760 Why? 342 00:25:05,760 --> 00:25:10,580 Because if you have no clients, then you can't listen to the four-way handshake. 343 00:25:10,580 --> 00:25:13,560 We're trying to capture the four-way handshake. 344 00:25:13,560 --> 00:25:22,220 So once we start de-authenticating them, the client is going to want to authenticate back to the network. 345 00:25:22,220 --> 00:25:25,800 So that's when we get the WPA handshake. 346 00:25:28,750 --> 00:25:35,850 And once we get the handshake, we can run AirCrack as well with a word list. 347 00:25:35,870 --> 00:25:37,290 So dictionary attack. 348 00:25:37,670 --> 00:25:39,210 Why is this useful? 349 00:25:39,210 --> 00:25:44,270 Because there are a lot of dictionaries out there in the web. 350 00:25:44,270 --> 00:25:53,210 And today, nowadays, we have the cloud, so we can run a whole lot of passwords to crack the Wi-Fi password. 351 00:25:57,160 --> 00:26:01,980 So here you can see the WPA handshake sign right there. 352 00:26:02,020 --> 00:26:05,700 We can see that there are two clients connected to the network. 353 00:26:05,740 --> 00:26:10,000 And once I start de-authenticating them, I'm going to get that message up there. 354 00:26:10,000 --> 00:26:11,440 And that's all you need. 355 00:26:11,440 --> 00:26:13,580 That's the goldmine. 356 00:26:16,000 --> 00:26:21,980 So if you do not get the handshake, you're going to want to de-authenticate once again. 357 00:26:21,980 --> 00:26:24,720 And repeat until you do get the message. 358 00:26:30,780 --> 00:26:34,760 So now we're going to see how to crack WPA and WPA2. 359 00:26:34,760 --> 00:26:39,440 The way to crack WPA and WPA2 is actually the same method. 360 00:26:39,440 --> 00:26:42,540 So I'm not going to do a difference between there. 361 00:26:42,640 --> 00:26:45,600 So we do the monitor mode interface. 362 00:26:45,600 --> 00:26:48,920 We're going to start looking for our target now. 363 00:26:50,740 --> 00:26:56,500 So once we get our target, we're going to specify it in AirDump with the channel and the BSSID. 364 00:27:01,620 --> 00:27:02,980 Getting the MAC. 365 00:27:02,980 --> 00:27:03,960 It's important. 366 00:27:10,180 --> 00:27:13,840 So we can see right here that we got a client connected. 367 00:27:13,920 --> 00:27:17,180 If we did not have that client, we just could not crack it. 368 00:27:17,800 --> 00:27:20,880 So in another terminal, I'm going to start de-authenticating. 369 00:27:21,580 --> 00:27:29,360 We can see that the power column is going to go jumping between 0 and a negative number. 370 00:27:29,440 --> 00:27:32,620 That means that it's being interrupted. 371 00:27:32,760 --> 00:27:36,080 So the client is going to be kicked off of the network. 372 00:27:36,160 --> 00:27:40,660 And the client is going to try to get back into the network automatically. 373 00:27:40,900 --> 00:27:43,920 So that's when we get the WPA handshake. 374 00:27:47,120 --> 00:27:55,780 So what we did in China a month ago, two months ago, is that we created a password on Crunch. 375 00:27:55,780 --> 00:28:01,020 Just created a whole dictionary with passwords, number-based. 376 00:28:01,540 --> 00:28:07,280 So for the people attending the workshop, they could actually get to crack it. 377 00:28:07,380 --> 00:28:13,180 We made it so that they could crack it in about 5-10 minutes. 378 00:28:13,180 --> 00:28:18,260 So you can crack it with Aircrack and Dictionary. 379 00:28:19,860 --> 00:28:23,300 So now I'm going to start talking about cloud. 380 00:28:24,220 --> 00:28:27,000 There's this site called GPUHashMe. 381 00:28:27,520 --> 00:28:36,440 And you can send the CAP files on that site so that it can start cracking it on their site, on the cloud. 382 00:28:36,720 --> 00:28:40,460 So what it does is you have a basic search. 383 00:28:41,440 --> 00:28:44,660 GPUHashMe is going to start doing... 384 00:28:44,660 --> 00:28:48,060 Well, the basic search only takes 8 digits. 385 00:28:48,480 --> 00:28:55,360 And it's going to use a reduced word list spectrum. 386 00:28:56,460 --> 00:29:01,320 So once you send the CAP file, it's no charge. 387 00:29:01,360 --> 00:29:04,560 And you get a message like, hey, we found your password. 388 00:29:04,560 --> 00:29:06,340 Do you want to pay $5 for it? 389 00:29:06,580 --> 00:29:09,120 And usually I say no. 390 00:29:09,120 --> 00:29:13,300 Because if it cracked it, then I can crack it with my own dictionaries. 391 00:29:13,300 --> 00:29:18,760 So that's what we did in the workshops when we were trying to hack some Wi-Fis. 392 00:29:18,760 --> 00:29:21,360 We actually sent it to GPUHashMe. 393 00:29:21,400 --> 00:29:28,080 And once it said it got it, we just started cracking on my computer. 394 00:29:29,120 --> 00:29:37,400 You also have an advanced WPA search, which takes a lot better and more word lists. 395 00:29:37,400 --> 00:29:40,960 You have to pay in advance about $27. 396 00:29:41,120 --> 00:29:46,560 So if you do not get the password or the password is not crackable, you do not get a refund. 397 00:29:47,460 --> 00:29:51,220 Once it finds the password, it's free. 398 00:29:51,220 --> 00:29:53,380 You already paid $27 for it. 399 00:29:58,580 --> 00:30:00,580 And there's the pro search. 400 00:30:00,580 --> 00:30:03,360 It just uses a whole lot of spectrum. 401 00:30:03,360 --> 00:30:05,400 It's going to be about $54. 402 00:30:05,940 --> 00:30:09,720 So some of the cons about cracking in the cloud. 403 00:30:09,720 --> 00:30:16,300 I think the cons are basically when you try to hack Wi-Fi is that it's really slow. 404 00:30:16,460 --> 00:30:25,900 When I got into Wi-Fi hacking, I had high expectations. 405 00:30:25,900 --> 00:30:32,480 Because I thought I was going to start cracking Wi-Fis and I'm going to be that cool kid that gets the whole neighborhood's passwords. 406 00:30:32,480 --> 00:30:34,200 And it wasn't like that. 407 00:30:34,200 --> 00:30:38,440 It took a lot of time and practice to actually know what you're doing. 408 00:30:39,880 --> 00:30:42,560 So you can automize it. 409 00:30:43,000 --> 00:30:46,600 Like I talked to you about crawlers and scrappers, I like automation. 410 00:30:46,800 --> 00:30:50,480 So I had some scripts in the presentation from DEF CON. 411 00:30:50,480 --> 00:30:52,500 There's some scripts for you guys to run. 412 00:30:52,500 --> 00:30:56,640 That it takes the whole spectrum of Wi-Fis and it's going to start attacking all of them. 413 00:31:00,240 --> 00:31:03,220 So we got a GPU hash me in the cloud. 414 00:31:04,180 --> 00:31:06,760 And we tried to do it ourselves. 415 00:31:06,760 --> 00:31:09,680 So we got an Amazon Web Service server. 416 00:31:09,680 --> 00:31:15,480 And we had 16 NVIDIA K80 GPUs. 417 00:31:16,240 --> 00:31:20,040 It was about less than a dollar for a GPU an hour. 418 00:31:20,040 --> 00:31:25,660 So if you can actually crack the password in under an hour, it's going to be less than a dollar. 419 00:31:28,680 --> 00:31:36,100 So the cons for doing this dictionary-based attack is that you actually need dictionaries. 420 00:31:36,780 --> 00:31:42,380 That's kind of like a semi-con because there are a lot of dictionaries out there. 421 00:31:42,820 --> 00:31:44,880 And really good dictionaries. 422 00:31:45,900 --> 00:31:53,220 Another con, it was the configuration of the environment in Amazon Web Service was actually quite complicated. 423 00:31:53,220 --> 00:31:55,560 It was not like, just go do it. 424 00:31:55,560 --> 00:31:58,020 So we spent a lot of time doing that. 425 00:31:59,460 --> 00:32:01,100 So as well as... 426 00:32:03,500 --> 00:32:06,820 So I told you it was a slow process. 427 00:32:07,100 --> 00:32:11,040 And in Amazon Web Service, we did not get really good performance. 428 00:32:11,040 --> 00:32:16,880 Like , we had 16 GPUs and it only cracked 60,000 passwords a second. 429 00:32:16,880 --> 00:32:20,380 Which sounds like a lot, but you're using 16 GPUs. 430 00:32:20,380 --> 00:32:26,680 If you are trying to do a dictionary with 5 billion passwords, it's going to take a lot of time. 431 00:32:26,680 --> 00:32:46,880 So actually, like I told you before, once we sent the cap file to the GPU, and we got the check like, hey, we found your password, we actually started using my Surface Book 2, and it was really, really, really fast. 432 00:32:46,880 --> 00:32:50,920 It got really hot, so you can see why it's ventilating. 433 00:32:51,520 --> 00:32:54,220 So I told you about the Amazon Web Service. 434 00:32:54,220 --> 00:32:58,160 It cracked 60,000 passwords a second. 435 00:32:58,180 --> 00:33:01,260 The Surface Book 2 cracked 100,000. 436 00:33:01,300 --> 00:33:09,240 And with one GPU, I think we were doing something wrong in AWS, but we couldn't figure it out. 437 00:33:11,180 --> 00:33:15,180 And so now I'm going to start talking about client attacks. 438 00:33:15,340 --> 00:33:20,840 So what I just talked to you about, it was infrastructure and encryption methods. 439 00:33:20,840 --> 00:33:23,180 Now we're going to start attacking the client. 440 00:33:25,980 --> 00:33:29,180 So the first attack is called the Café Latte attack. 441 00:33:29,600 --> 00:33:32,600 I don't know why it's called like that, but it's a web attack. 442 00:33:33,000 --> 00:33:37,840 So you actually do not need the AP to be nearby. 443 00:33:37,960 --> 00:33:39,780 You only need the client. 444 00:33:42,420 --> 00:33:48,720 So what you do in this attack is that you are going to simulate that the AP is near the client. 445 00:33:48,720 --> 00:33:51,200 So the client is going to start connecting to you. 446 00:33:51,380 --> 00:33:56,240 Once the client starts connecting to you, you are going to get the same passphrase from the client. 447 00:33:56,240 --> 00:34:01,740 So you can actually crack the WEP passphrase that way. 448 00:34:03,140 --> 00:34:18,240 The Café Latte attack is actually really simple to employ, to do to somebody if they are using a WEP AP, which, please, do not use them. 449 00:34:19,140 --> 00:34:21,420 Yeah, so it's really easy to execute. 450 00:34:23,140 --> 00:34:28,080 Yeah, it's very important for you guys to have them in not associated mode. 451 00:34:28,220 --> 00:34:32,880 You can see down there in the stations, they're not associated, so they are good clients. 452 00:34:32,880 --> 00:34:37,540 If they are associated, we're going to have to kick them off the network and start doing the attack. 453 00:34:40,560 --> 00:34:45,860 So for the Café Latte, I told you, you are supposed to create your own AP. 454 00:34:45,860 --> 00:34:53,080 You do that with Airbase, and with command-n-w, that's going to start the Café Latte. 455 00:34:53,080 --> 00:34:59,780 You actually run that command, and once the client starts connecting to you, the Café Latte attack is going to execute by its own. 456 00:34:59,940 --> 00:35:01,740 You don't have to do anything at all. 457 00:35:02,860 --> 00:35:08,700 And you're going to have to collect the packets as well as we did in the WEP cracking. 458 00:35:12,360 --> 00:35:17,080 And there's another variation of the Café Latte, it's called a Hirte. 459 00:35:17,080 --> 00:35:20,980 What it does is it fragmentates all the packets. 460 00:35:21,020 --> 00:35:30,480 So when you have a big packet sent through the network, what this does is it's going to partition the big packet into really small packets, so you can get more traffic. 461 00:35:30,480 --> 00:35:31,800 Why do we need more traffic? 462 00:35:31,800 --> 00:35:34,020 Because we need the IVs to overflow. 463 00:35:37,100 --> 00:35:40,080 So that's with the WEP client attacks. 464 00:35:40,460 --> 00:35:43,480 So now, the Evil Twin. 465 00:35:43,480 --> 00:35:47,500 I think this is my favorite attack, the evil man in the middle. 466 00:35:47,500 --> 00:35:49,580 Why is it my favorite attack? 467 00:35:49,580 --> 00:35:57,480 Because, well, if you're the man in the middle, you are getting all the traffic from the person you want, or the company. 468 00:35:58,120 --> 00:36:00,320 So I think that's really powerful. 469 00:36:00,320 --> 00:36:07,200 Once you crack the password, you can decrypt the messages, unless it's HTTPS encrypted. 470 00:36:07,720 --> 00:36:11,380 But , so, how does it work? 471 00:36:11,380 --> 00:36:15,000 We see that we got an ISP. 472 00:36:15,640 --> 00:36:19,180 And the Dracarys, Dracarys is actually a real name for AP. 473 00:36:19,180 --> 00:36:23,020 We saw the, walking around the streets, we saw Dracarys down there. 474 00:36:23,020 --> 00:36:25,320 So we said, huh, we need to hack them. 475 00:36:25,780 --> 00:36:32,220 So, basically, the man in the middle is that all those machines are connected to Dracarys. 476 00:36:32,320 --> 00:36:38,340 And our evil man down there is going to create an identic AP. 477 00:36:39,120 --> 00:36:44,420 And with the same name, same ESSID, and same BSSID. 478 00:36:45,440 --> 00:36:50,240 And what he's going to do, he's going to kick them out of the network. 479 00:36:50,360 --> 00:36:53,900 He's going to denial of service the real AP. 480 00:36:53,900 --> 00:37:02,600 And all those clients that are trying to reconnect to the AP are going to connect to the fake one. 481 00:37:03,300 --> 00:37:07,680 So, it's actually quite easy to execute as well. 482 00:37:07,680 --> 00:37:13,860 You just put the fake AP, kick the clients off, and the clients are going to come to you. 483 00:37:17,290 --> 00:37:21,970 So, there's this thing about competing with the legitimate route AP. 484 00:37:22,170 --> 00:37:30,970 You have to have the same signal, or strength, or power, as the original AP. 485 00:37:30,970 --> 00:37:36,950 If you have less strength, power, the clients are not going to connect to you. 486 00:37:38,390 --> 00:37:45,070 So, the steps for doing the man in the middle is you bring up a fake AP. 487 00:37:46,110 --> 00:37:49,370 I'm sorry, you have an AP, you connect clients to it. 488 00:37:49,370 --> 00:37:54,850 If you're doing this at home, and not in the wild, you bring up the AP, the original. 489 00:37:54,850 --> 00:37:59,390 You connect some clients to it, and then bring up the fake AP. 490 00:38:00,110 --> 00:38:04,410 Then you deauth them, and the clients are going to connect to the fake AP. 491 00:38:04,410 --> 00:38:08,330 And that's what I told you right now. 492 00:38:12,990 --> 00:38:14,570 Some commands. 493 00:38:14,570 --> 00:38:18,430 We already saw how to create a fake AP with Airbase. 494 00:38:21,690 --> 00:38:25,230 This interface creates the AT0 interface. 495 00:38:25,370 --> 00:38:30,210 And you're going to have to do a little bit of configurations between port forwarding. 496 00:38:30,290 --> 00:38:33,490 So, you can actually give them internet access. 497 00:38:33,490 --> 00:38:41,990 If you do not do this configuration, then the client that connects to the fake AP, he's not going to be able to surface the net. 498 00:38:44,290 --> 00:38:47,110 So, that's how you create the bridge. 499 00:38:47,110 --> 00:38:52,090 You bridge your ETH0 with the fake AP created AT0. 500 00:38:53,210 --> 00:39:00,410 You give them an IP, and I think I deleted some configurations. 501 00:39:00,410 --> 00:39:05,250 If you want to know specific configurations, check out the Defcon China link. 502 00:39:06,710 --> 00:39:12,450 So, once you ping that IP, so you know that you're having internet through the machine. 503 00:39:14,630 --> 00:39:16,450 And more configurations. 504 00:39:20,310 --> 00:39:25,590 So, what we want to do is... 505 00:39:25,590 --> 00:39:29,870 So, we got our fake AP, and we got the client connected to us. 506 00:39:29,870 --> 00:39:32,070 Now, we want to start sniffing the packets. 507 00:39:32,070 --> 00:39:34,210 And we're going to do that with Wireshark. 508 00:39:34,210 --> 00:39:40,350 We're going to put the Wireshark on the AT0, which is the fake AP interface. 509 00:39:41,210 --> 00:39:45,970 And once you do that, you can start sniffing all the packets. 510 00:39:47,650 --> 00:39:54,390 In the terminal for the error base, it's going to say, okay, the fake AP is up. 511 00:39:54,390 --> 00:40:00,350 And it's going to start sending messages for when people try to connect to your network, to your AP. 512 00:40:05,780 --> 00:40:06,700 Okay, so... 513 00:40:07,860 --> 00:40:12,880 Error base is actually pretty cool, because you can tell it to... 514 00:40:13,460 --> 00:40:17,360 You can tell it which kind of network I want to simulate. 515 00:40:17,560 --> 00:40:23,600 For example, if I want an open network, I just do the error base, no parameters. 516 00:40:23,600 --> 00:40:29,860 If I want a WEP fake AP, I just put the dash W. 517 00:40:30,200 --> 00:40:43,880 And with WPA, WPA, with the different types of WPAs, we're going to start adding parameters to get the fake AP to behave like it's what you're trying to do. 518 00:40:46,220 --> 00:40:52,240 So, we already talked about denial of service, like through it out. 519 00:40:52,240 --> 00:41:01,400 When we were kicking off the clients of the networks for it to connect to us, we were actually denialing their service. 520 00:41:01,700 --> 00:41:08,240 And the way I only know how to do DOS, it's with... 521 00:41:09,440 --> 00:41:11,160 It's doing AirPlay. 522 00:41:11,160 --> 00:41:15,880 So, the AirPlay is actually a pretty cool command as well. 523 00:41:15,880 --> 00:41:21,760 You can tell it to do an infinite loop of deauthing with the dash 0. 524 00:41:22,160 --> 00:41:27,720 You can do dash 0 and the next number, you see it's dash 00. 525 00:41:27,940 --> 00:41:31,860 If I go dash 010, it's going to send 10 deauth packets. 526 00:41:31,860 --> 00:41:34,960 If I go dash 00, it's going to go forever. 527 00:41:34,960 --> 00:41:42,800 So, if you have your machine turned on and dash 00, she's not going to be able to connect to the network. 528 00:41:48,090 --> 00:41:49,970 Alright, that was denial of service. 529 00:41:49,970 --> 00:41:51,390 I told you it was one slide. 530 00:41:51,550 --> 00:41:54,810 So, DNS hijacking. 531 00:41:54,850 --> 00:42:02,890 We actually did not go in depth about this, but we got some pretty cool DNS results. 532 00:42:03,970 --> 00:42:07,510 I'm not supposed to say, but we got all my neighbors. 533 00:42:07,930 --> 00:42:10,890 And we started getting to the router and we put... 534 00:42:11,730 --> 00:42:13,890 Yeah, you can't see it very well. 535 00:42:13,890 --> 00:42:19,450 You go to the router homepage and to the configurations, you can go to the DNS. 536 00:42:19,450 --> 00:42:24,150 And you can write down the IP you want it to... of another DNS server. 537 00:42:27,820 --> 00:42:33,800 So, DNS hijacking is very useful for doing spear phishing. 538 00:42:33,800 --> 00:42:47,160 Like, if you are able to hack into someone's Wi-Fi, get into the router and change the DNS, you can actually get everything from the people connecting there. 539 00:42:47,160 --> 00:42:47,640 Why? 540 00:42:47,640 --> 00:42:57,460 Because you're going to start looking like, ah, he goes to the bank of Chile, he goes to the bank of Santiago, he goes to these pages, he goes there. 541 00:42:57,460 --> 00:43:08,220 So, when you know where your client is doing the... which pages he's visiting, you can actually create a phishing. 542 00:43:08,220 --> 00:43:10,520 Like, ah, he goes to Banco de Chile. 543 00:43:10,520 --> 00:43:26,210 Okay, I'm going to create a fake Banco de Chile site and redirect the original... you're going to redirect them to your fake website. 544 00:43:26,330 --> 00:43:29,670 So, you can get credentials from whatever website you want. 545 00:43:35,910 --> 00:43:46,190 There's... I think I didn't include the script, but you can actually automize it by trying to crack the default passwords. 546 00:43:46,190 --> 00:43:52,670 There are some dictionaries that have the default passwords for the different brands of APs. 547 00:43:53,170 --> 00:44:00,950 For example, for Linksys, there's, like, username, password defaults, and you can go through it really quick. 548 00:44:00,950 --> 00:44:09,910 So, if your target is not really Wi-Fi geek, and he didn't change the passwords, you're practically in. 549 00:44:16,480 --> 00:44:20,160 And there's the link for how to DNS poison. 550 00:44:20,460 --> 00:44:25,280 Like, it's a Spanish link, so if you want to translate it, that would be cool. 551 00:44:29,350 --> 00:44:31,790 Okay, so, restaurants, coffee shops. 552 00:44:31,790 --> 00:44:47,050 The typical display of a coffee shop or a restaurant is that you practically have Wi-Fi, and maybe you have some machines connected to it, and then you have some printers. 553 00:44:47,090 --> 00:44:50,910 You are going to have some customers eating there that are going to ask for the Wi-Fi. 554 00:44:55,080 --> 00:45:00,360 So, what this guy can do, he can do a man-in-the-middle-in-the-hall restaurant. 555 00:45:00,360 --> 00:45:06,900 For example, if he asks for the password, he is already in the network. 556 00:45:06,900 --> 00:45:11,220 He doesn't have to do much work to get anything from the people. 557 00:45:11,220 --> 00:45:17,320 You can actually get into the printers quite easily, and start printing the crap out of them, if you want to. 558 00:45:18,120 --> 00:45:27,420 So, that's when I came to DEF CON, I was really worried about being hacked here, and being worried about the Wi-Fis. 559 00:45:27,420 --> 00:45:30,280 And I see that problem a lot in restaurants. 560 00:45:30,840 --> 00:45:35,760 I am really looking out for anything suspicious. 561 00:45:35,780 --> 00:45:41,320 Like, if I'm in Starbucks, for example, I look for suspicious people trying to do something. 562 00:45:41,320 --> 00:45:43,480 Like, my nature, I don't know. 563 00:45:47,120 --> 00:45:48,320 Okay, 564 00:45:58,040 --> 00:46:02,740 so that was all about Wi-Fi. 565 00:46:02,740 --> 00:46:07,540 I just wanted to show you something we got into on our way. 566 00:46:07,540 --> 00:46:10,860 It's a fake AP's flood. 567 00:46:11,220 --> 00:46:23,920 So, what this command you're looking at right now, what it does is it's going to create a whole bunch of fake AP's with really random names. 568 00:46:24,600 --> 00:46:25,780 Like those. 569 00:46:45,540 --> 00:46:52,720 So, if you guys can watch on your cell phones right now, I'm going to start doing the attack, or the flood. 570 00:46:58,060 --> 00:46:59,960 Why is it not working? 571 00:47:04,260 --> 00:47:14,100 Alright, so if you watch right now, you can see that you're looking at really weird named Wi-Fis. 572 00:47:14,520 --> 00:47:16,900 If you can see them, raise your hand. 573 00:47:17,140 --> 00:47:26,520 So, what happened in my machine right here, there's a lot of Wi-Fi going around, and my machine freezes. 574 00:47:26,620 --> 00:47:29,780 So, there's the same proof of concept. 575 00:47:29,780 --> 00:47:37,840 Like, how can you do a crash device by sending so many Wi-Fis? 576 00:47:38,040 --> 00:47:45,600 We did not go in depth, but I think it's interesting to look for. 577 00:47:45,600 --> 00:47:52,180 Like, if you want to mess with somebody, do a crazy AP flood and his cell phone freezes. 578 00:47:58,400 --> 00:48:02,240 So, some of the devices we used. 579 00:48:02,360 --> 00:48:05,540 You can see here the Pineapple, the Wi-Fi Pineapple. 580 00:48:05,720 --> 00:48:07,880 You all know Hack 5, right? 581 00:48:07,960 --> 00:48:13,020 So, the Pineapple, what it does is, it automizes all the attacks I just talked about. 582 00:48:13,180 --> 00:48:18,300 And it does it fantastic, and it's really easy to use. 583 00:48:18,300 --> 00:48:24,060 Like, if you want to get a man in the middle, you just tell it to do it, and it does it. 584 00:48:24,940 --> 00:48:32,500 So, this adapter, it says it has 3km range, which I do not believe that. 585 00:48:33,000 --> 00:48:35,540 It's actually pretty good for the cost. 586 00:48:35,540 --> 00:48:39,540 It's $34 in Amazon, and it's actually a pretty good adapter. 587 00:48:39,680 --> 00:48:43,300 The next one right here is $220 in Amazon. 588 00:48:43,300 --> 00:48:46,900 It says it has 5km range. 589 00:48:47,120 --> 00:48:52,640 I wouldn't trust that, but my friend has it, and it's not that good. 590 00:48:56,190 --> 00:48:58,310 And that one, we got a crazy... 591 00:48:59,210 --> 00:49:06,710 I think that one can go up about 5km on open, like no buildings in the middle. 592 00:49:06,830 --> 00:49:08,790 So, that's a crazy adapter right there. 593 00:49:10,930 --> 00:49:18,310 So, to finalize this talk, I just want to say, Wi-Fi is really weak. 594 00:49:18,330 --> 00:49:28,870 Like, they have these strong methods for encryption and ciphering, but there are a lot of ways to get around if you want to attack a target. 595 00:49:28,870 --> 00:49:30,550 There are a lot of ways you can do it. 596 00:49:30,550 --> 00:49:35,570 Even though Wi-Fi says it's safe, it is not. 597 00:49:35,810 --> 00:49:37,690 And people do not know that. 598 00:49:38,350 --> 00:49:41,530 So, even WPA3 is vulnerable. 599 00:49:41,530 --> 00:49:45,350 So, I don't know how can we make it safer. 600 00:49:45,610 --> 00:49:47,590 I always ask myself that question. 601 00:49:47,590 --> 00:49:49,810 I just don't know how to solve it. 602 00:49:49,810 --> 00:49:55,270 And I think people smarter than me are trying to solve it and they're not getting that either. 603 00:49:56,250 --> 00:49:58,730 So, Wi-Fi is everywhere. 604 00:49:58,730 --> 00:50:01,870 Everywhere you go, you're going to find Wi-Fi. 605 00:50:02,230 --> 00:50:07,270 And I think that's a pretty cool research subject, like Wi-Fi in general. 606 00:50:07,270 --> 00:50:11,790 Because everywhere you go, you're going to find it and everyone uses it. 607 00:50:12,570 --> 00:50:14,510 So, WEP. 608 00:50:14,930 --> 00:50:20,650 After getting to know WEP, I was like, why would people use WEP? 609 00:50:20,810 --> 00:50:29,890 And so, we were in my boss's office with the adapter and we saw a WEP pop up and it went away. 610 00:50:29,970 --> 00:50:38,450 So, we started looking for that WEP because we really wanted to do the hands-on, not just in the office. 611 00:50:38,450 --> 00:50:41,290 So, we went outside to look for it. 612 00:50:41,290 --> 00:50:43,650 So, I think it was a gas station. 613 00:50:43,890 --> 00:50:49,850 And we were, one computer on one hand and the adapter on the other one, walking like that in the streets. 614 00:50:49,850 --> 00:50:50,730 Like, where are you? 615 00:50:50,730 --> 00:50:51,690 Where are you? 616 00:50:51,690 --> 00:50:56,270 And we actually got to, we found the WEP, it was a gas station. 617 00:50:57,650 --> 00:51:02,150 So, we went there in bad hours because they weren't working. 618 00:51:02,150 --> 00:51:04,130 It was like 7 p.m. 619 00:51:04,290 --> 00:51:07,710 It was after hours, so no traffic was available. 620 00:51:07,710 --> 00:51:12,730 So, we went there the next day and we actually got to crack that WEP. 621 00:51:13,350 --> 00:51:18,070 I think that was my first Wi-Fi accomplishment. 622 00:51:21,770 --> 00:51:27,810 Yeah, and to finalize it, Wi-Fi attacks are cheap to execute and they're actually pretty easy. 623 00:51:27,810 --> 00:51:31,490 If you do not know anything about Wi-Fi, you can still do it. 624 00:51:31,590 --> 00:51:34,850 So, there, hands-on for Wi-Fi. 625 00:51:34,850 --> 00:51:35,430 Thank you.