1 00:00:00,250 --> 00:00:04,890 Hello guys, welcome to the first ever virtual DEF CON event. 2 00:00:05,010 --> 00:00:14,650 This workshop, Introduction to Wi-Fi Security, is a part of Wireless Village, which is a part of DEF CON as you know. 3 00:00:14,890 --> 00:00:19,490 So in this workshop, we are going to talk about the basics of Wi-Fi security. 4 00:00:19,810 --> 00:00:28,550 We will talk about the schemes that Wi-Fi uses to keep your traffic, your identity secure while you are using the Wi-Fi. 5 00:00:28,550 --> 00:00:31,830 And we will also look at the ways to attack those. 6 00:00:32,070 --> 00:00:38,050 My name is Nishant and I will be conducting this workshop along with my colleague Jaswin. 7 00:00:38,050 --> 00:00:40,890 We both work for Pentester Academy. 8 00:00:41,870 --> 00:00:46,450 So before moving forward, a little bit background about us. 9 00:00:46,450 --> 00:00:50,450 I work as R&D Manager at Pentester Academy. 10 00:00:50,450 --> 00:00:54,970 We work on developing labs and training contents for our customers. 11 00:00:54,970 --> 00:01:00,190 When we are not doing that, we train around the world in different venues. 12 00:01:00,490 --> 00:01:02,370 We present our research. 13 00:01:02,910 --> 00:01:05,910 Jaswin also works at Pentester Academy. 14 00:01:05,910 --> 00:01:07,810 He is a researcher there. 15 00:01:07,910 --> 00:01:16,390 And apart from doing all the lab work and the routine work, he also helps me as a co-trainer in the trainings. 16 00:01:16,390 --> 00:01:19,910 And he also publishes his research. 17 00:01:21,110 --> 00:01:26,890 So here are some cool logos from some conferences that we have been to. 18 00:01:28,090 --> 00:01:30,730 This is the pentesteracademy.com. 19 00:01:30,830 --> 00:01:36,390 We have a lot of courses, on-demand video courses on here. 20 00:01:36,390 --> 00:01:38,310 You can go and take a look. 21 00:01:38,590 --> 00:01:43,090 Similarly, we have a browser-based lab which is completely in cloud. 22 00:01:43,090 --> 00:01:44,910 We call it Attack Defense. 23 00:01:46,090 --> 00:01:50,530 Everything in this lab can be used using your browser. 24 00:01:50,530 --> 00:01:51,830 You don't need any VPN. 25 00:01:51,830 --> 00:01:53,210 You don't need any plugin. 26 00:01:54,110 --> 00:01:57,130 We have customers from over 90 plus countries. 27 00:01:57,310 --> 00:02:00,290 And now coming to the workshop outline. 28 00:02:00,630 --> 00:02:04,990 So as discussed before, we will talk about the basics of Wi-Fi. 29 00:02:04,990 --> 00:02:08,270 And then we will talk about sniffing and recon. 30 00:02:08,370 --> 00:02:13,270 We'll talk about WEP, WPA2-PSK, and WPA2-Enterprise. 31 00:02:13,270 --> 00:02:19,530 What they are, how the authentication works in them, and how we can actually attack them. 32 00:02:20,530 --> 00:02:28,710 So first of all, you know, when you read about Wi-Fi, you will see that it is referred by the name or this number. 33 00:02:28,710 --> 00:02:30,990 That's 802.11. 34 00:02:30,990 --> 00:02:36,850 So 802 is the committee that deals with the network-related norms. 35 00:02:36,950 --> 00:02:41,690 And .11 is assigned to Wi-Fi or wireless LAN. 36 00:02:43,350 --> 00:02:46,490 So 802.11 is the standard. 37 00:02:46,490 --> 00:02:51,250 And then there are multiple amendments to the standard to support newer things. 38 00:02:51,250 --> 00:02:57,250 So for example, you have your 802.11 A, B, G, N. 39 00:02:57,430 --> 00:03:00,450 Similarly, you have I, W, and there's a list. 40 00:03:00,450 --> 00:03:02,010 There's a list of this. 41 00:03:02,010 --> 00:03:06,410 So all of these are amendments to the main standard. 42 00:03:07,790 --> 00:03:15,650 Wi-Fi Alliance is the organization that actually holds the right for this specific logo. 43 00:03:15,650 --> 00:03:18,250 The Wi-Fi trademarks actually belong to them. 44 00:03:18,310 --> 00:03:25,150 So if you are a vendor and if you want to use this logo on your product, you have to take approval from them. 45 00:03:25,150 --> 00:03:28,010 So you submit your product to them and then they go through it. 46 00:03:28,010 --> 00:03:31,470 They check if it complies with whatever standards they have. 47 00:03:31,470 --> 00:03:33,830 And then you're allowed to use this logo. 48 00:03:36,650 --> 00:03:39,150 So there are multiple amendments. 49 00:03:39,150 --> 00:03:51,510 But we are only going to talk about those which deal with the transmission of Wi-Fi, especially the bands and the bandwidth and all. 50 00:03:51,630 --> 00:03:58,050 So in that, you have A, B, G, N, and AC, which is the latest one. 51 00:03:58,530 --> 00:04:02,870 So 802.11 A, it uses OFDM. 52 00:04:02,870 --> 00:04:07,170 So all of this, because it's a basic class, we don't have that amount of time. 53 00:04:07,170 --> 00:04:18,810 But just to give you an overview, there's a reason why these slides are here, so that you can go back later and, you know, if you are interested in this specific part, you can dig deeper into it. 54 00:04:18,850 --> 00:04:20,870 So 11A is the first one. 55 00:04:20,870 --> 00:04:22,550 It was the basic one. 56 00:04:22,550 --> 00:04:24,550 It used to use 5 GHz. 57 00:04:24,650 --> 00:04:30,390 And at that time, OFDM was the way to propagate the wave of the data in this case. 58 00:04:30,650 --> 00:04:32,890 And then the 11B came. 59 00:04:32,890 --> 00:04:36,430 It used to work on a different way of modulation. 60 00:04:36,430 --> 00:04:39,250 And 2.4 GHz was used for it. 61 00:04:39,250 --> 00:04:41,070 Then came G. 62 00:04:41,570 --> 00:04:46,470 In G, they increased the data carrying capacity. 63 00:04:46,650 --> 00:04:48,870 After that came N. 64 00:04:48,910 --> 00:04:53,210 N actually allowed you to use two or more channels together. 65 00:04:53,210 --> 00:04:59,350 So it's, you know, so what the idea here is to increase the throughput. 66 00:04:59,430 --> 00:05:08,390 So, you know, from A, B, G, N, what we are trying to do, we are trying to transmit more data using Wi-Fi, right? 67 00:05:08,390 --> 00:05:11,370 Because, you know, it's not like the older times now. 68 00:05:11,850 --> 00:05:19,990 If you talk about 10, 15 years back, you didn't have that kind of requirements as well as that kind of equipment at your home. 69 00:05:20,090 --> 00:05:23,990 So, for example, you didn't have 4K TV, right? 70 00:05:23,990 --> 00:05:32,430 But now when you have 4K TV, which connects to your Internet and you want to stream a movie or something, you need higher bandwidth, right? 71 00:05:32,430 --> 00:05:35,930 So that's where all of these standards actually came in. 72 00:05:35,930 --> 00:05:45,090 So, you know, 11 AC is the latest one, which is, you know, being adopted by the market for the past few years now. 73 00:05:45,090 --> 00:05:52,670 So it can actually give you up to 1.3 Gbps of data transmission using your home Wi-Fi. 74 00:05:52,950 --> 00:05:57,150 And if you talk about enterprise Wi-Fi, then the limit will increase. 75 00:05:57,150 --> 00:06:04,150 So these standards will make sure that, you know, it can accommodate your needs with the time. 76 00:06:05,410 --> 00:06:08,490 So this is the 2.4 GHz channel. 77 00:06:08,490 --> 00:06:18,750 So Wi-Fi, if we talk about the main Wi-Fi, not the newer ones like 11 AD or something, it operates on two main channels. 78 00:06:18,750 --> 00:06:24,010 First one is the 2.4 GHz channel and the second one is the 5 GHz channel. 79 00:06:24,010 --> 00:06:28,990 So this is the layout for the channels on 2.4 GHz. 80 00:06:29,170 --> 00:06:35,490 So you can see that there are 14 channels and all of these cannot be used in all of geographies. 81 00:06:35,490 --> 00:06:37,050 You know, there are regulations. 82 00:06:37,210 --> 00:06:46,590 So according to them, you can use 14 channels in some of the geographies, some of the nations, and then you can use 12 or 13 in others. 83 00:06:46,590 --> 00:06:51,510 So you can refer to the regulatory information for this. 84 00:06:51,510 --> 00:06:58,050 Now, what you can observe here is these bands are very narrow and they overlap. 85 00:06:58,150 --> 00:07:10,270 And this causes a lot of problems because, you know, then you have interference and you have a lot of, you know, Wi-Fi networks operating and there are a lot of clients in the vicinity. 86 00:07:10,270 --> 00:07:12,170 It is going to cause problems. 87 00:07:12,410 --> 00:07:15,950 So that's where people then move to 5 GHz. 88 00:07:15,950 --> 00:07:18,730 So 5 GHz is more spread out. 89 00:07:18,910 --> 00:07:21,190 It has non-overlapping channels. 90 00:07:21,510 --> 00:07:23,150 So you can transmit more. 91 00:07:23,150 --> 00:07:25,950 So that was the idea behind it. 92 00:07:26,310 --> 00:07:30,890 Now, coming back to the sniffing and the connection part. 93 00:07:30,890 --> 00:07:35,650 Obviously, if you want to connect to a Wi-Fi, everyone is doing it now. 94 00:07:35,650 --> 00:07:38,750 So, you know, it's the part of daily routine now. 95 00:07:38,750 --> 00:07:56,550 So you have your access point in your home, at your office, and then you have a Wi-Fi card which you have connected to your desktop externally or, you know, you can have a laptop which automatically comes with it, your phones, all of these have internal Wi-Fi cards. 96 00:07:56,590 --> 00:07:59,370 So, you know, also they have antennas. 97 00:07:59,490 --> 00:08:05,570 So using that, your device connects to the access point and then you're able to exchange traffic with it, right? 98 00:08:05,570 --> 00:08:07,810 So that's the basic thing about it. 99 00:08:07,950 --> 00:08:16,070 Now, when in normal mode, these cards, they don't actually look at the traffic of other cards. 100 00:08:16,070 --> 00:08:30,970 So, you know, if you are sitting somewhere and there are multiple clients and multiple routers or access points, as you like to call them, if there are multiple of these pairs, they are transmitting data back and forth, right? 101 00:08:30,970 --> 00:08:42,450 So, but the card that your machine is using in normal operation, it will only consider or it will only show you the traffic that is, you know, that is for your machine. 102 00:08:42,450 --> 00:08:47,070 All the other, it, you know, it totally rejects that. 103 00:08:47,070 --> 00:08:48,690 It totally ignores that. 104 00:08:49,030 --> 00:08:55,230 So if you want to take a look at other people's traffic, it can't be done in the normal mode. 105 00:08:55,230 --> 00:08:59,050 So for that, you have something called as monitor mode. 106 00:08:59,230 --> 00:09:06,910 If you guys have done a sniffing of other people's machine on LAN, it's also known as promiscuous mode there. 107 00:09:07,090 --> 00:09:11,930 So monitor mode allows you to look at the traffic in the vicinity. 108 00:09:12,450 --> 00:09:16,810 You can do sniffing and then you can go for attacks and all of those things. 109 00:09:17,470 --> 00:09:27,690 So first of the things that you need is a Wi-Fi card, which allow you to sniff, which actually allow you to put it into monitor mode. 110 00:09:27,930 --> 00:09:32,890 So here are some of the cards which actually allows monitor mode. 111 00:09:32,890 --> 00:09:37,870 You can order one from Amazon or some other, you know, e-commerce market. 112 00:09:38,510 --> 00:09:40,710 So this was the old way of doing it. 113 00:09:40,710 --> 00:09:42,430 It was the conventional way of doing it. 114 00:09:42,450 --> 00:09:45,730 Now, suppose you're dealing with something advanced, right? 115 00:09:46,390 --> 00:09:52,190 You know, you're dealing with 11 AC points, which is transmitting data on a very high pace. 116 00:09:52,190 --> 00:09:57,190 At that point, what you can do is you can go for an off-shelf access point. 117 00:09:57,290 --> 00:10:03,310 You can write, you know, with your own firmware and then you can use it for sniffing. 118 00:10:03,310 --> 00:10:08,990 The reason for doing that is for high performance access points. 119 00:10:08,990 --> 00:10:16,190 Your cards will not be able to match the throughput or the capacity of those access points. 120 00:10:16,230 --> 00:10:25,190 So if you have an access point, you have a better chance to not miss the traffic that is being transmitted or received by that specific access point. 121 00:10:26,370 --> 00:10:31,570 Now, you know, because firmware is not something that, you know, that is like Windows software. 122 00:10:31,570 --> 00:10:35,250 It's not like you download it and you click run and it runs and installs. 123 00:10:35,250 --> 00:10:36,350 It's not like that. 124 00:10:36,350 --> 00:10:38,970 And that's where a lot of people face problems. 125 00:10:38,990 --> 00:10:49,210 So when you buy a router, you know, of the shelf routers from market and you want to transform it into sniffer, you can use something like OpenWRT. 126 00:10:49,210 --> 00:11:00,270 So OpenWRT is a Linux based project for these embedded devices, which actually allow you to customize and, you know, customize your routers and access points. 127 00:11:00,270 --> 00:11:02,370 You can use it in access point mode. 128 00:11:02,370 --> 00:11:03,630 You can make it something else. 129 00:11:03,630 --> 00:11:05,470 You can make it a hacking gadget. 130 00:11:05,470 --> 00:11:08,170 So all of that, it actually allows you. 131 00:11:08,170 --> 00:11:14,250 It has support for most of the hacking and recon tools, especially for Wi-Fi and all. 132 00:11:14,370 --> 00:11:18,370 So you can use it if you want to go for the higher throughput ones. 133 00:11:18,810 --> 00:11:27,830 So now let's talk about some basic terminology that will help us, you know, in the workshop or the later parts of the workshop. 134 00:11:28,070 --> 00:11:34,190 So first, station or STA in short is nothing but a wireless client. 135 00:11:34,190 --> 00:11:35,630 It can be your mobile. 136 00:11:35,630 --> 00:11:37,010 It can be your laptop. 137 00:11:37,170 --> 00:11:41,050 It can be a desktop, you know, with a Wi-Fi card on it. 138 00:11:41,370 --> 00:11:42,830 Then comes BSS. 139 00:11:42,930 --> 00:11:46,110 BSS stands for Basic Service Set. 140 00:11:46,790 --> 00:11:53,630 So BSS, when you will hear about it, it is to refer a set of access point and a client. 141 00:11:53,750 --> 00:12:00,630 If you know they are operating in that or it can be ad hoc clients, which, you know, do not need access point to connect. 142 00:12:01,490 --> 00:12:05,770 ESS is a set which contains multiple BSS. 143 00:12:06,210 --> 00:12:13,730 And similarly, then ESSID or SSID is the name which we use to identify that ESS. 144 00:12:13,950 --> 00:12:18,330 So suppose you have a Wi-Fi network, you put some name on it, right? 145 00:12:18,510 --> 00:12:20,130 Home Wi-Fi or something. 146 00:12:20,130 --> 00:12:22,630 So that is SSID, right? 147 00:12:22,630 --> 00:12:24,170 It's important to remember. 148 00:12:24,170 --> 00:12:26,250 That's why, you know, I'm explaining it again. 149 00:12:26,570 --> 00:12:30,370 SSID is the name of the Wi-Fi network that you are using. 150 00:12:31,030 --> 00:12:39,470 And now ESSID refers to the MAC address of the access point that is giving you the Wi-Fi, right? 151 00:12:39,630 --> 00:12:46,750 So ESSID will be the MAC address and you will be able to see it when you connect with that Wi-Fi. 152 00:12:46,750 --> 00:12:49,570 Not in your Windows machine, you know, directly. 153 00:12:49,630 --> 00:12:53,930 You have to do some dig through or you have to look at the packets to see it. 154 00:12:54,470 --> 00:12:56,670 Then comes the distribution system. 155 00:12:56,670 --> 00:13:04,890 So generally distribution system refers to the network which connects access point with the larger network. 156 00:13:06,250 --> 00:13:09,490 So again, some examples of VSS. 157 00:13:09,490 --> 00:13:14,470 You can see that in the first picture here, you have a VSSID. 158 00:13:15,110 --> 00:13:18,410 You know, this AP, you have this access point. 159 00:13:18,410 --> 00:13:23,790 And then there are two nodes which will be connected to this. 160 00:13:23,790 --> 00:13:28,750 Similarly, in ad-hoc configuration, you can see that there is no access point. 161 00:13:28,750 --> 00:13:33,910 But, you know, these machines are connecting with each other. 162 00:13:36,870 --> 00:13:41,270 ESS is... it consists of DS, which is connecting to access points. 163 00:13:41,270 --> 00:13:45,190 And then it consists of two VSS also. 164 00:13:45,450 --> 00:13:47,110 Two or more actually. 165 00:13:47,110 --> 00:13:48,510 Two in this figure. 166 00:13:49,370 --> 00:13:51,670 Now coming to WDS. 167 00:13:51,670 --> 00:13:54,390 WDS is a wireless distribution system, right? 168 00:13:54,390 --> 00:14:01,050 So suppose you want to deploy an access point in such a location where you don't have a wire, right? 169 00:14:01,050 --> 00:14:03,490 You don't have an Ethernet connectivity there. 170 00:14:03,490 --> 00:14:11,170 So what you can do is you can use an access point which has wired connectivity to extend the network. 171 00:14:11,390 --> 00:14:18,670 And this bridge or this link between these two access points is known as WDS link. 172 00:14:18,670 --> 00:14:20,330 And then you can cover more ground. 173 00:14:20,330 --> 00:14:26,650 So it's also known as mesh networking in Wi-Fi, if you read about it. 174 00:14:27,990 --> 00:14:33,510 So now there are three main type of packets in Wi-Fi. 175 00:14:33,510 --> 00:14:36,250 First is the management packet. 176 00:14:36,310 --> 00:14:46,390 Management packets are used to connect, to disconnect, or to manage the devices, if you want to say, on board. 177 00:14:46,390 --> 00:14:53,830 Similarly, control packets are something which deal with the transmission control and other things. 178 00:14:53,890 --> 00:14:58,550 But that is not something that we are going to look into a lot. 179 00:14:58,650 --> 00:15:06,190 And the third one, data, as the name suggests, these are the packets which will actually carry the real data. 180 00:15:07,070 --> 00:15:10,030 And then you have different subtypes in these. 181 00:15:10,030 --> 00:15:11,550 You can read about these. 182 00:15:11,550 --> 00:15:14,310 This table is available on the Internet. 183 00:15:14,310 --> 00:15:17,570 You can see that there are multiple management packets. 184 00:15:17,570 --> 00:15:22,210 You have association request, association response. 185 00:15:22,470 --> 00:15:26,370 And similarly, you have beacons and probes and whatnot. 186 00:15:29,210 --> 00:15:40,970 So to summarize the Wi-Fi environment, you have an access point, which is currently operating a Wi-Fi network, which will be identified by its SSID. 187 00:15:40,970 --> 00:15:42,670 That's the Wi-Fi network name. 188 00:15:42,670 --> 00:15:48,930 And then the SSID will be there because the MAC address needs to be there on the access point. 189 00:15:49,510 --> 00:15:53,470 And this SSID will then send the beacons out. 190 00:15:53,470 --> 00:16:05,290 So beacons are the packets which your access point uses to advertise that, hey, I'm using or, you know, I'm providing you the specific Wi-Fi that you can use. 191 00:16:06,170 --> 00:16:14,890 If a client has already connected to this Wi-Fi, instead of waiting for a beacon frame, it can also do probing. 192 00:16:14,890 --> 00:16:25,490 So by probing, it sends a probe message looking for that specific network, which it already connected to once or multiple times in the past. 193 00:16:25,490 --> 00:16:37,710 So once your client discovers the Wi-Fi network, then it goes ahead, it exchanges some packets with the access point, and then it connects with the access point. 194 00:16:37,710 --> 00:16:42,970 And, you know, after that, you can transmit data, you can access Internet and other things. 195 00:16:44,470 --> 00:16:49,510 So now, because, you know, it was not the wired thing, it's wireless, right? 196 00:16:49,510 --> 00:16:58,290 Your packets are open, anyone with the monitor mode interfaces can capture it and then, you know, can look into what you are doing if it is not encrypted. 197 00:16:58,290 --> 00:17:09,850 So that's the reason why we needed Wi-Fi encryption standards, so that we can protect our data from being sniffed by other people, right? 198 00:17:10,250 --> 00:17:12,710 At your home, it might not matter. 199 00:17:12,710 --> 00:17:20,870 But, you know, especially if you are at a coffee shop, if you are at your office, if you're at an airport, all of this matters, right? 200 00:17:21,810 --> 00:17:25,030 So here are some of the standards that we are going to talk about. 201 00:17:25,030 --> 00:17:27,230 We are going to talk about WEP. 202 00:17:27,230 --> 00:17:28,870 That was the oldest standard. 203 00:17:29,610 --> 00:17:41,270 I hope that no one is using it now, but still, you know, you will find it somewhere in a CTF or in someone's home who is not very tech-savvy or, you know, old. 204 00:17:41,970 --> 00:17:47,170 WPA, WPA2 are the ones that are currently used. 205 00:17:47,330 --> 00:17:50,470 These can be used in two different configurations. 206 00:17:50,590 --> 00:17:54,470 One is the PSK or pre-shared key. 207 00:17:54,470 --> 00:18:00,710 It's also known as WPA or WPA2 personal, because it is meant to be personal use. 208 00:18:00,710 --> 00:18:04,810 And then there's enterprise one, which is meant for enterprise use. 209 00:18:04,970 --> 00:18:07,530 WPA3 is the latest standard. 210 00:18:08,110 --> 00:18:15,530 It is something that you will see in mainstream, you know, within a year or maybe this year. 211 00:18:15,530 --> 00:18:18,930 In some places, you might have already been started seeing this. 212 00:18:20,170 --> 00:18:33,250 So now to do the recon and the cracking for WEP and WPA, PSK, we are going to use Aircrack-NG suite of tools. 213 00:18:33,250 --> 00:18:37,830 So it's a set of tools which allows you to do different things. 214 00:18:37,870 --> 00:18:50,010 So Aerodump-NG and Airmon-NG will allow you to capture the traffic, you know, to monitor the waves, to see the devices, access points that are in the vicinity. 215 00:18:50,590 --> 00:18:59,430 Airbase-NG and Airreplay-NG allows you to create a honeypot to send deauthentication messages, to replay the messages. 216 00:18:59,430 --> 00:19:10,150 And similarly, if you want to crack the key or the passphrase for WEP or WPA-PSK, you use Aircrack-NG. 217 00:19:10,270 --> 00:19:14,230 So you can know more about these by searching about these on Google. 218 00:19:14,290 --> 00:19:16,330 This tool is used a lot. 219 00:19:16,330 --> 00:19:18,730 So you'll find multiple videos on it. 220 00:19:19,670 --> 00:19:26,730 So now we'll talk about how to do basic recon with Airmon and Aerodump. 221 00:19:28,710 --> 00:19:31,070 So now it's the demo time. 222 00:19:31,070 --> 00:19:36,410 And for that, we will shift to our demo setup. 223 00:19:37,150 --> 00:19:43,530 So this is the portal that we are going to use to learn about these attacks. 224 00:19:43,610 --> 00:19:44,970 The URL is blurred. 225 00:19:44,970 --> 00:19:47,050 As of now, don't worry about it. 226 00:19:47,050 --> 00:19:54,130 We'll post the link to it in the YouTube description part. 227 00:19:54,850 --> 00:20:03,150 So if you go down, you'll see that we have a course here which says Wi-Fi Basics Workshop. 228 00:20:03,150 --> 00:20:05,010 You press start on it. 229 00:20:05,010 --> 00:20:08,350 It will show you four different scenarios. 230 00:20:08,410 --> 00:20:15,670 First is the Wi-Fi basics and then you have attacking WEP, you have attacking WPA2 Enterprise and PSK. 231 00:20:16,070 --> 00:20:20,150 So we are going to start the Wi-Fi basics one. 232 00:20:20,690 --> 00:20:29,310 So we chose this interface because, you know, as you can automatically see, you have commands on this side, you have lab on this side. 233 00:20:29,310 --> 00:20:32,530 So it will help you to learn because, you know, you are the beginner people. 234 00:20:32,530 --> 00:20:35,170 So it really helps if you have guidelines ready. 235 00:20:35,170 --> 00:20:40,330 Instead of searching on it on a blog and then coming back and then pasting and making mistakes and going back. 236 00:20:40,330 --> 00:20:40,870 Right. 237 00:20:40,870 --> 00:20:43,270 That actually wastes a lot of time. 238 00:20:43,930 --> 00:20:48,670 So what we will do now, we will select a server from here. 239 00:20:48,670 --> 00:20:51,730 In your case, you might only see one option. 240 00:20:52,930 --> 00:20:54,990 Solve this recapture. 241 00:21:03,060 --> 00:21:05,440 And then you start the lab. 242 00:21:06,460 --> 00:21:10,820 It will take some time in starting the lab, so please be patient. 243 00:21:12,760 --> 00:21:14,660 So the lab is ready now. 244 00:21:14,660 --> 00:21:21,600 What we have to do is on the left hand panel, we will read about the steps. 245 00:21:21,920 --> 00:21:26,440 So first is check Wi-Fi interfaces present on this system. 246 00:21:26,540 --> 00:21:31,300 And then to fire this, we will use this button. 247 00:21:31,740 --> 00:21:34,600 Oh, please use Firefox for this exercise. 248 00:21:34,600 --> 00:21:39,300 It might feel it might face some issues on Chrome and others. 249 00:21:39,300 --> 00:21:49,180 So if you click this, the command will execute and you will see that we have a WLAN0 interface, which is in managed mode. 250 00:21:49,180 --> 00:21:54,300 So as we discussed before, managed mode is good for normal operation. 251 00:21:54,300 --> 00:22:01,160 But if you want to do the recon and the sniffing and other things, this won't be enough. 252 00:22:01,320 --> 00:22:04,600 So you have to put it in monitor mode. 253 00:22:04,600 --> 00:22:08,100 And that's what we are doing in step two. 254 00:22:08,100 --> 00:22:12,160 So this is the command to put it in the monitor mode. 255 00:22:12,160 --> 00:22:20,480 As you can observe, IWDEVWLAN0, the name of the interface, and then set monitor now. 256 00:22:20,480 --> 00:22:22,900 So I'll press this. 257 00:22:23,380 --> 00:22:27,480 And it seems that the command has run. 258 00:22:27,840 --> 00:22:32,900 Now, let's again run this command to see if it is in monitor mode. 259 00:22:33,600 --> 00:22:34,960 Yes, it is. 260 00:22:34,960 --> 00:22:36,540 So we are ready now. 261 00:22:36,540 --> 00:22:42,320 So now what we will do, we will run aerodump-ng on WLAN0. 262 00:22:42,400 --> 00:22:45,640 And we will not define any other options for now. 263 00:22:45,640 --> 00:22:52,200 We will let it jump on all the channels of 2.4 GHz and find what it can. 264 00:22:52,640 --> 00:22:54,120 So press this. 265 00:22:54,500 --> 00:23:03,260 And as you can observe here, now it is looking for different ESSIDs or SSIDs. 266 00:23:03,260 --> 00:23:08,420 You can also see the corresponding ESSIDs, corresponding channels. 267 00:23:08,520 --> 00:23:16,340 And you can also see some of the stations, which means these are laptops or these can be phones. 268 00:23:16,340 --> 00:23:20,460 In this case, this is emulated lab, so obviously these are none. 269 00:23:20,460 --> 00:23:29,920 But in realistic scenario, you will see the phones, the laptops, other machines, sending probe requests, looking for the specific Wi-Fi. 270 00:23:30,800 --> 00:23:31,860 Right. 271 00:23:32,120 --> 00:23:37,860 So this is how you can check which devices are in the vicinity. 272 00:23:38,340 --> 00:23:41,720 So do a CTRL-C to stop it. 273 00:23:41,760 --> 00:23:45,120 And then let's move to the next screen here. 274 00:23:45,880 --> 00:23:52,680 Now suppose I am only interested in looking at traffic of channel 1. 275 00:23:52,680 --> 00:23:56,000 So in that case, I can fire this command. 276 00:23:56,000 --> 00:24:02,200 And here with argument-C, I have defined the channel number. 277 00:24:03,260 --> 00:24:07,360 So what you will see here is this time this channel will not jump. 278 00:24:07,540 --> 00:24:12,680 And you will only see the traffic which is coming on this specific channel. 279 00:24:12,680 --> 00:24:13,400 Right. 280 00:24:14,520 --> 00:24:21,180 So this is how you use AeroDump to do basic recon. 281 00:24:21,700 --> 00:24:24,980 And with this, our lab is done. 282 00:24:26,000 --> 00:24:27,500 We will stop the lab after this. 283 00:24:27,900 --> 00:24:29,900 And we will get back to the slides. 284 00:24:33,250 --> 00:24:39,570 So now I will pass it over to my colleague Jaswin who will go through the WEP part. 285 00:24:40,070 --> 00:24:46,430 And then I will meet you guys again when we will discuss WPA2-PSK and WPA2-Enterprise. 286 00:24:46,850 --> 00:24:48,370 Hello everyone. 287 00:24:48,430 --> 00:24:52,530 Next we will take a look at WEP, Wired Equivalent Privacy. 288 00:24:52,530 --> 00:24:59,510 When it comes to wired network, the physical proximity itself acts as a security mechanism. 289 00:24:59,650 --> 00:25:08,370 That is, we need to get into the building physically, find a port, plug in our device and sniff the traffic or perform an attack. 290 00:25:08,450 --> 00:25:14,470 Whereas in case of wireless networks, we have radio waves which are not bound by walls. 291 00:25:14,530 --> 00:25:17,990 Therefore, it is very easy to intercept the traffic. 292 00:25:17,990 --> 00:25:24,010 WEP was the original IEEE standard to add security to wireless network. 293 00:25:24,010 --> 00:25:29,190 It provided security equivalent to that of wired network and hence the name. 294 00:25:29,990 --> 00:25:34,910 WEP used RC4 stream cipher for generating the key stream. 295 00:25:34,910 --> 00:25:42,370 It supported 40-bit shared key which is equivalent to 5 ASCII characters or 10 hexadecimal characters. 296 00:25:42,370 --> 00:25:48,630 And a 104-bit shared key which is equivalent to 13 ASCII characters or 26 hex characters. 297 00:25:49,510 --> 00:26:02,050 Now, if the same key is used to encrypt multiple plain text messages, what the attacker can do is analyze the ciphertext to generate the pattern and the attacker can ultimately find the key. 298 00:26:02,370 --> 00:26:06,310 To prevent this, an initialization vector is added to the key. 299 00:26:06,310 --> 00:26:11,570 In case of WEP, the initialization vector had length of 24 bits. 300 00:26:11,570 --> 00:26:17,730 Therefore, the encryption key had the length of 64-bit or 0.28-bit. 301 00:26:18,230 --> 00:26:22,770 WEP used CRC32 for generating the integrative check value. 302 00:26:22,770 --> 00:26:25,430 Now, let's take a look at the encryption process. 303 00:26:25,590 --> 00:26:30,370 So, here we have the initialization vector, key and the message. 304 00:26:30,370 --> 00:26:37,690 The initialization vector and key is passed to the key scheduling algorithm and the pseudo random number generator. 305 00:26:37,690 --> 00:26:42,470 It generates the key stream which will be used to encrypt the data. 306 00:26:42,470 --> 00:26:44,850 For the second part, we have the message. 307 00:26:44,890 --> 00:26:54,390 The integrity check value is generated of the message and is concatenated with the message and then it is encrypted. 308 00:26:54,450 --> 00:27:02,690 The integrity check value is generated so that after decryption, we can verify that the message has not been tampered with. 309 00:27:02,690 --> 00:27:11,830 So, finally, the message and the ICD is XORed with the key stream to generate the ciphertext. 310 00:27:11,830 --> 00:27:18,670 In the end, the packet has initialization vector, 2-bit key ID, ciphertext and ICD. 311 00:27:18,670 --> 00:27:21,510 Now, let's take a look at the decryption process. 312 00:27:22,070 --> 00:27:28,590 In the decryption process, we have initialization vector, 2-bit key ID, ciphertext and ICD. 313 00:27:28,590 --> 00:27:36,770 We'll get the key from the key ID and we'll feed it to the key scheduling algorithm along with the initialization vector. 314 00:27:36,870 --> 00:27:43,860 This is further passed to the pseudo random number generator and the key stream is generated which will be used to decrypt the ciphertext. 315 00:27:44,290 --> 00:27:51,610 The ciphertext is XORed with the key stream to generate the message and the ICD. 316 00:27:51,610 --> 00:27:57,530 Now, the ICDs are compared and if both of them match, the packet is considered. 317 00:27:57,530 --> 00:27:59,730 Otherwise, it is discarded. 318 00:28:00,310 --> 00:28:04,270 Now, the next question arises, what was the weakness of WEP? 319 00:28:04,370 --> 00:28:09,410 The major weakness in WEP was the length of the initialization vector. 320 00:28:09,710 --> 00:28:12,570 24-bit was not enough. 321 00:28:12,790 --> 00:28:18,290 And as a result, when we have large number of packets, the ID will get repeated. 322 00:28:18,290 --> 00:28:27,610 And once the attacker has all of these ciphertexts with repeated IDs, the attacker can easily find out the shared key. 323 00:28:27,610 --> 00:28:29,370 Now, the attacker has two options. 324 00:28:29,370 --> 00:28:35,190 One is to wait and sniff all the traffic till we get enough number of IDs. 325 00:28:35,190 --> 00:28:45,730 Or the attacker can inject a packet to force the access point to send more packets and therefore the attacker will get more number of IDs. 326 00:28:45,730 --> 00:28:52,030 And this way, the second option fastened the process and made it possible to crack any WEP key. 327 00:28:53,710 --> 00:29:01,510 Now, to crack a 64-bit WEP key, usually 250,000 IDs are required. 328 00:29:01,510 --> 00:29:06,410 And to crack a 128-bit WEP key, 1.5 million IDs are required. 329 00:29:06,410 --> 00:29:14,090 But with the technique such as PDW, it is possible to crack WEP keys with a very less number of IDs. 330 00:29:14,090 --> 00:29:18,070 So, to crack WEP keys, there are many methods. 331 00:29:18,070 --> 00:29:25,850 Few of the methods are break authentication, capillarity attack, chop-chop attack, fragmentation attack, and PDW attack. 332 00:29:26,770 --> 00:29:34,790 Now, in order to crack the WEP key, we will start by sniffing the traffic, identifying the SSID, VSSID, and the channel number. 333 00:29:35,150 --> 00:29:42,350 Now, in order to send packets to the access point, the MAC address of the attacker has to be authenticated with the access point. 334 00:29:42,350 --> 00:29:47,370 Otherwise, any packet we send will get blocked and will get a deauthentication. 335 00:29:48,090 --> 00:29:53,810 Now, in order to authenticate the MAC address, fake authentication can be used. 336 00:29:53,810 --> 00:30:04,770 So, what happens in fake authentication is, we tell the access point that we can prove that we have the shared key, but we will not send the shared key yet. 337 00:30:04,770 --> 00:30:14,650 This way, the access point will add the MAC address of the attacker to the list of clients who can send packets to the access point. 338 00:30:15,150 --> 00:30:22,670 Now, since we have not sent the shared key to the access point, we cannot transmit data. 339 00:30:22,690 --> 00:30:30,770 However, we can capture the data from the legitimate client connected to the network and then replay those packets. 340 00:30:30,770 --> 00:30:33,310 Now, this is exactly what we are going to do. 341 00:30:33,310 --> 00:30:42,490 First, we will capture the op request sent by the already connected client and then we will replay it to the access point. 342 00:30:42,870 --> 00:30:51,470 So, when the access point gets the op request, it will rebroadcast the op request with a new initialization value. 343 00:30:51,470 --> 00:31:01,670 This way, we can continuously send op requests to the access point to get more and more op requests with new initialization vectors. 344 00:31:02,050 --> 00:31:09,190 Once we have enough number of initialization vectors, we can use aircrack-ng to crack the web key. 345 00:31:09,190 --> 00:31:12,150 So, now let's take a look at a demo. 346 00:31:12,150 --> 00:31:16,350 So, we will quickly select the server and install the capture. 347 00:31:21,040 --> 00:31:22,760 Then we will start the lab. 348 00:31:22,780 --> 00:31:25,540 It should take a couple of seconds for the lab to come up. 349 00:31:26,940 --> 00:31:28,660 The lab is now ready. 350 00:31:28,680 --> 00:31:31,140 Let's increase the size of the pond. 351 00:31:31,220 --> 00:31:34,480 We will start testing the interfaces on the machine. 352 00:31:34,480 --> 00:31:35,940 So, we have two interfaces. 353 00:31:36,160 --> 00:31:39,140 One is wlan1 and another is wlan2. 354 00:31:39,140 --> 00:31:40,980 Both are in managed mode. 355 00:31:40,980 --> 00:31:45,200 So, we will set wlan0 into monitor mode. 356 00:31:45,720 --> 00:31:48,280 And we will check the list of interfaces again. 357 00:31:48,780 --> 00:31:52,800 So, now we can see wlan0 is in monitor mode. 358 00:31:52,900 --> 00:31:56,760 Now, let's check the networks which are present in the vicinity. 359 00:31:56,980 --> 00:31:59,800 We can do this with the help of aircrack-ng command. 360 00:32:00,260 --> 00:32:07,140 So, now as you can see, we have epic-media-proc, which is using VIP on channel 6. 361 00:32:07,640 --> 00:32:14,720 So, next, what we will do is we will start a capture in channel 6 and write these packets into capture file. 362 00:32:14,720 --> 00:32:20,720 Now, if we just keep sniffing, it could take a lot of time to get enough number of packets. 363 00:32:20,780 --> 00:32:29,200 So, what we are going to do is, we will start a pre-play attack in order to generate more number of packets. 364 00:32:31,950 --> 00:32:35,530 So, we will start our pre-play attack. 365 00:32:35,910 --> 00:32:39,870 And now we need around 10,000 data packets. 366 00:32:41,690 --> 00:32:46,850 Currently, we can see we have 83,132 and the number increased. 367 00:32:46,910 --> 00:32:49,090 So, now we have 10,000 data packets. 368 00:32:49,090 --> 00:32:50,430 We will stop the capture. 369 00:32:50,750 --> 00:32:55,170 And we will also stop attacking the access point. 370 00:32:55,170 --> 00:33:00,090 Now, we will use aircrack-ng command to crack the IP. 371 00:33:00,230 --> 00:33:03,330 We will have to mention which network we want to target. 372 00:33:03,330 --> 00:33:09,130 In this case, we have epic-media-proc, which is having the index of 4. 373 00:33:09,130 --> 00:33:11,070 So, we will enter 4 now. 374 00:33:11,530 --> 00:33:13,750 And then, we will start cracking. 375 00:33:15,410 --> 00:33:17,730 So, we were able to find the key. 376 00:33:18,330 --> 00:33:21,670 The key was 14332. 377 00:33:26,840 --> 00:33:28,800 So, guys, welcome back. 378 00:33:28,800 --> 00:33:32,440 I hope you enjoyed the WEP session. 379 00:33:32,680 --> 00:33:36,020 So, now we will talk about WPA2-PSK. 380 00:33:36,020 --> 00:33:38,580 This is the scheme that is widely used. 381 00:33:38,580 --> 00:33:40,700 You will find this at your home. 382 00:33:40,700 --> 00:33:47,060 And even in the smaller coffee shops or the restaurants or even the small offices. 383 00:33:47,400 --> 00:33:51,680 So, WPA2 came after WPA. 384 00:33:51,680 --> 00:33:57,740 WPA was a transitional scheme to move from WEP to WPA2. 385 00:33:57,740 --> 00:34:03,020 So, WPA2 uses dynamic keys unlike WEP. 386 00:34:03,020 --> 00:34:08,840 It uses AES encryption standard with CCMP mode in the CCMP mode. 387 00:34:08,840 --> 00:34:11,800 And the protocol is still secure. 388 00:34:11,800 --> 00:34:18,960 It is prone to passphrase brute forcing or the dictionary attacks if your password is not strong. 389 00:34:18,960 --> 00:34:22,680 But apart from that, the scheme is still secure. 390 00:34:22,680 --> 00:34:30,880 There were crack attacks that were discovered last year, which was for this specific scheme. 391 00:34:30,880 --> 00:34:36,280 But again, it is very important to understand that the problem was not in the scheme itself. 392 00:34:36,280 --> 00:34:38,020 It was in the implementation. 393 00:34:38,020 --> 00:34:44,540 So, the scheme, theoretically, if you choose a good strong password, it is good to go. 394 00:34:44,540 --> 00:34:48,580 But WPA2 also had its own shortcomings. 395 00:34:48,580 --> 00:35:10,300 It doesn't have forward secrecy, which means if I'm capturing all of your traffic today and if you're using WPA2-PSK, even if I don't have the password today, if I somehow manage to get the password two months after or two years after, I can still go back and decrypt all of your traffic. 396 00:35:10,360 --> 00:35:14,340 So, that is not good from security point of view. 397 00:35:14,400 --> 00:35:17,140 Similarly, there is no management frame protection. 398 00:35:17,420 --> 00:35:31,780 So, your receiver, when he receives a management frame, he doesn't have any way to tell that if it is coming from a real source or it is something which is sent by a hacker or a malicious user. 399 00:35:31,780 --> 00:35:42,480 And that's the reason why the deauthentication attacks, which are used widely for Wi-Fi DOS, the denial of service, work. 400 00:35:42,480 --> 00:35:45,040 So, you can read about deauthentication attacks. 401 00:35:45,040 --> 00:35:46,300 It's very common now. 402 00:35:46,300 --> 00:35:48,920 It's been used for quite some years now. 403 00:35:49,180 --> 00:35:54,560 And also, WPA2-PSK or personal is supposed to be personal. 404 00:35:54,560 --> 00:35:57,400 It is supposed to be used in a personal network. 405 00:35:57,400 --> 00:36:07,980 So, if you use it in a work environment or some place which you don't count as a personal space, it is also prone to insiders. 406 00:36:08,140 --> 00:36:15,000 So, if you have a malicious insider, he can actually see the traffic of all the people on that specific Wi-Fi. 407 00:36:16,160 --> 00:36:21,420 So, as we mentioned before, there are no static keys like WEP. 408 00:36:21,420 --> 00:36:24,500 So, idea is you generate a dynamic key. 409 00:36:24,500 --> 00:36:28,680 You use that to decrypt the traffic or encrypt the traffic. 410 00:36:28,920 --> 00:36:33,600 And then, you know, next time when you do this, you again generate the keys again. 411 00:36:34,220 --> 00:36:42,220 In saying it's very easy, but you need some way in which both the parties can have the keys. 412 00:36:42,220 --> 00:36:45,480 And then they can use them to encrypt and decrypt stuff. 413 00:36:45,480 --> 00:36:48,040 And obviously, this key needs to be the same, right? 414 00:36:48,040 --> 00:36:50,680 Because we are going to use the symmetric encryption. 415 00:36:50,680 --> 00:36:51,800 We have a lot of data. 416 00:36:51,920 --> 00:36:56,540 So, what we do in this case is we use something called PSK. 417 00:36:56,540 --> 00:36:58,640 That's where the PSK terms come. 418 00:36:58,640 --> 00:37:00,060 It's pre-shared key. 419 00:37:00,060 --> 00:37:08,880 So, you have a passphrase, which is, you know, between 8 to 63 letters long or characters long. 420 00:37:08,880 --> 00:37:10,320 And you use it. 421 00:37:10,320 --> 00:37:12,860 You feed it to pbkdf2. 422 00:37:13,040 --> 00:37:15,420 pbkdf2 is a function. 423 00:37:15,420 --> 00:37:19,460 It stands for password-based key derivation function. 424 00:37:19,460 --> 00:37:24,680 And it will actually give you a pre-shared key of 256 bit. 425 00:37:24,800 --> 00:37:29,420 The reason of doing this is passphrases are easier for human beings. 426 00:37:29,420 --> 00:37:32,540 Just like you have IP to domain mappings. 427 00:37:32,540 --> 00:37:36,700 Similarly, you can use passphrase to generate the pre-shared key. 428 00:37:36,700 --> 00:37:43,220 It's easier to remember something meaningful than, you know, than a chunk of random hex characters. 429 00:37:44,000 --> 00:37:49,700 So, when your access point is configured, it already knows the passphrase. 430 00:37:49,700 --> 00:37:53,480 When you connect to that network, you also know the passphrase. 431 00:37:53,520 --> 00:37:54,980 And that's how it works. 432 00:37:54,980 --> 00:38:01,920 So, both the parties, they can calculate the same PSK and then they can use it for connection. 433 00:38:02,120 --> 00:38:09,620 But again, as you can observe, PSK is not transient or not temporary in nature, right? 434 00:38:09,620 --> 00:38:11,260 It's not directly generated. 435 00:38:11,260 --> 00:38:17,560 You are converting it from the passphrase to the PSK, but that's not dynamic nature, right? 436 00:38:17,740 --> 00:38:21,860 It will remain same till the time you will not change the password, right? 437 00:38:21,860 --> 00:38:29,880 So, that's where we have to generate something else, which we refer to PTK from this. 438 00:38:30,320 --> 00:38:34,560 So, PMK is derived using this specific function here. 439 00:38:34,560 --> 00:38:36,580 You use PBKDF. 440 00:38:36,580 --> 00:38:39,220 You pass it the secret passphrase. 441 00:38:39,240 --> 00:38:41,240 You pass it the SSID name. 442 00:38:41,860 --> 00:38:44,640 And then the SSID name length. 443 00:38:44,880 --> 00:38:48,680 And then these numbers are there, which is 4096. 444 00:38:48,680 --> 00:38:51,260 It's the number of iteration that will happen. 445 00:38:51,280 --> 00:38:56,500 And then 256 is the intended key length for the PMK key that we are going to get. 446 00:38:56,500 --> 00:39:01,260 So, you can read more about PBKDF and all of this in RFC 2898. 447 00:39:02,260 --> 00:39:09,100 So, what will happen in WPA2 or even in WPA, we have this handshake. 448 00:39:09,100 --> 00:39:10,740 We call it four-way handshake. 449 00:39:11,260 --> 00:39:21,040 And this handshake is used to generate this specific temporary key that you use to pass the traffic on securely, obviously. 450 00:39:21,460 --> 00:39:26,160 So, when you have a client, it wants to connect to the access point. 451 00:39:26,160 --> 00:39:28,560 First of all, it will locate the access point. 452 00:39:28,560 --> 00:39:30,760 It will locate the Wi-Fi network. 453 00:39:30,760 --> 00:39:38,140 And after that, there are authentication and association messages, which are part of Wi-Fi protocol. 454 00:39:38,140 --> 00:39:43,980 But here, please don't confuse authentication with the thing that we are going to do now. 455 00:39:44,140 --> 00:39:49,260 So, it's more of a compatibility kind of thing rather than security. 456 00:39:49,440 --> 00:39:52,460 So, first four steps are pretty much the same. 457 00:39:52,460 --> 00:39:57,080 Your client, it will ask the AP that, hey, I want to connect. 458 00:39:57,080 --> 00:39:59,360 And your AP will say, okay, go ahead. 459 00:39:59,380 --> 00:40:00,660 So, this much is done. 460 00:40:00,660 --> 00:40:04,080 After this, both of them have pre-shared key. 461 00:40:04,080 --> 00:40:04,380 Why? 462 00:40:04,380 --> 00:40:06,700 Because both of them had passphrases. 463 00:40:06,700 --> 00:40:11,100 And when you have passphrases, you can derive PSK of 256-bit format. 464 00:40:11,100 --> 00:40:13,720 We just saw it in the previous slides. 465 00:40:14,320 --> 00:40:17,620 Now, your access point will send message 1. 466 00:40:17,620 --> 00:40:18,780 It's the first message. 467 00:40:18,780 --> 00:40:19,880 There are four messages. 468 00:40:19,880 --> 00:40:21,940 That's why it is four-way handshake. 469 00:40:22,040 --> 00:40:28,340 So, in first message, it will generate a random number or a random string. 470 00:40:28,860 --> 00:40:30,780 It will call it anons. 471 00:40:30,820 --> 00:40:36,460 And it will send it in a packet in plain text to the supplicant. 472 00:40:36,700 --> 00:40:38,560 Supplicant here is the client. 473 00:40:38,560 --> 00:40:41,460 Your mobile, laptop, you know, whatever it is. 474 00:40:41,580 --> 00:40:51,080 Now, what your client will do, it will take these anons, and it will also generate a random number or random string called snons. 475 00:40:51,080 --> 00:40:54,860 So, A here denotes to the authenticator or the access point. 476 00:40:54,980 --> 00:40:59,500 S here denotes the supplicant or this station. 477 00:40:59,940 --> 00:41:10,020 So, when you have snons and anons, which are randomly generated, you can use this specific function here to generate the PTK. 478 00:41:10,100 --> 00:41:13,840 PTK is the Pairwise Transient Key. 479 00:41:14,220 --> 00:41:18,020 And as you can observe here, we passed PMK to it. 480 00:41:18,020 --> 00:41:26,760 PMK is nothing but a key that we derived using the passphrase and SSID and SSID name length. 481 00:41:26,820 --> 00:41:30,020 And then you have anons and snons. 482 00:41:30,020 --> 00:41:33,800 These are randomly generated by access point and the client. 483 00:41:33,800 --> 00:41:38,380 And then you have access point MAC and the client MAC. 484 00:41:38,380 --> 00:41:44,240 So, this is the information which is now used to generate a temporary key. 485 00:41:44,300 --> 00:41:49,640 This is temporary because anons and snons are randomly generated. 486 00:41:50,980 --> 00:41:53,840 So, now this happens. 487 00:41:53,840 --> 00:41:56,660 So, this guy can generate a PTK. 488 00:41:56,660 --> 00:42:01,900 Now, what it will do, it will send snons plus MIC. 489 00:42:01,900 --> 00:42:06,960 MIC or Michael is used to verify the integrity of a message. 490 00:42:07,220 --> 00:42:08,740 And it is signed by a key. 491 00:42:08,740 --> 00:42:15,460 So, in this case, the key that we have used, that we have generated, is used to sign this message. 492 00:42:15,780 --> 00:42:19,640 And again, anons and snons are in plain text. 493 00:42:19,820 --> 00:42:22,200 So, it will be sent to the access point. 494 00:42:22,340 --> 00:42:24,680 Now, access point has all the information. 495 00:42:24,680 --> 00:42:26,580 So, it will also generate PTK. 496 00:42:26,660 --> 00:42:29,580 So, what it will do, it will generate its PTK. 497 00:42:29,580 --> 00:42:31,480 It will check this MIC. 498 00:42:31,480 --> 00:42:37,340 And then it will generate MIC for this specific packet and match the MIC to MIC. 499 00:42:37,620 --> 00:42:45,200 Now, if this MIC matches, it means the PTK is same with the both parties. 500 00:42:45,280 --> 00:42:49,740 In that case, access point will go ahead, install the key for use. 501 00:42:49,740 --> 00:42:55,240 And it will also send a message to the client that, you know, this key is good. 502 00:42:55,240 --> 00:42:56,820 Please go ahead with it. 503 00:42:56,820 --> 00:43:04,520 And then client will also say, okay, I have installed the key and now we can use this key for encrypting the traffic. 504 00:43:04,560 --> 00:43:06,100 And then the encryption starts. 505 00:43:06,540 --> 00:43:20,720 Now, if suppose the access point, if it does not have the same PMK, you know, the passphrase is different for access point and the client, then the PTK will be different. 506 00:43:20,720 --> 00:43:23,560 Because, you know, it depends on PMK, right? 507 00:43:23,560 --> 00:43:25,480 Then the MIC check will fail. 508 00:43:25,480 --> 00:43:29,480 And in that case, access point will reject it and it will not connect. 509 00:43:29,840 --> 00:43:34,960 So this is how the authentication works in WPA four-way handshake. 510 00:43:37,410 --> 00:43:41,150 So again, to reiterate, you have the PF passphrase. 511 00:43:41,150 --> 00:43:42,930 You use PBKDF. 512 00:43:42,930 --> 00:43:48,870 You put it, you gave it SSID name, length, and you generated a pre-shared key. 513 00:43:48,870 --> 00:43:50,910 That is 256 bit in length. 514 00:43:50,990 --> 00:43:55,070 And then from four-way handshake, you get all of this information. 515 00:43:55,210 --> 00:43:59,770 You get S-nones, A-nones, because again, these are transmitted in plain text. 516 00:43:59,770 --> 00:44:00,990 There is no encryption. 517 00:44:01,450 --> 00:44:05,890 And then APMAC and ClientMAC is something that you can easily see. 518 00:44:06,310 --> 00:44:08,510 And from there, you will generate the PTK. 519 00:44:08,510 --> 00:44:11,050 You will use the PTK to encrypt the traffic. 520 00:44:11,330 --> 00:44:22,110 So now, from an attacker's angle, if you want to perform an attack, a dictionary attack to guess the PTK, how you will do it? 521 00:44:22,110 --> 00:44:23,770 You will take a dictionary. 522 00:44:23,770 --> 00:44:28,210 You will take one passphrase from dictionary at one time. 523 00:44:28,450 --> 00:44:36,410 And you will generate the PTK, because obviously, you also need to have this information, which will come from four-way handshake. 524 00:44:36,410 --> 00:44:39,930 Once you have this, you can generate the PTK. 525 00:44:39,930 --> 00:44:45,430 You have a packet from the real access point on client, which has MIC. 526 00:44:45,430 --> 00:44:47,230 You will generate the MAC. 527 00:44:47,230 --> 00:44:50,250 You will generate the MIC. 528 00:44:50,250 --> 00:44:52,590 And then you will compare the MIC. 529 00:44:52,590 --> 00:44:57,590 If MIC is correct, then you have done it. 530 00:44:57,590 --> 00:45:00,790 You have got the right passphrase for it. 531 00:45:00,790 --> 00:45:02,970 So this is how the dictionary attack will work. 532 00:45:03,530 --> 00:45:06,490 Now, look at the information what we need, right? 533 00:45:06,490 --> 00:45:11,690 So all packets will have AP and ClientMAC, because, you know, one is sender, one is a receiver. 534 00:45:12,470 --> 00:45:16,270 A -nonce is going in packet one and packet three. 535 00:45:16,510 --> 00:45:19,350 And S-nonce is going in packet two. 536 00:45:19,350 --> 00:45:28,190 So now, what you can do here is, you can either take all four packets, or you can either take packet one or two. 537 00:45:28,190 --> 00:45:33,650 And you will have all the information that you need to crack WPA2-PSK. 538 00:45:34,290 --> 00:45:37,670 And again, deauthentication, we already talked about it. 539 00:45:37,670 --> 00:45:42,090 It's a packet that you send, you know, you spoof it. 540 00:45:42,090 --> 00:45:46,910 You send it to client from posing as, you know, access point. 541 00:45:46,910 --> 00:45:50,810 If you are sending it to access point, you will pose as, you know, one of the clients. 542 00:45:50,910 --> 00:45:56,270 And then you will tell the other party that, you know, I don't want to be connected to you anymore. 543 00:45:56,930 --> 00:46:03,850 So in that case, the other party will think that this message is being sent by the real party and, you know, it will disconnect. 544 00:46:04,430 --> 00:46:13,430 So this comes handy when you have access point connected with a client and you want this to move so that you can capture the four-way handshake. 545 00:46:13,430 --> 00:46:19,790 Because remember, four-way handshake will only take place when you are connecting to the device first time. 546 00:46:19,810 --> 00:46:24,390 When you are connecting to the access point, only then your client will do the four-way handshake. 547 00:46:24,390 --> 00:46:27,910 If it's already connected, there is no need to do the four-way handshake. 548 00:46:28,010 --> 00:46:35,190 So if we want to capture four-way handshake for our device, which is already connected, we have to do a deauthentication. 549 00:46:37,050 --> 00:46:38,930 So now it's the demo time. 550 00:46:38,930 --> 00:46:41,470 We will do this using the same lab. 551 00:46:41,470 --> 00:46:43,630 The principles are very simple. 552 00:46:43,790 --> 00:46:48,230 WPA-PSK is using a weak passphrase, which is present in our dictionary. 553 00:46:48,510 --> 00:46:52,610 We will capture the four-way handshake and then we will attack it. 554 00:46:53,310 --> 00:46:55,530 So let's move to the lab. 555 00:46:57,290 --> 00:47:00,890 So let's go to attacking WPA-2-PSK. 556 00:47:02,130 --> 00:47:05,510 Again, you have to select a zone from here. 557 00:47:07,470 --> 00:47:10,770 Prove to this guy that you are not a robot, you are a human. 558 00:47:12,410 --> 00:47:15,290 And then start the lab and wait. 559 00:47:15,690 --> 00:47:17,290 And the lab is ready. 560 00:47:17,290 --> 00:47:19,050 We'll follow the same drill. 561 00:47:19,310 --> 00:47:23,230 First, let's check the Wi-Fi interface. 562 00:47:23,250 --> 00:47:29,090 There is a Wi-Fi interface in managed mode and its name is WLAN0. 563 00:47:29,530 --> 00:47:31,610 We'll put it in monitor mode. 564 00:47:32,050 --> 00:47:34,410 Let's check if it is there. 565 00:47:34,670 --> 00:47:36,650 Yes, it is in monitor mode. 566 00:47:36,650 --> 00:47:42,630 Now let's run AeroDump on WLAN0. 567 00:47:42,870 --> 00:47:53,610 And here we can observe that this is the SSID protected network, which is using WPA-2-PSK. 568 00:47:53,910 --> 00:47:59,770 So let's press CTRL-C and move to the next step. 569 00:48:01,840 --> 00:48:07,360 SSID protected network is the one that we want to do the attack on. 570 00:48:08,020 --> 00:48:13,680 So for that, what we want to do is we need to capture the four-way handshake, right? 571 00:48:13,980 --> 00:48:17,480 So it is running on channel 4. 572 00:48:17,480 --> 00:48:26,280 So what we will do, we will run AeroDump packet capture on channel 4 using this command. 573 00:48:27,200 --> 00:48:30,680 And as you can observe, it is now doing that. 574 00:48:33,770 --> 00:48:42,170 If you wait for some time, it will also find the client that is attached to this specific machine. 575 00:48:42,430 --> 00:48:45,730 If you are not able to see it, don't worry. 576 00:48:45,730 --> 00:48:51,750 We will do a broadcast deauthentication on this VSSID and then also it will work. 577 00:48:51,750 --> 00:49:00,310 But, you know, as you can observe here, AeroDump has found one client that is this client connected to this VSSID. 578 00:49:00,310 --> 00:49:06,490 Now, if you remember to capture the four-way handshake, we need to disconnect it, right? 579 00:49:06,490 --> 00:49:10,330 And for that, we are going to use deauthentication packet. 580 00:49:10,970 --> 00:49:16,090 And so we can launch it from the next tab, open a new tab. 581 00:49:16,370 --> 00:49:26,950 You can use the same WLAN0 interface to do this because, you know, you have set WLAN0 on channel 4 and you want to send this packet on channel 4 as well. 582 00:49:26,950 --> 00:49:30,010 So click on this. 583 00:49:30,090 --> 00:49:40,910 And you will see that AeroPlayNG is sending deauthentication packets, 100 packets, to this specific VSSID. 584 00:49:41,170 --> 00:49:44,970 Let's do control-C because I think these are enough. 585 00:49:45,770 --> 00:49:49,170 And let's go back here. 586 00:49:49,210 --> 00:49:55,930 And now what happened when we did this is this guy here, it was disconnected. 587 00:49:56,590 --> 00:50:01,510 And then it reconnected once we stopped the deauthentication attack. 588 00:50:01,510 --> 00:50:06,410 And when it did that, we captured handshake for it. 589 00:50:06,870 --> 00:50:08,850 So now we have handshake. 590 00:50:10,030 --> 00:50:13,530 You can also, you know, run commands on it if you like to. 591 00:50:14,730 --> 00:50:19,070 So you can observe that we have the file, the capture file here. 592 00:50:19,070 --> 00:50:23,610 We also have this specific dictionary here, which we will use to crack it. 593 00:50:23,610 --> 00:50:29,430 So now we can go ahead and try to crack it. 594 00:50:29,430 --> 00:50:38,750 We'll use AeroPlayNG with this dictionary and test-01.cap is the capture file. 595 00:50:38,750 --> 00:50:40,350 So run it. 596 00:50:40,490 --> 00:50:41,990 Attack is running. 597 00:50:42,010 --> 00:50:45,130 And we have found the right key. 598 00:50:45,450 --> 00:50:48,790 So the right passphrase is Raspberry. 599 00:50:49,190 --> 00:50:52,170 So with that, this demo is done. 600 00:50:52,170 --> 00:51:00,170 This is how easy it is to attack it if you are using a weak passphrase. 601 00:51:03,750 --> 00:51:09,470 So after WPA2-PSK, now we will talk about WPA2-Enterprise. 602 00:51:10,150 --> 00:51:16,010 We already learned about the shortcomings of WPA2-Personal. 603 00:51:16,030 --> 00:51:20,730 These are not really shortcomings, but it was designed in such a way. 604 00:51:20,730 --> 00:51:23,470 It was designed for personal spaces. 605 00:51:23,470 --> 00:51:31,510 So it was assumed that whoever is using the network, you don't need to hide your information from them. 606 00:51:32,130 --> 00:51:40,250 So that's the reason why same password was there and all the other people on the network had the capability to decrypt your traffic. 607 00:51:40,310 --> 00:51:47,670 But if you want to use this for your enterprise or for your company, this is going to be a problem, right? 608 00:51:47,670 --> 00:51:50,930 Because first thing is this insider threat. 609 00:51:50,930 --> 00:51:56,530 And the second thing is it is difficult to maintain the credentials because everyone is using the same passphrase. 610 00:51:56,530 --> 00:52:00,530 Now, suppose if this passphrase gets leaked, you have to change it. 611 00:52:00,530 --> 00:52:05,530 You have to inform everybody and you have to keep doing this again and again, right? 612 00:52:05,730 --> 00:52:11,590 So for that, these people came up with WPA2-Enterprise. 613 00:52:11,590 --> 00:52:19,930 So in WPA2-Enterprise, instead of using a passphrase, a RADIUS server is used for authentication. 614 00:52:20,330 --> 00:52:25,650 So this RADIUS server will maintain the credential list for all the authorized users. 615 00:52:25,650 --> 00:52:32,070 And then users can use their username, passwords to authenticate with the Wi-Fi. 616 00:52:32,910 --> 00:52:35,850 So it looks like this. 617 00:52:35,850 --> 00:52:42,030 So you have your Wi-Fi client, that is, you know, a laptop or a PC. 618 00:52:42,030 --> 00:52:46,550 And then you have the access point which is connected to the RADIUS server. 619 00:52:47,130 --> 00:52:50,530 So this RADIUS server is the authentication backend here. 620 00:52:53,240 --> 00:52:56,060 And then this is the handshake flow. 621 00:52:56,060 --> 00:53:00,040 So four-way handshake will be there because, again, it's WPA. 622 00:53:00,340 --> 00:53:07,180 But in this case, because there is no passphrase, EAP will be used. 623 00:53:07,800 --> 00:53:10,540 EAP is Extended Authentication Protocol. 624 00:53:10,900 --> 00:53:17,050 So EAP will be used to do authentication with the authentication server, that is, the RADIUS server in the backend. 625 00:53:17,700 --> 00:53:25,260 So your client, after doing the connection ritual, it will send a EAP poll start, which is the first packet. 626 00:53:25,380 --> 00:53:28,220 And then access point will ask it for its identity. 627 00:53:28,220 --> 00:53:33,540 So, you know, if you're using credentials, the username will be the identity. 628 00:53:33,540 --> 00:53:38,320 And this username will be then forwarded to the authentication server. 629 00:53:38,440 --> 00:53:46,980 So after this, the access point, you know, will be in the path, but it's not really doing anything. 630 00:53:46,980 --> 00:53:50,880 Your client and the authentication server will exchange some packets. 631 00:53:51,100 --> 00:54:01,260 And once it is proved to the authentication server that this guy or this client is the real client, it will generate a PMK. 632 00:54:01,260 --> 00:54:07,960 It's randomly generated, and then it will send this PMK to the access point and to the client. 633 00:54:08,280 --> 00:54:11,520 So you can observe the difference from the PSK here. 634 00:54:11,520 --> 00:54:17,240 It is not being generated from the passphrase that was known to both parties. 635 00:54:17,680 --> 00:54:26,080 And after, you know, you have PMK on both the parties, you will do the same four-way handshake and then, you know, data transfer will continue. 636 00:54:26,080 --> 00:54:33,600 Now, the scheme that we are going to talk about in this demo is a PEEP-MSCHAP-V2. 637 00:54:33,600 --> 00:54:38,120 So PEEP stands for Protected Extensible Authentication Protocol. 638 00:54:38,180 --> 00:54:52,920 It is known as protected or it is being referred as protected because all the EAP packets that will be exchanged between your client and your authentication server will go through a TLS tunnel. 639 00:54:52,920 --> 00:54:57,300 So even access point cannot look into it, right, what it is sending. 640 00:54:57,740 --> 00:55:06,880 And then MSCHAP, MS obviously stands for Microsoft, and then CHAP is Challenge Handshake Authentication Protocol. 641 00:55:07,020 --> 00:55:16,060 So it's a challenge response authentication protocol where one party will send a challenge and then the other party will send response and then, you know, they'll verify each other. 642 00:55:16,140 --> 00:55:17,400 So it's like that. 643 00:55:17,400 --> 00:55:24,000 So the user account credentials, the password and the username will be used. 644 00:55:24,000 --> 00:55:32,360 A TLS certificate will be used to create the tunnel and to make sure that the client is connecting to the correct authentication server. 645 00:55:34,650 --> 00:55:37,450 So this is how it looks. 646 00:55:38,270 --> 00:55:47,610 So till here, you can see that the request identity is asked by the RADIUS server or the access point, and then the username is provided. 647 00:55:47,610 --> 00:55:50,010 After that, it requests for the PEEP. 648 00:55:50,010 --> 00:55:52,250 RADIUS server is initiating PEEP. 649 00:55:52,250 --> 00:55:55,270 And then a TLS tunnel will be set up. 650 00:55:55,270 --> 00:55:59,450 So this certificate will be sent by the authentication server to the client. 651 00:55:59,490 --> 00:56:05,590 And the client, if it accepts it, after that, it will do the MSCHAP challenge. 652 00:56:05,590 --> 00:56:08,850 So the challenge will be sent by the RADIUS server. 653 00:56:09,250 --> 00:56:14,530 Your client is supposed to provide a response and send it to the RADIUS server. 654 00:56:14,530 --> 00:56:16,090 The RADIUS server will check it. 655 00:56:16,090 --> 00:56:22,990 If it is good, then EAP success will be conveyed and the PMK will be shared with the station. 656 00:56:23,370 --> 00:56:34,130 And on the same time, it will also share the PMK with the access point because PTK is the key that will be generated by the station and the access point. 657 00:56:34,130 --> 00:56:36,270 So RADIUS has nothing to do there. 658 00:56:37,930 --> 00:56:41,610 So now if you want to attack it, what are the ways? 659 00:56:41,850 --> 00:56:53,690 So what you can do is, instead of making the client connect to the real access point, you can create your own honeypot or fake access point or evil twin. 660 00:56:54,070 --> 00:57:00,590 And when the client will connect to it, obviously, because you don't have access to the real RADIUS server. 661 00:57:00,590 --> 00:57:04,210 Because if you had that, you could have taken credentials from there, right? 662 00:57:04,210 --> 00:57:05,390 You don't have that. 663 00:57:05,550 --> 00:57:09,350 So what you will do, you will emulate a fake RADIUS server. 664 00:57:09,850 --> 00:57:12,130 Which will say yes to all the credentials, right? 665 00:57:12,130 --> 00:57:16,790 And then here you are relying on the client that it will provide the real credentials. 666 00:57:17,170 --> 00:57:19,910 But before that, there is a problem with EAP, right? 667 00:57:19,910 --> 00:57:22,470 Because there is a TLS tunnel. 668 00:57:22,470 --> 00:57:31,210 And because the certificate that your fake access point or fake RADIUS will send, it will not match the real certificate. 669 00:57:31,210 --> 00:57:38,850 So your client will actually get a warning that this certificate doesn't match or we don't know this certificate. 670 00:57:38,850 --> 00:57:51,110 So at that point, if your client or if your user, he accepts this fake certificate, a non-real certificate, then you are in a problem. 671 00:57:51,110 --> 00:57:54,330 If you don't do this, then you are again safe. 672 00:57:54,470 --> 00:58:00,970 So you can say that this attack is a combination of technical as well as social engineering angles, right? 673 00:58:01,090 --> 00:58:09,270 So we are going to do this attack, but to keep it simple, what we will do instead of creating an evil twin, we will create a honeypot. 674 00:58:09,270 --> 00:58:14,630 So you don't have to do the deauth and all those things. 675 00:58:15,810 --> 00:58:19,590 So for that, we are going to use Hosteo PD Mana Toolkit. 676 00:58:19,690 --> 00:58:23,950 So it's a tool which can be used to create the rogue access point. 677 00:58:25,030 --> 00:58:34,050 It is generally used mainly for the enterprise networks because, you know, it will keep the hassle of creating a RADIUS and all, you know, away from you. 678 00:58:34,050 --> 00:58:38,030 You can directly go, you can fire three or four commands and, you know, you are good to go. 679 00:58:38,030 --> 00:58:39,850 You are good to do attack. 680 00:58:41,590 --> 00:58:43,870 So let's go for the demo now. 681 00:58:44,630 --> 00:58:49,510 So here, go for the attacking WPA2 enterprise. 682 00:58:50,150 --> 00:58:51,270 Same drill. 683 00:58:51,270 --> 00:58:52,930 You have to select the server. 684 00:58:52,930 --> 00:58:56,130 You have to prove that you are a human. 685 00:58:56,770 --> 00:59:00,770 And you might have to solve this, a recapture. 686 00:59:05,420 --> 00:59:07,640 So now the lab is ready. 687 00:59:08,360 --> 00:59:13,100 So let's see what interfaces are there on the lab. 688 00:59:13,220 --> 00:59:18,360 So here we can observe that there are two interfaces, WLAN0 and WLAN1. 689 00:59:18,400 --> 00:59:22,580 Let's put WLAN0 into monitor mode. 690 00:59:22,960 --> 00:59:25,580 And let's run aerodump on it. 691 00:59:26,880 --> 00:59:35,200 So what we can observe here is there is a client which is looking for AMAZE underscore LLC. 692 00:59:35,620 --> 00:59:41,720 So if we go to next step, we will see that the challenge is regarding this only. 693 00:59:41,720 --> 00:59:45,140 A client is probing for AMAZE underscore LLC. 694 00:59:45,140 --> 00:59:51,340 We have to create a honeypot and then we have to steal the credential for it. 695 00:59:51,340 --> 00:59:55,700 And this guy is using peepmschapv2. 696 00:59:57,240 --> 01:00:00,280 So let's do a control C here. 697 01:00:01,080 --> 01:00:05,080 We will also need the fake certificates as we talked about before. 698 01:00:05,820 --> 01:00:07,040 And there you go. 699 01:00:07,040 --> 01:00:10,500 We have provided you all the things that you need for this. 700 01:00:10,500 --> 01:00:12,920 If you scroll down. 701 01:00:13,500 --> 01:00:19,540 You will also see the configuration for the hosted PD mana. 702 01:00:20,160 --> 01:00:22,520 So what you have to do here is. 703 01:00:22,520 --> 01:00:25,760 First, you have to create this file. 704 01:00:26,580 --> 01:00:28,800 So I'm using VIM. 705 01:00:29,140 --> 01:00:34,660 VIM is mostly available in most environments, so you can use that. 706 01:00:36,220 --> 01:00:38,660 And let's copy this. 707 01:00:39,460 --> 01:00:40,920 And paste it here. 708 01:00:43,640 --> 01:00:46,540 And you have to format it. 709 01:00:46,540 --> 01:00:50,640 You have to make sure that everything is in separate lines. 710 01:00:50,640 --> 01:00:52,100 Let me do that. 711 01:00:52,100 --> 01:00:54,720 So now I have done the formatting for this file. 712 01:00:54,720 --> 01:00:57,020 Let's go over the configuration file. 713 01:00:57,240 --> 01:00:58,920 So first is the interface. 714 01:00:58,920 --> 01:01:00,900 We are using WLAN1. 715 01:01:02,200 --> 01:01:04,000 SSID is mentioned. 716 01:01:04,000 --> 01:01:08,020 We want to host a honeypot with AMAZE underscore LLC. 717 01:01:08,660 --> 01:01:10,980 And you can choose channel as per your liking. 718 01:01:10,980 --> 01:01:12,880 I have chosen 6 here. 719 01:01:13,560 --> 01:01:17,840 Hardware mode is G, which indicates the 11G. 720 01:01:18,580 --> 01:01:22,960 And then WPA3 means WPA2. 721 01:01:23,680 --> 01:01:28,520 And here we are using management TKE. 722 01:01:28,960 --> 01:01:30,600 Here you can put CCMP. 723 01:01:30,600 --> 01:01:31,980 You can put something else. 724 01:01:32,520 --> 01:01:35,140 So yeah, there's a mistake. 725 01:01:36,030 --> 01:01:43,340 When you put TKCCMP, which means you support both WPA and WPA2-PSK. 726 01:01:44,400 --> 01:01:49,020 And then, you know, for 1X, 1X is the EAP. 727 01:01:49,020 --> 01:01:54,000 And you're also hosting a fake backend server. 728 01:01:54,000 --> 01:02:02,450 And for that, we'll provide a special configuration in this file, which can be then used by our hosted PD Mana. 729 01:02:02,450 --> 01:02:06,570 And here you can observe the certificate, the key. 730 01:02:06,590 --> 01:02:16,990 All of that is provided so that when the tunnel forms, you know, the setup can get the information and then show us what it is. 731 01:02:18,030 --> 01:02:28,210 Mana EAP success actually signifies that doesn't matter what kind of credentials the user provides, we will always tell him that these are the correct ones. 732 01:02:28,690 --> 01:02:30,730 So this file is done. 733 01:02:30,730 --> 01:02:33,030 Let's create the second file. 734 01:02:36,920 --> 01:02:43,640 Let's move a little low and copy it from here. 735 01:02:46,030 --> 01:02:47,330 Paste it. 736 01:02:49,230 --> 01:02:58,310 So to know more details about these configurations, I'll suggest you visit hosted PD Mana's GitHub page. 737 01:02:58,490 --> 01:03:01,430 The link to the documentation is also given here. 738 01:03:01,430 --> 01:03:02,490 So check that out. 739 01:03:02,490 --> 01:03:04,630 You will be able to understand these better. 740 01:03:05,090 --> 01:03:14,290 So this configuration will make sure that doesn't matter what kind of scheme or what kind of method your EAP is using. 741 01:03:14,290 --> 01:03:23,250 It will support it, even if it is a PEEP or a TTLS or TLS, or even if it is using MSCHAP or GTC or something inside. 742 01:03:23,250 --> 01:03:25,070 So all of that will be supported. 743 01:03:25,070 --> 01:03:27,430 So it's a catch all kind of thing. 744 01:03:28,160 --> 01:03:37,520 So once it is done, we can move forward and we can launch this to start our honeypot. 745 01:03:37,990 --> 01:03:48,470 So what we can observe here is on interface WLAN1, we have created a maze underscore LLC SSID. 746 01:03:51,090 --> 01:04:00,230 Here, what we are observing is a client which was roaming has tried to connect to this, you know, access point. 747 01:04:00,470 --> 01:04:06,250 And in that process, we are able to see the information that it was passing. 748 01:04:06,250 --> 01:04:09,650 So if you remember, we talked about CHAP, right? 749 01:04:09,650 --> 01:04:11,190 The challenge response. 750 01:04:11,190 --> 01:04:20,030 So here, hosted PD Mana is actually giving us the challenge, the response so that we can crack it. 751 01:04:20,030 --> 01:04:22,670 And the username here is Sean. 752 01:04:23,010 --> 01:04:28,670 So this is the command that we need to use with asleep to crack it. 753 01:04:29,270 --> 01:04:33,990 So if we move down, we have actually written this command for you. 754 01:04:34,110 --> 01:04:36,350 Let's clear the screen a little bit. 755 01:04:36,790 --> 01:04:39,330 And let's run this command. 756 01:04:40,110 --> 01:04:49,930 So what we did here is because we had the challenge and the response captured, we used a dictionary file that is given here. 757 01:04:49,930 --> 01:04:54,150 And from that, we recovered the password for it. 758 01:04:54,150 --> 01:04:57,230 The password is chocolate in this case. 759 01:04:57,230 --> 01:05:10,050 So this is how using a honeypot, you can attack enterprise networks, the WPA2 enterprise in this case, which was using a PMS CHAP version 2. 760 01:05:10,690 --> 01:05:15,270 The attack will work similarly for the other schemes as well. 761 01:05:16,010 --> 01:05:19,890 So with this, we are going to conclude this workshop. 762 01:05:19,890 --> 01:05:25,910 I hope you learned about the basics of Wi-Fi and schemes and how to attack them. 763 01:05:25,910 --> 01:05:32,430 And if you face these in real world or in a CTF somewhere, you will be able to solve it. 764 01:05:32,630 --> 01:05:39,150 So with that, thanks again for attending our workshop in Wireless Village. 765 01:05:39,150 --> 01:05:47,870 We also thanks Wireless Village and the DEF CON team to make all of this possible in this tough time. 766 01:05:47,970 --> 01:05:50,910 It doesn't matter how bad it is. 767 01:05:50,910 --> 01:05:52,590 The learning should continue. 768 01:05:52,590 --> 01:05:55,070 And with that, I'll say thanks. 769 01:05:55,070 --> 01:06:01,170 If you have any follow up questions, any comments, any feedbacks, here's my email ID. 770 01:06:01,170 --> 01:06:04,890 You can drop me a mail and I'll try to help you out. 771 01:06:04,970 --> 01:06:06,030 Thank you.