1 00:00:00,000 --> 00:00:05,740 So I think before we start the presentation, I want to set a little bit of a context here and set a little bit of background. 2 00:00:06,520 --> 00:00:12,480 My colleague Vivek is going to make the main presentation. I am Praveen, the Chief Technology Officer of Airtight Networks. 3 00:00:13,860 --> 00:00:23,360 So the context or the background of what we are going to talk about here is the whole community here, I think, knows that web has been dead for many, many years. 4 00:00:23,360 --> 00:00:30,100 But recently, about three months ago, a very interesting or a thought-provoking idea was proposed. 5 00:00:31,140 --> 00:00:41,100 And the idea suggested that if you inject some shaft frames in the air, it is possible to confuse current generation web cracking tools. 6 00:00:41,840 --> 00:00:49,360 So in a sense, kind of a new war has started that a shaffer can win over a cracking tool. 7 00:00:50,080 --> 00:00:52,980 And the question that you want to pose here... 8 00:00:52,980 --> 00:00:57,800 that in this war, between a shaffer and a cracker, who is going to eventually win? 9 00:00:58,500 --> 00:01:02,920 And obviously, there are going to be ups and downs. One time, one party will win. Another time, another party will win. 10 00:01:03,180 --> 00:01:07,500 So we have sort of done some thought experiment along this war game. 11 00:01:07,880 --> 00:01:13,780 And we are here to share our findings or the results that we have arrived at. 12 00:01:15,300 --> 00:01:22,960 And it is important to kind of mention that we are here presenting results, not specifically targeting at any specific target. 13 00:01:22,980 --> 00:01:25,100 Not a specific implementation of a shaffing approach. 14 00:01:25,460 --> 00:01:31,200 But rather, this general approach of injecting shaft frames and trying to confuse a web cracker. 15 00:01:31,820 --> 00:01:35,320 And we are going to show you all possible ways the shaft can be generated. 16 00:01:35,500 --> 00:01:40,740 And each one of those possibilities, how a cracking tool can evolve to beat the shaffer all the time. 17 00:01:41,360 --> 00:01:47,060 So before we get into the specifics of the presentation, it is important to mention, as I said... 18 00:01:47,760 --> 00:01:50,200 And during the presentation, also... 19 00:01:50,200 --> 00:01:55,960 We will be using terms like web cloaking, web shaffing, or web masking interchangeably. 20 00:01:56,700 --> 00:02:02,000 And since this idea was proposed, these terms have been used in the industry as a whole interchangeably. 21 00:02:02,120 --> 00:02:07,660 So our reference of these terms should be treated as reference to the generic shaffing approach. 22 00:02:07,960 --> 00:02:11,460 Not to any specific implementation of it, which may be out there. 23 00:02:12,000 --> 00:02:17,700 So with that kind of a context and background, I want to invite Vivek, who is the youngest member of our R&D team. 24 00:02:17,860 --> 00:02:20,180 And I would have been very honored to have him here. 25 00:02:20,200 --> 00:02:25,400 And I would have been very honored if Deepak Gupta, who is one of the main brains behind what you are going to be presenting, could be here. 26 00:02:25,980 --> 00:02:27,120 Unfortunately, he couldn't make it. 27 00:02:27,300 --> 00:02:29,240 So that's why I am kind of substituting for him. 28 00:02:29,420 --> 00:02:31,560 So please welcome Vivek, and we will get started. Thanks. 29 00:02:34,200 --> 00:02:34,800 Thanks, Praveen. 30 00:02:37,800 --> 00:02:41,660 I am Vivek, and I work as a security researcher at Airtight Networks. 31 00:02:42,100 --> 00:02:45,240 This is my first time both in America and, of course, in DEF CON. 32 00:02:45,800 --> 00:02:47,440 And we've tried to do a good job here. 33 00:02:47,580 --> 00:02:49,420 And I hope you guys are going to enjoy this presentation. 34 00:02:51,020 --> 00:02:51,500 Thanks. 35 00:02:52,780 --> 00:02:55,680 So with that, let me briefly run you through the talk outline. 36 00:02:58,660 --> 00:03:01,260 First, I'll be talking about the evolution of web cracking. 37 00:03:01,600 --> 00:03:07,580 And how web shaffing is actually going to stop the current generation of web cracking tools from failing. 38 00:03:08,900 --> 00:03:14,200 Also, we are going to discuss some of the techniques which the shaffer used in order to send out his frames. 39 00:03:14,620 --> 00:03:18,440 And also various countermeasures which can be used to separate those shafts. 40 00:03:18,440 --> 00:03:20,640 And once again, allow air crack to crack. 41 00:03:21,920 --> 00:03:25,800 Also, then we'll discuss about some of the implementation problems with web shaffing. 42 00:03:25,860 --> 00:03:29,800 And then try and conclude what we think about the whole web shaffing approach. 43 00:03:30,580 --> 00:03:32,380 And then the house opens up for Q&A. 44 00:03:33,340 --> 00:03:34,840 So evolution of web cracking. 45 00:03:35,880 --> 00:03:38,940 I'm sure almost everybody here must have cracked web once. 46 00:03:39,220 --> 00:03:41,780 And I really do not want to run you through the whole refresher. 47 00:03:42,000 --> 00:03:47,420 So very simply put, web cracking is the process of using various statistical attacks, 48 00:03:47,420 --> 00:03:52,980 which were discovered against web from the last seven years or so, to derive the web key. 49 00:03:53,360 --> 00:03:58,480 And let's quickly look at the historical evolution of the various cracks which occurred in web. 50 00:04:00,080 --> 00:04:03,020 So the first crack was as early as 2001. 51 00:04:03,500 --> 00:04:09,600 And the first cryptographic vulnerability was discovered also in 2001 in the celebrated FMS paper. 52 00:04:09,880 --> 00:04:15,260 Which was later followed by COREC in 2004, which decreased the complexity of web cracking. 53 00:04:15,660 --> 00:04:17,040 And finally, recently, 54 00:04:17,420 --> 00:04:21,420 the PTW guys sort of extrapolated Adria's clean conditions 55 00:04:21,420 --> 00:04:27,800 and have really brought down web cracking to the extent that you can crack web within five minutes. 56 00:04:28,080 --> 00:04:31,660 So what started with five million packets at the FMS time 57 00:04:31,660 --> 00:04:36,480 has now come down to around 60 to 90 thousand packets required for web cracking. 58 00:04:37,420 --> 00:04:41,460 But this hasn't really stopped people from trying to save web. 59 00:04:41,760 --> 00:04:44,740 And people have used these band-aid approaches saying, 60 00:04:44,820 --> 00:04:45,580 Okay, make it 128. 61 00:04:47,420 --> 00:04:47,960 These are tough to crack. 62 00:04:48,500 --> 00:04:50,880 And, you know, suppress weak IVs, 63 00:04:50,960 --> 00:04:53,200 and so on and so forth, you know, what not. 64 00:04:53,700 --> 00:04:55,560 So what we are here to discuss 65 00:04:55,560 --> 00:04:57,080 is the latest development 66 00:04:57,080 --> 00:04:58,520 of such a band-aid approach. 67 00:04:58,780 --> 00:05:01,060 And that is called web shaft frame insertion. 68 00:05:01,540 --> 00:05:05,160 So the question we are going to try and answer in this presentation is 69 00:05:05,760 --> 00:05:06,900 the shafting approach 70 00:05:07,220 --> 00:05:08,960 just yet another band-aid approach? 71 00:05:09,420 --> 00:05:11,800 Or is it really going to hold water? 72 00:05:12,580 --> 00:05:13,060 Right? 73 00:05:16,280 --> 00:05:19,800 So basically it's web shafting against web cracking. 74 00:05:20,020 --> 00:05:21,500 And we'll see who's going to win. 75 00:05:23,720 --> 00:05:25,520 Now, so what is web shafting? 76 00:05:26,700 --> 00:05:27,900 Very simply put, 77 00:05:28,060 --> 00:05:31,860 web shafting is a technique of mixing spoofed web encrypted frames, 78 00:05:32,120 --> 00:05:33,340 also called shaft, 79 00:05:33,620 --> 00:05:37,640 and to make them as indistinguishable from the real frames as possible. 80 00:05:38,120 --> 00:05:39,380 What's going to happen is 81 00:05:39,380 --> 00:05:41,700 the current generation of web cracking tools 82 00:05:41,700 --> 00:05:43,040 are going to use 83 00:05:43,060 --> 00:05:45,140 the shaft trace which contains 84 00:05:45,140 --> 00:05:47,320 both the real authorised network's web data 85 00:05:47,320 --> 00:05:49,040 along with the shaft data 86 00:05:49,040 --> 00:05:51,460 gets confused and is going to fail. 87 00:05:53,880 --> 00:05:55,460 So what are these shaft packets? 88 00:05:55,840 --> 00:05:58,240 Can any web encrypted packet 89 00:05:58,240 --> 00:06:00,040 in reality qualify as shaft? 90 00:06:00,340 --> 00:06:01,580 The answer is no. 91 00:06:01,740 --> 00:06:04,360 It's because only those web encrypted packets 92 00:06:04,360 --> 00:06:06,800 who have a property called a weak IV 93 00:06:06,800 --> 00:06:08,500 are really going to influence 94 00:06:08,500 --> 00:06:09,700 the cryptographic process. 95 00:06:10,080 --> 00:06:12,360 And only those can cause a bias 96 00:06:12,360 --> 00:06:13,040 to open up the network 97 00:06:13,060 --> 00:06:14,460 to either force aircrack 98 00:06:14,460 --> 00:06:16,740 or any other cracking tool to converge to the wrong key 99 00:06:16,740 --> 00:06:19,200 or to diverge to no solution and fail. 100 00:06:22,180 --> 00:06:25,060 So let's quickly look at an example of shafting. 101 00:06:29,160 --> 00:06:31,380 So actually these traces were generated 102 00:06:31,380 --> 00:06:33,580 and I have these offline traces 103 00:06:33,580 --> 00:06:34,500 through which I'll show you 104 00:06:34,500 --> 00:06:36,360 how web shafting works and the countermeasures. 105 00:06:36,640 --> 00:06:39,100 So first, let's look at how shafting works. 106 00:06:39,880 --> 00:06:41,380 I'm using the latest 107 00:06:41,380 --> 00:06:43,020 backtrack 2.0 final cut 108 00:06:43,020 --> 00:06:45,100 and pretty much I'm going to use 109 00:06:45,100 --> 00:06:47,300 the default aircrack version which comes along with that. 110 00:06:49,820 --> 00:06:51,440 I'm also going to give aircrack 111 00:06:51,440 --> 00:06:53,680 the hint that the key is a 40-bit key. 112 00:06:57,400 --> 00:06:59,580 And this trace called one-key-shaft 113 00:06:59,580 --> 00:07:01,800 contains both web encrypted packets 114 00:07:01,800 --> 00:07:03,040 of the authorised network 115 00:07:03,040 --> 00:07:04,720 as well as the shaft packets. 116 00:07:05,000 --> 00:07:06,320 So let's see what's going to happen. 117 00:07:10,580 --> 00:07:11,980 So if you notice, 118 00:07:12,180 --> 00:07:14,120 aircrack actually exits without trying. 119 00:07:14,640 --> 00:07:15,880 Let's try and 120 00:07:17,840 --> 00:07:19,560 cajole aircrack into working 121 00:07:19,560 --> 00:07:22,060 a little bit more by increasing the 122 00:07:22,060 --> 00:07:23,980 fudge factor to the maximum of 32. 123 00:07:32,420 --> 00:07:34,240 It tries but once again 124 00:07:34,240 --> 00:07:36,020 within 4 seconds it pretty much exits. 125 00:07:36,500 --> 00:07:36,900 So 126 00:07:38,360 --> 00:07:39,740 going back to the presentation 127 00:07:41,880 --> 00:07:43,480 How did this really work? 128 00:07:43,760 --> 00:07:45,560 I can assure you and we'll see later 129 00:07:45,560 --> 00:07:48,280 that there are enough web encrypted data packets 130 00:07:48,280 --> 00:07:49,780 in that shaft trace 131 00:07:49,780 --> 00:07:51,500 to be able to crack the web key. 132 00:07:51,680 --> 00:07:53,560 But what actually went wrong? 133 00:07:53,800 --> 00:07:56,180 The thing one has to realise is that 134 00:07:56,180 --> 00:07:58,100 the current generation of web cracking tools 135 00:07:58,100 --> 00:08:00,180 typically trust whatever is there 136 00:08:00,180 --> 00:08:00,760 over the air. 137 00:08:01,540 --> 00:08:03,940 And if you think about it, as a hacking 138 00:08:04,240 --> 00:08:06,020 tool, why should we trust 139 00:08:06,020 --> 00:08:07,580 what we see? Right? 140 00:08:07,780 --> 00:08:10,180 And that's where aircrack and all the 141 00:08:10,180 --> 00:08:11,320 other crackers are going wrong. 142 00:08:11,680 --> 00:08:14,040 And web shafting pretty much exploits 143 00:08:14,040 --> 00:08:16,120 that trust. That trust that whatever 144 00:08:16,120 --> 00:08:17,900 aircrack is using into its statistical 145 00:08:17,900 --> 00:08:19,460 processes is right. 146 00:08:21,020 --> 00:08:22,160 So we're going 147 00:08:22,160 --> 00:08:24,080 to be using aircrack for the rest of our discussion 148 00:08:24,080 --> 00:08:26,040 pretty much as a benchmark tool 149 00:08:26,040 --> 00:08:28,200 because from what we've observed, it's also the most 150 00:08:28,200 --> 00:08:29,520 reliable as well as popular. 151 00:08:30,020 --> 00:08:31,800 Implements all these statistical attacks 152 00:08:31,800 --> 00:08:34,000 pretty much exhaustively. And 153 00:08:34,240 --> 00:08:36,460 the good thing is the creator of aircrack 154 00:08:36,460 --> 00:08:38,100 Thomas is also here at Defcon. 155 00:08:38,700 --> 00:08:39,760 Thomas, are you here? 156 00:08:39,960 --> 00:08:41,080 You can raise your hand. 157 00:08:42,660 --> 00:08:44,020 There he is. So for 158 00:08:44,020 --> 00:08:46,160 every web key which you crack, you need 159 00:08:46,160 --> 00:08:46,680 to thank him. 160 00:08:51,360 --> 00:08:52,220 Moving on, 161 00:08:52,300 --> 00:08:53,520 let's try and understand 162 00:08:54,090 --> 00:08:56,100 how a web shafting approach can 163 00:08:56,100 --> 00:08:58,020 actually try and fool aircrack. 164 00:08:58,440 --> 00:09:00,100 So this is actually a very complicated 165 00:09:00,100 --> 00:09:01,500 slide of how aircrack works. 166 00:09:01,720 --> 00:09:04,180 But putting it very simply, what happens 167 00:09:04,240 --> 00:09:06,100 is when you give a trace file to aircrack, 168 00:09:06,220 --> 00:09:07,800 it's going to read that trace file, 169 00:09:08,320 --> 00:09:10,460 list out all the unique IVs 170 00:09:10,460 --> 00:09:12,060 along with the first two encrypted bytes 171 00:09:12,060 --> 00:09:13,780 and create a list out of it. 172 00:09:14,080 --> 00:09:16,280 Right? Then we go on to the iterative 173 00:09:16,280 --> 00:09:17,500 approach of cracking web. 174 00:09:17,720 --> 00:09:20,100 So I'll be discussing basically from the 175 00:09:20,100 --> 00:09:21,280 FMS and Corect perspective. 176 00:09:21,980 --> 00:09:24,220 So basically what happens is if you want to 177 00:09:24,220 --> 00:09:26,080 crack the web key, to crack 178 00:09:26,080 --> 00:09:28,060 the bth byte of the key, we 179 00:09:28,060 --> 00:09:30,100 assume that the last b-1 bytes 180 00:09:30,100 --> 00:09:32,280 of the key have been cracked. And of course 181 00:09:32,280 --> 00:09:33,860 we start with b is equal to 0 182 00:09:34,240 --> 00:09:35,960 that is absolute zero knowledge about 183 00:09:35,960 --> 00:09:38,120 the real web key. From there 184 00:09:38,120 --> 00:09:39,920 on, for every unique IV 185 00:09:39,920 --> 00:09:42,240 along with the first two encrypted bytes which we have 186 00:09:42,240 --> 00:09:44,120 in our list, we'll go ahead and 187 00:09:44,120 --> 00:09:46,180 try and see if that is going to match 188 00:09:46,180 --> 00:09:48,100 one or more of the Corect 189 00:09:48,100 --> 00:09:48,860 and FMS conditions. 190 00:09:49,580 --> 00:09:51,720 If it matches, then 191 00:09:51,720 --> 00:09:53,700 we're going to get that 192 00:09:54,700 --> 00:09:56,020 possibility of that 193 00:09:56,020 --> 00:09:57,300 byte from this match. 194 00:09:57,680 --> 00:09:59,920 So there are equations which are going to be used 195 00:09:59,920 --> 00:10:01,920 to define what that possibility is going to be 196 00:10:01,920 --> 00:10:03,980 and depending upon which one of these 197 00:10:04,240 --> 00:10:05,700 statistical conditions got matched, 198 00:10:05,880 --> 00:10:07,480 we will award an according score. 199 00:10:07,880 --> 00:10:09,560 So as most of you might be knowing, 200 00:10:09,780 --> 00:10:11,920 the statistical conditions pretty much revolve 201 00:10:11,920 --> 00:10:13,400 between 5 to 13% 202 00:10:14,000 --> 00:10:15,840 with respect to what the real web 203 00:10:15,840 --> 00:10:16,880 key byte might be. 204 00:10:17,480 --> 00:10:20,020 So once we've done this, we're going to 205 00:10:20,020 --> 00:10:22,080 use the most possible 206 00:10:22,080 --> 00:10:23,760 byte for that value 207 00:10:23,760 --> 00:10:26,200 as the one having the highest vote or score. 208 00:10:26,940 --> 00:10:28,080 And once we've done 209 00:10:28,080 --> 00:10:30,040 that, for all the four bytes 210 00:10:30,040 --> 00:10:32,080 let's say, for a five byte key, 211 00:10:32,240 --> 00:10:34,080 then for the fifth byte we're going to be doing 212 00:10:34,240 --> 00:10:35,860 brute forcing. So by default, 213 00:10:36,000 --> 00:10:37,840 the last byte is cracked by brute force 214 00:10:37,840 --> 00:10:40,000 and in that you want to use something 215 00:10:40,000 --> 00:10:42,120 called the Fudge Factor, in which we 216 00:10:42,120 --> 00:10:43,920 decide also which possibilities 217 00:10:43,920 --> 00:10:46,040 to include for every byte which 218 00:10:46,040 --> 00:10:47,040 we've encountered till now. 219 00:10:47,580 --> 00:10:49,760 And finally, in the brute force technique, 220 00:10:49,940 --> 00:10:52,000 when you're trying to crack the key 221 00:10:52,000 --> 00:10:53,720 and you've arrived at a possible key, 222 00:10:53,880 --> 00:10:55,980 you're going to verify that against a list 223 00:10:55,980 --> 00:10:58,120 of 32 IVs, if you're 224 00:10:58,120 --> 00:11:00,240 able to crack it or not. So now let's 225 00:11:00,240 --> 00:11:02,000 try and understand what are the attack 226 00:11:02,000 --> 00:11:03,400 points in this logic. 227 00:11:04,240 --> 00:11:04,400 ... 228 00:11:07,680 --> 00:11:10,020 The first attack point is ignoring the 229 00:11:10,020 --> 00:11:11,920 duplicates. The second is 230 00:11:11,920 --> 00:11:14,100 playing with the actual statistical calculations. 231 00:11:14,700 --> 00:11:15,760 The third is 232 00:11:15,760 --> 00:11:17,560 playing around with the Fudge Factor. 233 00:11:17,700 --> 00:11:20,200 And the final one is beating the verification process. 234 00:11:20,820 --> 00:11:21,380 ... 235 00:11:21,380 --> 00:11:23,200 So let's look at how this can be done. 236 00:11:23,420 --> 00:11:25,980 So the very first one, ignoring duplicates 237 00:11:25,980 --> 00:11:27,780 or eliminating legitimate IVs. 238 00:11:28,100 --> 00:11:30,040 See, the shaffer can have the real 239 00:11:30,040 --> 00:11:31,680 network's web key and 240 00:11:32,160 --> 00:11:33,940 exhaustively enumerate all the weak 241 00:11:34,240 --> 00:11:36,060 IVs for that network key. 242 00:11:36,240 --> 00:11:38,120 Right? And then he's going to 243 00:11:38,120 --> 00:11:39,800 send out all these weak IVs 244 00:11:39,800 --> 00:11:41,920 and randomize the first two encrypted bytes 245 00:11:41,920 --> 00:11:43,840 and send it over the air again and again. 246 00:11:44,560 --> 00:11:46,000 Aircrack is going to use that 247 00:11:46,000 --> 00:11:48,080 encounter all those weak IVs at one 248 00:11:48,080 --> 00:11:49,580 go and from there on, 249 00:11:50,040 --> 00:11:52,120 any weak IV which comes from the legitimate 250 00:11:52,120 --> 00:11:54,060 network's traffic is going to be 251 00:11:54,060 --> 00:11:55,960 ignored. Right? You have this 252 00:11:55,960 --> 00:11:57,360 unique underscore IV check 253 00:11:57,360 --> 00:11:59,380 for people who looked into the code. 254 00:11:59,760 --> 00:12:01,940 So pretty much we end up masking the unique 255 00:12:01,940 --> 00:12:04,120 IVs coming in from the authorized network. 256 00:12:04,240 --> 00:12:06,000 The second is influencing 257 00:12:06,000 --> 00:12:07,260 the voting logic itself. 258 00:12:07,660 --> 00:12:10,160 And this is done basically by concocting 259 00:12:10,160 --> 00:12:12,020 a weak IV along with two encrypted 260 00:12:12,020 --> 00:12:14,140 bytes which are going to match one 261 00:12:14,140 --> 00:12:15,440 or more of these statistical conditions. 262 00:12:15,960 --> 00:12:18,160 Once this happens, we're pretty much going to 263 00:12:18,160 --> 00:12:20,280 be influencing the voting 264 00:12:20,280 --> 00:12:22,100 logic. After that, beating 265 00:12:22,100 --> 00:12:23,840 the fudge factor. So 266 00:12:23,840 --> 00:12:25,800 the way to beat the fudge factor is 267 00:12:25,800 --> 00:12:28,180 to create such a large 268 00:12:28,180 --> 00:12:29,640 bias for the first possibility 269 00:12:30,240 --> 00:12:32,240 that even if you divide it by the largest 270 00:12:32,240 --> 00:12:33,560 fudge factor which is 32, 271 00:12:34,240 --> 00:12:35,480 the quotient of that division 272 00:12:35,480 --> 00:12:37,800 is going to be greater than 273 00:12:37,800 --> 00:12:39,540 the legitimate key bytes vote. 274 00:12:39,780 --> 00:12:41,700 When this happens, pretty much 275 00:12:42,110 --> 00:12:43,940 the legitimate key byte, even if it is a 276 00:12:43,940 --> 00:12:46,060 possibility, will not be included for brute 277 00:12:46,060 --> 00:12:48,100 forcing. And final is 278 00:12:48,100 --> 00:12:49,300 beating the verification step. 279 00:12:49,660 --> 00:12:51,780 So even if two or more 280 00:12:51,780 --> 00:12:53,960 of the 32 IVs which are used for 281 00:12:53,960 --> 00:12:55,640 verification contain 282 00:12:56,030 --> 00:12:57,880 SHAF, then Aircrack will exit 283 00:12:57,880 --> 00:12:59,620 even if it's going to have the real key. 284 00:13:01,120 --> 00:13:02,340 So can Aircrack 285 00:13:02,340 --> 00:13:04,120 be made smarter or should we end this talk? 286 00:13:04,940 --> 00:13:06,300 And the answer is 287 00:13:06,300 --> 00:13:07,300 pretty much yes. 288 00:13:07,840 --> 00:13:09,940 See, what is the fundamental problem here 289 00:13:09,940 --> 00:13:11,860 is that Aircrack trusts what it sees. 290 00:13:12,300 --> 00:13:14,020 And what we are going to do 291 00:13:14,020 --> 00:13:16,160 is that give Aircrack some sort of a 292 00:13:16,160 --> 00:13:18,060 microscopic view into what's 293 00:13:18,060 --> 00:13:20,000 happening and that we accomplish 294 00:13:20,000 --> 00:13:21,520 by using various filters. 295 00:13:22,100 --> 00:13:24,240 So using these filters, we'll try 296 00:13:24,240 --> 00:13:26,000 and separate the SHAF from the grain 297 00:13:26,000 --> 00:13:27,860 or the noise from the real signal 298 00:13:27,860 --> 00:13:29,840 or the web data from the SHAF. 299 00:13:32,100 --> 00:13:33,980 So now we'll look at the 300 00:13:34,240 --> 00:13:35,960 various techniques through which SHAF 301 00:13:35,960 --> 00:13:38,180 can be produced and the countermeasures 302 00:13:38,180 --> 00:13:39,360 which we can use against them. 303 00:13:39,620 --> 00:13:40,740 And filter SHAF. 304 00:13:42,560 --> 00:13:44,000 Okay, so as this is 305 00:13:44,000 --> 00:13:46,020 Las Vegas, we sort of decided to play 306 00:13:46,020 --> 00:13:46,800 a game of roulette. 307 00:13:47,640 --> 00:13:50,100 What we are going to do is that we are going to start 308 00:13:50,100 --> 00:13:51,980 off with techniques from the very naive 309 00:13:51,980 --> 00:13:53,220 to the most sophisticated. 310 00:13:53,700 --> 00:13:56,120 And for every SHAFing technique, we are 311 00:13:56,120 --> 00:13:58,140 going to bet on one piece of the 312 00:13:58,140 --> 00:13:58,800 Emperor's clothing. 313 00:14:01,460 --> 00:14:01,940 If 314 00:14:02,940 --> 00:14:04,780 we can actually zero down upon 315 00:14:04,780 --> 00:14:06,780 a filter which is going to filter out 316 00:14:06,780 --> 00:14:08,940 that SHAF, then we are going to 317 00:14:08,940 --> 00:14:10,520 remove that piece of clothing from the Emperor. 318 00:14:10,740 --> 00:14:12,760 So let's see what happens. The SHAFer versus 319 00:14:12,760 --> 00:14:13,240 the Cracker. 320 00:14:15,800 --> 00:14:16,820 The very first 321 00:14:16,820 --> 00:14:18,420 approach is actually the most 322 00:14:18,420 --> 00:14:20,980 naive as well and that is injecting 323 00:14:20,980 --> 00:14:22,800 random frames. So what happens 324 00:14:22,800 --> 00:14:24,760 here is that the SHAFer can 325 00:14:24,760 --> 00:14:26,780 actually go ahead, send out any 326 00:14:26,780 --> 00:14:28,740 web data packet. Is this 327 00:14:28,800 --> 00:14:30,360 really going to affect Aircrack's performance? 328 00:14:30,760 --> 00:14:32,360 Most probably not. Why? 329 00:14:32,820 --> 00:14:34,700 As we have already discussed, only 330 00:14:34,700 --> 00:14:36,640 those packets which have weak IVs 331 00:14:36,640 --> 00:14:38,540 will influence the statistical 332 00:14:38,540 --> 00:14:40,820 analysis. And if you randomly 333 00:14:40,820 --> 00:14:42,240 just generate any packet, 334 00:14:42,480 --> 00:14:44,780 given that the weak IV distribution is very 335 00:14:44,780 --> 00:14:46,840 small and chunked, the probability that 336 00:14:46,840 --> 00:14:48,780 you will actually send out a large number 337 00:14:48,780 --> 00:14:50,820 of weak IV packets is very very less. 338 00:14:51,360 --> 00:14:51,880 So, 339 00:14:53,000 --> 00:14:54,740 Aircrack NG default itself 340 00:14:54,740 --> 00:14:56,760 has a lot of noise tolerance and we 341 00:14:56,760 --> 00:14:58,280 have tried this technique out in the lab. 342 00:14:58,800 --> 00:15:00,520 And you see that pretty much Aircrack can 343 00:15:00,520 --> 00:15:02,740 cack the key. And off goes 344 00:15:02,740 --> 00:15:03,120 the necklace. 345 00:15:05,440 --> 00:15:06,560 The next technique 346 00:15:08,180 --> 00:15:10,700 is going to be weak IV frames but with 347 00:15:10,700 --> 00:15:11,240 fixed size. 348 00:15:13,220 --> 00:15:14,660 So we have already discussed 349 00:15:14,660 --> 00:15:16,660 that weak IV frames is 350 00:15:16,660 --> 00:15:18,740 what is going to influence all these statistical 351 00:15:18,740 --> 00:15:20,800 calculations, right? But why fixed 352 00:15:20,800 --> 00:15:22,880 size? We are going to look into 353 00:15:22,880 --> 00:15:24,800 some technique later which is also going to 354 00:15:24,800 --> 00:15:26,600 use this property called fingerprinting. 355 00:15:26,660 --> 00:15:28,700 The reason is whenever a VIPS is 356 00:15:28,800 --> 00:15:30,640 going to deploy any sort of a prevention technique, 357 00:15:30,860 --> 00:15:32,000 there has to be some fingerprint. 358 00:15:32,420 --> 00:15:34,720 And having the frame size fixed is a very 359 00:15:34,720 --> 00:15:36,200 easy fingerprint. Note, 360 00:15:36,360 --> 00:15:38,700 this technique is one of the more naive 361 00:15:38,700 --> 00:15:40,420 techniques. We will talk about more sophisticated 362 00:15:40,420 --> 00:15:42,580 ones just in a little bit more. 363 00:15:42,840 --> 00:15:44,280 So how can we beat this? 364 00:15:45,560 --> 00:15:46,820 Do you need to write your own 365 00:15:46,820 --> 00:15:47,040 tool? 366 00:15:49,660 --> 00:15:50,480 I think not. 367 00:15:50,820 --> 00:15:52,680 Just go ahead, take the trace of 368 00:15:52,680 --> 00:15:54,640 all the weak IV packets. If you actually 369 00:15:54,640 --> 00:15:56,780 observe lot of weak IVs with 370 00:15:56,780 --> 00:15:58,640 fixed size, just go ahead and 371 00:15:58,800 --> 00:16:00,820 write your own simple wireshark 372 00:16:00,820 --> 00:16:02,780 filter to weed out by frame size. 373 00:16:04,020 --> 00:16:04,860 So any 374 00:16:04,860 --> 00:16:06,800 frame size filter can actually 375 00:16:06,800 --> 00:16:08,660 eliminate this sort of trivial 376 00:16:08,660 --> 00:16:09,520 and elementary shaft. 377 00:16:10,840 --> 00:16:12,220 Now let's look into some 378 00:16:12,900 --> 00:16:14,520 technique which is slightly more 379 00:16:14,520 --> 00:16:14,860 advanced. 380 00:16:17,660 --> 00:16:18,540 And that is 381 00:16:18,540 --> 00:16:20,400 shafing using a single key. 382 00:16:21,220 --> 00:16:22,660 So what happens here 383 00:16:22,660 --> 00:16:24,680 is that the shaffer is going 384 00:16:24,680 --> 00:16:26,660 to have his own unique key through 385 00:16:26,660 --> 00:16:28,380 which he is going to find out all possible 386 00:16:28,800 --> 00:16:29,200 weak IVs. 387 00:16:29,940 --> 00:16:32,040 Once he does that, he is going to send out 388 00:16:32,040 --> 00:16:34,420 all these weak IVs along with the first 389 00:16:34,420 --> 00:16:36,340 two encrypted bytes in order to match 390 00:16:36,340 --> 00:16:37,960 one or more of these statistical conditions. 391 00:16:38,660 --> 00:16:40,760 So all the tools, pretty much 392 00:16:40,760 --> 00:16:42,520 Aircrack and every other tool which is currently 393 00:16:42,520 --> 00:16:44,600 existing, are going to blindly 394 00:16:44,600 --> 00:16:46,580 plug in these weak IVs into their 395 00:16:46,580 --> 00:16:48,480 statistical calculations and 396 00:16:48,480 --> 00:16:50,680 either converge to the wrong key or 397 00:16:50,680 --> 00:16:52,740 will diverge without a solution and 398 00:16:52,740 --> 00:16:54,660 just exit as the case we saw 399 00:16:54,660 --> 00:16:56,600 in our demo. Right? So whether 400 00:16:56,600 --> 00:16:58,700 it's going to succeed or not pretty much depends on the very 401 00:16:58,800 --> 00:16:59,260 verification process. 402 00:17:00,020 --> 00:17:02,600 So how can we actually beat a 403 00:17:02,600 --> 00:17:04,120 shaffer who is using a single 404 00:17:04,760 --> 00:17:06,260 cryptographic web key to send out shaff? 405 00:17:12,860 --> 00:17:14,480 Actually the beauty is that 406 00:17:14,480 --> 00:17:16,200 Aircrack default can do it 407 00:17:16,200 --> 00:17:18,620 but it requires a very trivial modification. 408 00:17:19,280 --> 00:17:20,500 And that's what we call 409 00:17:20,500 --> 00:17:21,660 Aircrack visual inspection. 410 00:17:23,720 --> 00:17:24,740 So what is visual 411 00:17:24,740 --> 00:17:26,620 inspection? Visual inspection is 412 00:17:26,620 --> 00:17:28,480 the process through which we are going to weed out the 413 00:17:28,800 --> 00:17:30,180 anomalies. And when you say 414 00:17:30,180 --> 00:17:32,540 anomaly, you have to be very sure about what 415 00:17:32,540 --> 00:17:33,720 the normal behavior is. 416 00:17:34,040 --> 00:17:36,280 So what we observe over and over again 417 00:17:36,280 --> 00:17:38,680 you know, hundreds of experiments is that 418 00:17:38,680 --> 00:17:40,420 let's say we have a trace of around 419 00:17:40,420 --> 00:17:41,980 300,000 weak IVs 420 00:17:41,980 --> 00:17:44,440 then the maximum vote 421 00:17:44,440 --> 00:17:46,660 for any byte rarely goes about 422 00:17:46,660 --> 00:17:48,760 250. It's more like an empirical observation. 423 00:17:49,140 --> 00:17:50,620 Pretty much it's going to be lesser 424 00:17:50,620 --> 00:17:52,660 than 250. So if you really see 425 00:17:52,660 --> 00:17:54,800 a huge anomaly in the voting process 426 00:17:54,800 --> 00:17:56,860 you can weed out some of those possibilities. 427 00:17:57,900 --> 00:17:58,720 And that is 428 00:17:58,800 --> 00:18:00,580 what the visual inspection technique is all about. 429 00:18:01,000 --> 00:18:02,620 See, because the shaffer 430 00:18:02,620 --> 00:18:04,820 has to force the cracker to converge 431 00:18:04,820 --> 00:18:06,720 to the wrong key as soon as 432 00:18:06,720 --> 00:18:08,880 possible, right? He is going to be sending out 433 00:18:08,880 --> 00:18:09,700 these weak IV packets. 434 00:18:10,360 --> 00:18:12,680 And the distribution of votes which is going to be 435 00:18:12,680 --> 00:18:14,920 caused by these weak IVs is going to be 436 00:18:14,920 --> 00:18:16,800 very visible when you look at Aircrack. 437 00:18:16,940 --> 00:18:18,900 The problem right now is Aircrack 438 00:18:18,900 --> 00:18:20,000 just goes ahead and proceeds. 439 00:18:20,460 --> 00:18:22,560 What if we could matrix style 440 00:18:22,560 --> 00:18:24,780 freeze Aircrack when it is 441 00:18:24,780 --> 00:18:26,840 doing the cracking at every key byte 442 00:18:26,840 --> 00:18:28,160 and look at the voting distribution 443 00:18:28,800 --> 00:18:30,400 and if we can identify any 444 00:18:30,400 --> 00:18:31,880 anomaly there, weed that out. 445 00:18:33,280 --> 00:18:34,560 So let's look at a demo. 446 00:18:37,800 --> 00:18:38,720 I am going to be 447 00:18:38,720 --> 00:18:40,600 using the same trace which the 448 00:18:40,600 --> 00:18:42,260 Aircrack default failed to crack. 449 00:18:46,880 --> 00:18:48,780 So modified Aircrack trivially 450 00:18:48,780 --> 00:18:50,640 to actually stop at every key byte 451 00:18:50,640 --> 00:18:52,700 and I think this is included with the CD as well. 452 00:19:01,820 --> 00:19:02,820 So now we are 453 00:19:02,820 --> 00:19:04,760 about to crack the 0th byte of the key 454 00:19:04,760 --> 00:19:06,620 and if you noticed, Aircrack has just 455 00:19:06,620 --> 00:19:08,760 frozen over there and you can see the voting 456 00:19:08,760 --> 00:19:10,880 distribution. If you look at the voting 457 00:19:10,880 --> 00:19:12,800 distribution, what you find is that 458 00:19:12,800 --> 00:19:14,840 the highest possibility which is 459 00:19:14,840 --> 00:19:16,780 41 has a huge 460 00:19:16,780 --> 00:19:17,880 vote of 1580. 461 00:19:18,440 --> 00:19:20,600 This happened because the shaffer sent out 462 00:19:20,600 --> 00:19:22,640 weak IVs destined for that 463 00:19:22,640 --> 00:19:24,900 byte to be 41. So the attacker 464 00:19:24,900 --> 00:19:26,840 key was actually 41, 42, 43, 465 00:19:26,940 --> 00:19:28,780 44 and 45, right? 466 00:19:28,800 --> 00:19:30,680 So you will notice some of these things 467 00:19:30,680 --> 00:19:32,640 over and over again. So let's say we 468 00:19:32,640 --> 00:19:34,640 assume that, let's just go ahead 469 00:19:34,640 --> 00:19:36,660 with the cracking process and see how Aircrack fails. 470 00:19:37,020 --> 00:19:38,700 So Aircrack is going to ask me, should I 471 00:19:38,700 --> 00:19:40,560 go ahead with that value or some other new value? 472 00:19:40,820 --> 00:19:42,620 And I am going to say, let's just 473 00:19:42,620 --> 00:19:43,500 continue with 41. 474 00:19:44,680 --> 00:19:46,700 And if you notice, now 475 00:19:46,700 --> 00:19:48,720 for the second byte, the highest vote 476 00:19:48,720 --> 00:19:50,660 comes for 42, which is 477 00:19:50,660 --> 00:19:52,520 the second byte of the attacker's key. 478 00:19:53,000 --> 00:19:54,640 So by going ahead with this whole 479 00:19:54,640 --> 00:19:56,900 calculation, you will actually 480 00:19:56,900 --> 00:19:58,700 end up either converging to the 481 00:19:58,800 --> 00:19:59,360 attacker key 482 00:20:03,100 --> 00:20:04,560 or diverging to no solution. 483 00:20:04,860 --> 00:20:06,540 Why did this happen? Because 484 00:20:06,540 --> 00:20:08,440 Aircrack tried to verify against the 485 00:20:08,440 --> 00:20:10,600 shaff trace and the 486 00:20:10,600 --> 00:20:12,180 IVs which it picked up for verification 487 00:20:12,900 --> 00:20:14,780 actually had a couple of legitimate packets 488 00:20:14,780 --> 00:20:15,880 which were more than 2. 489 00:20:16,360 --> 00:20:18,740 Because of which the key typically could not 490 00:20:18,740 --> 00:20:20,140 be used to decrypt it. 491 00:20:20,420 --> 00:20:22,660 So now let's look at how we can use this visual 492 00:20:22,660 --> 00:20:24,340 inspection technique to weed out shaff. 493 00:20:25,720 --> 00:20:26,720 So what we are going to 494 00:20:26,720 --> 00:20:28,620 do here is 41 absolute anomaly 495 00:20:28,800 --> 00:20:30,240 absolute garbage. 496 00:20:30,560 --> 00:20:32,460 So let's go with the next value which is 67. 497 00:20:35,640 --> 00:20:36,940 Once again 1C 498 00:20:36,940 --> 00:20:38,820 absolute anomaly. The reason 499 00:20:38,820 --> 00:20:40,360 why 1C appears and not 42 500 00:20:40,360 --> 00:20:42,760 because now we are simulating the KSA 501 00:20:42,760 --> 00:20:44,560 to the next step, assuming that 502 00:20:44,560 --> 00:20:46,900 the value 41 is the 0th byte of the key. 503 00:20:52,540 --> 00:20:54,780 Once again 28 absolute anomaly 504 00:20:54,780 --> 00:20:56,220 let's use the next value. 505 00:20:58,800 --> 00:20:59,240 30 506 00:21:00,520 --> 00:21:02,720 And if you notice now Aircrack 507 00:21:02,720 --> 00:21:04,540 is able to crack that same 508 00:21:04,540 --> 00:21:05,780 trace and get you the key. 509 00:21:06,980 --> 00:21:08,460 Right? So a 510 00:21:08,460 --> 00:21:10,680 shaffer using a single key all he can do is 511 00:21:10,680 --> 00:21:12,680 sort of change the bias to such an 512 00:21:12,680 --> 00:21:14,140 extent that Aircrack is going to exit. 513 00:21:14,420 --> 00:21:16,480 But trivial modifications can do it. 514 00:21:16,640 --> 00:21:18,660 I am doing visual inspection by hand 515 00:21:18,660 --> 00:21:20,740 and sort of breakpointing at every level just to 516 00:21:20,740 --> 00:21:21,920 explain this concept. 517 00:21:22,220 --> 00:21:24,680 But this can be included. Note that 518 00:21:24,680 --> 00:21:26,220 this is different from the Fudge Factor. 519 00:21:26,520 --> 00:21:28,740 Fudge Factor is going to divide 1580 520 00:21:28,800 --> 00:21:30,060 the highest vote 41 521 00:21:30,840 --> 00:21:32,820 divided by 32 which is still 522 00:21:32,820 --> 00:21:34,780 not going to include 69 or some of these 523 00:21:34,780 --> 00:21:36,120 values because of which it exits. 524 00:21:42,740 --> 00:21:44,760 So what are the strengths and weaknesses of this 525 00:21:44,760 --> 00:21:46,640 technique? This can crack key 526 00:21:46,640 --> 00:21:48,840 in many cases. Especially in the single 527 00:21:48,840 --> 00:21:50,480 key and the multiple shaft key 528 00:21:50,480 --> 00:21:52,800 cases. We will discuss the multiple one in the 529 00:21:52,800 --> 00:21:54,100 next slide. 530 00:21:54,380 --> 00:21:56,800 The weakness is it's not going to work for random keys 531 00:21:56,800 --> 00:21:57,940 and we will look at that as well. 532 00:21:59,200 --> 00:22:00,800 The point is we are going to 533 00:22:00,800 --> 00:22:02,700 present you a wide gamut of techniques 534 00:22:02,700 --> 00:22:04,660 and all these techniques 535 00:22:04,660 --> 00:22:06,640 have an overlap. Visual inspection 536 00:22:06,640 --> 00:22:08,480 can work for the next one and this one 537 00:22:08,480 --> 00:22:09,600 so on and so forth. 538 00:22:09,940 --> 00:22:12,720 In the end we will try to assimilate this 539 00:22:12,720 --> 00:22:14,720 together and show you in the form of a chart 540 00:22:14,720 --> 00:22:16,100 how all these techniques overlap. 541 00:22:17,640 --> 00:22:18,740 So the next type 542 00:22:18,740 --> 00:22:20,300 of shaft is using multiple keys. 543 00:22:20,760 --> 00:22:22,820 So now the shaffer let's say has 4, 5, 544 00:22:22,860 --> 00:22:24,760 6 keys, generates all the weak 545 00:22:24,760 --> 00:22:26,020 IVs and sends them out. 546 00:22:26,620 --> 00:22:27,980 So what's going to happen? 547 00:22:28,800 --> 00:22:30,700 And how can we beat such kind of a 548 00:22:30,700 --> 00:22:32,520 shaffing is using sequence number analysis. 549 00:22:33,740 --> 00:22:34,800 How does this work? 550 00:22:36,040 --> 00:22:36,940 So the sequence 551 00:22:36,940 --> 00:22:38,720 number as all of us know is part 552 00:22:38,720 --> 00:22:40,720 of the MAC header and is present in all 553 00:22:40,720 --> 00:22:41,920 the management and data packets. 554 00:22:42,680 --> 00:22:44,580 The point to note is that for 555 00:22:44,580 --> 00:22:46,760 every source there is going to be a 556 00:22:46,760 --> 00:22:48,300 distinct sequence number pattern 557 00:22:48,300 --> 00:22:50,760 which you can see. And pretty 558 00:22:50,760 --> 00:22:52,420 much all the MAC spoofing algorithms 559 00:22:52,420 --> 00:22:54,920 detection algorithms which are currently 560 00:22:54,920 --> 00:22:56,840 used in VIPS rely on this 561 00:22:56,840 --> 00:22:58,720 form of detection to find an 562 00:22:58,800 --> 00:22:59,760 attacker spoofing a MAC. 563 00:23:00,360 --> 00:23:02,580 So using this we can 564 00:23:02,580 --> 00:23:04,280 pretty much filter out the shaft 565 00:23:04,280 --> 00:23:05,620 and the real data traffic. 566 00:23:06,460 --> 00:23:08,480 Just a few hours before we submitted this 567 00:23:08,480 --> 00:23:10,660 presentation we also came across Joshua 568 00:23:10,660 --> 00:23:12,520 Wright's blog in which he advocates 569 00:23:12,520 --> 00:23:14,740 this as a technique. I am sure most of you 570 00:23:14,740 --> 00:23:16,520 know about Joshua. He is a well known security 571 00:23:16,520 --> 00:23:17,820 researcher in the wireless community. 572 00:23:19,080 --> 00:23:20,580 So how does the MAC 573 00:23:20,580 --> 00:23:22,700 spoofing detection algorithm using sequence number 574 00:23:22,700 --> 00:23:24,600 work? The pseudo code is pretty simple. 575 00:23:25,360 --> 00:23:26,280 Given a trace 576 00:23:26,800 --> 00:23:28,080 for a device in the trace 577 00:23:28,800 --> 00:23:30,620 and the first sequence number from there 578 00:23:30,620 --> 00:23:32,620 on for every sequence number which you 579 00:23:32,620 --> 00:23:33,940 encounter for the same device 580 00:23:33,940 --> 00:23:36,540 take the difference between the current and the 581 00:23:36,540 --> 00:23:38,540 previous. If it is going to be lesser 582 00:23:38,540 --> 00:23:40,740 than a threshold go ahead accept 583 00:23:40,740 --> 00:23:42,820 that packet. If it is not going to be lesser 584 00:23:42,820 --> 00:23:44,680 than the threshold discard the packet. 585 00:23:44,980 --> 00:23:46,400 The threshold pretty much 586 00:23:46,400 --> 00:23:48,720 is going to depend upon how lossy your 587 00:23:48,720 --> 00:23:49,900 trace file is going to be. 588 00:23:52,260 --> 00:23:54,720 I will actually do a demonstration of this technique 589 00:23:54,720 --> 00:23:56,720 along with the next one together. 590 00:23:57,420 --> 00:23:58,700 So how can 591 00:23:58,800 --> 00:24:00,920 shaft insertion sort of be made 592 00:24:00,920 --> 00:24:02,740 more sophisticated is by 593 00:24:02,740 --> 00:24:03,800 using random keys. 594 00:24:04,550 --> 00:24:06,860 So now the attacker is taking the attack 595 00:24:06,860 --> 00:24:08,180 to a totally different level. 596 00:24:08,560 --> 00:24:10,560 He is going to take a single key 597 00:24:10,560 --> 00:24:11,920 which he is going to randomly generate 598 00:24:11,920 --> 00:24:14,620 find out a couple of weak IVs, inject 599 00:24:14,620 --> 00:24:16,520 those packets then he is going to generate 600 00:24:16,520 --> 00:24:18,840 another random key and continue the process. 601 00:24:19,340 --> 00:24:20,760 So is it possible to 602 00:24:20,760 --> 00:24:22,780 beat the random key case using a technique? 603 00:24:24,040 --> 00:24:24,880 The technique 604 00:24:24,880 --> 00:24:26,080 which we propose as a filter 605 00:24:26,670 --> 00:24:28,700 is using initialization vector analysis. 606 00:24:29,320 --> 00:24:29,920 Now 607 00:24:30,800 --> 00:24:32,460 beautiful fact about the IV 608 00:24:32,460 --> 00:24:34,760 is that it also follows a trend 609 00:24:34,760 --> 00:24:36,060 just like the sequence number. 610 00:24:36,620 --> 00:24:38,900 Now most of you must be having this query 611 00:24:38,900 --> 00:24:40,760 that IVs might also be 612 00:24:40,760 --> 00:24:42,440 random. They need not be sequential. 613 00:24:43,140 --> 00:24:44,540 But in the context 614 00:24:44,540 --> 00:24:46,740 of web shafting because it is 615 00:24:46,740 --> 00:24:48,660 intended to protect legacy clients 616 00:24:48,660 --> 00:24:50,760 and legacy devices you will 617 00:24:50,760 --> 00:24:53,000 note that all these devices invariably 618 00:24:53,000 --> 00:24:54,520 have incrementally increasing 619 00:24:54,520 --> 00:24:56,840 IVs as well. That is why 620 00:24:56,840 --> 00:24:58,680 we can discuss the 621 00:24:58,800 --> 00:25:00,720 IV based filter for web 622 00:25:00,720 --> 00:25:02,160 shafting and against it. 623 00:25:02,580 --> 00:25:04,420 So Joshua Wright also advocates this technique 624 00:25:04,420 --> 00:25:06,620 on his blog and the pseudo 625 00:25:06,620 --> 00:25:08,280 code is absolutely simple. 626 00:25:08,480 --> 00:25:10,400 Only point to remember is the 627 00:25:10,400 --> 00:25:12,460 IV is going to be there only in data packets 628 00:25:12,460 --> 00:25:14,120 and not in management packets. 629 00:25:16,200 --> 00:25:18,500 So let's look at a demonstration of this technique. 630 00:25:22,540 --> 00:25:24,760 So just to not meddle 631 00:25:24,760 --> 00:25:26,540 around with the code 632 00:25:26,540 --> 00:25:28,660 of Aircrack or any other cracker I have 633 00:25:28,800 --> 00:25:30,600 written a separate utility which is 634 00:25:30,600 --> 00:25:32,640 going to run through a trace and filter it out 635 00:25:32,640 --> 00:25:34,600 based upon sequence number and IVs. 636 00:25:35,220 --> 00:25:36,880 Both of them together are very robust 637 00:25:36,880 --> 00:25:38,660 and that's what we are going to do. But before that 638 00:25:39,420 --> 00:25:40,780 let's quickly look at 639 00:25:40,780 --> 00:25:41,860 how the shaft trace 640 00:25:42,960 --> 00:25:43,980 is going to look like 641 00:25:43,980 --> 00:25:45,780 for the four key case. 642 00:25:48,100 --> 00:25:48,760 So let's 643 00:25:48,760 --> 00:25:50,400 once again run the default Aircrack. 644 00:25:53,440 --> 00:25:54,600 Actually we need to run visual 645 00:25:54,600 --> 00:25:56,580 inspection so that we can freeze 646 00:25:56,580 --> 00:25:57,460 and look at the distribution. 647 00:26:05,880 --> 00:26:07,240 So this trace 648 00:26:07,240 --> 00:26:09,020 contains all the legitimate 649 00:26:09,020 --> 00:26:10,560 networks traffic 650 00:26:10,560 --> 00:26:12,760 along with shaft which was 651 00:26:12,760 --> 00:26:14,100 generated using four keys. 652 00:26:15,020 --> 00:26:16,560 It's a slightly larger trace. 653 00:26:19,280 --> 00:26:19,920 Right. 654 00:26:20,020 --> 00:26:22,400 So now look at the voting pattern. 655 00:26:22,660 --> 00:26:24,840 If you notice 63, 31, 656 00:26:25,040 --> 00:26:25,900 41 and 45 657 00:26:25,900 --> 00:26:28,780 the first four possibilities have a 658 00:26:28,800 --> 00:26:30,580 huge anomaly in the 659 00:26:30,580 --> 00:26:31,740 votes which they have got. 660 00:26:32,740 --> 00:26:33,240 Right. 661 00:26:34,360 --> 00:26:36,720 So let's exit this here and now 662 00:26:36,720 --> 00:26:38,260 let's use our sequence number filter 663 00:26:38,750 --> 00:26:40,620 to go ahead and filter this trace out. 664 00:27:05,960 --> 00:27:07,880 We'll write the absolute 665 00:27:07,880 --> 00:27:10,380 I would say the trace after filtering into 666 00:27:10,380 --> 00:27:11,180 filtered.cap. 667 00:27:36,520 --> 00:27:38,580 Actually the minus N64 confused it. 668 00:27:38,640 --> 00:27:40,800 That was Aircrack's command line argument 669 00:27:40,800 --> 00:27:42,800 and not for the sequence number IV filter. 670 00:27:43,020 --> 00:27:43,840 It's a separate utility. 671 00:27:47,780 --> 00:27:49,480 So the filters are being initialized 672 00:27:49,480 --> 00:27:50,640 and there are a lot of debugs 673 00:27:51,160 --> 00:27:52,780 which pretty much you can take a look later. 674 00:27:53,020 --> 00:27:55,300 So now what we have in the same directory 675 00:27:55,300 --> 00:27:57,180 is a filtered.cap trace 676 00:27:57,180 --> 00:27:58,780 which was generated using the 677 00:27:58,780 --> 00:27:59,820 four key shaft trace. 678 00:28:00,120 --> 00:28:01,940 Now just to play it even 679 00:28:03,020 --> 00:28:05,020 let's fire Aircrack NG default 680 00:28:05,020 --> 00:28:06,460 once again which comes with backtrack 681 00:28:07,300 --> 00:28:08,540 on this new filtered trace. 682 00:28:17,380 --> 00:28:18,680 So now if you notice 683 00:28:18,680 --> 00:28:20,620 all that anomaly which was caused 684 00:28:20,620 --> 00:28:22,540 in those huge votes pretty much 685 00:28:22,540 --> 00:28:24,100 don't appear on your screen. Right. 686 00:28:25,300 --> 00:28:26,500 So let's go ahead with its cracking process 687 00:28:26,500 --> 00:28:28,440 and it's trying to crack the web key. 688 00:28:35,980 --> 00:28:36,460 Right. 689 00:28:37,100 --> 00:28:39,120 Same trace we use the 690 00:28:39,120 --> 00:28:40,300 sequence number and IV filter 691 00:28:40,300 --> 00:28:42,740 and after that Aircrack is able to crack it. 692 00:28:43,840 --> 00:28:45,040 So this shows that 693 00:28:45,040 --> 00:28:46,520 sequence number and IV together 694 00:28:46,520 --> 00:28:48,920 are pretty robust. Now let's look at the 695 00:28:48,920 --> 00:28:50,600 random key case. Right. For every 696 00:28:52,500 --> 00:28:53,180 Let's actually 697 00:28:53,180 --> 00:28:54,760 run Aircrack visual inspection 698 00:29:08,240 --> 00:29:10,940 And let's look at how the random key generated 699 00:29:10,940 --> 00:29:12,180 shaft actually looks like. 700 00:29:12,400 --> 00:29:14,080 So this contains both the 701 00:29:14,080 --> 00:29:16,140 real networks data along with 702 00:29:16,140 --> 00:29:17,980 shaft which was generated using random keys. 703 00:29:18,200 --> 00:29:19,160 And if you notice 704 00:29:19,160 --> 00:29:20,560 nothing is actually predictable. 705 00:29:20,820 --> 00:29:22,640 And there are also a lot of negative values 706 00:29:22,640 --> 00:29:25,180 which are coming in. Anybody ever notice 707 00:29:25,300 --> 00:29:26,700 negative values while they cracked web? 708 00:29:28,220 --> 00:29:29,040 For the voting. 709 00:29:29,160 --> 00:29:31,000 The reason why this is happening is 710 00:29:31,000 --> 00:29:32,960 one of the correct conditions which are there 711 00:29:32,960 --> 00:29:34,680 is an error correcting condition 712 00:29:35,300 --> 00:29:37,040 which has a negative vote. So if you generate 713 00:29:37,040 --> 00:29:39,080 things randomly you do not have a 714 00:29:39,080 --> 00:29:40,500 control over what's going to happen. 715 00:29:40,800 --> 00:29:42,780 But the beauty is if you notice 716 00:29:43,660 --> 00:29:44,960 67 which is G 717 00:29:44,960 --> 00:29:46,760 and the very first byte of the web key 718 00:29:47,180 --> 00:29:49,080 does not appear in any of the 719 00:29:49,080 --> 00:29:50,940 possibilities. Right. 720 00:29:51,780 --> 00:29:53,240 So the attacker does not have 721 00:29:53,240 --> 00:29:55,060 control over what is actually going to come up 722 00:29:55,060 --> 00:29:56,120 as the final distribution. 723 00:29:56,720 --> 00:29:59,000 But at the very least he's going to end up 724 00:29:59,000 --> 00:30:01,220 masking the real networks key byte 725 00:30:01,820 --> 00:30:02,920 using random keys. 726 00:30:04,300 --> 00:30:05,040 So once again 727 00:30:05,040 --> 00:30:07,120 what we've seen is that we've conducted a lot of 728 00:30:07,120 --> 00:30:09,160 experiments and the sequence number 729 00:30:09,160 --> 00:30:11,120 and IV filter also is going to 730 00:30:11,120 --> 00:30:12,560 protect against that sort of a shafing. 731 00:30:30,100 --> 00:30:31,380 So let's store the 732 00:30:32,580 --> 00:30:33,540 trace in filter 733 00:30:33,540 --> 00:30:35,100 to dot cap and once again 734 00:30:35,100 --> 00:30:37,020 what I'm going to do is let's first actually 735 00:30:37,020 --> 00:30:37,840 run air crack 736 00:30:40,420 --> 00:30:41,380 the default 737 00:30:41,380 --> 00:30:43,220 version on the random key 738 00:30:43,220 --> 00:30:43,860 shaf. 739 00:30:44,820 --> 00:30:46,840 Just to once again show that look this is the 740 00:30:46,840 --> 00:30:48,840 shaf which air crack could not crack by default. 741 00:30:50,200 --> 00:30:51,240 I think it runs for 742 00:30:51,240 --> 00:30:52,860 around 15 to 20 seconds. 743 00:30:53,240 --> 00:30:54,660 And if you notice the voting pattern 744 00:30:54,660 --> 00:30:57,120 has negative values suddenly very large values 745 00:30:57,120 --> 00:30:58,880 are happening. You know pretty much 746 00:30:58,880 --> 00:31:01,100 unpredictable because what you assume at 747 00:31:01,100 --> 00:31:02,940 the first step to be let's say the 748 00:31:02,940 --> 00:31:05,120 zeroth byte of the key is going 749 00:31:05,120 --> 00:31:07,100 to decide how you're going to simulate the rest of 750 00:31:07,100 --> 00:31:07,560 the key essay. 751 00:31:08,480 --> 00:31:10,000 So air crack exits. 752 00:31:10,760 --> 00:31:11,760 Now let's give 753 00:31:16,640 --> 00:31:19,080 the same default air crack the filter trace. 754 00:31:24,020 --> 00:31:25,200 Key is pretty much found. 755 00:31:25,580 --> 00:31:26,020 Right? 756 00:31:29,580 --> 00:31:30,920 So with a lot of experimentation 757 00:31:30,920 --> 00:31:33,320 you know we basically had two groups 758 00:31:33,320 --> 00:31:35,120 one playing the shaffer and one the cracker. 759 00:31:35,820 --> 00:31:36,880 We saw that 760 00:31:37,340 --> 00:31:39,120 sequence number and IV together is 761 00:31:39,120 --> 00:31:41,300 very very robust. The strength is that 762 00:31:41,300 --> 00:31:43,160 this can work against almost all 763 00:31:43,160 --> 00:31:45,100 the different kinds of shaf. Single, 764 00:31:45,180 --> 00:31:46,060 multiple and random. 765 00:31:47,220 --> 00:31:49,240 At the very same time because it is a passive 766 00:31:49,240 --> 00:31:51,080 and an offline technique it is more preferred. 767 00:31:51,740 --> 00:31:53,160 And an independent shaf 768 00:31:53,240 --> 00:31:54,940 generator, shaf separator 769 00:31:54,940 --> 00:31:57,160 as we've just made can be easily 770 00:31:57,160 --> 00:31:58,920 built. The weakness of course 771 00:31:58,920 --> 00:32:00,820 is that IVs may not be sequential 772 00:32:00,820 --> 00:32:03,140 for all devices. It can be random. 773 00:32:03,360 --> 00:32:04,560 But the point remains 774 00:32:05,020 --> 00:32:06,860 that for all legacy devices which 775 00:32:06,860 --> 00:32:07,940 web shafing is recommended 776 00:32:08,660 --> 00:32:11,060 to basically use with in order to protect web 777 00:32:11,800 --> 00:32:13,360 have sequential IVs. 778 00:32:14,560 --> 00:32:15,200 So now 779 00:32:15,200 --> 00:32:17,140 moving on. Pretty much if you think about 780 00:32:17,140 --> 00:32:19,200 it the way in which weak IVs can be generated 781 00:32:19,200 --> 00:32:21,200 is using a single, multiple or random 782 00:32:21,200 --> 00:32:23,220 key. Right? And because we were using 783 00:32:23,240 --> 00:32:24,760 the sequence number and IV analysis 784 00:32:24,760 --> 00:32:26,940 we decided to take it 785 00:32:26,940 --> 00:32:28,840 a step further. So 786 00:32:28,840 --> 00:32:30,700 now we are going to talk about an approach 787 00:32:31,240 --> 00:32:32,880 which currently is not implemented 788 00:32:32,880 --> 00:32:35,100 anywhere and most likely will never be 789 00:32:35,100 --> 00:32:36,900 implemented but more from a 790 00:32:36,900 --> 00:32:39,020 completeness perspective it is important 791 00:32:39,020 --> 00:32:39,820 to discuss it. 792 00:32:40,760 --> 00:32:42,920 So this approach is somehow 793 00:32:42,920 --> 00:32:44,900 making the frames indistinguishable 794 00:32:44,900 --> 00:32:46,760 for the AP at least 795 00:32:46,760 --> 00:32:48,960 as far as the sequence number and IV is concerned. 796 00:32:49,540 --> 00:32:51,140 The only way you can 797 00:32:51,140 --> 00:32:53,060 do this if you have web 798 00:32:53,240 --> 00:32:55,260 shafing as a feature in the AP 799 00:32:55,260 --> 00:32:56,720 itself. Right? 800 00:32:56,860 --> 00:32:58,900 Only then can you not have any collisions 801 00:32:58,900 --> 00:33:00,140 if you are trying to spoof it. 802 00:33:00,480 --> 00:33:02,160 So if this is somehow achieved 803 00:33:02,160 --> 00:33:04,300 how can we beat this? 804 00:33:06,700 --> 00:33:09,080 The answer lies in a filter called 805 00:33:09,080 --> 00:33:10,180 Active Frame Replay. 806 00:33:10,680 --> 00:33:11,700 Now what is this? 807 00:33:13,180 --> 00:33:14,580 The problem with web is 808 00:33:14,580 --> 00:33:16,500 it's not just the cryptographic vulnerabilities 809 00:33:16,500 --> 00:33:18,680 which have sort of caused all those cracks 810 00:33:19,120 --> 00:33:21,060 it's also other things such as 811 00:33:21,060 --> 00:33:23,000 web is vulnerable to replay attack as well. 812 00:33:23,160 --> 00:33:24,640 So you bandage one crack 813 00:33:24,640 --> 00:33:26,940 we can pretty much poke a hole from the other one. 814 00:33:27,340 --> 00:33:29,060 So the basic idea is simple 815 00:33:29,060 --> 00:33:31,140 web has no replay protection 816 00:33:31,140 --> 00:33:32,460 second of all 817 00:33:32,460 --> 00:33:34,880 the web MAC header can 818 00:33:34,880 --> 00:33:36,740 be modified trivially 819 00:33:36,740 --> 00:33:38,720 and actually retransmitted over the air. 820 00:33:39,100 --> 00:33:40,920 So what we are going to use in this 821 00:33:40,920 --> 00:33:42,860 technique is take every 822 00:33:42,860 --> 00:33:45,000 packet which we have in our corrupted 823 00:33:45,000 --> 00:33:46,820 trace, change the destination 824 00:33:46,820 --> 00:33:48,320 address to the broadcast 825 00:33:48,320 --> 00:33:50,400 or a chosen multicast address 826 00:33:51,060 --> 00:33:52,720 and send it back to the AP. 827 00:33:53,760 --> 00:33:55,240 Now what's going to happen is 828 00:33:55,240 --> 00:33:57,020 if the data packet 829 00:33:57,020 --> 00:33:59,020 which we send belongs to the 830 00:33:59,020 --> 00:34:00,840 authorized network the AP 831 00:34:00,840 --> 00:34:01,940 is going to replay it 832 00:34:02,700 --> 00:34:04,760 because first of all the data packet 833 00:34:04,760 --> 00:34:06,140 will be decrypted correctly 834 00:34:06,140 --> 00:34:09,000 and then because it is decrypted the AP is going to 835 00:34:09,000 --> 00:34:10,720 look at the destination and forward it to that 836 00:34:10,720 --> 00:34:12,560 as we are using a broadcast 837 00:34:12,560 --> 00:34:15,020 and a multicast destination it has to be 838 00:34:15,020 --> 00:34:16,280 once again sent over the air. 839 00:34:16,880 --> 00:34:18,880 Now let's say the AP is going to encounter 840 00:34:18,880 --> 00:34:20,980 a shaft data packet which we 841 00:34:21,060 --> 00:34:22,400 have already inserted using the same technique 842 00:34:22,880 --> 00:34:24,620 the AP will fail to decrypt it 843 00:34:24,620 --> 00:34:26,040 and simply discard it. 844 00:34:26,780 --> 00:34:28,760 So what's going to happen is we are going to see 845 00:34:28,760 --> 00:34:29,980 the packets which we sent 846 00:34:29,980 --> 00:34:32,400 we are going to replay them and only the real 847 00:34:32,400 --> 00:34:34,420 networks data packets will be replayed. 848 00:34:34,440 --> 00:34:36,600 So the big question is how can we identify 849 00:34:36,600 --> 00:34:38,380 the packets which we just replayed, right? 850 00:34:38,720 --> 00:34:40,900 Because the AP is going to actually encrypt them 851 00:34:40,900 --> 00:34:41,660 with a different IV. 852 00:34:42,340 --> 00:34:44,900 The answer is simple, what we could 853 00:34:44,900 --> 00:34:46,860 do is we could randomly generate 854 00:34:46,860 --> 00:34:48,820 a multicast address and use that 855 00:34:48,820 --> 00:34:50,580 as a destination and then 856 00:34:51,060 --> 00:34:53,000 keep it long enough in memory, let's say 2 or 3 857 00:34:53,000 --> 00:34:54,900 milliseconds and wait and see if 858 00:34:54,900 --> 00:34:56,940 we are actually seeing a data packet from the AP 859 00:34:56,940 --> 00:34:59,040 which has the same destination multicast 860 00:34:59,040 --> 00:35:00,980 address. Also we can 861 00:35:00,980 --> 00:35:02,600 use the frame size as another parameter. 862 00:35:03,280 --> 00:35:05,080 What we've noticed is using both 863 00:35:05,080 --> 00:35:07,140 of these together, technique pretty much 864 00:35:07,140 --> 00:35:08,440 is very robust and works 865 00:35:09,060 --> 00:35:09,540 very well. 866 00:35:10,680 --> 00:35:13,060 Also 100% shaft separation is possible. 867 00:35:13,540 --> 00:35:14,920 The reason is very simple 868 00:35:14,920 --> 00:35:16,620 this is how the protocol works 869 00:35:16,620 --> 00:35:17,820 you cannot change that. 870 00:35:20,300 --> 00:35:21,620 So there are two reasons 871 00:35:21,620 --> 00:35:22,940 why I cannot do an active replay 872 00:35:22,940 --> 00:35:23,540 live here. 873 00:35:23,760 --> 00:35:26,400 One is it's going to take around 30 to 40 minutes 874 00:35:26,400 --> 00:35:28,560 and the second is this being DEFCON 875 00:35:28,560 --> 00:35:30,100 I'm sure somebody is going to DOS me. 876 00:35:33,200 --> 00:35:34,500 So the technique works 877 00:35:34,500 --> 00:35:35,480 and I think theoretically 878 00:35:35,480 --> 00:35:36,800 it's already been used 879 00:35:36,800 --> 00:35:38,600 in the tool called chop-chop 880 00:35:38,600 --> 00:35:39,360 which Kodak released. 881 00:35:41,600 --> 00:35:43,320 So what we notice is that 882 00:35:43,320 --> 00:35:44,560 for any trace which you have 883 00:35:44,560 --> 00:35:46,180 use the active replay technique 884 00:35:46,180 --> 00:35:47,700 what you get back 885 00:35:47,820 --> 00:35:49,900 is going to be totally pure data 886 00:35:49,900 --> 00:35:51,600 traffic which originated from the 887 00:35:51,600 --> 00:35:52,140 authorized network. 888 00:35:53,760 --> 00:35:55,640 There's also a good thing about this technique 889 00:35:56,160 --> 00:35:57,120 and that is 890 00:35:57,660 --> 00:35:59,860 if you send a good data packet to the AP 891 00:35:59,860 --> 00:36:01,360 it's going to give you 892 00:36:01,360 --> 00:36:03,080 a new data packet as a bonus 893 00:36:03,080 --> 00:36:05,980 and that's going to have a new IV in it. 894 00:36:06,860 --> 00:36:07,980 So think about it 895 00:36:07,980 --> 00:36:09,420 right? Good data packet 896 00:36:09,420 --> 00:36:11,180 get back another data packet as a bonus. 897 00:36:12,420 --> 00:36:13,900 This technique is going to work 898 00:36:13,900 --> 00:36:15,220 for any kind of shaft. 899 00:36:15,980 --> 00:36:17,720 Also 100% shaft separation 900 00:36:17,820 --> 00:36:18,320 is possible. 901 00:36:18,580 --> 00:36:19,820 At the very same time 902 00:36:19,820 --> 00:36:21,440 because we are totally oblivious 903 00:36:21,440 --> 00:36:22,540 and really do not care about 904 00:36:22,540 --> 00:36:23,580 what the sequence number 905 00:36:23,580 --> 00:36:26,540 or the initialization vector was 906 00:36:26,540 --> 00:36:28,120 for the device which returns 907 00:36:28,120 --> 00:36:29,580 so pretty much we can use it 908 00:36:29,580 --> 00:36:32,300 and this can be done in real time as well. 909 00:36:33,300 --> 00:36:35,540 Lot of you guys must have already used tools 910 00:36:35,540 --> 00:36:36,680 like PCAP to AIR 911 00:36:37,500 --> 00:36:39,240 so that can be trivially modified 912 00:36:39,240 --> 00:36:40,140 to support this. 913 00:36:41,380 --> 00:36:43,200 The weaknesses of course is that 914 00:36:43,200 --> 00:36:44,300 this is not a passive approach. 915 00:36:47,820 --> 00:36:49,060 You have to be able to replay these packets. 916 00:36:49,400 --> 00:36:50,620 The second thing is 917 00:36:50,620 --> 00:36:53,600 if let's suppose the authentication 918 00:36:53,600 --> 00:36:55,280 which the AP has is open 919 00:36:55,780 --> 00:36:56,980 you can spoof an association 920 00:36:56,980 --> 00:36:58,260 you can spoof an authentication. 921 00:36:58,800 --> 00:37:01,320 If there is a shared key authentication in place 922 00:37:01,900 --> 00:37:03,600 and if you are unlucky enough 923 00:37:03,600 --> 00:37:05,420 not to have a shared key authentication 924 00:37:05,420 --> 00:37:07,060 transaction in your trace file 925 00:37:07,060 --> 00:37:09,540 you will have to wait for a client to be associated. 926 00:37:12,620 --> 00:37:13,660 So now 927 00:37:13,660 --> 00:37:15,080 let's move on to the final technique 928 00:37:15,080 --> 00:37:17,440 and if you notice the emperor is looking 929 00:37:17,820 --> 00:37:17,960 very worried. 930 00:37:19,880 --> 00:37:21,560 So the final 931 00:37:22,280 --> 00:37:23,980 sophistication could actually be 932 00:37:23,980 --> 00:37:25,840 that pretty much using a 933 00:37:25,840 --> 00:37:27,580 super secret magic potion 934 00:37:27,580 --> 00:37:28,180 you know 935 00:37:30,300 --> 00:37:31,740 absolutely use something 936 00:37:31,740 --> 00:37:33,460 I mean which nobody can even think of 937 00:37:33,460 --> 00:37:34,920 totally unrealistic but still 938 00:37:34,920 --> 00:37:37,120 some way in which shaft could be generated 939 00:37:37,120 --> 00:37:38,140 some other way. 940 00:37:40,140 --> 00:37:41,020 For that 941 00:37:41,020 --> 00:37:43,100 the replay technique is going to work 942 00:37:43,100 --> 00:37:44,740 because that's where the protocol works. 943 00:37:45,060 --> 00:37:46,960 Another important point to note here 944 00:37:47,820 --> 00:37:48,200 is fingerprinting. 945 00:37:48,420 --> 00:37:50,720 Why is fingerprinting so important? 946 00:37:52,220 --> 00:37:53,380 See the implementation 947 00:37:53,380 --> 00:37:55,400 of shafting dictates that 948 00:37:55,400 --> 00:37:57,780 you have to have an identifiable 949 00:37:57,780 --> 00:37:59,020 recognizable fingerprint 950 00:37:59,020 --> 00:38:00,680 in the packets which you send. 951 00:38:01,040 --> 00:38:02,860 Just think about it. There could be two whips 952 00:38:02,860 --> 00:38:03,940 which have an overlap region 953 00:38:03,940 --> 00:38:07,020 and if they do not identify the shaft packets they send 954 00:38:07,020 --> 00:38:08,960 they are going to shaft each other's packets. 955 00:38:09,980 --> 00:38:11,380 So fingerprint is 956 00:38:11,380 --> 00:38:13,560 absolutely mandatory for this technique. 957 00:38:13,860 --> 00:38:15,940 So how can we find a usable fingerprint? 958 00:38:16,360 --> 00:38:17,540 Now this is where 959 00:38:17,820 --> 00:38:19,100 it is implementation specific. 960 00:38:19,880 --> 00:38:21,620 So what we could do is check 961 00:38:21,620 --> 00:38:23,780 the packet header for various abnormalities 962 00:38:23,780 --> 00:38:25,140 duration field 963 00:38:25,140 --> 00:38:27,600 you know some other field where some value is there 964 00:38:27,600 --> 00:38:29,720 also the packet could be of fixed length 965 00:38:29,720 --> 00:38:31,760 something could be prepended or appended 966 00:38:31,760 --> 00:38:33,820 to the packet. I mean there are a lot of possibilities. 967 00:38:34,560 --> 00:38:35,760 The point to understand 968 00:38:35,760 --> 00:38:37,340 here is fingerprinting 969 00:38:37,340 --> 00:38:39,600 will be there and it's very easy to 970 00:38:39,600 --> 00:38:40,360 recognize a fingerprint. 971 00:38:41,380 --> 00:38:43,420 Maximum it could take is a couple of hours 972 00:38:43,420 --> 00:38:44,900 maybe a day or a week. 973 00:38:45,020 --> 00:38:47,620 But when that happens somebody is going to release 974 00:38:47,820 --> 00:38:49,660 a fingerprint and all guys 975 00:38:49,660 --> 00:38:51,960 who actually could collect a trace 976 00:38:52,720 --> 00:38:53,620 with such a 977 00:38:53,620 --> 00:38:55,880 shafting deployment can go ahead and decrypt 978 00:38:55,880 --> 00:38:57,500 the entire trace by 979 00:38:57,500 --> 00:38:59,600 weeding out packets which exhibit that fingerprint. 980 00:39:01,140 --> 00:39:02,180 So fingerprinting 981 00:39:02,180 --> 00:39:03,160 is a real powerful technique. 982 00:39:05,440 --> 00:39:07,700 Okay so pretty much we have covered the nine 983 00:39:07,700 --> 00:39:09,740 yards from the very naive to the most sophisticated. 984 00:39:12,400 --> 00:39:13,740 So who would like to see that? 985 00:39:15,620 --> 00:39:16,920 I am sure not many. 986 00:39:21,920 --> 00:39:23,700 Okay so now let's talk about 987 00:39:23,700 --> 00:39:25,960 the overlapping of the various 988 00:39:25,960 --> 00:39:27,980 countermeasures. The point to understand 989 00:39:27,980 --> 00:39:29,900 here is that when I say sequence number and IV 990 00:39:29,900 --> 00:39:31,860 that does not mean it only applies 991 00:39:31,860 --> 00:39:33,860 for the technique I used it as a 992 00:39:33,860 --> 00:39:35,980 filter against. There is a lot of overlap 993 00:39:35,980 --> 00:39:37,700 and if you notice for 994 00:39:37,700 --> 00:39:39,860 every possible way in which shaft can be 995 00:39:39,860 --> 00:39:41,800 generated there are at least 996 00:39:41,800 --> 00:39:43,880 two techniques which are real 997 00:39:43,880 --> 00:39:45,780 and feasible even though the 998 00:39:45,780 --> 00:39:47,360 shafting technique might be absolutely 999 00:39:47,360 --> 00:39:48,680 impractical. Right? 1000 00:39:49,080 --> 00:39:51,560 So pretty much the odds are more towards the 1001 00:39:51,560 --> 00:39:52,560 cracker at this moment. 1002 00:39:53,920 --> 00:39:55,580 So what are the other implementation 1003 00:39:55,580 --> 00:39:57,720 problems which are there with 1004 00:39:57,720 --> 00:39:58,260 web shafting? 1005 00:40:04,340 --> 00:40:05,540 There are a lot of implementation 1006 00:40:05,540 --> 00:40:07,300 issues. The first thing to understand 1007 00:40:07,300 --> 00:40:09,600 is that web cracking is absolutely 1008 00:40:09,600 --> 00:40:11,760 passive. Right? So the shaffer has to 1009 00:40:11,760 --> 00:40:13,680 run 24-7, 365 1010 00:40:13,680 --> 00:40:15,680 days of the year. Even if he is 1011 00:40:15,780 --> 00:40:17,680 going to stop for 5 minutes it's enough 1012 00:40:17,680 --> 00:40:19,620 to crack the web key. The PTW attack 1013 00:40:19,620 --> 00:40:21,580 typically just demonstrates that. 1014 00:40:22,180 --> 00:40:23,520 Also the point to understand 1015 00:40:23,520 --> 00:40:25,660 here is that shafting has to be 1016 00:40:25,660 --> 00:40:27,660 done exhaustively for all 1017 00:40:27,660 --> 00:40:29,780 devices across all channels 1018 00:40:29,780 --> 00:40:31,480 clients and APs included. 1019 00:40:31,900 --> 00:40:33,560 Even if you are going to miss out one 1020 00:40:33,560 --> 00:40:35,660 single client the attacker can 1021 00:40:35,660 --> 00:40:37,560 simply use that clients traffic 1022 00:40:37,560 --> 00:40:39,000 and go ahead and crack the web key. 1023 00:40:39,240 --> 00:40:41,840 He might take slightly longer but the point 1024 00:40:41,840 --> 00:40:43,580 remains he is going to crack the web key. 1025 00:40:44,620 --> 00:40:45,620 At the very same 1026 00:40:45,780 --> 00:40:47,100 time if you want a real total 1027 00:40:47,100 --> 00:40:49,680 reliable confusion then you should 1028 00:40:49,680 --> 00:40:51,880 have dedicated devices on all channels 1029 00:40:51,880 --> 00:40:53,820 which just do nothing but shaffing. 1030 00:40:55,580 --> 00:40:57,620 There are other things as well. From 1031 00:40:57,620 --> 00:40:59,720 a game theory perspective what's 1032 00:40:59,720 --> 00:41:01,680 happening is that the shaffer has to win always 1033 00:41:01,680 --> 00:41:03,160 and the attacker only once. 1034 00:41:03,500 --> 00:41:05,860 Why is that? First of all the shaffer 1035 00:41:05,860 --> 00:41:07,740 has no knowledge about when the trace 1036 00:41:07,740 --> 00:41:09,720 is being collected because of which he is 1037 00:41:09,720 --> 00:41:10,960 going to shaff over and over again. 1038 00:41:11,600 --> 00:41:13,800 The attacker has to collect a trace 1039 00:41:13,800 --> 00:41:15,580 and let's say he succeeds in 1040 00:41:15,780 --> 00:41:17,660 cracking the web key with just one 1041 00:41:17,660 --> 00:41:19,760 single trace then from there on 1042 00:41:19,760 --> 00:41:21,540 he can decrypt all the data packets 1043 00:41:21,540 --> 00:41:23,720 and separate shaff because he has the 1044 00:41:23,720 --> 00:41:25,740 legitimate key. How can he do that 1045 00:41:25,740 --> 00:41:27,820 with the legitimate key? Decrypt the packets 1046 00:41:27,820 --> 00:41:29,780 check with the ICV if there is a 1047 00:41:29,780 --> 00:41:31,120 match it's the real data packet 1048 00:41:31,580 --> 00:41:33,540 if not it's going to be shaff and weed it out. 1049 00:41:33,900 --> 00:41:35,620 So once the attacker 1050 00:41:35,620 --> 00:41:37,220 wins web shaffing 1051 00:41:37,220 --> 00:41:39,900 first of all is going to be absolutely oblivious 1052 00:41:39,900 --> 00:41:41,580 of the fact that someone 1053 00:41:41,580 --> 00:41:43,540 managed to crack web because it's a 1054 00:41:43,540 --> 00:41:45,620 passive technique. So the shaffer is just 1055 00:41:45,780 --> 00:41:47,760 going to keep on running and not 1056 00:41:47,760 --> 00:41:49,200 really understand what's happened. 1057 00:41:49,480 --> 00:41:51,620 So the odds are pretty much 1058 00:41:51,620 --> 00:41:53,240 stacked against the shaffer. 1059 00:41:53,540 --> 00:41:55,360 And the odds are more 1060 00:41:55,360 --> 00:41:56,780 for the attacker. 1061 00:41:57,700 --> 00:41:59,600 So any prevention technique 1062 00:41:59,600 --> 00:42:01,500 which is going to be used against 1063 00:42:01,500 --> 00:42:03,680 any attack should be such that 1064 00:42:03,680 --> 00:42:05,780 the odds are for the prevention techniques. 1065 00:42:06,420 --> 00:42:07,900 There is a higher probability 1066 00:42:07,900 --> 00:42:09,760 for the prevention technique to win 1067 00:42:09,760 --> 00:42:11,320 and not the attacker 1068 00:42:11,320 --> 00:42:13,140 who is trying to penetrate into the network. 1069 00:42:13,440 --> 00:42:15,760 So pretty much even from a game theory perspective 1070 00:42:15,780 --> 00:42:17,760 web shaffing is at a great 1071 00:42:17,760 --> 00:42:18,020 disadvantage. 1072 00:42:19,780 --> 00:42:21,700 Also let's talk about increasing the 1073 00:42:21,700 --> 00:42:23,720 sophistication. Let's say you have 1074 00:42:23,720 --> 00:42:25,820 this technology deployed somewhere 1075 00:42:25,820 --> 00:42:27,620 and somehow somebody manages 1076 00:42:27,620 --> 00:42:28,800 to crack it. Right? 1077 00:42:29,180 --> 00:42:31,040 Using some of the techniques which we've shown 1078 00:42:31,040 --> 00:42:33,700 or maybe some other technique. From there on 1079 00:42:33,700 --> 00:42:35,560 the guy is first of all going to decrypt 1080 00:42:35,560 --> 00:42:37,640 all the trace files at the very 1081 00:42:37,640 --> 00:42:39,580 same time till the time 1082 00:42:39,580 --> 00:42:41,540 the shaffer does not release a new 1083 00:42:41,540 --> 00:42:43,840 patch all those networks are going to be 1084 00:42:43,840 --> 00:42:44,960 absolutely unprotected. 1085 00:42:45,980 --> 00:42:47,520 Right? So increasing 1086 00:42:47,520 --> 00:42:49,660 sophistication of the attack is very simple. 1087 00:42:50,120 --> 00:42:51,680 Attacker can go offline and do 1088 00:42:51,680 --> 00:42:53,900 everything. But increasing the sophistication 1089 00:42:53,900 --> 00:42:55,160 from a shaffer perspective 1090 00:42:55,640 --> 00:42:56,600 is very very tough. 1091 00:42:59,460 --> 00:43:01,700 So before we look at the final verdict of 1092 00:43:01,700 --> 00:43:02,200 web shaffing 1093 00:43:03,700 --> 00:43:05,760 actually let's actually go through the final verdict 1094 00:43:05,760 --> 00:43:07,540 first. So the point is that 1095 00:43:08,960 --> 00:43:09,720 shaffing is 1096 00:43:09,720 --> 00:43:11,460 yet another band-aid approach. Right? 1097 00:43:11,600 --> 00:43:12,980 Web has lot of cracks 1098 00:43:13,760 --> 00:43:15,580 we've tried to band-aid some of them 1099 00:43:15,780 --> 00:43:17,000 there's a new technique and unfortunately 1100 00:43:17,000 --> 00:43:18,620 this also cannot hold water. 1101 00:43:18,980 --> 00:43:21,260 And even if shaft frames were pretty much made 1102 00:43:21,780 --> 00:43:22,820 indistinguishable by an oracle 1103 00:43:22,820 --> 00:43:25,640 I think that's the magic potion case which we talk about 1104 00:43:25,640 --> 00:43:27,440 still then we can crack web. 1105 00:43:27,780 --> 00:43:29,380 Web has so many other vulnerabilities 1106 00:43:29,380 --> 00:43:31,320 you can sort of poke here and there 1107 00:43:31,320 --> 00:43:32,480 and get the job done. 1108 00:43:34,820 --> 00:43:35,860 So the final 1109 00:43:35,860 --> 00:43:37,640 verdict on web shaffing. It was indeed 1110 00:43:37,640 --> 00:43:39,960 too good to be true. Now think about it 1111 00:43:39,960 --> 00:43:41,780 does web shaffing actually 1112 00:43:42,460 --> 00:43:43,900 targeting the cryptographic 1113 00:43:43,900 --> 00:43:45,440 problems which are there? 1114 00:43:45,780 --> 00:43:47,740 In the RC4 implementation of web? 1115 00:43:47,860 --> 00:43:49,220 Is it a patch for that? 1116 00:43:49,720 --> 00:43:51,640 Absolutely not. And that is 1117 00:43:51,640 --> 00:43:53,720 where the real problem is. That is 1118 00:43:53,720 --> 00:43:55,480 why the web key gets cracked is because 1119 00:43:55,480 --> 00:43:57,160 there's a problem with the cryptography 1120 00:43:57,160 --> 00:43:58,320 in which it is implemented. 1121 00:43:59,300 --> 00:44:01,480 All web shaffing is trying to do 1122 00:44:01,480 --> 00:44:03,660 is obscure those problems 1123 00:44:03,660 --> 00:44:05,460 and obscure those weak IVs. 1124 00:44:05,840 --> 00:44:07,760 So that to make it very tough 1125 00:44:07,760 --> 00:44:09,680 for any cracker to be able to recognize 1126 00:44:09,680 --> 00:44:11,560 that. So it is just another 1127 00:44:11,560 --> 00:44:13,600 attempt at security through obscurity. 1128 00:44:14,460 --> 00:44:15,720 And as we all 1129 00:44:15,780 --> 00:44:17,620 typically know that security through obscurity 1130 00:44:17,620 --> 00:44:18,800 is a really bad idea. 1131 00:44:19,920 --> 00:44:21,660 The lesson of this whole demonstration 1132 00:44:21,660 --> 00:44:23,560 is very simple. Web is 1133 00:44:23,560 --> 00:44:25,580 broken. Web was pretty much broken. 1134 00:44:25,780 --> 00:44:27,420 2001 the whole thing started. 1135 00:44:27,920 --> 00:44:29,980 2007 under 5 minutes 1136 00:44:29,980 --> 00:44:31,800 everybody knows that. People want to 1137 00:44:31,800 --> 00:44:32,640 migrate to WPA. 1138 00:44:33,260 --> 00:44:35,760 Web is broken and it will remain broken. 1139 00:44:35,940 --> 00:44:37,640 Period. If you really want to protect 1140 00:44:37,640 --> 00:44:39,620 your networks, go ahead and migrate 1141 00:44:39,620 --> 00:44:41,040 to WPA and WPA2. 1142 00:44:43,540 --> 00:44:44,980 So we decided to 1143 00:44:44,980 --> 00:44:47,080 spice this up with a little challenge of ours as well. 1144 00:44:47,360 --> 00:44:48,980 If somebody believes that they 1145 00:44:48,980 --> 00:44:50,340 have a web shaffing implementation 1146 00:44:50,340 --> 00:44:52,760 which works differently and then 1147 00:44:52,760 --> 00:44:54,720 we'll provide them a very simple demo 1148 00:44:54,720 --> 00:44:56,540 setup. We'll have an access point 1149 00:44:56,540 --> 00:44:58,580 along with that we'll have two clients 1150 00:44:58,580 --> 00:44:59,940 and they can get their shaffer. 1151 00:45:00,780 --> 00:45:02,920 Try and protect that network which we deploy 1152 00:45:02,920 --> 00:45:04,820 and we'll crack the key within 1153 00:45:04,820 --> 00:45:05,540 72 hours. 1154 00:45:11,040 --> 00:45:12,900 Well that's it. I think we have 1155 00:45:12,900 --> 00:45:13,920 some time for the Q&A. 1156 00:45:15,540 --> 00:45:15,980 Thank you. 1157 00:45:24,900 --> 00:45:26,780 I'll also be there in the Q&A room after this. 1158 00:45:33,020 --> 00:45:34,960 I think vendors are in the process of 1159 00:45:34,960 --> 00:45:36,780 implementing shaffing. 1160 00:45:36,860 --> 00:45:38,580 That's what the news is according to Network World. 1161 00:45:39,860 --> 00:45:40,680 But I think, Praveen? 1162 00:45:41,040 --> 00:45:41,760 Would you like to take that? 1163 00:45:42,560 --> 00:45:42,880 Right. 1164 00:45:45,780 --> 00:45:46,440 Actually we are 1165 00:45:46,880 --> 00:45:48,920 not here to comment specifically on 1166 00:45:48,920 --> 00:45:50,840 any vendor implementation. We are just here to 1167 00:45:51,400 --> 00:45:52,380 mention that this approach 1168 00:45:53,020 --> 00:45:54,840 doesn't work. And I think you can do 1169 00:45:54,840 --> 00:45:56,200 your own investigation and find it out. 1170 00:45:57,480 --> 00:45:58,780 Because I think we don't want to target any 1171 00:45:58,780 --> 00:46:00,780 specific vendor. It's just a logical 1172 00:46:00,780 --> 00:46:02,420 discussion that this approach is not going to work. 1173 00:46:03,340 --> 00:46:03,660 Yes. 1174 00:46:35,840 --> 00:46:37,240 Yes. 1175 00:46:38,180 --> 00:46:38,760 Right. 1176 00:46:41,040 --> 00:46:42,580 For everybody, the point he's making 1177 00:46:42,580 --> 00:46:44,780 is that actually we could also see some 1178 00:46:44,780 --> 00:46:46,380 sort of a difference in the RSSI level 1179 00:46:47,100 --> 00:46:48,860 from the real client as well as 1180 00:46:48,860 --> 00:46:50,180 from the shaffer. And 1181 00:46:50,180 --> 00:46:52,380 it's actually a very good point. And 1182 00:46:52,380 --> 00:46:54,800 if you read Joshua's blog, he's also made that point. 1183 00:46:55,440 --> 00:46:56,760 The number of filters 1184 00:46:56,760 --> 00:46:58,720 which we can deploy and what you showed right now 1185 00:46:58,720 --> 00:47:00,840 is not exhaustive. RSSI is one 1186 00:47:00,840 --> 00:47:02,920 very good filter which you can use 1187 00:47:02,920 --> 00:47:04,740 because definitely the power radiation level 1188 00:47:04,740 --> 00:47:06,760 for the client is going to be different from 1189 00:47:06,760 --> 00:47:08,360 the shaffer because they are at different locations. 1190 00:47:08,360 --> 00:47:10,080 And the attacker can always 1191 00:47:10,080 --> 00:47:11,660 change its location from time to time. 1192 00:47:11,860 --> 00:47:12,980 Good question. Thanks. 1193 00:47:14,020 --> 00:47:15,940 Actually, just one comment I'll make here. 1194 00:47:16,060 --> 00:47:18,060 The reason why we didn't include that, because that 1195 00:47:18,060 --> 00:47:20,100 filter is not absolutely 1196 00:47:20,100 --> 00:47:21,920 deterministic. I mean, there are cases where 1197 00:47:21,920 --> 00:47:22,760 Yes. 1198 00:47:24,760 --> 00:47:26,140 But certainly one more 1199 00:47:26,140 --> 00:47:28,140 direction where you can start filter the package. 1200 00:47:28,300 --> 00:47:28,400 Yes. 1201 00:47:30,400 --> 00:47:30,880 Sure. 1202 00:47:35,820 --> 00:47:36,300 Right. 1203 00:47:43,120 --> 00:47:44,160 Right. 1204 00:47:46,080 --> 00:47:47,120 Right. 1205 00:47:50,960 --> 00:47:52,000 Right. 1206 00:47:55,880 --> 00:47:56,920 Right. 1207 00:47:59,120 --> 00:47:59,600 Right. 1208 00:47:59,780 --> 00:48:00,820 Right. 1209 00:48:03,000 --> 00:48:03,500 Right. 1210 00:48:03,500 --> 00:48:03,540 Right. 1211 00:48:03,540 --> 00:48:03,580 Right. 1212 00:48:04,140 --> 00:48:04,260 Right. 1213 00:48:04,260 --> 00:48:04,600 Right. 1214 00:48:05,020 --> 00:48:05,780 Right. 1215 00:48:08,360 --> 00:48:09,620 Separation of skips, right? 1216 00:48:09,840 --> 00:48:10,240 Right. 1217 00:48:10,840 --> 00:48:12,460 While I agree that you have, 1218 00:48:12,460 --> 00:48:13,960 if you have sequence numbers 1219 00:48:13,960 --> 00:48:15,980 that go up, like, 1220 00:48:15,980 --> 00:48:17,040 one, two, three, four, 1221 00:48:17,120 --> 00:48:18,280 and then you insert chaps 1222 00:48:18,280 --> 00:48:21,380 that are separately separated. 1223 00:48:21,720 --> 00:48:22,000 Right. 1224 00:48:22,260 --> 00:48:23,240 You eject chaps 1225 00:48:23,240 --> 00:48:26,220 in a way that is blended in. 1226 00:48:26,340 --> 00:48:27,480 It's hard to do that 1227 00:48:27,480 --> 00:48:28,960 and then the only resource you have 1228 00:48:28,960 --> 00:48:32,500 is the replay. 1229 00:48:32,920 --> 00:48:33,320 Right. 1230 00:48:33,740 --> 00:48:34,640 So, actually, 1231 00:48:34,800 --> 00:48:36,080 just to sort of summarize 1232 00:48:36,080 --> 00:48:37,000 what he's putting here 1233 00:48:37,000 --> 00:48:37,960 is that let's say 1234 00:48:37,960 --> 00:48:39,760 broadcast and multicast forwarding 1235 00:48:39,760 --> 00:48:40,640 back to the client 1236 00:48:40,640 --> 00:48:41,280 is prevented. 1237 00:48:41,640 --> 00:48:41,920 Right. 1238 00:48:41,960 --> 00:48:42,640 Very simply put. 1239 00:48:42,960 --> 00:48:45,780 So, in the PTW paper, 1240 00:48:46,120 --> 00:48:46,580 right, 1241 00:48:46,680 --> 00:48:48,380 the way in which he talks about 1242 00:48:48,380 --> 00:48:50,180 to generate that initial ARP request, 1243 00:48:50,380 --> 00:48:52,020 there is some interesting property about it. 1244 00:48:52,560 --> 00:48:54,000 Let's say there is a legitimate client 1245 00:48:54,000 --> 00:48:54,860 which is communicating 1246 00:48:54,860 --> 00:48:57,220 and you send a DOT to that client. 1247 00:48:57,400 --> 00:48:58,260 What happens is that 1248 00:48:58,260 --> 00:48:59,640 the client is going to authenticate 1249 00:48:59,640 --> 00:49:00,420 and associate again. 1250 00:49:00,740 --> 00:49:01,680 And after that, 1251 00:49:01,760 --> 00:49:03,040 the client is going to send out 1252 00:49:03,040 --> 00:49:04,200 a couple of ARP requests. 1253 00:49:04,500 --> 00:49:04,940 Right. 1254 00:49:05,220 --> 00:49:06,960 One is definitely going to be 1255 00:49:06,960 --> 00:49:07,920 for the default gate. 1256 00:49:08,440 --> 00:49:08,940 Right. 1257 00:49:09,400 --> 00:49:10,860 So, now what we do is 1258 00:49:10,860 --> 00:49:11,580 when you actually 1259 00:49:11,580 --> 00:49:13,260 that ARP request goes through, 1260 00:49:13,380 --> 00:49:14,820 the reply which comes from 1261 00:49:14,820 --> 00:49:15,700 the default gateway 1262 00:49:15,700 --> 00:49:17,500 is unicast for the client. 1263 00:49:17,980 --> 00:49:18,480 Right. 1264 00:49:18,620 --> 00:49:19,720 So, what happens is 1265 00:49:19,720 --> 00:49:21,560 take the very first 10 packets 1266 00:49:21,560 --> 00:49:23,980 which the client sent after the DOT, 1267 00:49:24,200 --> 00:49:25,960 just replay them over and over again. 1268 00:49:26,160 --> 00:49:27,860 You'll see a lot of unicast replies 1269 00:49:27,860 --> 00:49:29,780 coming in from the default gateway. 1270 00:49:30,100 --> 00:49:31,820 And pretty much because of the fact 1271 00:49:31,820 --> 00:49:33,140 that the replies are unicast, 1272 00:49:33,260 --> 00:49:35,460 any multicast or broadcast-based filtering 1273 00:49:35,460 --> 00:49:36,720 cannot work against it. 1274 00:49:36,800 --> 00:49:37,760 We've actually tried this out 1275 00:49:37,760 --> 00:49:38,120 in the lab. 1276 00:49:38,340 --> 00:49:39,740 That's an interesting point though. 1277 00:49:40,620 --> 00:49:41,060 Rick. 1278 00:49:42,200 --> 00:49:42,640 Okay. 1279 00:49:45,780 --> 00:49:46,220 Okay. 1280 00:49:46,340 --> 00:49:46,480 Yeah. 1281 00:49:50,000 --> 00:49:50,780 Initialization vector. 1282 00:49:51,560 --> 00:49:52,000 Yeah. 1283 00:49:52,080 --> 00:49:53,540 So, what happens is 1284 00:49:53,540 --> 00:49:54,200 for every 1285 00:49:54,200 --> 00:49:55,580 WEP is a per-packet encryption 1286 00:49:55,580 --> 00:49:56,660 mechanism scheme. 1287 00:49:57,120 --> 00:49:58,500 So, that you really do not want 1288 00:49:58,500 --> 00:49:59,640 to lose track of where you are 1289 00:49:59,640 --> 00:50:00,200 in the key stream. 1290 00:50:00,440 --> 00:50:01,540 So, what we do is 1291 00:50:01,540 --> 00:50:03,380 it's like a cryptographic nuance 1292 00:50:03,380 --> 00:50:04,020 or a salt 1293 00:50:04,020 --> 00:50:05,260 which is prepended 1294 00:50:05,260 --> 00:50:06,720 to the secret key. 1295 00:50:07,100 --> 00:50:07,540 Right. 1296 00:50:07,760 --> 00:50:09,000 And that is actually used 1297 00:50:09,520 --> 00:50:10,600 for the KSA 1298 00:50:10,600 --> 00:50:11,860 and later the PRGA 1299 00:50:11,860 --> 00:50:13,280 which is the pseudo-random number generation. 1300 00:50:14,320 --> 00:50:15,960 So, it basically makes sure 1301 00:50:15,960 --> 00:50:17,160 that every packet 1302 00:50:17,160 --> 00:50:18,840 is going to have a different key stream. 1303 00:50:19,020 --> 00:50:20,740 Because if you use the same WEP key 1304 00:50:20,740 --> 00:50:22,480 to generate the key stream, 1305 00:50:22,620 --> 00:50:23,720 the key stream is always same. 1306 00:50:23,940 --> 00:50:25,380 And that's going to open up 1307 00:50:25,380 --> 00:50:27,100 for various plain text-based attacks. 1308 00:50:27,300 --> 00:50:28,260 Where you know the plain text, 1309 00:50:28,460 --> 00:50:29,740 you know the cipher text, 1310 00:50:29,900 --> 00:50:31,080 you do a XOR between them, 1311 00:50:31,200 --> 00:50:32,280 you get the key stream, 1312 00:50:32,460 --> 00:50:33,480 and from there on 1313 00:50:33,480 --> 00:50:34,820 for every packet which you see, 1314 00:50:34,940 --> 00:50:36,780 you can go ahead and decrypt that packet. 1315 00:50:37,040 --> 00:50:37,740 That's why we do this. 1316 00:50:37,740 --> 00:50:37,960 Why don't we use 1317 00:50:37,960 --> 00:50:39,420 the initialization vector or the IV? 1318 00:50:42,680 --> 00:50:43,100 Okay. 1319 00:50:43,260 --> 00:50:44,000 So, we'll be there 1320 00:50:44,000 --> 00:50:44,860 in the Q&A room 1321 00:50:44,860 --> 00:50:46,620 if anybody has any other questions. 1322 00:50:46,820 --> 00:50:47,240 Thank you. 1323 00:50:48,220 --> 00:50:49,060 Thank you. 1324 00:50:49,440 --> 00:50:50,400 Thank you.