1 00:00:00,520 --> 00:00:04,380 Okay, so welcome to another Crypto Village Talk. 2 00:00:05,080 --> 00:00:06,800 I'm Matt Singletee, this is Trey, 3 00:00:06,960 --> 00:00:10,140 and we'll be talking about PKI, 4 00:00:10,400 --> 00:00:13,700 a public infrastructure, revocation, the frailty of PKI, 5 00:00:13,840 --> 00:00:18,540 so specifically about some weaknesses in revocation. 6 00:00:18,760 --> 00:00:20,500 We're not here to drop O-days, 7 00:00:20,740 --> 00:00:22,940 but sort of to talk about the state of the industry 8 00:00:22,940 --> 00:00:25,100 and some things that are kind of challenging 9 00:00:25,100 --> 00:00:27,600 for the encryption that we pretty much use every day 10 00:00:27,600 --> 00:00:29,580 on the web with applications, 11 00:00:30,780 --> 00:00:34,900 probably the most commonly used kinds of encryption there are. 12 00:00:35,640 --> 00:00:42,360 Okay, so revocation began as something that you did directly 13 00:00:44,800 --> 00:00:46,220 to distrust certificates. 14 00:00:46,620 --> 00:00:48,420 When you've set up PKI, you have it working, 15 00:00:48,960 --> 00:00:50,740 you're going to find certificates that get compromised, 16 00:00:50,900 --> 00:00:53,620 that have problems, that get lost, stolen, whatever, 17 00:00:53,780 --> 00:00:55,840 and you have to make them distrusted. 18 00:00:55,940 --> 00:00:57,280 So this is what revocation is. 19 00:00:57,340 --> 00:00:57,580 It's a... 20 00:00:57,580 --> 00:01:01,460 And when that started scaling, 21 00:01:02,880 --> 00:01:05,460 it's evolved over the last 20 years. 22 00:01:06,080 --> 00:01:09,020 After direct manual certificate revoking, 23 00:01:09,160 --> 00:01:12,240 which you do directly on your own device, 24 00:01:12,400 --> 00:01:16,420 on a specific device, non-network related manner, 25 00:01:17,980 --> 00:01:23,660 the idea of bringing different kinds of devices together 26 00:01:23,660 --> 00:01:25,660 for certificate revocation. 27 00:01:25,880 --> 00:01:27,240 So CRLs are... 28 00:01:27,240 --> 00:01:28,820 CRLs are a way of taking a lot of certificates 29 00:01:28,820 --> 00:01:31,260 and bundling up in a file that can be dispersed. 30 00:01:32,040 --> 00:01:35,640 That evolved, again, because it didn't scale. 31 00:01:35,860 --> 00:01:39,140 If you have to have a large file with every certificate 32 00:01:39,140 --> 00:01:41,240 that's being revoked, that grows and grows and grows, 33 00:01:41,360 --> 00:01:42,040 it gets out of control. 34 00:01:42,940 --> 00:01:45,640 So OCSP is the next set of evolution of that. 35 00:01:45,760 --> 00:01:48,200 And OCSP is a protocol that, 36 00:01:48,280 --> 00:01:49,620 think of it like a database query. 37 00:01:49,900 --> 00:01:51,980 You're saying, is this certificate good? 38 00:01:52,180 --> 00:01:54,620 And it'll come back and tell you within a time span, 39 00:01:54,920 --> 00:01:56,480 yes, it's good or no, it's not. 40 00:01:56,480 --> 00:01:58,400 So you don't retrieve all of them. 41 00:01:58,440 --> 00:01:59,840 You only get the stuff that you need. 42 00:02:01,440 --> 00:02:04,220 Down the road, so we'll talk about the weaknesses of these things 43 00:02:04,220 --> 00:02:07,220 and then down the road, what the alternatives are. 44 00:02:07,500 --> 00:02:09,260 Short-lived certificates to constrain the timelines, 45 00:02:09,600 --> 00:02:11,500 to do the same, try to accomplish the same goal, 46 00:02:11,660 --> 00:02:14,180 and an effort by Google called certificate transparency. 47 00:02:15,320 --> 00:02:18,200 So RFC 5280 is where these things are defined. 48 00:02:19,260 --> 00:02:22,020 In theory, there's two different states for revocation, 49 00:02:22,160 --> 00:02:23,880 which is revoked and held. 50 00:02:24,280 --> 00:02:26,020 But the reality is, it's just, 51 00:02:26,480 --> 00:02:27,940 the most common one is revoked. 52 00:02:31,740 --> 00:02:33,120 So a little bit of background here. 53 00:02:33,900 --> 00:02:36,700 When certificate authorities provide certificates 54 00:02:37,760 --> 00:02:40,680 that are signed, they do so in kind of three 55 00:02:40,680 --> 00:02:42,320 general assurance levels. 56 00:02:42,400 --> 00:02:44,840 That's known as, in the industry, the CA industry, 57 00:02:45,060 --> 00:02:46,600 as DVOV and EV. 58 00:02:47,480 --> 00:02:50,240 The reason this is related to revocation is that 59 00:02:51,080 --> 00:02:52,720 they have different requirements. 60 00:02:52,960 --> 00:02:55,940 So you have a higher level of assurance with the extended validation. 61 00:02:55,960 --> 00:02:56,460 So you have a higher level of assurance with the extended validation. 62 00:02:56,480 --> 00:02:56,960 So you have a higher level of assurance with the extended validation. 63 00:02:56,960 --> 00:02:59,320 Because the certificate authorities will go to much greater depth 64 00:02:59,320 --> 00:03:03,460 when they're vetting the entity that the certificate's for. 65 00:03:04,760 --> 00:03:07,480 And one of the things that go along with that that you get 66 00:03:07,480 --> 00:03:09,680 is that OCSP is a requirement. 67 00:03:09,860 --> 00:03:14,180 So that most current kind of revocation check is made available. 68 00:03:14,380 --> 00:03:17,000 So this means that when you buy that $400 certificate from your CA, 69 00:03:17,580 --> 00:03:20,520 they're effectively obligated during that two-year timeline 70 00:03:20,520 --> 00:03:24,000 to provide an OCSP server and response 71 00:03:24,000 --> 00:03:26,380 that will help, that will address that. 72 00:03:26,480 --> 00:03:29,720 That way they're not compromising their intermediate. 73 00:03:30,180 --> 00:03:32,800 And again, it's one of those things that's required. 74 00:03:33,060 --> 00:03:37,560 So when you hit the green bar in your mobile OS 75 00:03:37,560 --> 00:03:39,320 and you see the green lock and all that, 76 00:03:39,960 --> 00:03:42,980 that's typically involving OCSP at this point in time. 77 00:03:43,080 --> 00:03:46,000 And CRL is still built into these devices, 78 00:03:47,300 --> 00:03:49,960 but less and less commonly used. 79 00:03:50,060 --> 00:03:51,080 It's kind of grandfathered in. 80 00:03:51,140 --> 00:03:54,580 The CRLs are still there, just not as commonly used. 81 00:03:55,100 --> 00:03:55,580 So... 82 00:03:56,480 --> 00:03:57,200 There are other assurance levels. 83 00:03:57,360 --> 00:03:58,800 I won't go into details other than to say 84 00:03:58,800 --> 00:04:00,480 CAs will do their own magic, 85 00:04:00,560 --> 00:04:02,340 extra magic sauce for other levels. 86 00:04:04,000 --> 00:04:06,020 So for explicitly revoking trust, 87 00:04:06,320 --> 00:04:08,580 the methods vary by operating system. 88 00:04:09,420 --> 00:04:11,760 Mac OS X uses the keychain as a GUI 89 00:04:11,760 --> 00:04:13,880 and then the security as the command line tool. 90 00:04:14,360 --> 00:04:16,800 It's one from my work that I'm the most familiar with. 91 00:04:17,520 --> 00:04:20,480 And that those settings for revocation 92 00:04:20,480 --> 00:04:24,120 are found ultimately in the system trust settings P list. 93 00:04:25,500 --> 00:04:26,020 Windows. 94 00:04:26,020 --> 00:04:27,420 I've got the TechNet article there 95 00:04:28,240 --> 00:04:30,420 to say it also has a GUI and you can dig in. 96 00:04:30,580 --> 00:04:31,980 Again, exercise left to the reader. 97 00:04:32,580 --> 00:04:35,660 You can go and take specific certificates 98 00:04:35,660 --> 00:04:37,360 and mark them as untrusted. 99 00:04:37,900 --> 00:04:39,820 For Linux, again, it's going to depend upon 100 00:04:39,820 --> 00:04:42,300 whether you're using LibreSSL or OpenSSL 101 00:04:42,300 --> 00:04:44,900 or whatever your stack is. 102 00:04:45,380 --> 00:04:46,660 I've got the command here 103 00:04:46,660 --> 00:04:50,600 for how Mozilla handles certificate revocation. 104 00:04:50,940 --> 00:04:53,620 An example being a recently compromised certificate 105 00:04:53,620 --> 00:04:56,000 or at least a certificate from Mozilla. 106 00:04:56,980 --> 00:05:00,100 It's not being handled according to the agreements 107 00:05:00,100 --> 00:05:01,600 that Symantec and Bluecoat had. 108 00:05:01,940 --> 00:05:03,540 So it's one that you'd want to have 109 00:05:03,540 --> 00:05:05,020 pervasively across the internet 110 00:05:05,020 --> 00:05:06,320 no longer trusted or used. 111 00:05:07,280 --> 00:05:09,420 So to take another further example 112 00:05:09,420 --> 00:05:11,020 to dig a little bit further on Mac OS X, 113 00:05:11,840 --> 00:05:13,780 the security dump keychain 114 00:05:13,780 --> 00:05:17,600 will give you all of the system root certificates. 115 00:05:17,700 --> 00:05:19,260 They're about 190 or 180. 116 00:05:20,020 --> 00:05:22,760 Apple updates these on a quarterly basis 117 00:05:22,760 --> 00:05:24,120 or semi-annual basis. 118 00:05:26,340 --> 00:05:28,080 That's, again, the root certificates. 119 00:05:29,220 --> 00:05:31,680 Removing a root is not the same as revocation. 120 00:05:31,860 --> 00:05:35,220 So revocation happens between the intermediates 121 00:05:35,220 --> 00:05:36,660 and the leaves. 122 00:05:36,820 --> 00:05:38,840 That's how the revocation gets managed. 123 00:05:39,160 --> 00:05:41,700 But again, to manually trust or distrust 124 00:05:41,700 --> 00:05:43,060 for the whole chain, 125 00:05:44,080 --> 00:05:46,020 you could take a root certificate 126 00:05:46,020 --> 00:05:49,740 and do a security add trusted cert deny 127 00:05:49,740 --> 00:05:52,460 and then that certificate will then no longer 128 00:05:52,460 --> 00:05:54,880 and all of the things that chain up to it 129 00:05:54,880 --> 00:05:55,860 will no longer be trusted. 130 00:05:56,720 --> 00:05:58,420 So with this command, 131 00:05:58,680 --> 00:05:59,600 you could, for example, 132 00:06:00,180 --> 00:06:02,920 remove trust certificates from Turkey or China, 133 00:06:03,120 --> 00:06:04,120 things like that. 134 00:06:04,220 --> 00:06:04,820 So it's useful. 135 00:06:05,020 --> 00:06:09,340 But being only 180 in the OS, 136 00:06:10,420 --> 00:06:11,980 if you drop the VeriSign certificate, 137 00:06:12,680 --> 00:06:16,020 maybe you'd lose like a third of all of your connections. 138 00:06:16,180 --> 00:06:17,280 So you have to do this kind of carefully. 139 00:06:17,340 --> 00:06:18,800 I don't think Apple wants to have this being 140 00:06:20,140 --> 00:06:20,940 commonly recommended. 141 00:06:21,540 --> 00:06:23,480 But if you do really need to lock down a machine, 142 00:06:23,640 --> 00:06:25,340 it's comforting to know that this is there. 143 00:06:27,060 --> 00:06:29,420 Okay, so again, that's at the level of the root. 144 00:06:29,540 --> 00:06:30,900 So what we'll do for the rest of this talk 145 00:06:30,900 --> 00:06:32,900 is step through certificate revocation lists, 146 00:06:32,960 --> 00:06:34,400 CRLs, the old way of doing it, 147 00:06:34,500 --> 00:06:38,640 and then OCSP, the protocol that's more common 148 00:06:38,640 --> 00:06:39,540 and standard currently. 149 00:06:41,940 --> 00:06:44,520 So CRLs are encoded as a Dura or PEM file 150 00:06:46,020 --> 00:06:48,700 and effectively it's just a file that's being hosted. 151 00:06:50,460 --> 00:06:52,800 Within the X509 header of a certificate, 152 00:06:53,080 --> 00:06:55,300 there'll be an EKU, an extended key usage, 153 00:06:55,360 --> 00:06:56,000 that basically is a file that's being hosted. 154 00:06:56,000 --> 00:06:59,000 So it basically designates where the CRL will be 155 00:06:59,000 --> 00:06:59,840 for that certificate. 156 00:07:00,100 --> 00:07:01,980 So when you're doing the chain evaluation, 157 00:07:02,360 --> 00:07:03,340 it knows where to check. 158 00:07:04,200 --> 00:07:07,000 So you would have a domain setup 159 00:07:07,000 --> 00:07:08,920 and a domain name associated with that, 160 00:07:09,340 --> 00:07:12,760 that when the certificate is used in a circumstance 161 00:07:12,760 --> 00:07:14,420 in which revocation has to be checked, 162 00:07:15,480 --> 00:07:17,980 which could also be a requirement in the X509 header, 163 00:07:18,240 --> 00:07:21,280 it will go out and make that connection and do that check. 164 00:07:21,500 --> 00:07:25,340 So OpenSSL CRL, there's a command, 165 00:07:26,280 --> 00:07:27,720 I don't see it on this slide, 166 00:07:27,840 --> 00:07:29,360 but anyway, there's a command in OpenSSL 167 00:07:29,360 --> 00:07:32,340 to create the file that could be hosted that way. 168 00:07:33,720 --> 00:07:35,560 And then I just want to note in passing, 169 00:07:35,720 --> 00:07:37,160 in addition to the X509 headers, 170 00:07:37,440 --> 00:07:39,700 the certificate policy statements from the CA 171 00:07:39,700 --> 00:07:43,540 will also have these and describe how they're operating 172 00:07:43,540 --> 00:07:44,700 and how they're handling revocation. 173 00:07:46,300 --> 00:07:46,780 Next. 174 00:07:48,340 --> 00:07:50,980 So here's how to make Apache serve CRLs. 175 00:07:51,380 --> 00:07:54,820 There's a Apache config directory SSL CA revocation path 176 00:07:54,820 --> 00:07:55,980 or SSL service. 177 00:07:56,000 --> 00:07:56,940 There's a Apache config directory SSL CA revocation file. 178 00:07:57,220 --> 00:08:00,800 And you point that to the file where you're hosting these. 179 00:08:01,100 --> 00:08:03,500 And then when the request gets made over, 180 00:08:03,500 --> 00:08:06,520 typically over HTTP or HTTPS, 181 00:08:06,540 --> 00:08:08,860 then that file gets received 182 00:08:08,860 --> 00:08:11,300 and the stack that's evaluating the chain 183 00:08:11,300 --> 00:08:13,840 will see all those things to revoke 184 00:08:13,840 --> 00:08:16,300 and prevent them from being evaluated as trusted. 185 00:08:17,300 --> 00:08:21,120 So basically, again, a CRL is just this bag of certificates 186 00:08:21,120 --> 00:08:23,220 that are untrusted that grows over time. 187 00:08:23,740 --> 00:08:25,980 Also, OpenVPN has a directory, 188 00:08:25,980 --> 00:08:27,760 a directive that's related. 189 00:08:28,120 --> 00:08:28,960 So next slide. 190 00:08:30,760 --> 00:08:33,180 Other places you can find these things, 191 00:08:33,300 --> 00:08:34,880 here are a couple little Google strings 192 00:08:34,880 --> 00:08:37,720 that can help you just find scads and scads 193 00:08:37,720 --> 00:08:41,760 of certificate revocation lists that are hosted out there. 194 00:08:42,320 --> 00:08:45,000 The certificate authorities largely host these 195 00:08:45,000 --> 00:08:47,720 and large organizations that are doing PKI 196 00:08:47,720 --> 00:08:52,000 will also keep these collections of untrusted certificates. 197 00:08:52,500 --> 00:08:53,720 Once it's untrusted, 198 00:08:53,780 --> 00:08:55,640 it kind of sticks around 199 00:08:55,640 --> 00:08:55,880 forever. 200 00:08:56,680 --> 00:08:58,640 These things, the contents of those, 201 00:08:58,700 --> 00:08:59,240 you never want to say, 202 00:08:59,300 --> 00:09:00,680 well, we've been untrusting all this time, 203 00:09:00,780 --> 00:09:01,460 but we'll take it out. 204 00:09:01,620 --> 00:09:03,380 I mean, you have to kind of keep maintaining these lists 205 00:09:03,380 --> 00:09:03,740 and they grow, 206 00:09:03,920 --> 00:09:06,560 which is why OCSP is a more attractive option. 207 00:09:08,860 --> 00:09:13,240 Also want to point out that the policies for checking CRLs 208 00:09:13,240 --> 00:09:15,120 and handling revocations 209 00:09:15,120 --> 00:09:16,900 sometimes are at the operating system level 210 00:09:17,380 --> 00:09:20,240 and sometimes they're at the application level. 211 00:09:20,400 --> 00:09:22,380 So it takes a little bit of kind of thought 212 00:09:22,380 --> 00:09:24,880 to figure out when you're using an app, you know, is it, 213 00:09:24,880 --> 00:09:26,000 is your OS making the check 214 00:09:26,000 --> 00:09:27,500 or is it the app making a check? 215 00:09:27,700 --> 00:09:32,080 And a good sort of example here is Firefox handles it all 216 00:09:32,080 --> 00:09:32,920 within its own app. 217 00:09:33,060 --> 00:09:37,240 So it'll have the entire stack in Mozilla Firefox by itself. 218 00:09:38,500 --> 00:09:40,520 Mozilla has a nice feature 219 00:09:41,440 --> 00:09:44,700 that pushes CRLs in a compressed form out 220 00:09:45,620 --> 00:09:47,520 on a three week basis. 221 00:09:47,640 --> 00:09:49,400 So Firefox is doing some really cool stuff. 222 00:09:50,100 --> 00:09:54,640 There's a file, a format for compressed CRLs there. 223 00:09:54,880 --> 00:09:55,580 I've shown. 224 00:09:55,940 --> 00:09:58,520 And then the patch where Mozilla has done that. 225 00:09:58,720 --> 00:09:59,560 Next slide. 226 00:10:00,300 --> 00:10:04,580 The reason that Mozilla and Firefox are doing this 227 00:10:04,580 --> 00:10:05,680 is that they're kind of keeping up 228 00:10:05,680 --> 00:10:07,480 with Google Certificate Transparency Initiative 229 00:10:08,100 --> 00:10:10,440 where you have large sets of certificates 230 00:10:10,440 --> 00:10:12,400 that are not trusted 231 00:10:12,920 --> 00:10:15,420 and yet not necessarily the ability to scale 232 00:10:16,020 --> 00:10:17,340 with a lot of requests. 233 00:10:17,620 --> 00:10:18,660 Because if you make a request, 234 00:10:18,700 --> 00:10:20,760 it's more overhead every time you do an SSL request. 235 00:10:21,180 --> 00:10:24,180 So it's kind of hard to find. 236 00:10:24,180 --> 00:10:26,540 But if you dig for it or if you watch your traffic 237 00:10:26,540 --> 00:10:29,040 for a three or four week period on Firefox, 238 00:10:29,520 --> 00:10:31,220 you'll see it make a request out to this 239 00:10:31,220 --> 00:10:35,220 blocklist.addons.mozilla.org to pull down that set. 240 00:10:36,940 --> 00:10:39,400 And then again, some links to Mozilla policies 241 00:10:39,400 --> 00:10:44,320 about where the CAs can report revoked certificates. 242 00:10:44,540 --> 00:10:46,060 But by and large, that's not really 243 00:10:46,060 --> 00:10:47,900 in the certificate authority's interest 244 00:10:48,400 --> 00:10:50,580 to do a lot of this reporting to the public. 245 00:10:51,300 --> 00:10:52,220 It's more headache. 246 00:10:52,320 --> 00:10:53,620 It's things that don't work instead of things 247 00:10:53,620 --> 00:10:54,040 that do. 248 00:10:54,280 --> 00:10:57,080 So they're not terribly incentivized economically 249 00:10:57,080 --> 00:11:00,340 to keep the CAs, or to keep the contents 250 00:11:00,340 --> 00:11:02,760 of the revoked set made public. 251 00:11:03,200 --> 00:11:06,460 So it would be good for us to keep the CAs on track 252 00:11:06,460 --> 00:11:08,660 and make sure that they're actually doing their job 253 00:11:08,660 --> 00:11:10,420 and handling revocation correctly. 254 00:11:13,440 --> 00:11:15,520 Okay, so on to OCSP. 255 00:11:16,420 --> 00:11:18,540 Again, the Online Certificate Status Protocol. 256 00:11:19,160 --> 00:11:23,140 It's encoded in ASN1 with all the joys and tribulations 257 00:11:23,140 --> 00:11:24,040 that brings with it. 258 00:11:24,120 --> 00:11:26,340 So ASN1 is Abstract Syntax Notation. 259 00:11:26,420 --> 00:11:29,080 It's very compressed encoding format. 260 00:11:30,960 --> 00:11:33,680 And it's as a protocol, you basically 261 00:11:33,680 --> 00:11:37,320 are making an outbound request for a given certificate 262 00:11:37,320 --> 00:11:40,680 or a given chain to see if it's valid or not. 263 00:11:41,300 --> 00:11:43,600 Again, run with very high availability requirements 264 00:11:43,600 --> 00:11:47,800 and very low ping times for the big CAs. 265 00:11:49,200 --> 00:11:53,120 On the client side, the requests are good for a given chain. 266 00:11:53,120 --> 00:11:54,460 They're good for a given span of time. 267 00:11:54,620 --> 00:11:59,800 And there's the span of time in which the CA can provide 268 00:11:59,800 --> 00:12:02,240 the response for, which might be, you know, 269 00:12:02,260 --> 00:12:03,900 you're good for the next year or something. 270 00:12:04,080 --> 00:12:06,600 And then there's the actual caching of that check 271 00:12:07,060 --> 00:12:08,680 by the OS or the application. 272 00:12:09,040 --> 00:12:11,320 So there's a lot of different sort of time slices 273 00:12:12,260 --> 00:12:14,260 to keep in mind when you're troubleshooting 274 00:12:14,260 --> 00:12:15,200 and working through this. 275 00:12:15,260 --> 00:12:16,900 Like I said, there's the official, 276 00:12:17,080 --> 00:12:21,260 here's what the server, OCSP server will tell you. 277 00:12:21,480 --> 00:12:23,040 And then there's what the actual 278 00:12:23,120 --> 00:12:24,380 clients are doing with it. 279 00:12:24,460 --> 00:12:26,140 Those are very often very different timelines. 280 00:12:27,080 --> 00:12:31,040 So you'd want your browser to, or your device to check 281 00:12:31,040 --> 00:12:34,620 on a fairly periodic basis even though, you know, 282 00:12:34,620 --> 00:12:36,940 maybe the certificate's good for a year or two years, 283 00:12:37,080 --> 00:12:38,080 which is typical for EV. 284 00:12:38,960 --> 00:12:40,800 The next day, maybe that was revoked. 285 00:12:40,900 --> 00:12:42,620 So how do you know it's still good, right? 286 00:12:42,700 --> 00:12:44,620 So there's this kind of set of different timelines 287 00:12:44,620 --> 00:12:47,260 about whether, under what period 288 00:12:47,260 --> 00:12:48,420 of time the certificate is good. 289 00:12:51,060 --> 00:12:51,700 All right. 290 00:12:52,260 --> 00:12:53,100 Next slide. 291 00:12:55,040 --> 00:12:57,400 Right now, we're just going to walk you through working 292 00:12:57,760 --> 00:13:00,540 through a basic example of going through an OCSP query. 293 00:13:01,560 --> 00:13:03,080 And these are actually pretty straightforward. 294 00:13:03,740 --> 00:13:05,780 This is an OpenSSL command. 295 00:13:06,000 --> 00:13:08,040 The command's at the top, the first bit of the output. 296 00:13:08,140 --> 00:13:09,100 These are kind of long outputs. 297 00:13:09,740 --> 00:13:11,880 But basically, what it's going to do is start going 298 00:13:11,880 --> 00:13:13,000 to get the certificate. 299 00:13:14,100 --> 00:13:16,540 The next thing you would want to do is save it as a file, 300 00:13:16,700 --> 00:13:18,840 which is that last little redirect I've got at the end. 301 00:13:19,800 --> 00:13:23,100 And then literally, it's this one OpenSSLX509 command. 302 00:13:23,120 --> 00:13:25,400 And this is all you've got to do to parse it. 303 00:13:25,480 --> 00:13:26,300 And you'll get this URL. 304 00:13:26,580 --> 00:13:30,140 And this is basically telling you the OCSP URL, URI. 305 00:13:30,840 --> 00:13:35,380 And that's basically all you have to do to verify where it is. 306 00:13:36,980 --> 00:13:38,800 For the next example, we're looking 307 00:13:38,800 --> 00:13:41,500 at how you actually do the query if you've got a chain. 308 00:13:42,740 --> 00:13:44,420 And this first step is the same. 309 00:13:44,600 --> 00:13:46,840 We're just going to save the certificate to a file 310 00:13:46,840 --> 00:13:47,820 so that we've got it. 311 00:13:48,460 --> 00:13:51,520 But then this part we're going to do is grab the certificate chain. 312 00:13:51,780 --> 00:13:53,000 And this is going to vary in length. 313 00:13:53,120 --> 00:13:55,540 Depending on how the certificate's signed, 314 00:13:55,760 --> 00:13:58,200 number of intermediaries, also sometimes where you're at, 315 00:13:58,280 --> 00:14:00,620 if you've got an intermediary or whatever listening 316 00:14:00,620 --> 00:14:03,620 on your network or through your country or whatnot. 317 00:14:04,300 --> 00:14:06,120 But this is going to pull all that data. 318 00:14:06,260 --> 00:14:10,900 And you can start seeing inside of it all the different issuers 319 00:14:10,900 --> 00:14:14,360 of who all is in this certificate chain for that. 320 00:14:14,800 --> 00:14:16,820 The next thing is this is just a simple command. 321 00:14:16,960 --> 00:14:18,440 We're going to save the chain to a file. 322 00:14:19,640 --> 00:14:22,100 And then this is inside of that chain file. 323 00:14:22,340 --> 00:14:23,100 And if you look at this, 324 00:14:23,100 --> 00:14:25,040 this right here, you see the I. 325 00:14:25,040 --> 00:14:25,980 The I is the issuer. 326 00:14:26,760 --> 00:14:28,780 That's the first thing that you're actually going to look for 327 00:14:28,780 --> 00:14:30,560 because you're going to actually want to be verifying 328 00:14:30,560 --> 00:14:34,420 who's issuing the certificate for this particular website. 329 00:14:34,760 --> 00:14:36,680 So this is the thing that you're going to have to pull out of that. 330 00:14:37,680 --> 00:14:40,300 And then this is where you're actually going to verify 331 00:14:40,300 --> 00:14:41,920 the certificate with the issuer. 332 00:14:42,120 --> 00:14:45,080 And you can see what we did is we pulled the chain as the issuer. 333 00:14:45,400 --> 00:14:46,580 We did this for DEF CON. 334 00:14:46,960 --> 00:14:50,020 And then we actually are going straight to the certificate provider 335 00:14:50,020 --> 00:14:52,460 for the DEF CON, OCSP, 336 00:14:53,100 --> 00:14:54,020 and that's going to be a site. 337 00:14:54,120 --> 00:14:55,400 They're usually something like this, 338 00:14:55,460 --> 00:14:58,600 ocsp.sslprovidersname.com. 339 00:14:59,280 --> 00:15:03,680 The important thing is not to be fooled by this successful response, 340 00:15:04,160 --> 00:15:07,640 but make sure that the cert status is actually good. 341 00:15:08,540 --> 00:15:09,820 So this can be a little misleading. 342 00:15:09,940 --> 00:15:12,200 You want to make sure that you're actually getting the cert 343 00:15:12,760 --> 00:15:15,680 directly certified from the issuer. 344 00:15:16,900 --> 00:15:17,500 Okay. 345 00:15:21,200 --> 00:15:23,080 So maybe we'll just stop here. 346 00:15:23,100 --> 00:15:23,420 We'll stop for a second. 347 00:15:23,480 --> 00:15:24,260 Any questions so far? 348 00:15:24,880 --> 00:15:25,320 Yes. 349 00:15:26,460 --> 00:15:26,900 . 350 00:15:42,800 --> 00:15:45,040 So those responses are signed? 351 00:15:45,760 --> 00:15:48,300 So they're signed by the issuing CA? 352 00:15:49,980 --> 00:15:52,860 There's an issue that we're going to talk about in a couple of slides. 353 00:15:52,940 --> 00:15:53,080 . There's an issue that we're going to talk about in a couple of slides. 354 00:15:53,080 --> 00:15:55,060 It does have to do with one part of your question. 355 00:15:55,380 --> 00:15:55,560 Okay. 356 00:15:56,240 --> 00:15:56,640 . 357 00:16:04,400 --> 00:16:05,800 We're on the way. 358 00:16:05,960 --> 00:16:06,360 Yes. 359 00:16:07,500 --> 00:16:07,900 Okay. 360 00:16:08,460 --> 00:16:08,860 Yes? 361 00:16:10,440 --> 00:16:10,840 . 362 00:16:13,680 --> 00:16:14,580 Can you repeat the question? 363 00:16:15,940 --> 00:16:16,340 . 364 00:16:16,340 --> 00:16:17,360 . 365 00:16:24,440 --> 00:16:27,540 So let me repeat the question to make sure I get it. 366 00:16:27,620 --> 00:16:30,940 So you're saying with this, the timeline for the next update, 367 00:16:31,740 --> 00:16:34,940 is there a reason for the client to, 368 00:16:35,480 --> 00:16:38,460 is there a requirement for the client to go and make another request 369 00:16:39,040 --> 00:16:39,880 after that expires? 370 00:16:41,040 --> 00:16:41,560 . 371 00:16:43,720 --> 00:16:44,240 . 372 00:16:44,240 --> 00:16:44,740 Mm-hmm. 373 00:16:44,760 --> 00:16:45,240 . 374 00:16:47,300 --> 00:16:47,820 . 375 00:16:51,040 --> 00:16:54,360 Basically, if it's cached, it doesn't have to check again? 376 00:16:54,620 --> 00:16:55,240 Yeah, what you're asking. 377 00:16:55,900 --> 00:17:00,020 So the OCSP query is cached. 378 00:17:00,620 --> 00:17:03,240 So the question is, are the OCSP queries cached? 379 00:17:03,560 --> 00:17:04,940 Yes, the answer is yes. 380 00:17:05,320 --> 00:17:12,460 And the policy for that can depend upon the requesting stack. 381 00:17:12,780 --> 00:17:14,520 . So. 382 00:17:14,520 --> 00:17:14,560 . 383 00:17:14,560 --> 00:17:15,120 You might want to go with location and that sort of thing. 384 00:17:15,120 --> 00:17:21,500 So most browsers and operating systems will have a cache for OCSP 385 00:17:21,500 --> 00:17:23,020 queries for that reason. 386 00:17:23,120 --> 00:17:23,260 . 387 00:17:23,260 --> 00:17:25,720 And they'll all have timelines for when that's done. 388 00:17:25,820 --> 00:17:28,180 So when it does the evaluation, there's a time check every time. 389 00:17:29,440 --> 00:17:30,240 Hopefully that's helpful. 390 00:17:30,500 --> 00:17:31,880 Okay, next next question. 391 00:17:32,060 --> 00:17:32,160 . 392 00:17:32,160 --> 00:17:32,180 . 393 00:17:32,180 --> 00:17:32,240 . 394 00:17:32,460 --> 00:17:32,900 . 395 00:17:32,900 --> 00:17:42,260 So, these aren't typically things that you can access unless you've got a jail-broken device. 396 00:17:42,540 --> 00:17:42,840 . 397 00:17:42,840 --> 00:17:43,360 . 398 00:17:43,360 --> 00:17:43,580 . 399 00:17:43,580 --> 00:17:43,620 . 400 00:17:43,620 --> 00:17:43,980 . . 401 00:17:43,980 --> 00:17:51,060 is located in VARDB. The OCSP daemon is there. These were used in previous jailbreaks and 402 00:17:51,340 --> 00:17:56,740 so they've been attacked. It's part of the infrastructure that gets attacked. The revocation 403 00:17:56,740 --> 00:18:01,360 cache is in a SQLite file. And again, you can't do this on your iPhone unless you jailbreak 404 00:18:01,360 --> 00:18:08,960 it and directly work with these files. But when you get that SQLite file, you can actually 405 00:18:08,960 --> 00:18:15,420 take a look at the contents of a SQLite in SQL and query it out and see the contents 406 00:18:15,420 --> 00:18:20,960 of that. If you want to reset that or basically, I think the only thing I can find that's sort 407 00:18:20,960 --> 00:18:28,340 of like officially sanctioned by Apple for interacting with revocation is other than 408 00:18:28,340 --> 00:18:31,860 when you receive the certificate and it's not signed, you have the option to either 409 00:18:31,860 --> 00:18:36,800 trust it or not trust it at the very beginning, but is to use the reset network settings, 410 00:18:36,880 --> 00:18:38,160 which will blow away the cache. 411 00:18:38,160 --> 00:18:42,320 That's kind of awkward though because then it gets rid of a bunch of other settings at 412 00:18:42,320 --> 00:18:48,260 the same time. So there's not a whole lot of granularity for this on iOS. But again, 413 00:18:49,020 --> 00:18:54,260 the goal is to make these slides a resource for, a general resource for people investigating 414 00:18:54,260 --> 00:18:58,880 a revocation. So maybe some helpful things if you want to look further and some pointers 415 00:18:58,880 --> 00:18:59,540 as to where to look. 416 00:19:01,100 --> 00:19:07,360 So in some ways, OCSP is a privacy disaster. And I think this is, there's one takeaway 417 00:19:07,360 --> 00:19:08,080 from this talk. 418 00:19:08,160 --> 00:19:14,580 I would like it to be this, which is that as you're surfing and you hit a site where 419 00:19:14,580 --> 00:19:20,000 you need to, you haven't visited before, let's say you go through an online commerce 420 00:19:20,000 --> 00:19:24,380 store and you visit some products and then you go to the checkout site, which is HTTPS, 421 00:19:24,640 --> 00:19:28,860 that will initiate the OCSP request when it's not cached. 422 00:19:29,140 --> 00:19:36,260 And so you effectively leave a trail of requests out to the OCSP infrastructure of where you've 423 00:19:36,260 --> 00:19:36,480 been. 424 00:19:36,480 --> 00:19:43,580 And it's not very commonly talked about that your browser history for HTTPS sites is being 425 00:19:43,580 --> 00:19:50,020 leaked or given to the OCSP server operators. It's called a responder. 426 00:19:51,880 --> 00:19:57,860 So you have to have a very high level of trust with your CA, the people who are running 427 00:19:57,860 --> 00:20:01,480 that server, because effectively you're giving them that snapshot of your browser history 428 00:20:02,100 --> 00:20:06,460 that includes every site that you've visited that has an OCSP. 429 00:20:06,460 --> 00:20:07,760 So you have to have that HTTPS connection on it. 430 00:20:09,820 --> 00:20:15,480 It would be good if someone kind of queried the big CAs to make even more clear whether 431 00:20:15,480 --> 00:20:19,260 they're using that data for any purposes. It would be very valuable for data mining. 432 00:20:20,600 --> 00:20:25,300 And it's not that there's a right or wrong answer to whether that should be done so much 433 00:20:25,300 --> 00:20:32,660 as the policy should be very, very clear to the general public what the use of that data 434 00:20:32,660 --> 00:20:33,420 ever could be. 435 00:20:34,100 --> 00:20:35,920 I've got a slide a little bit later that'll show. 436 00:20:35,920 --> 00:20:40,300 The different levels of logging on an OCSP server. And they can pretty much get, I mean 437 00:20:40,300 --> 00:20:43,680 they're going to get your time and date stamp, they're going to get your IP address, and 438 00:20:43,680 --> 00:20:45,720 they're going to get the domain that you're requesting. 439 00:20:46,080 --> 00:20:50,560 Some user agent browser data will go across because it's, a lot of times it's going to 440 00:20:50,560 --> 00:20:55,520 be an HTTP type of connection. So you're going to have some information about the browser 441 00:20:55,520 --> 00:20:59,520 which might identify or de-anonymize who you are, especially in conjunction with the time 442 00:20:59,520 --> 00:21:00,360 and the IP address. 443 00:21:05,920 --> 00:21:09,940 I think that's a very, very good topic because we are already trusting the 444 00:21:09,940 --> 00:21:12,400 . How many years did you say we have 190? 445 00:21:13,480 --> 00:21:13,960 Yeah. 446 00:21:14,140 --> 00:21:16,820 But all of those can decrease our trash, right? 447 00:21:18,120 --> 00:21:18,780 That's correct. 448 00:21:19,340 --> 00:21:21,540 So we are already trusting the . 449 00:21:23,000 --> 00:21:23,640 That's true. 450 00:21:24,040 --> 00:21:28,040 What about the link? What about . What about Google analytics? 451 00:21:29,000 --> 00:21:30,020 Can you give me that? 452 00:21:30,600 --> 00:21:35,900 You know, it's obviously making it into the BS connection, right? It should all of the links, 453 00:21:35,920 --> 00:21:36,860 . 454 00:21:39,760 --> 00:21:42,820 So let me repeat the question. The question is what about the non-domain cookies? 455 00:21:43,280 --> 00:21:49,040 So to be clear, this isn't your web traffic that's being exposed. It's only a check for verification 456 00:21:49,040 --> 00:21:54,860 of a certificate that belongs to the domain of the secure one. So you're not getting inside 457 00:21:54,860 --> 00:21:59,560 traffic. All your leaking is the domain name. 458 00:21:59,720 --> 00:22:03,780 Yeah. Because it's cached, it's also not as powerful as a cookie where you're going to see 459 00:22:03,780 --> 00:22:05,900 like every URL they dig into or anything like that. 460 00:22:05,920 --> 00:22:11,720 You're just seeing the initial connection the first time that browser goes to a site that has HTTPS. 461 00:22:12,100 --> 00:22:17,900 So it's not as much information as Google cookies or Google AdWords. 462 00:22:18,100 --> 00:22:18,160 Yeah. 463 00:22:18,420 --> 00:22:21,680 Is it only a certificate or is it also a check that's changed at your launch? 464 00:22:22,820 --> 00:22:28,040 So you only get a check for that domain. So it doesn't, it's not traversing. 465 00:22:28,040 --> 00:22:28,300 . 466 00:22:29,820 --> 00:22:34,160 That's correct. It's on a per domain basis. But let's say, you know, let's, an example, 467 00:22:34,300 --> 00:22:34,640 . 468 00:22:35,940 --> 00:22:41,880 Let's say you go to Amazon and then you check out. And so you visit a couple webpages for products. 469 00:22:42,420 --> 00:22:49,120 None of that would be leaked. What you leak is when it's not cached, the fact that you hit the HTTPS, 470 00:22:49,160 --> 00:22:53,440 you know, store.amazon.com or whatever site and the time and date when that happened. 471 00:22:53,540 --> 00:22:57,780 But again, you're effectively, it's pretty likely if someone wanted to go after that data, 472 00:22:57,800 --> 00:23:02,040 they'd be able to get a lot of specifics around what kind of device you have. 473 00:23:03,000 --> 00:23:06,840 There's a bigger issue is if you have a large scale aggregation of data, 474 00:23:07,000 --> 00:23:11,640 let's say you're in a repressive country or something and a whistleblower goes to a site 475 00:23:11,640 --> 00:23:14,860 and uploads some information and stuff, it might identify that whistleblower. 476 00:23:15,260 --> 00:23:20,080 So it's situations like that where it can become a much more dangerous scenario 477 00:23:20,080 --> 00:23:22,840 rather than the day-to-day user might have. 478 00:23:23,040 --> 00:23:23,260 Yeah. 479 00:23:23,320 --> 00:23:26,600 What happens if the OCSP query fails? 480 00:23:26,880 --> 00:23:28,760 So what happens if the OCSP query fails? 481 00:23:29,540 --> 00:23:30,040 . 482 00:23:30,040 --> 00:23:31,080 . 483 00:23:33,560 --> 00:23:34,120 Yes. 484 00:23:34,600 --> 00:23:39,760 So the response where it doesn't know anything about it is actually then a pass 485 00:23:39,760 --> 00:23:41,240 because it's saying it's not revoked. 486 00:23:44,060 --> 00:23:44,620 . 487 00:23:47,820 --> 00:23:48,380 . 488 00:24:00,640 --> 00:24:01,120 . 489 00:24:02,300 --> 00:24:02,780 . 490 00:24:02,780 --> 00:24:02,940 . 491 00:24:05,500 --> 00:24:09,520 So before I jump into answering the question about man-in-the-middle with multiple CAs, 492 00:24:09,620 --> 00:24:12,340 I want to point out that there are different levels of failure mode here. 493 00:24:12,580 --> 00:24:14,960 Sometimes the fail is hard, sometimes it's soft. 494 00:24:15,100 --> 00:24:15,780 So what does that mean? 495 00:24:18,120 --> 00:24:22,280 Do you continue on with that session enabling that encryption to occur, 496 00:24:22,480 --> 00:24:23,900 or do you hard cut it off? 497 00:24:24,100 --> 00:24:28,640 And that's really up to the browser and the policies in your OS. 498 00:24:28,640 --> 00:24:33,640 process. And the different operating systems handle that differently. It would be cool 499 00:24:33,640 --> 00:24:38,040 if we had a nice table showing, you know, how each, how they all handle them. But they're 500 00:24:38,040 --> 00:24:42,600 a little bit different. So hard fail and soft fail is a difference. And if you don't mind, 501 00:24:42,700 --> 00:24:45,640 we'll keep going on the presentation and get back to the man in the middle thing a little 502 00:24:45,640 --> 00:24:53,080 bit later. So you noticed when we did the OCSP request, it had that, the date range, the 503 00:24:53,080 --> 00:25:04,040 bottom. They are time sensitive. And basically, again, the cache is held by the device. And it 504 00:25:04,040 --> 00:25:08,360 can only be good for that. But, you know, you could have a certificate that gets compromised 505 00:25:08,840 --> 00:25:15,060 out, you know, within under that time window. So it's good to think of this always in terms of, 506 00:25:15,080 --> 00:25:18,600 you know, a timeline. So again, your EV certificate is good for two years. But if you're 507 00:25:18,600 --> 00:25:23,060 looking at how this revocation infrastructure works, it has to be able to provide, you know, 508 00:25:23,080 --> 00:25:29,780 effectively an ongoing 24-7 availability of is this certificate, you know, known to be 509 00:25:29,780 --> 00:25:35,740 compromised or not. So it helps to think of it in terms of the failure modes of the system as 510 00:25:35,740 --> 00:25:45,200 always having a time element to it. Okay. Next slide. So revocation is not just for SSL. SSH 511 00:25:45,200 --> 00:25:51,620 certificates are quick show of hands. Who's an SSH user? Familiar with authentic keys? Okay. 512 00:25:51,660 --> 00:25:53,060 Awesome. You're in the right place to go. You're in the right place to go. You're in the right 513 00:25:53,080 --> 00:25:58,500 place. You're in the right place. So if you're a crypto village, okay. Open SSH 6.8 has a 514 00:25:58,500 --> 00:26:04,420 feature called key revocation lists. What this lets you do is have a set of keys, SSH keys that 515 00:26:04,420 --> 00:26:10,720 are revoked. So the normal model for SSH authentication is you have a key pair that you 516 00:26:10,720 --> 00:26:17,260 exchange that you are allowing in. You can you can you can graft on PKI to that authentication. 517 00:26:17,700 --> 00:26:22,720 And this this is a mechanism for taking certificates that are bad. So if you had a red team 518 00:26:22,720 --> 00:26:27,940 team come and own your, a couple boxes on your enterprise network and they left some keys 519 00:26:27,940 --> 00:26:32,540 around, it'd probably be good to drop these in a revoked keys list so that they couldn't be used 520 00:26:32,540 --> 00:26:37,680 anywhere else. And in general, I think having the mindset of managing SSH keys by revoked keys 521 00:26:37,680 --> 00:26:43,320 list puts you in a much better position to respond to, you know, attacks and challenges with 522 00:26:43,320 --> 00:26:50,640 compromised keys. So again, just some directives here in your SSHD config to turn it on. It's 523 00:26:50,640 --> 00:26:56,720 called a KRL, which is a key revocation list, and you basically provide that as a file, which 524 00:26:56,720 --> 00:27:02,800 basically stores all the bad keys as hashes, and then every time you're authorized in, it'll 525 00:27:02,800 --> 00:27:07,000 check that against it. So just good to know. I don't see this in heavy usage out there, probably 526 00:27:07,000 --> 00:27:12,420 because the PKI authentication integration for SSH is not all that common, but hopefully it'll be 527 00:27:12,420 --> 00:27:16,060 more common in the future. So you want to take that? 528 00:27:16,120 --> 00:27:20,540 Oh, okay. In this slide, we were just kind of pointing out that if you've got 529 00:27:21,520 --> 00:27:25,720 traffic that you can capture either on your network or from your browser and your host and 530 00:27:25,720 --> 00:27:32,240 stuff, Wireshark has a built-in OCSP decoder, and so you can actually run Wireshark or Tshark, 531 00:27:32,380 --> 00:27:37,660 capture that data, and start looking at what's going on in your network. This is useful for a 532 00:27:37,660 --> 00:27:42,160 number of reasons. You'll also see things like might be software or operating system updates on 533 00:27:42,160 --> 00:27:47,720 your network. You might catch a lot of different things. When the OCSP queries are being made via 534 00:27:47,720 --> 00:27:50,520 HTTP rather than the HTTPS code, you might see a lot of different things. When the OCSP queries are 535 00:27:50,540 --> 00:27:52,060 being made, you might get some kind of network super šjífic mid Missoulae connection. So you get a 536 00:27:52,060 --> 00:27:55,300 little bit more information if you're a network admin, stuff that might be going through your 537 00:27:55,300 --> 00:27:59,360 network. But that's already built into Wireshark, and we just kind of wanted to point that out 538 00:27:59,360 --> 00:27:59,740 real quick. 539 00:28:00,120 --> 00:28:05,400 Yep, there's been built-in support since Wireshark, which is kind of cool, 540 00:28:05,960 --> 00:28:13,900 that's been around a long time. All right. If you want to run your own, OCSP responder, you 541 00:28:13,900 --> 00:28:20,260 can do that with OpenSSL, and you know, pick a port. I believe there's not a standard port for 542 00:28:20,260 --> 00:28:28,740 that. 2560 comes to mind. I don't know. But in this example, 7654. So you basically give this 543 00:28:28,740 --> 00:28:37,660 open SSL command and use an index file that when you set up a CA, you, it basically keeps a list 544 00:28:37,660 --> 00:28:42,740 of certificates that are under management in that file and then you mark them as revoked. So 545 00:28:42,740 --> 00:28:48,200 there's a little bit of a question about how well just open SSL by itself scales for traffic. So 546 00:28:48,200 --> 00:28:55,780 typically, the big CAs, in fact, every CA that I know of isn't using open SSL. They're actually 547 00:28:55,780 --> 00:29:01,700 using another thing called EJBCA. So EJBCA is Enterprise Java Bean Certificate Authority. It's 548 00:29:01,700 --> 00:29:08,880 like a suite for managing a CA out of PrimeKey. And they were, I typically, you know, at RSA and 549 00:29:08,880 --> 00:29:16,780 Black Hat. Anybody from PrimeKey in the house? Okay. They're a really great solution. It's Java 550 00:29:16,780 --> 00:29:18,180 and Oracle backed, so it'll save you a lot of time. And they're really great solutions. 551 00:29:18,180 --> 00:29:22,420 It's called Scale Like Crazy. It typically has a lot of load balancing, net scalar type 552 00:29:22,420 --> 00:29:25,700 infrastructure in front of it when you want to really, like, you know, do the things at the 553 00:29:25,700 --> 00:29:33,320 size of Symantec or just sort of the big CAs. It's got three logging modes. So you can log, 554 00:29:33,540 --> 00:29:39,500 so what I'm describing here is the logging behind the scenes that as you're hitting these OCSP 555 00:29:39,500 --> 00:29:47,620 servers can go on. There's just Log4J for doing kind of daemon level logging for just troubleshooting 556 00:29:48,180 --> 00:29:52,580 and that it's got network connectivity and whatnot. Then there's transaction level logging, 557 00:29:52,720 --> 00:29:57,440 which can be customized. And then finally, what they call audit logs. So if you turn on audit logs, 558 00:29:57,960 --> 00:30:01,800 if those audit logs are turned on, that's where you just get a complete stream, 559 00:30:02,040 --> 00:30:07,600 you know, of everyone's request for the stuff. And that's kind of the privacy scare story right 560 00:30:07,600 --> 00:30:14,560 there. So again, these are features that are built in already. And if that data gets streamed off 561 00:30:14,560 --> 00:30:17,380 and, you know, captured for data analytics purposes, 562 00:30:18,180 --> 00:30:22,420 again, it's neither good nor bad. It's just I think that the public could use some insights into, 563 00:30:23,140 --> 00:30:26,900 you know, if the CAs are doing that and what they're doing with that data. 564 00:30:27,680 --> 00:30:32,660 So also to say that, you know, it's a really, really dominant solution. Every OCSP responder 565 00:30:32,660 --> 00:30:39,060 I can find is backed by PrimeKey's EJBC. It's really, really dominant in the marketplace. 566 00:30:39,460 --> 00:30:43,700 And when you see that kind of monoculture, like if there was a flaw in that and someone could, 567 00:30:43,760 --> 00:30:48,040 you know, take down those servers, it could be, it could be getting pretty crazy. It's a little bit of a 568 00:30:48,040 --> 00:30:48,160 really, really bad thing. And so I think that's a really, really good thing. 569 00:30:53,780 --> 00:31:01,000 So short-lived certificates in terms of alternatives to OCSP and CRLs, like maybe this could be kind 570 00:31:01,000 --> 00:31:05,920 of like where we're going with the future. Short-lived certificates are one of those 571 00:31:05,920 --> 00:31:13,420 options. It kind of came into vogue around 2012. There's a Dan Bonet paper about short-lived 572 00:31:13,420 --> 00:31:17,300 certificates in which they very clearly declare that OCSP is as good as dead. 573 00:31:17,300 --> 00:31:21,380 And I guarantee you, it's probably the number one revocation check going on right now. 574 00:31:22,060 --> 00:31:24,900 Doesn't look like it'll change anytime soon, but it's good to have alternatives. 575 00:31:25,880 --> 00:31:29,720 The recommended timelines are like weeks or days, things of that timeline. And 576 00:31:30,180 --> 00:31:35,060 basically it would mean that the CAs would be just issuing, you know, very, very short-lived 577 00:31:35,060 --> 00:31:41,500 certificates. So it's going to be pretty heavy lifting. If you think about, let's say your 578 00:31:41,500 --> 00:31:46,900 Apache servers would be replacing their certificate every week. I mean, it could be kind of 579 00:31:47,640 --> 00:31:53,260 challenging to get that set up. And it will also make the usage of PKI a little bit more 580 00:31:53,260 --> 00:31:57,800 dependent upon the CA. So they're kind of in favor, I think, in some ways. But it's a pretty 581 00:31:57,800 --> 00:32:02,240 complex topic. There's a lot of challenging effort that would have to go in to make this 582 00:32:02,240 --> 00:32:07,960 actually work. But that's one option. Again, with OCSP, you get this validity timeline, 583 00:32:08,080 --> 00:32:11,460 but the certificates are all the same. You only replace it when it fails. This would just be a 584 00:32:11,460 --> 00:32:17,200 continually replaced certificate, like on a weekly basis. The ACME project at Mozilla Fire 585 00:32:17,300 --> 00:32:24,160 Fox would fit very well with that vision, to be able to very quickly validate that a 586 00:32:24,160 --> 00:32:26,760 certificate is good from the CA for a specific domain. 587 00:32:30,900 --> 00:32:37,260 That's actually still under discussion. The industry at large, the CAs, the browser and OS 588 00:32:37,260 --> 00:32:39,020 companies are all debating that right now. 589 00:32:41,320 --> 00:32:47,160 IOT devices, because they have such small amounts of CPU powers, they have to have limited 590 00:32:49,100 --> 00:32:57,000 Yeah, there's a variety of issues with the IOT. There are IOT providers that have ways to manage 591 00:32:57,000 --> 00:33:01,120 certificates or having unique certificates or client certificates on each one of their devices. 592 00:33:01,480 --> 00:33:06,100 But there are hardware manufacturers that might just do stuff in bulk that can create huge 593 00:33:06,100 --> 00:33:10,560 problems with these kind of things. So yeah, there's a huge issue with that. There's also a 594 00:33:10,560 --> 00:33:14,940 huge issue for apps, not necessarily because of the app stores. The app stores are frequently 595 00:33:14,940 --> 00:33:17,280 doing the right thing. But if somebody writes, you know, they're not doing the right thing, they're 596 00:33:17,300 --> 00:33:21,740 just bad code on the back end on how it's checking in. There's multiple layers where that can 597 00:33:21,740 --> 00:33:26,300 occur in software. So there are other issues there, too, for sure. 598 00:33:28,340 --> 00:33:33,960 So another alternative for revocation infrastructure is called certificate transparency. And it's 599 00:33:33,960 --> 00:33:37,920 not really a certificate, a CT talk, for those familiar with it. But I'll just give a quick 600 00:33:37,920 --> 00:33:46,300 highlight. CT is a Google-driven effort. And it basically applies a blockchain to this problem. 601 00:33:46,300 --> 00:33:54,400 And it's being already implemented in Google's operating systems and browsers. So it's kind of in 602 00:33:54,400 --> 00:34:01,940 place and going. As far as I understand, anyone from Google here, Chrome is not making OCS requires 603 00:34:02,300 --> 00:34:06,100 as a habit. It's using CT instead of that. 604 00:34:07,020 --> 00:34:14,320 A good place to kind of see some of the CT logs, the census.io from Michigan has a nice sort of 605 00:34:14,320 --> 00:34:18,540 description of, like, statuses on all these CT logs that are in operation. So think of these 606 00:34:18,540 --> 00:34:23,540 as, uh, blockchain, um, servers that are, are provide, be able to provide statuses on 607 00:34:23,540 --> 00:34:29,360 certificates. Um, and then, you know, with the future of certificate transparency there's a, 608 00:34:29,440 --> 00:34:34,580 there's a debate ongoing about how redaction is handled, which would basically be the 609 00:34:34,580 --> 00:34:39,220 ability to make exceptions for presence in the blockchain. So kind of a current topic that 610 00:34:39,220 --> 00:34:45,380 would, uh, you know, open up lots of, um, challenges to, to the, the future of CT. So 611 00:34:45,380 --> 00:34:49,600 I'll just leave it at that. And, uh, the certificate transparency.org site, which Google 612 00:34:49,600 --> 00:34:51,760 operates, is a great source of information. 613 00:34:56,380 --> 00:35:09,140 Right, right. 614 00:35:09,220 --> 00:35:13,500 So does, would CT, um, that, that would be a policy. So the question is, did, would CT handle 615 00:35:13,500 --> 00:35:19,640 every certificate that gets issued? Um, that would be a policy level, uh, question. So the 616 00:35:19,640 --> 00:35:23,540 certificate authorities, um, would, would answer that question for you. And they would either say, 617 00:35:23,660 --> 00:35:27,620 yes, we're going to operate this root with that assumption that every certificate comes out of 618 00:35:27,620 --> 00:35:34,240 here would be in, in the, in the blockchain. Or, um, they may not do that. And, uh, you know, 619 00:35:34,240 --> 00:35:38,660 right now we're in a situation where the, the most of the roots out there don't have CT support by 620 00:35:38,660 --> 00:35:43,800 default. So there will be a transition period where, if that is the goal, that we'll have to 621 00:35:43,800 --> 00:35:45,960 take, uh, take some halfway steps to get to that point. 622 00:35:47,180 --> 00:35:51,020 How exactly is CT better than OCSP? 623 00:35:51,260 --> 00:35:53,380 So how is CT better than OCSP? 624 00:35:54,220 --> 00:35:59,980 Yeah, yeah, yeah. So it doesn't require, um, an, an outbound request. The, the revocation 625 00:35:59,980 --> 00:36:05,400 typically gets bundled and then, and then sent out on a periodic basis. Again, the timeline 626 00:36:05,400 --> 00:36:08,640 question applies. Um, it's better in the sense that there's, there's, there's, there's a lot of 627 00:36:10,600 --> 00:36:18,160 reasons. Um, it's, it's subjects the issuances to, um, you know, an automated, an automatic 628 00:36:18,160 --> 00:36:23,660 process that would provide you some level of assurance that it has been issued and the details 629 00:36:23,660 --> 00:36:27,900 of that issuance, which right now, um, there are, you know, human factors that could get in 630 00:36:27,900 --> 00:36:32,360 the way or, or things that are not logged. So it's, it's, um, it just provides, again, it 631 00:36:32,360 --> 00:36:36,760 provides automation among other things. Uh, but again, this is not really a CT talk. It'll 632 00:36:36,760 --> 00:36:38,620 probably be a future talk, uh, here at DC. But, uh, it's, it's, it's, it's, it's, it's, it's, it's, it's, 633 00:36:38,620 --> 00:36:43,520 you know, you have your Defcon on CT, I'm sure. So, in summary, um, you know, you have to 634 00:36:43,520 --> 00:36:47,940 take your, your need to revoke trust about as important as your ability to establish trust. 635 00:36:48,120 --> 00:36:53,400 So it's, it's, it's revoking a certificate creates kind of a failure of PKI, right? This 636 00:36:53,400 --> 00:36:58,360 is where the website doesn't work. You know, it's, it's, you can't reach the site, you can't 637 00:36:58,360 --> 00:37:03,340 get authenticated, stuff does not work. But if you don't have a, a fluid mechanism for 638 00:37:03,340 --> 00:37:07,420 handling revocation, um, you, you're not in a good position, right? You should be able to 639 00:37:07,420 --> 00:37:08,600 revoke as easily as you can, correct? And that's, you know, why, you know, cop these 640 00:37:08,600 --> 00:37:16,100 grant on some level. And then we kind of walk through examples for CRL and then another 641 00:37:16,100 --> 00:37:20,740 example for OCSP. And for those who joined late, this slide deck provides a nice kind of 642 00:37:20,740 --> 00:37:25,280 worked example that you can use to kind of run this on your own operating system. And then 643 00:37:26,340 --> 00:37:32,260 online real time revocation checks are kind of a privacy disaster and require you to place 644 00:37:32,260 --> 00:37:36,800 a level of trust in your certificate authority that exists there of course because they're 645 00:37:36,800 --> 00:37:42,660 your CA. But in addition, you know, as you use, you know, you don't think of like, so 646 00:37:42,660 --> 00:37:46,480 list all of the certificate authorities out there as you browse. You don't sit there and 647 00:37:46,480 --> 00:37:52,540 say, oh, I just went to, you know, order a pair of shoes online. Now I have, now I just 648 00:37:52,540 --> 00:37:58,520 told that to DigiCert. Or I'm going to go, what's another good example? Or, you know, 649 00:37:58,540 --> 00:38:02,460 hit a messaging server and now Symantec knows that I did that, right? But those are the 650 00:38:02,460 --> 00:38:06,140 things that are actually happening with these outbound requests for the use of revocation. 651 00:38:06,300 --> 00:38:06,780 What's that? 652 00:38:07,920 --> 00:38:16,460 Yes. Or whatever, whatever your vice of choice is. So, yeah. 653 00:38:16,860 --> 00:38:22,900 Something else that we noticed that kind of comes up, it's not necessarily an OCSP or 654 00:38:22,900 --> 00:38:29,640 CRL thing, but the, there's an issue where people are not checking the certificates in line when 655 00:38:29,640 --> 00:38:36,720 they're surfing. And so if you're in a repressed country or repressed corporation and maybe they 656 00:38:36,720 --> 00:38:41,560 they've got blue code or something like that, we talked about the blue code one that, you know, might be revoked, but 657 00:38:42,060 --> 00:38:46,640 checking the chain of certificates is going to tell you if there are people that are decoding 658 00:38:46,640 --> 00:38:51,620 traffic. If you've got a certificate added to your box where people can sit there, your, be it the 659 00:38:51,620 --> 00:38:56,560 corporation you work for, whatever, or government or whatnot, it's going to show you who else can 660 00:38:56,560 --> 00:39:01,520 decode some of your traffic. So it's, it's a really important check. And it's something that most people don't 661 00:39:01,520 --> 00:39:06,520 think about. So it's something worth, you know, looking into. Again, it's not directly related. We ran across a lot of different 662 00:39:06,720 --> 00:39:13,460 certificate issues and certificate issues with, like, IOT and stuff like that. They're not revocation issues per se, but 663 00:39:13,460 --> 00:39:15,540 they're definitely interesting things to, you know. 664 00:39:27,660 --> 00:39:36,520 So how you check the OCSP response signature? So that, that will be in the log for the example, but that's handled 665 00:39:36,720 --> 00:39:43,880 by LibreSSL, OpenSSL. Your, your stack will, will make that check and fail out with that, that signature's not, not correct. 666 00:39:46,140 --> 00:39:56,160 How do you revoke? So revocation would be the presence of that in, in your OCSP server, right? So when, when that 667 00:39:56,160 --> 00:40:04,920 responder has that in its database, then that would be providing that as a, a revoked certificate. So again, the, the, the, if you look at the 668 00:40:04,920 --> 00:40:06,180 protocol, you can see it's HTTP. 669 00:40:06,720 --> 00:40:10,800 It's the same text. You can read it and see that, that, that that's taken place. Does that answer your question? 670 00:40:11,220 --> 00:40:15,960 No, I don't know. If the OCSP server is that, I don't think that it's, uh, still valid. 671 00:40:17,020 --> 00:40:18,080 I'm not sure I understand the question. 672 00:40:18,200 --> 00:40:18,880 So, uh, is there a question? 673 00:40:20,300 --> 00:40:28,620 Are you, you're saying you're trying to verify that the OCSP server's certificate is valid. Um, we could, you could actually make the 674 00:40:28,620 --> 00:40:35,520 request that we showed earlier to check against the certificate server, and the, the way that OCSP communication is 675 00:40:35,520 --> 00:40:40,660 authenticating is whether you're going to know whether it's the same one. You'd have to manually do that. I mean, and there's 676 00:40:40,660 --> 00:40:43,240 nothing in the software that checks that on a regular basis. 677 00:40:43,620 --> 00:40:46,880 The CAs compromise, the OCSP response . 678 00:40:48,040 --> 00:40:50,200 Yeah, the CAs compromise, you could… 679 00:40:52,520 --> 00:40:53,000 Okay. 680 00:40:55,440 --> 00:40:57,800 It's only, it only applies to the one commission. 681 00:40:57,920 --> 00:40:58,280 Because, sir. 682 00:41:00,060 --> 00:41:13,600 Okay. Next slide. Okay. That's, that's correct. But the, the requests are signed. Okay. So 683 00:41:13,600 --> 00:41:21,080 shouts out to the DEF CON goons, um, DC 206, DC 408, DC 404. Um, the CA browser forum has 684 00:41:21,080 --> 00:41:25,620 a revocation working group that are working on, um, some of these topics and they're hard 685 00:41:25,620 --> 00:41:29,280 at work at trying to kind of improve the situation. So shouts out to those guys. The Apple 686 00:41:29,280 --> 00:41:36,160 ProdSec team. Hey. Um, TeamObsters and, uh, hi mom. I think we're, I think we're good. Any, 687 00:41:36,180 --> 00:41:39,140 so other questions? And we are out of time. Yes. 688 00:41:44,920 --> 00:41:50,700 Yes, so the question of stape, OCSP stapling. Um, there's specifically a flag with, with OCSP 689 00:41:50,700 --> 00:41:55,240 must staple, which is not in common use, which basically allows the server that you're talking 690 00:41:55,240 --> 00:41:55,600 to, to make sure that it's stable. Um, and, and, and, and, and, and, and, and, and, and, 691 00:41:55,600 --> 00:41:59,620 and make that request out to the OCSP server and give it back to you signed rather than 692 00:41:59,620 --> 00:42:04,380 the browser or operating system making that server directly. So that's exactly right. I 693 00:42:04,380 --> 00:42:09,220 should have a slide there for that. Um, so OCSP must staple is, is a promising way forward 694 00:42:09,220 --> 00:42:13,640 that, that does resolve some of those privacy concerns. Yeah, the only thing is we don't 695 00:42:13,640 --> 00:42:17,560 see, we don't see that many people using it. Um, it's just when they're setting up their 696 00:42:17,560 --> 00:42:22,660 search, they get this working, they're happy, it's working, they leave, you know. Uh, yeah. 697 00:42:30,600 --> 00:42:39,480 So the question is which browsers are supporting OCSP must staple? Off the top of my head. 698 00:42:42,880 --> 00:42:48,620 There are common browsers that do support it. Chrome, I'm pretty sure Safari does. 699 00:43:14,680 --> 00:43:18,640 And I think that refers to the gentleman behind you's point about CA pinning. And 700 00:43:18,640 --> 00:43:22,280 I think, yeah, you're correct that, that, that, that does prevent a lot of this stuff. 701 00:43:22,280 --> 00:43:26,020 The, the issue that we end up running into is that, like, you know, if you're in a repressed 702 00:43:26,020 --> 00:43:29,640 country or something like that, you may not have ever connected to the site in a whistleblower 703 00:43:29,640 --> 00:43:34,000 case to be able to have the pinning set up to be able to really help. So it's kind of a... 704 00:43:34,420 --> 00:43:38,460 That's very clear, but if I want to know all for you, okay, a secure service, you know, 705 00:43:38,500 --> 00:43:42,700 where I care about, about my customers, you know, repressed countries and so forth. So, 706 00:43:42,760 --> 00:43:48,260 do I do publicly pinning? Do I do must staple? Do I do both? I mean, what, what is the, 707 00:43:48,420 --> 00:43:52,260 and where, and where does the law, like, so I, I convince myself, you know, I'm not 708 00:43:52,260 --> 00:43:55,960 saying that must staple plus pinning equals better than just pinning. 709 00:43:55,960 --> 00:43:59,280 Yeah, and I agree with that. I, I think that more controls are better because you don't 710 00:43:59,280 --> 00:44:03,100 necessarily know how the browser or software, it's not necessarily a browser, is going to 711 00:44:03,100 --> 00:44:07,680 implement the checks. And so, the more checks, the better are going to be the case in that. 712 00:44:07,860 --> 00:44:11,860 So, yeah. So. Okay. Thank you.