1 00:00:00,000 --> 00:00:03,620 Has anyone of you heard about the OpenSSL Debian bug? 2 00:00:04,660 --> 00:00:05,080 What? 3 00:00:07,700 --> 00:00:12,840 Sorry about our English. We know it's pretty poor. 4 00:00:14,260 --> 00:00:15,900 It's pathetic. The word is pathetic. 5 00:00:16,480 --> 00:00:19,220 According to the dictionary, it's pathetic, the word. 6 00:00:20,420 --> 00:00:21,600 Let's go again. 7 00:00:21,740 --> 00:00:25,540 Has anyone of you heard about the Debian OpenSSL package bug? 8 00:00:25,700 --> 00:00:25,940 How many of you? 9 00:00:26,200 --> 00:00:26,720 How many? 10 00:00:26,940 --> 00:00:27,740 Well, a lot. 11 00:00:27,740 --> 00:00:28,760 This will be easy. 12 00:00:33,920 --> 00:00:43,000 So, I start with a brief introduction and some history about how the bug was introduced in OpenSSL 13 00:00:43,000 --> 00:00:46,780 and how it affected this package and cryptography. 14 00:00:47,420 --> 00:00:53,520 And then, Luciano will show the most funny part, the live demo, 15 00:00:54,120 --> 00:00:56,180 and maybe even how to conquer the universe. 16 00:00:56,460 --> 00:00:57,440 So, let's go. 17 00:00:57,740 --> 00:01:03,380 Which he became a master of the universe. 18 00:01:04,180 --> 00:01:15,960 So, this bug was caused by a Debian-specific patch introduced almost two years ago 19 00:01:15,960 --> 00:01:22,260 and remained unseen until this year, a couple of months ago, 20 00:01:22,480 --> 00:01:27,720 when our friend Luciano discovered this problem. 21 00:01:27,740 --> 00:01:32,960 This problem that affected the random number generator in OpenSSL in Debian. 22 00:01:34,000 --> 00:01:41,300 This bug affected not only OpenSSL, but the underlying library, liveSSL, 23 00:01:41,380 --> 00:01:46,720 and every packages that linked against this library. 24 00:01:47,700 --> 00:01:57,380 Not only did it affect Debian distro, but any other distributions that are based on Debian, 25 00:01:57,380 --> 00:02:05,880 Debian such as Ubuntu. It also affected other, or may have affected other operating systems 26 00:02:06,760 --> 00:02:13,140 which are, although not based on Debian, may have imported wikis into them. 27 00:02:17,680 --> 00:02:26,740 So how did it affect the random number generation? Well, in fact, the entropy got reduced to 28 00:02:26,740 --> 00:02:37,840 just 15 bits. So the key space, any random number generated had to be inside this very 29 00:02:37,840 --> 00:02:48,040 little key space of just 15 bits. Other aspects, other features we should bear in mind that 30 00:02:48,780 --> 00:02:56,380 limit the key space are the platform, that is the architecture, and the endianness, little 31 00:02:56,380 --> 00:02:56,720 endianness. 32 00:02:56,720 --> 00:03:03,820 Big endian, big endian, 32 or 64 bits. And the length of the keys, for example, if they 33 00:03:03,820 --> 00:03:12,940 are 1024 or 2048. And well, these are just some examples of cryptographic schemes that 34 00:03:12,940 --> 00:03:22,140 got affected by this bug. As you may know, cryptography is heavily based on random, secure 35 00:03:22,140 --> 00:03:26,120 random numbers, so this bug affects all of them. 36 00:03:29,920 --> 00:03:36,380 These are some of the affected packages, which are linked against libSSL, either dynamically 37 00:03:36,380 --> 00:03:44,900 or statically. And some of them were showed off in some other presentations, such as OpenSSH 38 00:03:44,900 --> 00:03:54,200 and Tor. So they all relied on the security and unpredictability of the random numbers. 39 00:03:56,120 --> 00:04:07,000 So, how did this start? It began, as I said, two years ago, when a Debian user submitted a 40 00:04:07,000 --> 00:04:17,600 wishlist severity bug to the Debian backtracking system about some uninitialized variable warning 41 00:04:18,060 --> 00:04:25,980 that was being printed by Bidegreen. Bidegreen is an online debugger that checks for memory 42 00:04:26,120 --> 00:04:34,080 leaks and something like that. So, we show a brief demo. 43 00:04:40,700 --> 00:04:41,480 . 44 00:04:47,440 --> 00:04:48,220 Sorry. 45 00:04:48,220 --> 00:04:48,320 . 46 00:04:49,180 --> 00:04:49,960 . 47 00:04:49,960 --> 00:04:51,020 . 48 00:04:51,020 --> 00:04:51,240 . 49 00:04:51,240 --> 00:04:51,260 . 50 00:04:51,260 --> 00:04:51,400 . 51 00:04:56,460 --> 00:04:57,080 . 52 00:04:57,900 --> 00:05:08,200 We have here a program that just requests some random bytes into a 53 00:05:08,200 --> 00:05:13,900 from OpenSSL and prints them. It's just that. 54 00:05:14,200 --> 00:05:26,100 So, can you hear? Yeah. We compile it and link a variance libSSL to 55 00:05:26,120 --> 00:05:47,740 SSL. We see it's linked. And let's try it. It prints just random numbers. So let's see 56 00:05:47,740 --> 00:06:09,540 what this user was complaining about. We'll just link with the original version of OpenSSL, 57 00:06:10,280 --> 00:06:17,540 that of two years ago. And we're running with Valkyrie, just to check for any 58 00:06:17,540 --> 00:06:17,720 problems. 59 00:06:17,740 --> 00:06:30,060 So we can see here many warnings about initialized variables. Quite a lot of errors. 60 00:06:30,900 --> 00:06:40,620 So this is what the user was complaining about. In fact, it affected every package that linked 61 00:06:40,620 --> 00:06:47,200 against libSSL. So the Debian maintainer analyzed the source code. 62 00:06:47,200 --> 00:06:56,740 And just find out that it was due to just two lines of the OpenSSL source code, which 63 00:06:56,740 --> 00:07:04,740 are these two lines, which are identical. They are syntactically identical, but they're 64 00:07:04,740 --> 00:07:11,780 in two different functions in different contexts. We should notice that the second line is surrounded 65 00:07:13,100 --> 00:07:13,860 by... 66 00:07:13,860 --> 00:07:15,960 Ryan? We should Ryan? 67 00:07:16,160 --> 00:07:16,920 Ryan? 68 00:07:19,420 --> 00:07:20,460 Okay, so... 69 00:07:20,460 --> 00:07:21,260 Maybe we should Ryan. 70 00:07:21,420 --> 00:07:23,000 I'm not sure. 71 00:07:30,300 --> 00:07:32,180 Who puts the fight alarm? 72 00:07:34,700 --> 00:07:37,200 Okay. Do you look calm? That's good. 73 00:07:39,500 --> 00:07:41,520 I am not calm. That's fine. 74 00:07:43,440 --> 00:07:44,480 You look calm. 75 00:07:44,840 --> 00:07:45,420 No, I'm not calm. 76 00:07:45,420 --> 00:07:46,160 That's fine. 77 00:07:46,160 --> 00:07:46,540 Okay. 78 00:07:46,660 --> 00:07:47,180 Okay. 79 00:07:51,020 --> 00:07:53,240 They hacked our presentation. 80 00:07:59,720 --> 00:08:01,120 Should we continue? 81 00:08:04,260 --> 00:08:05,340 What did he say? 82 00:08:07,730 --> 00:08:08,400 He's checking. 83 00:08:08,540 --> 00:08:08,920 Be careful. 84 00:08:11,380 --> 00:08:12,080 Sorry? 85 00:08:19,900 --> 00:08:22,940 Okay, I try to continue. 86 00:08:29,120 --> 00:08:30,140 It's pretty hard. 87 00:08:32,980 --> 00:08:34,080 Oh my God. 88 00:08:52,820 --> 00:08:55,140 There's people clamping, so... 89 00:08:56,380 --> 00:08:58,120 The exit is over there. 90 00:09:06,180 --> 00:09:07,020 Stupid. 91 00:09:12,080 --> 00:09:12,520 Epic fail. 92 00:09:15,660 --> 00:09:17,340 It smells like sabotage. 93 00:09:17,740 --> 00:09:19,000 Oh, it's good. 94 00:09:21,420 --> 00:09:23,140 This is not the light button. 95 00:09:23,180 --> 00:09:24,180 This is the alarm button. 96 00:09:24,280 --> 00:09:25,740 Please don't touch it. 97 00:09:29,620 --> 00:09:30,140 Gosh. 98 00:09:34,000 --> 00:09:35,020 What should we do? 99 00:09:35,200 --> 00:09:36,160 We can't speak over there. 100 00:09:36,880 --> 00:09:37,900 We can continue. 101 00:09:38,200 --> 00:09:39,700 It's quite confusing. 102 00:09:40,440 --> 00:09:41,100 Stop it. 103 00:09:41,140 --> 00:09:41,480 Okay. 104 00:09:43,480 --> 00:09:46,260 If it happens again, should we do something? 105 00:09:46,480 --> 00:09:47,260 We have water here. 106 00:09:47,340 --> 00:09:47,980 We can use it. 107 00:09:54,240 --> 00:09:54,680 Okay. 108 00:09:57,340 --> 00:09:57,780 Okay. 109 00:09:59,660 --> 00:10:00,240 Let's go. 110 00:10:01,460 --> 00:10:02,520 Mom, I'm okay. 111 00:10:02,720 --> 00:10:03,720 Are you looking at me? 112 00:10:03,780 --> 00:10:04,240 I'm okay. 113 00:10:07,860 --> 00:10:09,060 So, where were we? 114 00:10:09,260 --> 00:10:09,700 Okay. 115 00:10:10,020 --> 00:10:11,900 So, these two lines. 116 00:10:12,080 --> 00:10:17,380 These two lines are the ones to blame for these uninitialized variable warnings. 117 00:10:18,640 --> 00:10:25,360 But we should notice that the second line is surrounded by this macro. 118 00:10:26,320 --> 00:10:32,980 It's about other debugging tool, very like Vibrant, that's called Purify. 119 00:10:33,640 --> 00:10:37,480 And this is just the original source code from OpenSSL, 120 00:10:37,580 --> 00:10:41,320 so that this line may get into the... 121 00:10:42,080 --> 00:10:47,420 binary program or not, depending of the compilation options. 122 00:10:48,260 --> 00:10:50,860 So, let's continue. 123 00:10:52,500 --> 00:10:59,740 There were several proposals or solutions to this problem, 124 00:11:00,150 --> 00:11:03,260 but the most... 125 00:11:03,260 --> 00:11:04,960 the most... 126 00:11:05,750 --> 00:11:09,660 the one that looked most suitable, thanks, 127 00:11:09,820 --> 00:11:11,180 was the... 128 00:11:11,180 --> 00:11:13,460 the... the option, just to comment out these lines, 129 00:11:14,420 --> 00:11:14,940 because... 130 00:11:14,940 --> 00:11:15,460 oh, sorry. 131 00:11:16,120 --> 00:11:17,680 They're adding just... 132 00:11:19,400 --> 00:11:20,680 what these lines are doing. 133 00:11:20,880 --> 00:11:21,160 They're... 134 00:11:21,660 --> 00:11:21,920 er... 135 00:11:21,920 --> 00:11:23,540 in some cases, they're 136 00:11:23,540 --> 00:11:23,880 er... 137 00:11:24,460 --> 00:11:26,840 taking this parameter, the buffer, 138 00:11:27,660 --> 00:11:29,780 both as input, and as output. 139 00:11:30,680 --> 00:11:34,200 They take the input from the buffer, 140 00:11:34,900 --> 00:11:36,720 add it to the entropy pool. 141 00:11:36,900 --> 00:11:38,480 So, when the buffer was. 142 00:11:39,740 --> 00:11:41,060 uninitialized, the... the. 143 00:11:41,060 --> 00:11:42,860 and the warning was being printed. 144 00:11:45,780 --> 00:11:51,720 So, in fact, this entropy added by some initialized variable 145 00:11:51,720 --> 00:11:56,580 is almost negligible, so it looked like a good idea 146 00:11:56,580 --> 00:11:58,520 just to comment out these two lines. 147 00:11:59,960 --> 00:12:06,860 So, the package maintainer asked to the OpenSSL mailing list 148 00:12:06,860 --> 00:12:14,260 about these two lines and the answer from an OpenSSL developer 149 00:12:15,150 --> 00:12:19,600 was that it was okay just to comment out those two lines 150 00:12:19,600 --> 00:12:23,620 for the buying purposes, because they didn't add 151 00:12:25,340 --> 00:12:29,700 any significant entropy to the entropy pool. 152 00:12:30,100 --> 00:12:35,160 So, okay, this is the most famous patch lately. 153 00:12:36,860 --> 00:12:39,860 It just commented out those two lines. 154 00:12:41,180 --> 00:12:45,140 But, how did this affect the random number generator? 155 00:12:47,000 --> 00:12:52,680 You remember the function we just saw a few minutes ago? 156 00:12:52,880 --> 00:12:54,180 It was runbytes. 157 00:12:54,300 --> 00:12:56,960 When a user wants to get a random string, 158 00:12:57,320 --> 00:13:02,200 it calls this function, runbytes, with a buffer, 159 00:13:02,900 --> 00:13:04,700 which is both input and output. 160 00:13:06,860 --> 00:13:10,800 So, this function takes some entropy, 161 00:13:11,600 --> 00:13:13,840 almost negligible from this buffer, 162 00:13:14,080 --> 00:13:20,960 and when the state of the random number generator 163 00:13:21,560 --> 00:13:25,080 hasn't been initialized, it calls the runpol function, 164 00:13:25,440 --> 00:13:27,440 which takes care of this, 165 00:13:28,840 --> 00:13:32,620 taking or adding entropy from several sources, 166 00:13:32,780 --> 00:13:35,700 such as the system random device, 167 00:13:35,980 --> 00:13:36,840 the user ID, and the buffer. 168 00:13:36,840 --> 00:13:38,520 The process ID, the process ID, and the current time. 169 00:13:38,740 --> 00:13:41,840 This is all through the runadd function. 170 00:13:44,080 --> 00:13:48,540 Finally, we got the process ID again, 171 00:13:49,040 --> 00:13:52,240 just in cases for multiprocess, and forking, 172 00:13:52,820 --> 00:13:58,700 just to avoid the collisions in the random number generator. 173 00:14:02,940 --> 00:14:06,820 So, here is the result of the, it's commenting out, but, 174 00:14:06,820 --> 00:14:10,940 the second line, that which was surrounded by the macro, 175 00:14:12,680 --> 00:14:16,020 we saw it doesn't add any significant entropy, 176 00:14:16,180 --> 00:14:18,840 so it's not a big deal. 177 00:14:19,120 --> 00:14:25,920 The problem relies on the first commented outline, 178 00:14:26,920 --> 00:14:29,380 which affected the runadd function, 179 00:14:30,300 --> 00:14:34,280 so in such a way that, okay, in such a way that 180 00:14:34,280 --> 00:14:36,800 none of this entropy is affected, 181 00:14:36,800 --> 00:14:39,100 the entropy sources, or randomness sources, 182 00:14:39,300 --> 00:14:45,600 were read into the entropy pool, 183 00:14:46,320 --> 00:14:49,940 and as a result, the only source of entropy remaining 184 00:14:50,260 --> 00:14:51,960 is the current process ID. 185 00:14:52,480 --> 00:14:58,420 This is what limits the entropy to just 15 bits, 186 00:14:59,960 --> 00:15:03,900 which is the maximum process ID of the system. 187 00:15:06,800 --> 00:15:12,860 So, we may wonder why this, the second line was commented, 188 00:15:13,600 --> 00:15:16,900 which has this effect. 189 00:15:18,040 --> 00:15:21,020 Well, in fact, with the Debian developer, 190 00:15:21,520 --> 00:15:24,240 tested the OpenSSL with Bygreen, 191 00:15:24,440 --> 00:15:28,040 just running the OpenSSL regression tests, 192 00:15:28,680 --> 00:15:33,960 and in many cases, the runadd function is called directly, 193 00:15:35,140 --> 00:15:41,120 that is, not from runbyte function, for example. 194 00:15:41,400 --> 00:15:47,540 So, in this function, which is OpenSSL API, 195 00:15:48,340 --> 00:15:52,420 which loads some entropy, or some randomness from a file, 196 00:15:53,500 --> 00:16:00,820 as the comment says, there may be the case, 197 00:16:00,940 --> 00:16:03,100 when the buffer, 198 00:16:04,040 --> 00:16:06,280 we're using more bytes from the buffer 199 00:16:06,280 --> 00:16:08,760 than those read from the file, 200 00:16:08,920 --> 00:16:12,840 and in this case, Bygreen will print the warning, too. 201 00:16:14,460 --> 00:16:21,880 So, okay, so, this is time to get to the funny part. 202 00:16:22,780 --> 00:16:23,740 Do you get this part? 203 00:16:24,160 --> 00:16:26,960 The third parameter of the runadd function 204 00:16:27,520 --> 00:16:33,900 is how much entropy is adding to the PRNG statement. 205 00:16:33,960 --> 00:16:38,400 And as you can see, the number is only i, 206 00:16:39,180 --> 00:16:41,200 which means only the part have you read. 207 00:16:41,340 --> 00:16:46,880 So, the initial values are not taken as entropy, in that case. 208 00:16:46,980 --> 00:16:48,820 I mean, they are valuable as zero. 209 00:16:49,020 --> 00:16:55,260 So, that's mean that the entropy by initialization memory 210 00:16:55,260 --> 00:16:57,200 is negligible, that's why. 211 00:16:58,020 --> 00:16:59,140 So, let's see. 212 00:17:06,120 --> 00:17:10,080 Let's see how can we take advantage of these problems. 213 00:17:11,200 --> 00:17:15,480 Well, as Maxi says, random numbers are everywhere 214 00:17:15,480 --> 00:17:18,680 in cryptography, so we will see few scenarios 215 00:17:18,680 --> 00:17:21,240 when we can exploit this flow. 216 00:17:22,300 --> 00:17:27,040 The first one is authentication by challenge, 217 00:17:27,840 --> 00:17:30,080 also known as powers-less authentication. 218 00:17:30,400 --> 00:17:32,720 How many of you are familiar with this concept? 219 00:17:34,340 --> 00:17:37,160 Okay, we will be quickly in this part, yeah? 220 00:17:37,500 --> 00:17:40,140 The client generates a pair of key, randomly. 221 00:17:40,920 --> 00:17:43,020 When the client wants to create, 222 00:17:43,760 --> 00:17:45,780 when it wants to log in with a powers-less authentication, 223 00:17:46,400 --> 00:17:48,360 the server creates a random number, 224 00:17:48,560 --> 00:17:50,260 they cipher with the public key, 225 00:17:50,440 --> 00:17:51,580 they send the challenge, 226 00:17:51,860 --> 00:17:54,500 the clients decipher the challenge, 227 00:17:54,700 --> 00:17:57,040 get, again, the random number, 228 00:17:57,140 --> 00:18:00,220 and sends to the server the challenge response. 229 00:18:00,900 --> 00:18:03,200 And if it's okay, access granted. 230 00:18:03,200 --> 00:18:05,980 Yeah, fixed with your concept? 231 00:18:06,380 --> 00:18:07,060 Cool. 232 00:18:07,800 --> 00:18:10,000 So, let's introduce another character. 233 00:18:10,620 --> 00:18:13,560 It's a hacker. 234 00:18:13,860 --> 00:18:17,980 You know, the hackers use common lines, so that's why. 235 00:18:19,360 --> 00:18:22,080 And this hacker uses really big fonts. 236 00:18:22,880 --> 00:18:23,920 I don't know why. 237 00:18:25,040 --> 00:18:30,080 Okay, this hacker, notice that the client 238 00:18:30,540 --> 00:18:32,440 generates this pair of key, these ones. 239 00:18:33,200 --> 00:18:34,920 I'm not sure if you can see the arrow. 240 00:18:35,160 --> 00:18:37,360 This one pair of key was generated by random, 241 00:18:37,520 --> 00:18:41,180 and was generated in an unsecured Debian system. 242 00:18:41,760 --> 00:18:45,560 So, there's a limited space for this key pair. 243 00:18:46,100 --> 00:18:50,860 So, the attacker creates all of the possible keys, 244 00:18:51,420 --> 00:18:52,720 which is two, 245 00:18:54,980 --> 00:18:57,220 which is two to power 15. 246 00:18:58,820 --> 00:19:02,860 And try with the first one, try with the second one, 247 00:19:03,700 --> 00:19:08,240 trying to challenge, to respond to the challenge. 248 00:19:08,760 --> 00:19:12,060 Sooner or later, the servers will grant the challenge 249 00:19:12,060 --> 00:19:15,140 because one of that pairs will be exactly the clone 250 00:19:15,440 --> 00:19:19,180 that use it by the client, yeah? 251 00:19:19,560 --> 00:19:22,100 So, this is really, really easy to get. 252 00:19:22,340 --> 00:19:23,460 I mean, it's not rocket science, 253 00:19:23,580 --> 00:19:27,940 but any of you didn't see this problem? 254 00:19:29,120 --> 00:19:30,540 Okay, let's see an example. 255 00:19:37,280 --> 00:19:38,100 Let's see. 256 00:19:46,340 --> 00:19:46,980 Let's see. 257 00:19:47,840 --> 00:19:52,220 Okay, hdmoor provide us a lot of the complete space 258 00:19:52,220 --> 00:19:53,900 for all SSH keys. 259 00:19:55,320 --> 00:19:57,920 It's available in his website, for example. 260 00:19:58,140 --> 00:20:03,180 In this case, we have the spaces for the 124, 1000 keys. 261 00:20:03,200 --> 00:20:05,660 We are going to have 124 and 2048 length, 262 00:20:06,180 --> 00:20:08,520 for example, for the two... 263 00:20:16,340 --> 00:20:19,500 As you can see, it's a really small space. 264 00:20:19,860 --> 00:20:23,120 I mean, you can get many of these ones. 265 00:20:23,580 --> 00:20:25,880 Let's see how we can try it. 266 00:20:29,140 --> 00:20:32,400 We have made a little script called exploiter, 267 00:20:32,480 --> 00:20:33,180 which is a rhetorical script. 268 00:20:33,180 --> 00:20:42,360 really simple script. As you can see, the script tries to, with each pair of key, tries 269 00:20:42,360 --> 00:20:53,620 to get login to the server. So let's try to see how it's working. Of course, you should 270 00:20:53,620 --> 00:21:00,900 know the user. For example, and let's try to, a random server, I don't know. 271 00:21:03,940 --> 00:21:16,340 What, w-o-p-r? Okay, let's go. And the port, probably is 22, so let's run. Well, let's 272 00:21:16,340 --> 00:21:23,000 see if it's, this works. As you can see, all the, all the, all the keys are the fingerprint, 273 00:21:23,620 --> 00:21:30,440 and the number, which is the PID, use it for create that pair. Oh, how nice. 274 00:21:37,040 --> 00:21:43,320 So, you know what, what an alarm is, you heard it. So, should we run this script? I mean, 275 00:21:44,100 --> 00:21:51,560 push red button, it sounds. No. Yeah. Okay. 276 00:21:53,620 --> 00:22:02,980 Oh, gosh. Where's the alarm? Yes? Yes? We shouldn't. We shouldn't. Well, it's, the script 277 00:22:02,980 --> 00:22:09,980 is not working well, but you can die with a bash script, I mean. Okay. Let's continue 278 00:22:09,980 --> 00:22:15,620 with this silly thing. Okay. Well, this is the first attack. It's a really simple attack. 279 00:22:15,760 --> 00:22:21,700 I mean, you, you, you can literally be in a script key, because it's a script, so you 280 00:22:21,700 --> 00:22:22,280 can use it. 281 00:22:24,340 --> 00:22:29,800 So, let's continue with the other one, but this one is really simple. I mean, let's, 282 00:22:29,800 --> 00:22:34,460 let's see how to attack Diffie-Hellman. How many of you are familiar with Diffie-Hellman 283 00:22:34,460 --> 00:22:43,000 key exchange? Okay. Good. So, Diffie-Hellman, you know about that. Yeah? Too, too many 284 00:22:43,000 --> 00:22:51,480 math for you? Okay. Both parts selects random number, and after some math magic, they get 285 00:22:51,480 --> 00:22:57,260 a shared secret. It's something simple. I mean, let's see. How many of you are familiar 286 00:22:57,260 --> 00:23:04,440 with Diffie-Hell, ephemeral Diffie-Hellman? Okay. I, I can teach you something new. No. 287 00:23:04,820 --> 00:23:09,320 It, the ephemeral Diffie-Hellman is just like Diffie-Hellman, but you should discard 288 00:23:09,680 --> 00:23:14,760 the private exponent. Yeah? So, after the key exchange, you discard the private exponent. 289 00:23:14,920 --> 00:23:20,220 If an attacker take control of one of the parties, they can't, he can't recalculate 290 00:23:20,220 --> 00:23:21,460 the shared secret. Yeah? Well, let's begin. No, no, no, no, no. Oh, come on. Okay. So, 291 00:23:21,460 --> 00:23:32,400 So if you want to decipher the communication, you should go against k, which of course is a really big number, so you need to brute force it. 292 00:23:32,780 --> 00:23:35,600 But in this case, probably you see the problem. 293 00:23:35,700 --> 00:23:39,260 In this case, the x, the private exponent, are random. 294 00:23:39,740 --> 00:23:46,340 So if those keys were generated in a vulnerable Debian system, we can look for all of them. 295 00:23:47,500 --> 00:23:49,640 So let's see how this works. 296 00:23:51,620 --> 00:24:03,300 So we just generate a list with all the possible x, and we try to get the private part of one of the parties. 297 00:24:04,380 --> 00:24:10,080 So if we get the private part of the client, that means that we get the x for the client. 298 00:24:10,360 --> 00:24:17,440 And if we can get the private part of the server, that means that we get the x of the server. 299 00:24:19,140 --> 00:24:21,440 Notice that even if one of the... 300 00:24:21,460 --> 00:24:25,040 If one of the parties are vulnerable, you are able to recalculate the share secret. 301 00:24:25,700 --> 00:24:27,300 That's something interesting. 302 00:24:27,740 --> 00:24:29,280 So we have a demo here. 303 00:24:29,660 --> 00:24:30,060 Okay. 304 00:24:31,940 --> 00:24:33,720 This is a Wireshark. 305 00:24:33,900 --> 00:24:35,240 Probably you are familiar with it. 306 00:24:37,620 --> 00:24:39,240 Maxi, me, and Paolo. 307 00:24:39,360 --> 00:24:42,480 Paolo is that guy who's looking for a show. 308 00:24:42,700 --> 00:24:45,900 If you have a show for him, please contact me. 309 00:24:46,580 --> 00:24:50,960 So we made a modification to the Wireshark in order to decipher... 310 00:24:51,460 --> 00:24:55,200 ...a SSL and TLS connection with a Diffie-Hellman. 311 00:24:55,620 --> 00:24:57,020 With a Diffie-Hellman. 312 00:24:57,780 --> 00:25:04,720 So, for example, in this case, the cipher suite was used with Diffie-Hellman ephemeral. 313 00:25:04,820 --> 00:25:06,160 That means D-H-E. 314 00:25:06,280 --> 00:25:07,300 Diffie-Hellman ephemeral. 315 00:25:08,040 --> 00:25:12,720 So as you can see, the connection is ciphered. 316 00:25:15,840 --> 00:25:17,240 I didn't notice. 317 00:25:17,860 --> 00:25:18,140 Okay. 318 00:25:20,520 --> 00:25:21,080 The... 319 00:25:21,080 --> 00:25:25,140 And, of course, you can decipher it because it's ciphered, of course. 320 00:25:25,320 --> 00:25:32,280 But if one of the parts is vulnerable, you can look for all the possibilities. 321 00:25:32,700 --> 00:25:35,760 So we go to Preference, Protocols, SSL. 322 00:25:36,840 --> 00:25:41,060 And this box, this is a new box, was created for us. 323 00:25:42,060 --> 00:25:43,620 Let's see if I have the... 324 00:25:43,620 --> 00:25:44,460 Nope. 325 00:25:46,100 --> 00:25:46,660 Nope. 326 00:25:48,460 --> 00:25:49,020 Nope. 327 00:25:49,340 --> 00:25:49,500 Nope. 328 00:25:49,600 --> 00:25:50,160 Nope. 329 00:25:50,500 --> 00:25:51,060 Nope. 330 00:25:55,460 --> 00:25:57,860 This file contains all the possible X. 331 00:25:58,420 --> 00:25:58,820 Yeah? 332 00:26:04,040 --> 00:26:07,260 The all possible X can be in two lengths. 333 00:26:07,460 --> 00:26:10,360 Can be 64 lengths or 128. 334 00:26:11,740 --> 00:26:12,940 128 bits. 335 00:26:13,140 --> 00:26:13,560 Yeah, of course. 336 00:26:13,600 --> 00:26:14,660 We are talking about the length. 337 00:26:14,840 --> 00:26:14,920 Yeah. 338 00:26:15,200 --> 00:26:15,800 Bits. 339 00:26:15,960 --> 00:26:16,260 Bits. 340 00:26:16,560 --> 00:26:18,040 So that's why the... 341 00:26:18,740 --> 00:26:19,040 That's... 342 00:26:19,600 --> 00:26:20,500 These kind of lines. 343 00:26:20,580 --> 00:26:21,060 It's true. 344 00:26:21,060 --> 00:26:21,720 Two power 16. 345 00:26:22,600 --> 00:26:23,700 So that's why it is. 346 00:26:24,320 --> 00:26:25,280 So we... 347 00:26:27,680 --> 00:26:28,980 We put this here. 348 00:26:30,160 --> 00:26:31,240 And this here. 349 00:26:32,620 --> 00:26:33,100 Yep. 350 00:26:33,300 --> 00:26:34,280 And press OK. 351 00:26:34,480 --> 00:26:39,740 In this moment, we are trying to brute force the connection looking for one of the public keys. 352 00:26:39,860 --> 00:26:41,840 That's why it's taking a while. 353 00:26:42,040 --> 00:26:44,900 In fact, it looks like hanging, but it's not. 354 00:26:45,000 --> 00:26:45,600 It's working. 355 00:26:45,760 --> 00:26:46,300 Believe me. 356 00:26:47,080 --> 00:26:48,080 Oh, there it is. 357 00:26:48,220 --> 00:26:48,920 So, okay. 358 00:26:50,340 --> 00:26:50,820 And... 359 00:26:51,360 --> 00:26:53,780 There is the connection deciphered. 360 00:26:55,920 --> 00:26:56,620 Thank you. 361 00:26:56,660 --> 00:26:56,900 Thank you. 362 00:26:57,120 --> 00:26:57,760 Thank you. 363 00:27:00,100 --> 00:27:01,040 Don't thanks me. 364 00:27:01,120 --> 00:27:01,700 Thanks, Kurt. 365 00:27:03,380 --> 00:27:04,720 Kurt is the... 366 00:27:04,720 --> 00:27:05,280 Okay. 367 00:27:05,500 --> 00:27:06,040 It's okay. 368 00:27:07,700 --> 00:27:09,480 It's the guy who comments the line. 369 00:27:10,600 --> 00:27:11,080 Fuck. 370 00:27:12,420 --> 00:27:13,580 He's gonna kill me. 371 00:27:15,300 --> 00:27:15,780 Okay. 372 00:27:17,320 --> 00:27:18,280 Well, that's... 373 00:27:18,280 --> 00:27:20,160 As you can see, this is a really big problem. 374 00:27:20,220 --> 00:27:20,600 I mean... 375 00:27:21,060 --> 00:27:21,420 You can... 376 00:27:21,420 --> 00:27:24,120 You can do the same thing for SSH. 377 00:27:25,140 --> 00:27:31,140 So if you transfer secrets with SSH connections in the last two years, 378 00:27:31,920 --> 00:27:36,160 you should note it that you are compromised a lot. 379 00:27:37,840 --> 00:27:44,080 For example, if you copy your private PCP over SCP 380 00:27:44,080 --> 00:27:49,880 and no passphrase there was not ciphered symmetrically, 381 00:27:49,880 --> 00:27:52,700 in that case, your PCP is compromised, too. 382 00:27:53,200 --> 00:27:53,640 Sorry. 383 00:27:56,420 --> 00:27:58,800 So, as you can see, it's a really big problem, yeah? 384 00:28:00,000 --> 00:28:00,440 Continue. 385 00:28:01,580 --> 00:28:05,560 And another scenario, and this one is really, really, really... 386 00:28:06,280 --> 00:28:06,960 I don't know. 387 00:28:07,000 --> 00:28:09,860 Really strange scenario, but it's really funny, too. 388 00:28:10,300 --> 00:28:11,120 It's DSA. 389 00:28:11,320 --> 00:28:13,280 How many of you are familiar with DSA? 390 00:28:14,260 --> 00:28:16,220 Digital Signature Algorithms, I think. 391 00:28:17,240 --> 00:28:17,960 Again, sorry? 392 00:28:19,200 --> 00:28:19,860 Oh, many. 393 00:28:19,860 --> 00:28:19,980 Many of you. 394 00:28:20,080 --> 00:28:20,300 Cool. 395 00:28:21,460 --> 00:28:22,880 Well, that's good. 396 00:28:24,840 --> 00:28:25,580 More math. 397 00:28:25,720 --> 00:28:25,980 Sorry. 398 00:28:26,580 --> 00:28:29,260 Okay, there are as many as you know. 399 00:28:29,400 --> 00:28:31,700 There are as many valuables, public valuables. 400 00:28:32,520 --> 00:28:34,900 There's P, G, which are primes. 401 00:28:35,020 --> 00:28:35,860 G is a generator. 402 00:28:36,240 --> 00:28:37,620 Y is the public part. 403 00:28:38,100 --> 00:28:39,780 X is the private part. 404 00:28:40,080 --> 00:28:42,940 And if Alice wants to sign a message M, 405 00:28:43,960 --> 00:28:47,600 she needs to calculate two numbers, R and S. 406 00:28:48,480 --> 00:28:49,660 As you can see, 407 00:28:49,660 --> 00:28:53,520 in this part, the only purpose of R is to obfuscate the X, 408 00:28:53,720 --> 00:28:56,140 which is the private part, yeah? 409 00:28:56,820 --> 00:29:01,100 And R only depends on K, which is a random number. 410 00:29:02,960 --> 00:29:05,060 Of course, you are seeing the problem now. 411 00:29:05,720 --> 00:29:10,100 If a message is signed in an unsecure environment, 412 00:29:10,340 --> 00:29:12,520 in a weak environment, in a vulnerable deviant, 413 00:29:13,180 --> 00:29:15,620 in that case, you can recover the X. 414 00:29:15,800 --> 00:29:19,260 You just make some math workout, 415 00:29:19,660 --> 00:29:23,280 and it's magic, and you can isolate the X. 416 00:29:23,640 --> 00:29:25,100 I'm not sure if the correct word, 417 00:29:25,180 --> 00:29:28,020 but you can put the X alone in one part of the equation. 418 00:29:28,540 --> 00:29:30,580 And of course, as you can see, 419 00:29:30,740 --> 00:29:32,600 S, it's a public value. 420 00:29:32,800 --> 00:29:36,020 K, it's a value which, what we're enforcing. 421 00:29:36,820 --> 00:29:39,520 The hash of M, of course, you should know it. 422 00:29:39,660 --> 00:29:42,200 And R is the public value, of course, Q2. 423 00:29:42,520 --> 00:29:46,680 So you can calculate the X, which is the private part. 424 00:29:47,040 --> 00:29:48,980 That means, even if, 425 00:29:48,980 --> 00:29:53,760 if DSA key pair was generating in a secure and safe system, 426 00:29:54,380 --> 00:29:59,980 if that pair had been using in an unsecure system, 427 00:30:00,560 --> 00:30:03,300 then your pair is compromised, too. 428 00:30:05,060 --> 00:30:06,320 Sorry, again. 429 00:30:08,300 --> 00:30:10,520 So, can you see this? 430 00:30:11,700 --> 00:30:12,420 No? 431 00:30:12,580 --> 00:30:13,420 Somebody said no? 432 00:30:14,020 --> 00:30:15,380 Say it slower. 433 00:30:16,180 --> 00:30:16,820 No? Okay. 434 00:30:16,920 --> 00:30:17,280 Yes. 435 00:30:17,360 --> 00:30:18,060 Yes, yes. 436 00:30:18,980 --> 00:30:21,120 Yeah, go, yeah, let's go, let's go, finish it. 437 00:30:21,500 --> 00:30:21,820 Okay. 438 00:30:24,420 --> 00:30:27,460 So, we have a really, really good scenario here. 439 00:30:27,900 --> 00:30:30,720 I mean, Debian is the universal operating system, 440 00:30:31,400 --> 00:30:32,980 so we can conquer the universe. 441 00:30:33,160 --> 00:30:34,180 Yeah, as Maxi says. 442 00:30:35,020 --> 00:30:37,660 We can do it in five single steps. 443 00:30:38,060 --> 00:30:40,880 Of course, we should choose an application. 444 00:30:41,620 --> 00:30:43,780 Can be SSH, SSL, whatever. 445 00:30:44,860 --> 00:30:47,040 You should see what algorithm is using. 446 00:30:47,040 --> 00:30:49,320 For example, if an SSL connection, 447 00:30:49,580 --> 00:30:52,660 if you had a pickup of the last two years, 448 00:30:53,460 --> 00:30:55,200 maybe you work for the NSA, 449 00:30:55,420 --> 00:30:57,300 and you have all the pickups in the world. 450 00:30:58,120 --> 00:30:59,640 That would be great, in that case. 451 00:30:59,720 --> 00:31:00,320 It's not great. 452 00:31:00,500 --> 00:31:01,460 The way it's not great, but. 453 00:31:04,200 --> 00:31:07,400 You see, you need to see which algorithm is using 454 00:31:07,800 --> 00:31:09,400 when you decide in the cipher suite. 455 00:31:10,240 --> 00:31:13,660 Then you should generate all the possible key. 456 00:31:13,980 --> 00:31:17,020 That means two to the 15th key. 457 00:31:17,020 --> 00:31:21,740 15th, minus one, because open SSL cannot run as init, 458 00:31:21,880 --> 00:31:24,480 so you can save one of the keys. 459 00:31:25,360 --> 00:31:26,300 Times three. 460 00:31:26,460 --> 00:31:27,340 Why times three? 461 00:31:27,460 --> 00:31:31,580 Because there's three combination with Indianness and bits. 462 00:31:32,300 --> 00:31:36,800 I mean, Debian runs in 32 bits, little Indian, 463 00:31:37,020 --> 00:31:41,740 32 bits bigger Indian, 64, little Indian. 464 00:31:41,900 --> 00:31:43,740 I'm not sure if I said it in the correct way, 465 00:31:43,820 --> 00:31:45,900 but that's three combinations. 466 00:31:47,020 --> 00:31:51,680 Combinations, so you should generate all the keys. 467 00:31:51,900 --> 00:31:54,960 Of course, if we are going to conquer the universe, 468 00:31:55,160 --> 00:31:56,800 you should conquer all the platforms, 469 00:31:57,020 --> 00:31:59,820 so that's why you should multiply by three. 470 00:32:01,180 --> 00:32:07,100 All this space can be something really easy to generate. 471 00:32:07,880 --> 00:32:10,860 In a few hours, you can generate all the possible keys. 472 00:32:12,100 --> 00:32:14,300 And then you should brute force. 473 00:32:15,360 --> 00:32:16,480 There are many options here. 474 00:32:16,480 --> 00:32:24,000 You can authenticate yourself using asymmetric keys. 475 00:32:24,200 --> 00:32:29,340 As we see, you can contact the whitehouse.globe 476 00:32:29,340 --> 00:32:31,940 and try to brute force him. 477 00:32:33,380 --> 00:32:38,020 In this case, you need a quick public key on a server. 478 00:32:38,320 --> 00:32:39,980 So it's a possible situation. 479 00:32:40,440 --> 00:32:44,760 You can do a man-in-the-middle attack in the same way 480 00:32:44,760 --> 00:32:45,820 that we generate. 481 00:32:45,820 --> 00:32:47,480 You can generate all the clones of the pairs. 482 00:32:47,720 --> 00:32:52,980 You can generate many clones for RSA certificate. 483 00:32:56,240 --> 00:33:00,820 So you can create a phishing situation or something like that. 484 00:33:01,000 --> 00:33:02,580 Of course, in this case, 485 00:33:02,720 --> 00:33:04,920 you need to create a man-in-the-middle scenario. 486 00:33:05,420 --> 00:33:07,120 You know, that is really hard. 487 00:33:07,400 --> 00:33:10,960 You need a multi-vendor DNS bugger. 488 00:33:13,220 --> 00:33:15,120 You need to poison in caches. 489 00:33:15,820 --> 00:33:16,500 It's really hard. 490 00:33:20,760 --> 00:33:22,940 You didn't go to the damn talk? 491 00:33:24,160 --> 00:33:24,640 Okay. 492 00:33:26,060 --> 00:33:26,840 It's tomorrow. 493 00:33:27,680 --> 00:33:28,440 It's tomorrow? 494 00:33:28,920 --> 00:33:29,400 Tomorrow. 495 00:33:29,660 --> 00:33:31,460 Oh, tomorrow is the damn talk. 496 00:33:31,580 --> 00:33:32,980 So that's why you are not laughing. 497 00:33:33,500 --> 00:33:33,980 Okay. 498 00:33:35,180 --> 00:33:36,520 He was in Black Hat, too. 499 00:33:36,660 --> 00:33:37,740 I have news for you. 500 00:33:40,980 --> 00:33:43,420 Internet is going to be exploding these days. 501 00:33:45,100 --> 00:33:45,800 Because I'm going to be talking to you. 502 00:33:45,820 --> 00:33:51,040 Because this little problem with DNS, where are you living, in a tupperware? 503 00:33:51,480 --> 00:33:53,000 You should know this one. 504 00:33:53,180 --> 00:33:54,400 Okay, let's continue. 505 00:33:58,640 --> 00:34:02,940 Yeah, if you, probably Dams wants to give you the surprise tomorrow. 506 00:34:03,160 --> 00:34:05,720 I am so stupid, but okay. 507 00:34:06,480 --> 00:34:07,260 Don't tell him. 508 00:34:07,940 --> 00:34:09,780 Don't tell him, don't tell him. 509 00:34:09,780 --> 00:34:19,140 Yeah, another scenario, possible scenario is the cipher connection, made it with one of the parts vulnerable, just as we did with Wireshark. 510 00:34:19,520 --> 00:34:23,180 There's many other tools you can attack SSH to. 511 00:34:23,820 --> 00:34:31,580 In that case, you need one of the parts outdated, which runs a Debian vulnerable in this moment. 512 00:34:31,880 --> 00:34:35,640 At least, you captured traffic in the last two years. 513 00:34:36,800 --> 00:34:37,840 Maybe don't. 514 00:34:38,880 --> 00:34:39,760 That's actually... 515 00:34:39,780 --> 00:34:42,440 There's an agency that made these kind of things. 516 00:34:43,960 --> 00:34:44,880 I don't know. 517 00:34:45,020 --> 00:34:51,400 Maybe if you didn't know the Dan problem, maybe you don't know about these things, so I am noticing you. 518 00:34:53,600 --> 00:35:02,760 Another problem, another scenario, possible scenario is attack cipher symmetric encryptions, storage or connections. 519 00:35:03,320 --> 00:35:09,260 You know, in many cases, when, for example, in a storage, if you want to cipher in a storage, 520 00:35:09,780 --> 00:35:18,040 you create a random key, which is symmetric, in that case, you should need to create all the possible keys and just decipher it, something like that. 521 00:35:18,340 --> 00:35:24,020 Many, many backup systems are vulnerable to this flaw in that way. 522 00:35:25,280 --> 00:35:34,480 And, of course, as we see, you can attack the DSA private part, there are tools made in this. 523 00:35:35,240 --> 00:35:38,940 We want to give you the URL in the... 524 00:35:39,780 --> 00:35:40,820 Next slide, I think. 525 00:35:41,480 --> 00:35:47,660 In that case, you need a message signet in a weak system. 526 00:35:48,200 --> 00:35:54,140 That means that the non-reputable... 527 00:35:54,140 --> 00:35:55,740 I don't think it's... 528 00:35:55,740 --> 00:35:57,300 Reputable means something for you? 529 00:35:58,800 --> 00:35:59,700 Non-reputability. 530 00:36:00,620 --> 00:36:01,420 Reputable. 531 00:36:02,300 --> 00:36:04,060 Okay, that's a strange word. 532 00:36:04,520 --> 00:36:06,520 Non-reputable? 533 00:36:07,460 --> 00:36:09,760 The property of non-reputable? 534 00:36:09,780 --> 00:36:11,980 Non-reputable was losing in DSA. 535 00:36:12,680 --> 00:36:13,280 Reputable? 536 00:36:14,100 --> 00:36:14,700 Repudiability. 537 00:36:16,020 --> 00:36:16,620 Repudiability? 538 00:36:17,360 --> 00:36:17,960 Oh! 539 00:36:21,880 --> 00:36:23,260 Thank you, James Bond. 540 00:36:24,260 --> 00:36:27,360 And, of course, the last step, ensure your power. 541 00:36:28,940 --> 00:36:33,420 Okay, that is the related work. 542 00:36:33,560 --> 00:36:36,240 The first one is the open... 543 00:36:36,240 --> 00:36:39,100 The HD Moore tools, which has the... 544 00:36:39,100 --> 00:36:42,220 All the key spaces for SSH. 545 00:36:42,900 --> 00:36:43,940 You can download there. 546 00:36:44,080 --> 00:36:48,420 There is many left, so you don't need to calculate them. 547 00:36:48,960 --> 00:36:52,700 The second link is our patch for Wyshack. 548 00:36:54,520 --> 00:37:02,800 The third link is a Ben Snort plugin to detect communications using weak... 549 00:37:04,060 --> 00:37:06,960 Weak Diffie-Hellman exponent in SSH. 550 00:37:07,120 --> 00:37:08,680 So you can get an alert. 551 00:37:08,680 --> 00:37:16,220 You can get an alert if one of the parties are running weak, okay, weak, weak keys. 552 00:37:16,420 --> 00:37:18,020 So, Ben, are you here? 553 00:37:19,120 --> 00:37:19,680 No. 554 00:37:19,880 --> 00:37:21,680 He ran with the final alarm, I think. 555 00:37:23,740 --> 00:37:25,680 Or maybe with the rocket issue. 556 00:37:27,480 --> 00:37:31,560 The third one is SSH tools. 557 00:37:32,080 --> 00:37:32,640 That's... 558 00:37:32,640 --> 00:37:38,360 In that link, you can find ways to decipher SSH connection when one of the parties are vulnerable. 559 00:37:38,680 --> 00:37:49,720 And in that link, you can find a tool for get DSA parts with a sign-in message in a weak environment. 560 00:37:50,780 --> 00:37:58,020 The other, the Firefox SSL blacklist add-on, it's a plugin for Firefox in order to detect if you... 561 00:37:58,020 --> 00:38:03,240 When you are connected with an SSH server, if there's a certificate, it's blacklisted. 562 00:38:05,040 --> 00:38:07,560 You need to install two extensions there. 563 00:38:07,740 --> 00:38:08,660 One is the... 564 00:38:08,660 --> 00:38:09,920 The extension for check itself. 565 00:38:10,240 --> 00:38:14,980 And the other one, it's the database with all the blacklisted certificates. 566 00:38:16,520 --> 00:38:25,180 The other, the open ID devian PRNG DNS cache poisoning advisory, it's from yesterday. 567 00:38:25,520 --> 00:38:27,940 I mean, tomorrow we... 568 00:38:27,940 --> 00:38:29,560 I think we get pranked. 569 00:38:29,760 --> 00:38:33,540 But we found this, and we decide to put it anyway. 570 00:38:37,080 --> 00:38:42,940 Nowadays, since yesterday, you can't trust in open ID anymore. 571 00:38:43,120 --> 00:38:43,480 Sorry. 572 00:38:44,480 --> 00:38:58,420 If you combine the problem with the PRNG, that means clone certificates, with the DNS cache poisoning, with the Kaminsky problem, open ID can be fakeable. 573 00:38:59,840 --> 00:39:00,920 That's why... 574 00:39:00,920 --> 00:39:03,520 That's because open ID is fake. 575 00:39:03,520 --> 00:39:08,320 Open ID doesn't use CRL, certificate location list, CRL. 576 00:39:08,900 --> 00:39:10,120 So, when... 577 00:39:10,120 --> 00:39:12,060 In fact, nobody uses CRL. 578 00:39:12,180 --> 00:39:12,560 When... 579 00:39:12,560 --> 00:39:13,480 Not nobody. 580 00:39:15,540 --> 00:39:18,500 How many of you are Windows Vista user? 581 00:39:20,440 --> 00:39:23,960 So, you are the only one who use it by default. 582 00:39:24,100 --> 00:39:24,520 Sorry. 583 00:39:26,420 --> 00:39:27,020 Yeah. 584 00:39:27,080 --> 00:39:28,020 Yes, please, please. 585 00:39:28,100 --> 00:39:28,340 Yes. 586 00:39:28,680 --> 00:39:29,460 You're safe. 587 00:39:29,740 --> 00:39:30,120 Yeah. 588 00:39:30,120 --> 00:39:38,840 The other ones should install by hand, but the only people who have CRL by default are the Vista users. 589 00:39:39,240 --> 00:39:41,980 You have other problems, but you are safe in this case. 590 00:39:46,960 --> 00:39:56,820 And the last link is the devian wiki where you can find all the packages affected and how you should regenerate the keys for each package. 591 00:39:57,040 --> 00:39:58,240 So, let's continue. 592 00:40:00,140 --> 00:40:02,000 So, some countermeasures. 593 00:40:02,280 --> 00:40:02,840 Countermeasures. 594 00:40:03,020 --> 00:40:10,160 Of course, you should read the devian wiki for more details, but one of the countermeasures is update libsl. 595 00:40:10,340 --> 00:40:14,780 Of course, if you are a devian user, how many of you are devian user or derivates? 596 00:40:14,920 --> 00:40:16,640 Ubuntu, Kubuntu, or something like that. 597 00:40:17,000 --> 00:40:17,560 Okay. 598 00:40:17,740 --> 00:40:22,080 But probably most of you do an upgrade daily. 599 00:40:24,820 --> 00:40:26,800 I see some faces like... 600 00:40:26,800 --> 00:40:27,340 Okay. 601 00:40:29,000 --> 00:40:31,140 In that case, you should upgrade it. 602 00:40:31,760 --> 00:40:36,880 The other problem, the other countermeasure is look for compromises keys. 603 00:40:37,440 --> 00:40:40,160 Devian provides you a nice tool to do that. 604 00:40:40,360 --> 00:40:41,200 I can... 605 00:40:41,200 --> 00:40:42,500 Maybe I can show you. 606 00:40:43,980 --> 00:40:50,620 It's called ssh-boolkey. 607 00:40:51,520 --> 00:40:53,600 I don't know if you are familiar with this tool. 608 00:40:54,560 --> 00:40:55,420 The devian users. 609 00:40:55,420 --> 00:40:56,280 Are you... 610 00:40:56,280 --> 00:40:57,360 You are not familiar with this tool? 611 00:40:58,860 --> 00:40:59,320 Okay. 612 00:40:59,560 --> 00:40:59,980 Well... 613 00:41:00,620 --> 00:41:01,400 Dump up. 614 00:41:01,520 --> 00:41:01,880 Okay. 615 00:41:02,640 --> 00:41:03,100 Okay. 616 00:41:03,200 --> 00:41:05,040 That's good because you are learning something. 617 00:41:05,300 --> 00:41:05,700 So... 618 00:41:06,180 --> 00:41:06,860 Let's see. 619 00:41:07,080 --> 00:41:12,140 For example, in this case, there are some compromises keys here. 620 00:41:12,260 --> 00:41:15,980 For example, this one, which is host compromises, as you can see. 621 00:41:18,360 --> 00:41:21,500 There are some ones that are not blacklisted, so it's safe. 622 00:41:27,460 --> 00:41:30,120 This checks for your... 623 00:41:30,120 --> 00:41:31,980 Of course, this is on purpose. 624 00:41:32,100 --> 00:41:33,560 I'm not using compromises keys. 625 00:41:33,780 --> 00:41:34,300 Cool. 626 00:41:39,040 --> 00:41:41,460 In one of the case, it's unknown. 627 00:41:41,720 --> 00:41:42,900 I can't find it. 628 00:41:44,520 --> 00:41:45,040 Okay. 629 00:41:45,480 --> 00:41:46,520 But let's go on. 630 00:41:47,220 --> 00:41:49,120 So, you know this tool now. 631 00:41:49,340 --> 00:41:50,900 You can write like this. 632 00:41:50,900 --> 00:41:53,560 And you can check all the keys on your system. 633 00:41:53,660 --> 00:41:56,780 Of course, you need to be rude because you need to read it. 634 00:41:57,340 --> 00:41:57,820 Okay. 635 00:41:57,900 --> 00:41:58,340 Let's continue. 636 00:42:01,240 --> 00:42:07,200 Well, you should look for weak keys even if you are not a devian user. 637 00:42:07,620 --> 00:42:12,320 Maybe one of your devian users export to your system weak public keys. 638 00:42:12,560 --> 00:42:16,180 So, in that case, you have a hole in your system. 639 00:42:16,300 --> 00:42:17,780 I mean, a really big hole. 640 00:42:18,680 --> 00:42:20,100 You can put some... 641 00:42:20,100 --> 00:42:21,800 A little elephant in that hole. 642 00:42:23,460 --> 00:42:29,640 You should regenerate all these keys if you use it in an affected devian system. 643 00:42:30,300 --> 00:42:38,060 Of course, you can mitigate the problem with Firefox, with the blacklist add-on. 644 00:42:39,260 --> 00:42:40,020 This is... 645 00:42:40,020 --> 00:42:43,220 It doesn't work in all the issues, but let's leave the details. 646 00:42:43,780 --> 00:42:48,100 And if you are a devian user, if you are running a Sage server in the devian user, 647 00:42:48,100 --> 00:42:55,540 you can check this option in order to avoid that users with weak keys connect to your systems. 648 00:42:55,900 --> 00:43:04,360 Of course, all the traffic affected in the last two years, you can do nothing for it. 649 00:43:04,560 --> 00:43:06,280 I mean, the milk is already split. 650 00:43:07,440 --> 00:43:09,060 So, let's see some repercussions. 651 00:43:10,500 --> 00:43:11,100 Okay. 652 00:43:11,220 --> 00:43:15,460 These numbers are from our friend Jeren. 653 00:43:16,320 --> 00:43:17,540 Oh, my God. 654 00:43:17,660 --> 00:43:18,080 Okay. 655 00:43:18,100 --> 00:43:18,880 Our friend. 656 00:43:18,960 --> 00:43:20,040 He is German. 657 00:43:21,260 --> 00:43:23,360 He works in Haysec. 658 00:43:23,840 --> 00:43:25,200 And he... 659 00:43:25,200 --> 00:43:30,740 They make a survey with 100,000 web servers. 660 00:43:31,020 --> 00:43:34,420 They are looking for man-in-the-middle situations. 661 00:43:34,680 --> 00:43:44,880 So, they detect 3% of the servers of the people who have a SANE-ed CA are running weak certificates. 662 00:43:45,120 --> 00:43:47,360 This is a number from two weeks ago... 663 00:43:47,360 --> 00:43:50,580 Two weeks after publications of the advisory. 664 00:43:51,020 --> 00:44:03,920 So, if we extrapolate this number to the global numbers, maybe 24,000 weak certificates are running these days. 665 00:44:04,300 --> 00:44:10,260 Combine this with the DNS problem, and you will get a perfect phishing situation. 666 00:44:10,940 --> 00:44:16,580 So, another repercussions on devian, of course. 667 00:44:16,580 --> 00:44:17,700 I am the devian developer. 668 00:44:18,060 --> 00:44:19,800 This problem touched my deep feelings. 669 00:44:20,160 --> 00:44:22,700 We get the pony award there. 670 00:44:23,200 --> 00:44:25,860 We won the pony award to the most epic fail. 671 00:44:26,060 --> 00:44:26,780 We have it here. 672 00:44:27,420 --> 00:44:28,660 Say hello to the pony. 673 00:44:33,160 --> 00:44:38,420 There are some things that you should know before criticize us. 674 00:44:38,780 --> 00:44:42,520 One of these is that devian needs to patch the systems. 675 00:44:42,640 --> 00:44:44,800 I mean, all the distribution patch software. 676 00:44:45,620 --> 00:44:52,420 That's because in most of the case, upstream has not the same goals than the distributions. 677 00:44:52,820 --> 00:44:58,680 In this case, for example, for open-cell, it's not something big to have by green problems. 678 00:45:00,220 --> 00:45:03,200 In devian, this is something really huge. 679 00:45:03,420 --> 00:45:05,720 So, that's why the problem starts. 680 00:45:06,440 --> 00:45:09,320 In some case, upstream is hostile. 681 00:45:10,760 --> 00:45:11,300 Hostile? 682 00:45:11,560 --> 00:45:13,060 I think the word is hostile. 683 00:45:13,060 --> 00:45:14,860 I mean, they are bad guys. 684 00:45:15,000 --> 00:45:15,580 No, not bad. 685 00:45:15,700 --> 00:45:15,880 Bad. 686 00:45:16,320 --> 00:45:17,080 Not friendly. 687 00:45:17,420 --> 00:45:18,040 Not friendly. 688 00:45:18,240 --> 00:45:18,400 Yeah. 689 00:45:18,780 --> 00:45:20,220 Well, open as I said. 690 00:45:20,540 --> 00:45:25,700 Guys are from the BSD school, and they are not friendly guys. 691 00:45:29,440 --> 00:45:34,160 So, of course, we can audit all the code because it's a lot of Linux code. 692 00:45:34,340 --> 00:45:36,040 So, let's see. 693 00:45:37,040 --> 00:45:38,160 Devian is working on visibility. 694 00:45:38,520 --> 00:45:39,940 Do you know about the Linux law? 695 00:45:40,060 --> 00:45:41,540 How many of you know the Linux law? 696 00:45:43,240 --> 00:45:49,040 The Linux law says, given enough eyeballs, all the bugs are shallow. 697 00:45:49,460 --> 00:45:55,300 So, we are working on create many eyeballs. 698 00:45:55,640 --> 00:45:57,420 So, we are working on visibility. 699 00:45:57,820 --> 00:45:59,680 So, many eyeballs will see the code. 700 00:46:00,700 --> 00:46:07,260 In that case, we are trying to get public the version control systems for all the sources. 701 00:46:08,100 --> 00:46:08,740 Okay. 702 00:46:08,840 --> 00:46:10,760 Working on patches.devian.org. 703 00:46:10,760 --> 00:46:13,340 Which will be a place where the patches will be there. 704 00:46:14,980 --> 00:46:17,800 The issue here is maybe it's not a technical problem. 705 00:46:18,060 --> 00:46:21,220 I mean, maybe the upstream has not an easy way to see the patches. 706 00:46:21,600 --> 00:46:23,140 Maybe it's a policy problem. 707 00:46:23,460 --> 00:46:28,940 The developers are not obliged to public the patches. 708 00:46:30,700 --> 00:46:31,900 Maybe it's a social problem. 709 00:46:32,140 --> 00:46:36,200 Maybe we should be more friendly with our co-developers. 710 00:46:36,280 --> 00:46:38,560 And we should ask in better ways. 711 00:46:38,720 --> 00:46:39,320 And that's... 712 00:46:40,780 --> 00:46:44,480 Maybe the problem is in the conjugation of all that sets. 713 00:46:45,060 --> 00:46:46,700 So, let's see some conclusions. 714 00:46:47,080 --> 00:46:48,620 We are hurrying, as you notice. 715 00:46:49,560 --> 00:46:53,140 The first problem here is review twice, patch once. 716 00:46:53,440 --> 00:46:58,020 If the devian developer follow the data flow problem, 717 00:46:58,700 --> 00:47:04,580 he will notice that the only part where buff is touching, 718 00:47:04,840 --> 00:47:07,180 it's there in the line in comment. 719 00:47:07,440 --> 00:47:08,560 So, the problem is... 720 00:47:09,640 --> 00:47:15,380 If you notice that run add don't add nothing, that's a problem. 721 00:47:15,800 --> 00:47:18,820 So, another issue is don't write fancy code. 722 00:47:19,040 --> 00:47:26,020 I mean, if unaccelerated memory doesn't contribute with something substantial, 723 00:47:26,380 --> 00:47:27,460 so don't do that. 724 00:47:28,380 --> 00:47:31,500 Of course, make a lot of comments on your code. 725 00:47:31,640 --> 00:47:32,600 That will be good. 726 00:47:33,200 --> 00:47:34,320 Ask with details. 727 00:47:34,800 --> 00:47:36,220 The devian developer... 728 00:47:36,220 --> 00:47:39,800 The devian developer just asked with few lines. 729 00:47:40,040 --> 00:47:41,740 You should put the context of the line. 730 00:47:41,800 --> 00:47:43,800 You should put what are you trying to do. 731 00:47:46,970 --> 00:47:48,940 If many people complains about something, 732 00:47:49,160 --> 00:47:50,820 maybe it's something huge. 733 00:47:51,240 --> 00:47:55,020 A lot of people complains about binary problems in OpenSSL in many... 734 00:47:55,920 --> 00:47:57,180 from many years ago. 735 00:47:57,480 --> 00:48:00,080 In fact, one year ago, 736 00:48:00,320 --> 00:48:05,500 a frequency-hacking question is why OpenSSL has a lot of warning problems. 737 00:48:06,220 --> 00:48:06,520 In the background. 738 00:48:08,260 --> 00:48:10,240 Of course, another... 739 00:48:10,240 --> 00:48:11,400 Another first... 740 00:48:11,400 --> 00:48:13,340 Another big issue here is... 741 00:48:13,340 --> 00:48:14,620 Open source... 742 00:48:14,620 --> 00:48:15,200 And I'm... 743 00:48:15,200 --> 00:48:16,920 And I'm an activist of OpenSource. 744 00:48:17,120 --> 00:48:23,520 But OpenSource doesn't complain the Linux law conditions per se. 745 00:48:23,900 --> 00:48:27,040 That means OpenSource doesn't mean a lot of eyeballs. 746 00:48:28,740 --> 00:48:32,300 How many of you are activists of OpenSource? 747 00:48:32,980 --> 00:48:34,500 Well, many of you. Okay. 748 00:48:34,500 --> 00:48:37,600 So, it's not enough with OpenSource. 749 00:48:37,740 --> 00:48:39,080 You should see the code. 750 00:48:39,360 --> 00:48:40,400 So, that's... 751 00:48:42,240 --> 00:48:43,860 That's what that line means. 752 00:48:44,720 --> 00:48:45,980 That... Here is the thanks. 753 00:48:46,400 --> 00:48:49,900 And, of course, we are answering question in room number... 754 00:48:49,900 --> 00:48:52,980 105, down this corridor, straight across the hallway. 755 00:48:53,260 --> 00:48:53,720 105. 756 00:48:54,240 --> 00:48:54,720 Okay. 757 00:48:54,840 --> 00:48:56,500 We will listen your insults there.