00:00:00.133 --> 00:00:08.208 My name is Jose Selvi,we are going the talk about some kind 00:00:08.208 --> 00:00:16.283 of attacks that we can use against as a cell using time 00:00:16.283 --> 00:00:23.023 synchronization and text. I have been working, just a brief 00:00:23.023 --> 00:00:30.430 presentation, I have been working for the last 10 years in 00:00:30.430 --> 00:00:37.838 the security industry. At the moment I am senior security NCC 00:00:37.838 --> 00:00:47.281 group. You have my Twitter on my blog in case you want to follow 00:00:47.281 --> 00:00:55.355 me but at the end of the presentation I have the e-mail 00:00:55.355 --> 00:01:04.097 and everything. So I am from Spain. I am from city that is 00:01:04.097 --> 00:01:10.170 called Valencia, near the Mediterranean sea where is a 00:01:10.170 --> 00:01:16.910 nice city, where the paella is from, you know. With 00:01:16.910 --> 00:01:22.983 beautiful [Laughter and Applause] Its a nice city if 00:01:22.983 --> 00:01:33.093 you you are nearby at some point and you want to have a ring in 00:01:33.093 --> 00:01:43.203 the mix just need to drop me an e-mail and I will be happy to 00:01:43.203 --> 00:01:51.278 share some things with you. So this is key question in this 00:01:51.278 --> 00:02:00.020 talk. I remember when I was a kid or well a teenager and 00:02:00.020 --> 00:02:06.760 computer were built thinking like they were stand alone boxes 00:02:06.760 --> 00:02:13.500 but now everything is different. Then theres the signs, the 00:02:13.500 --> 00:02:19.573 systems thinking that the computer is going to be 00:02:19.573 --> 00:02:26.313 connected to internet, right? And for example, now we have 00:02:26.313 --> 00:02:32.386 automatic updates and we have time synchronization using the 00:02:32.386 --> 00:02:37.758 internet, not the [indiscernible] as I would use 00:02:37.758 --> 00:02:47.200 when I was a kid. So that is something that we are going to 00:02:47.200 --> 00:02:55.275 talk about some features. I don't think they are box so but 00:02:55.275 --> 00:03:02.682 they work, well they should work, but we can abuse different 00:03:02.682 --> 00:03:08.055 functionalities so I consider the functional like features 00:03:08.055 --> 00:03:17.497 more or less than box. So let's go. This is the plane for today. 00:03:17.497 --> 00:03:25.572 I think the versus to start from the beginning but what happened 00:03:25.572 --> 00:03:33.647 when I started to bring this results. So what happened was I 00:03:33.647 --> 00:03:43.757 was doing like a demo. We had a set of demos to show clients and 00:03:43.757 --> 00:03:53.867 one of this demos was to use SSL strip but most of you know and 00:03:53.867 --> 00:04:01.942 we had a problem and suddenly it didn't work. It didn't work 00:04:01.942 --> 00:04:08.014 because there was something new at that moment. [indiscernible] 00:04:08.014 --> 00:04:14.754 HTTP [indiscernible] security. And that is why I started doing 00:04:14.754 --> 00:04:20.827 this time synchronization attacks. So how it works. so 00:04:20.827 --> 00:04:28.902 when you is first UBS connection is server sends a header that 00:04:28.902 --> 00:04:37.644 says, this is max security, max 8 and a number of seconds. This 00:04:37.644 --> 00:04:45.051 means, okay, in the following 3 million seconds, you are going 00:04:45.051 --> 00:04:53.126 to connect always using HTTPS. If the user types the host name 00:04:53.126 --> 00:05:01.201 you are always going to connect using HTTPS. If the user clicks 00:05:01.201 --> 00:05:09.943 an hTTP link, you are going to connect using HTTPS. So this is 00:05:09.943 --> 00:05:18.685 what a HTTPs does. The harder part is the part of client, the 00:05:18.685 --> 00:05:26.760 browser part because the browser has to managed all these, has to 00:05:26.760 --> 00:05:34.167 keep these policies on the time and everything. At this moment, 00:05:34.167 --> 00:05:39.539 all the models and [indiscernible] support this. I 00:05:39.539 --> 00:05:46.279 think the only exception is Internet Explorer, but most of 00:05:46.279 --> 00:05:54.354 them >> It does [ From audience] >> Oh, it does. Okay, 00:05:54.354 --> 00:06:02.429 cool. Perfect. Six months ago, are you sure? Okay. So for us, 00:06:02.429 --> 00:06:11.171 then if we are trying to get an HTTP connection we have this 00:06:11.171 --> 00:06:19.246 problem. We make a can an HTTP connection if HTTPS is working. 00:06:19.246 --> 00:06:27.988 So we can reach our target, the victim is behind the wall. This 00:06:27.988 --> 00:06:35.395 is very frustrating. But this worse because say that this in 00:06:35.395 --> 00:06:42.802 the first days of HTTPS connection you think so we have 00:06:42.802 --> 00:06:49.542 a opportunity before this first ATPS connection so people from 00:06:49.542 --> 00:06:55.615 Google, from Mozilla, say okay lets do, [indiscernible] with 00:06:55.615 --> 00:07:03.690 a host, then those host are the HSPS enforced by default. Okay, 00:07:03.690 --> 00:07:11.765 so with this host is even more difficult. So what I thought 00:07:11.765 --> 00:07:20.507 about this is, if the victim is protected this time, then what I 00:07:20.507 --> 00:07:29.249 need is the machine. So I just need to go 3 million seconds 00:07:29.249 --> 00:07:35.322 into the future and the [indiscernible], going MO SILC 00:07:35.322 --> 00:07:43.396 and have aliases with unknown host and those host they are HAT 00:07:43.396 --> 00:07:52.138 is enforced by the host and with this host is even more difficult 00:07:52.138 --> 00:08:00.880 so what I thought about this I thought okay if the victim is 00:08:00.880 --> 00:08:08.955 protected in this time then what, what they need is a time 00:08:08.955 --> 00:08:17.030 machine. So I need to go 3 millions seconds into the future 00:08:17.030 --> 00:08:23.770 and then I test the (indiscernible) and the HSPS is 00:08:23.770 --> 00:08:30.510 going expire. So then I can reach my target. [Explosion 00:08:30.510 --> 00:08:37.250 Sound] I love this sound. [Laughter] So what happened with 00:08:37.250 --> 00:08:45.325 all the lists because we have saved and those hosts are in 00:08:45.325 --> 00:08:52.065 enforced by default. The belief is if you read the 00:08:52.065 --> 00:08:58.805 recommendation this is from google what I understood when I 00:08:58.805 --> 00:09:07.547 read this from the first time it is like they are like a 00:09:07.547 --> 00:09:16.990 static list and says that out of the box. I can't figure out of 00:09:16.990 --> 00:09:25.732 the box. What Mozilla says, which is the same, it says it is 00:09:25.732 --> 00:09:33.139 enforced by default. And this is e-mail that another vendor sent 00:09:33.139 --> 00:09:41.881 me that say these are not the same. That HADS is enforced by 00:09:41.881 --> 00:09:50.623 default. But the real truth is that the list is loaded, it is 00:09:50.623 --> 00:09:58.031 not the static. (indiscernible) When this host in the list when 00:09:58.031 --> 00:10:04.771 you clean the cache, and when you install the [indiscernible] 00:10:04.771 --> 00:10:13.513 for the first time, it is like creates a dynamic entry with max 00:10:13.513 --> 00:10:23.623 8. Which is what, lets say this max 8 is 10 weeks. So it is 00:10:23.623 --> 00:10:28.995 not really even recommendation either the recommendation says 00:10:28.995 --> 00:10:37.070 enforced by default it is not really enforced by default it is 00:10:37.070 --> 00:10:44.477 10 weeks so this kind of confusions sometimes can be a 00:10:44.477 --> 00:10:49.849 bit problematic. [Laughter] [Applause] The only browser that 00:10:49.849 --> 00:10:57.924 I have seen the a problem that is really static is apple 00:10:57.924 --> 00:11:04.664 Safari. Theres a file released that you have the host 00:11:04.664 --> 00:11:10.737 and something is INF. I havent found a recommendation 00:11:10.737 --> 00:11:19.479 on this but I have tested if you change the clock on your 00:11:19.479 --> 00:11:26.219 computer 10 years into the future, 20 years into the 00:11:26.219 --> 00:11:32.959 future, it doesn't matter. They are always protected. So this 00:11:32.959 --> 00:11:41.034 so only for SAFARI this list is static. For the other ones 00:11:41.034 --> 00:11:50.476 theyre not static. So we know if we have a time machine we can 00:11:50.476 --> 00:11:59.218 do something with this HSPS. Do you know of anyway to change the 00:11:59.218 --> 00:12:07.293 clock on the computer from the network? NTP. Yes. NTP is what 00:12:07.293 --> 00:12:15.368 most, I think is all the properties I have seen used to 00:12:15.368 --> 00:12:22.108 synchronize the time. Well some of them are slightly different 00:12:22.108 --> 00:12:28.848 but 99 percent is NTP. The configuration may be different 00:12:28.848 --> 00:12:38.958 but most of them are not secured by default. So you can do a man 00:12:38.958 --> 00:12:45.698 in the middle attack against this protocol. This is example 00:12:45.698 --> 00:12:54.440 of NPT packet and the format in the request and responses is the 00:12:54.440 --> 00:13:03.182 same there is only a flag that can change that says client or 00:13:03.182 --> 00:13:11.924 server and time stamps are used to know what the proper date and 00:13:11.924 --> 00:13:18.665 time. There are some knots behind this but not interesting 00:13:18.665 --> 00:13:27.407 for us now. So what did was create a tool that on this 00:13:27.407 --> 00:13:33.479 server but with some modifications the use some flags 00:13:33.479 --> 00:13:41.554 this serai server attacks. I up loaded the latest version a half 00:13:41.554 --> 00:13:50.997 hour ago. So this is flags. This is much easier that we see some 00:13:50.997 --> 00:13:58.404 examples. So for example, don't pay attention to minus sign. It 00:13:58.404 --> 00:14:07.146 means not show the banner but if you use the script without any 00:14:07.146 --> 00:14:15.221 other flag (indiscernible) try to find a way into the future at 00:14:15.221 --> 00:14:22.628 least a thousand days into the future with the same weekday, 00:14:22.628 --> 00:14:32.071 month day as today. Because this is the day that the user can be 00:14:32.071 --> 00:14:38.144 come (indiscernible) someone say its Monday, or say its 00:14:38.144 --> 00:14:45.551 Wednesday, it can ruin the user. But the [indiscernible] that we 00:14:45.551 --> 00:14:54.994 can use for example is a minus sign 10 and 10 days into the 00:14:54.994 --> 00:15:05.104 future but we can use minus 10D to go 10 days into the past or 00:15:05.104 --> 00:15:15.214 minus twoY to do 2 years into the past, we can do a lot with 00:15:15.214 --> 00:15:22.622 that. We can say a specific date. Theres minus for random 00:15:22.622 --> 00:15:28.694 dates. So [indiscernible] the first. So this is Microsofts 00:15:28.694 --> 00:15:36.102 website. Here are some scripts. We are going to intercepts the 00:15:36.102 --> 00:15:44.177 HTTP connections. I have found and I think that the server that 00:15:44.177 --> 00:15:52.919 the going to intercept the old NTP connections so if I try to 00:15:52.919 --> 00:15:59.659 type (indiscernible) and HSDS works, I wont be able to 00:15:59.659 --> 00:16:07.066 intercept the HTTP connection. And if it doesnt work I am 00:16:07.066 --> 00:16:13.806 going to intercept the DB connection. So lets see what 00:16:13.806 --> 00:16:21.214 happened. We opened Firefox and Chrome or something, and what is 00:16:21.214 --> 00:16:28.621 left? There is something really important that we need now, a 00:16:28.621 --> 00:16:36.028 piece for hacking that is the proper music. [Back to the 00:16:36.028 --> 00:16:42.768 Future Theme Song Playing] So it working. [Applause] [Theme Song 00:16:42.768 --> 00:16:48.140 Continues] Enough music. [Laughter] So what happened was 00:16:48.140 --> 00:16:56.215 that we changed the clock in the computer then the cache expired 00:16:56.215 --> 00:17:04.290 so when the user connects the computer sees that its 3 million 00:17:04.290 --> 00:17:12.365 seconds in the future so they both connect using NTP. So we 00:17:12.365 --> 00:17:21.107 can use SST. Theyre not all attacks but I have found to be 00:17:21.107 --> 00:17:29.849 less useful, so I coded them because I wanted to try them but 00:17:29.849 --> 00:17:38.591 for example our replay attack you can say or have the pick up 00:17:38.591 --> 00:17:45.998 file we have response, I say okay, just replay this response. 00:17:45.998 --> 00:17:55.441 Or you can do like a spoofing or coding attack just the same. But 00:17:55.441 --> 00:18:01.514 waiting for a request, just following responses. The problem 00:18:01.514 --> 00:18:09.588 they have found is that NTP in windows Mac has security playing 00:18:09.588 --> 00:18:16.996 control and they transmit time stamp has to be is same 00:18:16.996 --> 00:18:23.736 originally time stamp in the response. So you just replay 00:18:23.736 --> 00:18:31.143 something, its not the same value. So they just ignore the 00:18:31.143 --> 00:18:39.218 response. But it is still in the tool because who knows maybe 00:18:39.218 --> 00:18:45.291 another implementation can be used. Okay but in different 00:18:45.291 --> 00:18:51.364 operating systems, the same operation work in a different 00:18:51.364 --> 00:18:56.068 way. So for example in (indiscernible) is 00:18:56.068 --> 00:19:01.440 synchronization happens each time of a interface and 00:19:01.440 --> 00:19:08.848 interface goes up so if you control the physical medium or 00:19:08.848 --> 00:19:16.255 or wireless network or whatever, you can just keep the computer 00:19:16.255 --> 00:19:23.662 out of network and when the computer joins again, you have 00:19:23.662 --> 00:19:30.403 synchronization so you can intercept this and the last time 00:19:30.403 --> 00:19:37.143 the last version there is not additional protection to that. 00:19:37.143 --> 00:19:44.550 So you can change the date. You have interview request each 00:19:44.550 --> 00:19:51.957 minute. The only problem with that is that they do something 00:19:51.957 --> 00:19:59.365 slightly different. I mean, with NTP you can just change the 00:19:59.365 --> 00:20:07.440 clock with a new date or make the time slower or faster, 00:20:07.440 --> 00:20:16.182 because they don't want to make jumps so this is what this does. 00:20:16.182 --> 00:20:25.624 So this is a problem because if you want the change 10 years the 00:20:25.624 --> 00:20:34.366 clock 10 years into the future you can some time wait for that 00:20:34.366 --> 00:20:40.439 synchronization but there is point that the first three 00:20:40.439 --> 00:20:46.512 synchronizations are standard and they change the clock. No 00:20:46.512 --> 00:20:55.254 speed up or slow down just changes the clock. So if I we 00:20:55.254 --> 00:21:04.697 are there when boots up you can do the same as you have seen 00:21:04.697 --> 00:21:10.069 with Macros S. MACROS S [indiscernible] do something 00:21:10.069 --> 00:21:18.144 similar done. But the problem we have here is that really there 00:21:18.144 --> 00:21:26.886 are like two parts NTP that is running all the time and other 00:21:26.886 --> 00:21:33.626 servers that is checking the information that NTP is storing 00:21:33.626 --> 00:21:43.736 in a file but I have found or a lot of people have found that 00:21:43.736 --> 00:21:51.810 doesn't seem to work. Doesn't seem to work and I mean the 00:21:51.810 --> 00:21:59.218 NTP So if you look sites google you see people saying 00:21:59.218 --> 00:22:07.293 didn't work I don't know what happened. But my computer is not 00:22:07.293 --> 00:22:13.365 doing synchronization properly. And even there are people that 00:22:13.365 --> 00:22:21.440 have just okay let me to download my NTP and now it 00:22:21.440 --> 00:22:30.883 works. But doesn't mean that we can do the attack, I mean we can 00:22:30.883 --> 00:22:38.958 do the attack but we have the same limitation. This is script 00:22:38.958 --> 00:22:47.700 that is run when one of scripts when the macro starts. First we 00:22:47.700 --> 00:22:57.142 have all we found SNTP is simple NTP code that this code works. I 00:22:57.142 --> 00:23:05.885 mean, if you intercept this you can change the clock and then we 00:23:05.885 --> 00:23:15.327 have NTP demon that is where the back is. I guess that there is 00:23:15.327 --> 00:23:22.067 back because it is not working the synchronization. There is 00:23:22.067 --> 00:23:28.807 another way to force us synchronization that is to open 00:23:28.807 --> 00:23:36.215 the data and time preferences. If user opens this window there 00:23:36.215 --> 00:23:42.955 is synchronization you can change the clock as well. But 00:23:42.955 --> 00:23:52.398 this is what I did. I opened the menu because it is easier done 00:23:52.398 --> 00:23:58.470 without the Mac again. Windows that most robust time 00:23:58.470 --> 00:24:03.842 synchronization because it synchronize once a week and 00:24:03.842 --> 00:24:11.917 don't allow changes more than 15 hours you can only change 15 00:24:11.917 --> 00:24:20.659 hours into the future or past which is not enough for most. So 00:24:20.659 --> 00:24:28.734 it is implementation. They work in a different way. You sign it 00:24:28.734 --> 00:24:36.141 with different keys and its robust as well. Because if you 00:24:36.141 --> 00:24:42.881 look at the task that is scheduled, you have the 00:24:42.881 --> 00:24:48.954 [indiscernible] of time in series that is doing this 00:24:48.954 --> 00:24:56.362 synchronization and you can see that happens once a week. This 00:24:56.362 --> 00:25:01.734 value is, this 50 [indiscernible] value is not 00:25:01.734 --> 00:25:10.476 something that is hard coded. It is the value in the register and 00:25:10.476 --> 00:25:17.216 different in different versions for example in window seven and 00:25:17.216 --> 00:25:25.290 eight it is 15 hours. But for example, Windows Seven is two 00:25:25.290 --> 00:25:32.698 days. It will be different in another version and when they 00:25:32.698 --> 00:25:40.105 computer joins domain it is different as well. So it changes 00:25:40.105 --> 00:25:48.180 depending on the configuration of the role of the server of the 00:25:48.180 --> 00:25:54.253 local station. So attacking windows using this technique is 00:25:54.253 --> 00:26:00.325 difficult in the full configuration but I have found 00:26:00.325 --> 00:26:07.066 people talking and on the internet about this and there 00:26:07.066 --> 00:26:15.808 are people that think that once a week is not enough. So there 00:26:15.808 --> 00:26:23.882 are people on the internet to change this frequency to twice a 00:26:23.882 --> 00:26:30.622 day or (indiscernible) or 85 minutes or something like that. 00:26:30.622 --> 00:26:40.065 So what do you think happens if I can change 15 hours on the 00:26:40.065 --> 00:26:45.437 clock but from once synchronization to another the 00:26:45.437 --> 00:26:56.215 time is less than 15 hours. What we can do is to jump just a few 00:26:56.215 --> 00:27:01.587 seconds before the next synchronization then why does 00:27:01.587 --> 00:27:09.661 that few seconds jump again and jump again and jump again like 00:27:09.661 --> 00:27:17.736 this. Fifteen hours, 15 hours 15 hours, 15 hours, right. I call 00:27:17.736 --> 00:27:24.476 this attack, time attack because it is similar to (indiscernible) 00:27:24.476 --> 00:27:31.216 stone skimming. The stone is just jumping in the water, 00:27:31.216 --> 00:27:39.291 jumping and jumping and jumping so we are doing the same but 00:27:39.291 --> 00:27:48.734 with the time so it makes sense, more or less. So this will be 00:27:48.734 --> 00:27:57.476 the comment says that we want to jump 15 hours minus 10 seconds. 00:27:57.476 --> 00:28:06.218 Okay. I have a number for this but I have video because it 00:28:06.218 --> 00:28:14.293 takes around two hours to happen and we don't have two hours. 00:28:14.293 --> 00:28:23.035 People in the staff we don't have two hours right. No. So I 00:28:23.035 --> 00:28:31.777 will fast forward the video. You have the -- you can review and 00:28:31.777 --> 00:28:39.851 look at the clock the bottom right you see the clock is 00:28:39.851 --> 00:28:47.259 changing 15 hours, 15 hours, 15 hours. Sometimes, from time to 00:28:47.259 --> 00:28:55.334 time, the window needs the response. And you have to do the 00:28:55.334 --> 00:29:02.741 following, do the following jump. So in around two hours I 00:29:02.741 --> 00:29:08.814 think it was like a month-and-a-half in the future 00:29:08.814 --> 00:29:18.256 like that so in four or five hours you can do the same attack 00:29:18.256 --> 00:29:26.331 that we have seen but just with this configuration. This is not 00:29:26.331 --> 00:29:32.404 the default configuration. But its something that you can 00:29:32.404 --> 00:29:39.811 find because there is lot of people saying they changed the 00:29:39.811 --> 00:29:45.183 time synchronization because its much better if you 00:29:45.183 --> 00:29:50.555 synchronize [indiscernible] or something like that. There is 00:29:50.555 --> 00:29:57.963 another way that these are less likely that the manual update. 00:29:57.963 --> 00:30:04.703 In windows you manually update the date, it works. Doesn't 00:30:04.703 --> 00:30:10.776 matter 15 hour limitation. Doesn't matter. It updates. But 00:30:10.776 --> 00:30:18.183 this is likely because it not like in (indiscernible) you just 00:30:18.183 --> 00:30:26.925 open a windows and that all. In windows you open a couple of 00:30:26.925 --> 00:30:35.667 window as click where it says update now so it less likely. So 00:30:35.667 --> 00:30:44.409 as you have seen, this is not a single bullet. An attack like 00:30:44.409 --> 00:30:51.817 this You can use the attack in all computers and all 00:30:51.817 --> 00:30:58.557 configurations and something that you can use. And that I 00:30:58.557 --> 00:31:05.297 have used. So when I presented this I presented an 00:31:05.297 --> 00:31:12.704 [indiscernible] attack last year and when I presented this I have 00:31:12.704 --> 00:31:19.444 people working here from Google and people saying what happened 00:31:19.444 --> 00:31:26.852 with that and they sent me e-mail saying what happened with 00:31:26.852 --> 00:31:36.294 that. We had some e-mails and at some point and I said that, lot 00:31:36.294 --> 00:31:44.369 of things go wrong when the clock is stopped and he was 00:31:44.369 --> 00:31:51.109 right. That the moment I was reciting all the attack 00:31:51.109 --> 00:31:59.851 surfaces. This is what I'm going to talk about now. I don't have 00:31:59.851 --> 00:32:08.593 a number for this because it is difficult to find to to draw 00:32:08.593 --> 00:32:18.036 a number for this. With this but on that when the even if not 00:32:18.036 --> 00:32:26.778 more the most likely scenario in window if you change the time 10 00:32:26.778 --> 00:32:34.853 years into the future and then the clock goes back to person 00:32:34.853 --> 00:32:43.595 there are some things that we are in the process of. In some 00:32:43.595 --> 00:32:49.668 task dependent on the configuration of the task the 00:32:49.668 --> 00:32:56.408 next execution is calculated from the last execution. So what 00:32:56.408 --> 00:33:03.815 happens if the last execution was 10 years into the future. 00:33:03.815 --> 00:33:09.187 That the following [indiscernible] is 10 years or 00:33:09.187 --> 00:33:16.595 more into the future. So it only happens with certain tasks 00:33:16.595 --> 00:33:24.002 depending on the configuration of the task. One of those task 00:33:24.002 --> 00:33:30.742 is window automatic updates. [Laughter] So I mean if user 00:33:30.742 --> 00:33:39.484 tried to update manually it works but if you don't -- if you 00:33:39.484 --> 00:33:48.226 just trust that the computer is going to warn you I have updates 00:33:48.226 --> 00:33:56.968 for you at least in the time that I have the computer testing 00:33:56.968 --> 00:34:05.043 this, I didn't have any update. I might have updates on other 00:34:05.043 --> 00:34:12.450 computers. So this is something that could happen when the clock 00:34:12.450 --> 00:34:19.858 is off. I have another attack this is against the public 00:34:19.858 --> 00:34:27.265 interested code. We use SSR and we use certificates all the 00:34:27.265 --> 00:34:34.005 time. Those certificates are security based on the task on 00:34:34.005 --> 00:34:40.745 the CAs of the signing the certificates. On all the 00:34:40.745 --> 00:34:46.818 certificates, theres like a preview of when the certificate 00:34:46.818 --> 00:34:55.560 is valid. But so if I can control the clock in a computer 00:34:55.560 --> 00:35:02.300 what I can do to use certificates from the past. 00:35:02.300 --> 00:35:11.743 Because that used to be valid at some point in the past and are 00:35:11.743 --> 00:35:21.186 not valid now. So it a time to bring back to life of well-known 00:35:21.186 --> 00:35:27.258 attacks. For example, We can explain weak certificates. I 00:35:27.258 --> 00:35:33.999 didnt, I didnt have any archive of this certificate but 00:35:33.999 --> 00:35:40.071 I have found theres a theres an observatory from 00:35:40.071 --> 00:35:48.146 2010 with certificates so then you can try to find for example 00:35:48.146 --> 00:35:56.221 certificates with less well more than a 1024 bits that now are 00:35:56.221 --> 00:36:04.963 invalid for example. If you look at this you have a number of 00:36:04.963 --> 00:36:13.038 certificates in data base so I was trying to think let's find 00:36:13.038 --> 00:36:21.780 something for the demo at Def Con. It would be nice to have 00:36:21.780 --> 00:36:30.522 something from Las Vegas so I said, what I found was a few 00:36:30.522 --> 00:36:37.929 online casinos. Have you seen the movie 21 blackjack? Yes. I 00:36:37.929 --> 00:36:45.336 don't want to check if this things happen or not. [Laughter] 00:36:45.336 --> 00:36:51.409 So okay let's find another example like (indiscernible) so 00:36:51.409 --> 00:36:58.817 I found something that doesnt seems very dangerous for me. I 00:36:58.817 --> 00:37:05.557 am less afraid of this. [Laughter] So its not the 00:37:05.557 --> 00:37:13.631 main domain but its one domain of this domain so what I 00:37:13.631 --> 00:37:23.074 did was it was a certificate. The key was 512 but we know that 00:37:23.074 --> 00:37:31.149 we can correct this and factor this now. I used several IC2 00:37:31.149 --> 00:37:37.889 boxes (indiscernible) and it took like three days or four 00:37:37.889 --> 00:37:45.964 days or something like that. So I have this certificate from the 00:37:45.964 --> 00:37:55.406 past and now I have the key, I can change the clock of the 00:37:55.406 --> 00:38:02.147 victim computer. Maybe I could have interesting attack here. So 00:38:02.147 --> 00:38:10.889 let me show [No audio] Okay. We are going to change now the 00:38:10.889 --> 00:38:17.629 [indiscernible] rules. Now we're going to intercept same NTP but 00:38:17.629 --> 00:38:25.703 the HTTPS instead of the ATP. We're going the say window want 00:38:25.703 --> 00:38:35.146 to go four years into the past. The time that is needed for this 00:38:35.146 --> 00:38:41.219 certificate to be valid now. So lets see. [Indiscernible] 00:38:41.219 --> 00:38:49.961 We're going to update now. And this is 2011 sorry. So let's see 00:38:49.961 --> 00:38:56.701 what happens when we visit the site. Okay. [Applause] The 00:38:56.701 --> 00:39:04.776 certificate changed is valid and we have no warnings. This demo I 00:39:04.776 --> 00:39:13.518 mean, it could happen the same in a few years with 1024 keys. 00:39:13.518 --> 00:39:20.258 At this moment the browser updated doesn't accept 500 keys 00:39:20.258 --> 00:39:29.701 so this browser is a bit old. But this is an example to show 00:39:29.701 --> 00:39:35.773 you that the same thing could happen with [indiscernible] 00:39:35.773 --> 00:39:41.846 keys. So The thing that happened with certificates that 00:39:41.846 --> 00:39:49.254 has been stolen in security incident for example we have a 00:39:49.254 --> 00:39:55.994 product key they are same could happen certificate were leaking 00:39:55.994 --> 00:40:02.734 using (indiscernible) maybe now is too soon to use certificates 00:40:02.734 --> 00:40:09.474 but maybe in a few years the certificates expire. For 00:40:09.474 --> 00:40:14.846 example, one that I like (indiscernible) this is 00:40:14.846 --> 00:40:21.586 something that happens in 2008 so we have some certificates 00:40:21.586 --> 00:40:28.326 that we can use. You can find this certificates in 00:40:28.326 --> 00:40:33.031 (indiscernible) website I believe, because they are 00:40:33.031 --> 00:40:41.773 received from 2010 and this bug is two years before so find some 00:40:41.773 --> 00:40:50.515 of them but not interesting ones but if you look at the internet 00:40:50.515 --> 00:40:59.257 what I found this page they do plug in for Firefox I think. 00:40:59.257 --> 00:41:06.664 They have all the certificates that they found to be generated 00:41:06.664 --> 00:41:15.406 (indiscernible) back. So at the end of the day, what we need for 00:41:15.406 --> 00:41:24.148 that is the like the top group certificate has to be in the 00:41:24.148 --> 00:41:30.888 browser, the same the same, well the certificate. The other 00:41:30.888 --> 00:41:36.961 certificates in [indiscernible] doesn't matter if it is expired 00:41:36.961 --> 00:41:45.036 I just need to have all the product keys that is certificate 00:41:45.036 --> 00:41:52.443 in the certificate chain and the product key of the host 00:41:52.443 --> 00:41:59.183 certificate and you can do this attack. What happens with 00:41:59.183 --> 00:42:05.923 revocation. You can use a certificate but what if its 00:42:05.923 --> 00:42:16.033 broken. The point is that what I felt is okay but the list is a 00:42:16.033 --> 00:42:26.811 lot of ways. It is not -- I mean, it has a size and if you 00:42:26.811 --> 00:42:31.516 are always storing more certificates and more 00:42:31.516 --> 00:42:35.553 certificates and more certificates and more 00:42:35.553 --> 00:42:42.293 certificates, this is not convene because the user as the 00:42:42.293 --> 00:42:50.368 host has to download the file. So I was reading on trying 00:42:50.368 --> 00:42:59.110 things and what I have found is that seems that it is not 00:42:59.110 --> 00:43:05.850 mandatory that a certificate isnt on this list after it 00:43:05.850 --> 00:43:12.590 expires. Because its invalid because it has expired. So I 00:43:12.590 --> 00:43:21.332 can't be sure about this but I have some suspect but I think 00:43:21.332 --> 00:43:27.405 there are some CAs that are removing all certificates 00:43:27.405 --> 00:43:34.812 because I found when I did some (indiscernible) to see to 00:43:34.812 --> 00:43:41.552 compare the issue date of CA with the first revoked 00:43:41.552 --> 00:43:48.960 certificate. And I found that some of them that for example 00:43:48.960 --> 00:43:57.034 there is difference of four years, six years. If you see a 00:43:57.034 --> 00:44:04.442 series that was issued and the first revoke certificate is 60 00:44:04.442 --> 00:44:12.517 years into the future, what I think they are removing the or 00:44:12.517 --> 00:44:17.889 revoking certificates that are not valid. [Indiscernible] But 00:44:17.889 --> 00:44:26.631 this is just what I think. I can't tell you this a hundred 00:44:26.631 --> 00:44:35.373 percent sure. What is the -- if the browser is checking that the 00:44:35.373 --> 00:44:43.447 certificate is removable or not using the old service it can be 00:44:43.447 --> 00:44:50.855 easier because what happens with configuration of I think all the 00:44:50.855 --> 00:44:58.930 browser they have tested is that when they do a connection to 00:44:58.930 --> 00:45:06.337 check for a certificate is revokable or not if they don't 00:45:06.337 --> 00:45:13.744 have a response they continue. So just drop the connection to 00:45:13.744 --> 00:45:21.819 this service. You don't have the check so you can use revoke 00:45:21.819 --> 00:45:26.524 certificates. So I have that. [No audio] 00:45:26.524 --> 00:45:28.526 [No audio] 00:45:28.526 --> 00:45:30.528 [No audio] 00:45:30.528 --> 00:45:32.530 [No audio] 00:45:32.530 --> 00:45:34.532 [No audio] 00:45:34.532 --> 00:45:36.534 [No audio] 00:45:36.534 --> 00:45:38.536 [No audio] 00:45:38.536 --> 00:45:40.538 [No audio] 00:45:40.538 --> 00:45:42.540 [No audio] 00:45:42.540 --> 00:45:44.542 [No audio] 00:45:44.542 --> 00:45:46.544 [No audio] 00:45:46.544 --> 00:45:49.246 Okay, let me change 00:45:49.246 --> 00:45:55.987 the host we are using. And [indiscernible] at the same 00:45:55.987 --> 00:46:05.429 because we are getting the HTTPS in the ATP and this time we are 00:46:05.429 --> 00:46:15.539 going to go to 10 years into the past. So we are going the use 00:46:15.539 --> 00:46:19.577 certificate [indiscernible] generated using the old 00:46:19.577 --> 00:46:24.949 (indiscernible) and we have the internet key. [indiscernible] 00:46:24.949 --> 00:46:31.689 And now I am going to restart the demon [indiscernible] 00:46:31.689 --> 00:46:39.096 because just because reboot the system will take more time but 00:46:39.096 --> 00:46:45.169 it is same. Okay. We have synchronization now. Lets 00:46:45.169 --> 00:46:53.911 see, okay. The date has changed now so we can visit the site. 00:46:53.911 --> 00:46:57.948 The site the certificate was tools. 00:46:57.948 --> 00:47:01.319 Tools dot i-e-t-f dot org. 00:47:01.319 --> 00:47:07.391 So this site. Okay? Okay. The certificate we have 00:47:07.391 --> 00:47:14.799 connection is valid. The site seems the originally one but I 00:47:14.799 --> 00:47:20.171 have links now links is security reaction[ Indiscernible] 00:47:20.171 --> 00:47:22.173 [Applause] 00:47:22.173 --> 00:47:26.877 The certificate no It's different from let 00:47:26.877 --> 00:47:33.617 me show you, it is different from if its different 00:47:33.617 --> 00:47:38.322 [ Indiscernible] because they changed the provider. 00:47:38.322 --> 00:47:40.324 Its completely 00:47:40.324 --> 00:47:43.694 different but its valid. Okay. 00:47:43.694 --> 00:47:45.696 [no audio] 00:47:45.696 --> 00:47:49.066 So you know the time 00:47:49.066 --> 00:47:55.139 synchronization well it is something that should have more 00:47:55.139 --> 00:48:01.212 security controls like Microsoft does for example. The security 00:48:01.212 --> 00:48:07.952 controls, for example, with Chrome has a warning if a 00:48:07.952 --> 00:48:16.694 certificate is -- if data in the system is older than the build 00:48:16.694 --> 00:48:25.436 time of the browser so there are some controls that could help. I 00:48:25.436 --> 00:48:33.511 would like to speed up things because this is my third year 00:48:33.511 --> 00:48:40.251 here. So Im ready for some questions on Microsoft, but 00:48:40.251 --> 00:48:47.658 [indiscernible] because it was my first time, to thank you guys 00:48:47.658 --> 00:48:55.065 and my associates and to the people who created all those 00:48:55.065 --> 00:49:02.473 movies in the 80s for a wonderful title. I think we 00:49:02.473 --> 00:00:00.000 don't have questions. Thank you. [Applause] [Music Playing]