00:00:00.133 --> 00:00:04.638 Hello everyone. I'm Josh AKA kernel Smith and this is high 00:00:04.638 --> 00:00:07.908 deaf fuzzing, exploring the vulnerabilities in HDMI-CEC as 00:00:07.908 --> 00:00:11.745 it says. This is not my first time speaking at a conference 00:00:11.745 --> 00:00:18.552 however it is my first time speaking at DEFCON. So hopefully 00:00:18.552 --> 00:00:23.190 there will be a resultant effect of that. Feel free to ask 00:00:23.190 --> 00:00:26.527 questions any time but it's on you to remind me where I was in 00:00:26.527 --> 00:00:32.533 the presentation. Because I have a squirrel kind of approach. In 00:00:36.837 --> 00:00:39.540 order to introduce myself and snap you guys out of any 00:00:39.540 --> 00:00:43.844 hangovers or any food comas you might be in, we're going to 00:00:43.844 --> 00:00:47.214 start with some really easy audience participation. First, 00:00:47.214 --> 00:00:51.418 if there is anyone here from the U.S. postal service, please come 00:00:51.418 --> 00:00:54.554 forward so I can kick you where it hurts. The lesson learns, 00:00:54.554 --> 00:01:02.062 don't ever ship medication to you hotel room if you're in 00:01:02.062 --> 00:01:06.433 Vegas because apparently they're incapable of doing that. I mean 00:01:06.433 --> 00:01:12.039 they can so I've been told, but ... Anyway. Now onto the quiz. 00:01:17.210 --> 00:01:20.247 Which of the following is not true about me. This is my intro 00:01:20.247 --> 00:01:24.184 or who am I, whatever? You don't have to raise your hand or 00:01:24.184 --> 00:01:27.587 anything. I know you're all dying to raise your hand. You 00:01:27.587 --> 00:01:30.791 don't have to, just think about which one might be false. Had 00:01:30.791 --> 00:01:33.627 ten knee surgeries, I worked at Johns Hopkins university applied 00:01:33.627 --> 00:01:37.664 physics laboratory. Was voted most athletic in high school, 00:01:37.664 --> 00:01:40.334 previously ran assessments of the 90 second information 00:01:40.334 --> 00:01:44.438 warfare aggressor squadron in the Air Force. I have a BS in 00:01:44.438 --> 00:01:49.710 computer engineering from -- poly tech institute. Represent 00:01:49.710 --> 00:01:54.614 all right. I'm an external meta Sploid developer and I had 00:01:54.614 --> 00:02:00.554 command and control of 50 nuclear ICBMs on 911? Three? I 00:02:03.156 --> 00:02:05.592 have had ten knee surgeries. I've had five other ones as 00:02:05.592 --> 00:02:11.598 well. If you have any -- need any advice or anything, I'm full 00:02:11.598 --> 00:02:13.934 of it. I thought about writing a book about it for a while. Knee 00:02:13.934 --> 00:02:17.404 surgeries, anyway. I did work at Johns Hopkins university applied 00:02:17.404 --> 00:02:24.378 physics laboratory, AKA, APL. I did weapons system vulnerability 00:02:24.378 --> 00:02:28.148 assessments. I was actually voted most athletic in high 00:02:28.148 --> 00:02:32.686 school. Don't judge a book by its cover. Referencing No. 1. 00:02:32.686 --> 00:02:38.692 Right. And referencing No. 1 now you know why I'm so FAT. I did 00:02:41.561 --> 00:02:43.930 previously run assessments at the 92nd information warfare 00:02:43.930 --> 00:02:46.867 special squadron which is now the 92nd specific information 00:02:46.867 --> 00:02:48.969 squadron. I did and ran the unit that did vulnerability 00:02:48.969 --> 00:02:56.543 assessments and red teams and that kind of stuff. I do not 00:02:56.543 --> 00:03:00.047 have a BS in computer engineering from RPI. I have a 00:03:00.047 --> 00:03:05.352 BS in aeronautical engineering from RPI, go figure. Also an MIS 00:03:05.352 --> 00:03:10.991 and some CI I studied while working at Hopkins. I am a meta 00:03:10.991 --> 00:03:15.929 school aid developer. Since 2013. And I was in charge of 50 00:03:15.929 --> 00:03:21.134 nukes on 911. They were sitting on the ground in Montana. If you 00:03:21.134 --> 00:03:24.771 want to hear the whole story, feel free to buy me a drink and 00:03:24.771 --> 00:03:29.910 we can talk about it. You don't have to buy me a drink but ... 00:03:29.910 --> 00:03:36.850 It helps. So this is what we're going to speak about. I'll 00:03:36.850 --> 00:03:40.520 explain what CEC is. We'll talk about the specks and design 00:03:40.520 --> 00:03:44.157 details. We'll get into the protocol a bit and discuss the 00:03:44.157 --> 00:03:47.227 attack surface and how it can go about analyzing it. Finally 00:03:47.227 --> 00:03:50.163 we'll talk about some of my test results. And what I hope to 00:03:50.163 --> 00:03:54.301 accomplish moving forward. It's in a state of there is more to 00:03:54.301 --> 00:03:57.838 be done which I could use some help with from all you 00:03:57.838 --> 00:04:05.679 DEFCONers. Why did I look at this area? Well, I was kind of 00:04:05.679 --> 00:04:09.116 late to the hacking game as I mentioned before. I did some 00:04:09.116 --> 00:04:11.818 time in the Air Force I did ten years. And the first 7 had 00:04:11.818 --> 00:04:19.192 nothing to do with info tech. So early in my career I lacked the 00:04:19.192 --> 00:04:24.931 knowledge to do anything innovative research. So later in 00:04:24.931 --> 00:04:28.001 life, it's kind of hard now to find some stuff that is 00:04:28.001 --> 00:04:34.107 interesting but also has not been covered before. In addition 00:04:34.107 --> 00:04:41.748 I kind of enjoy risk assembly more so than CD6 et cetera. And 00:04:41.748 --> 00:04:45.585 as I looked into this area I found that there's actually 00:04:45.585 --> 00:04:50.257 quite a few other avenues and mobile device, a lot of mobile 00:04:50.257 --> 00:04:56.730 devices that use CEC. So a lot of things started to open up as 00:04:56.730 --> 00:05:02.469 I looked into it before I committed to presenting on it. 00:05:02.469 --> 00:05:06.206 Also as it says there, my son is completely obsessed with HDMI 00:05:06.206 --> 00:05:10.777 cables among other cords and whatnot. My coworkers can vouch 00:05:10.777 --> 00:05:14.714 for this. Especially when he showed up for take your child to 00:05:14.714 --> 00:05:19.186 workday and -- you better save your work. That's all I'm 00:05:19.186 --> 00:05:26.693 saying. He might be unplugging some of you stuff. So there has 00:05:26.693 --> 00:05:30.997 been some previous research in the area. I actually was not 00:05:30.997 --> 00:05:33.166 aware of this in the beginning and it was kind of late when I 00:05:33.166 --> 00:05:36.036 figured it out which was really a fail of my Google foo because 00:05:36.036 --> 00:05:39.806 it was not hard to find the second time around. But Andy 00:05:39.806 --> 00:05:45.312 Davis presented at black hat EU in 2012. We wrote a GUI python 00:05:45.312 --> 00:05:49.382 CEC puzzler using WX python which was great as far as the 00:05:49.382 --> 00:05:51.551 GUI standpoint. I would definitely not go through this 00:05:51.551 --> 00:05:55.622 effort. But it was somewhat simplistic, I have not exception 00:05:55.622 --> 00:05:58.091 monitoring and no crash data gathering. So it was kind of on 00:05:58.091 --> 00:06:04.798 you to watch what was going on. So what is a HDMI? As you know 00:06:04.798 --> 00:06:07.868 it stands for high definition multimedia interface. It's 00:06:07.868 --> 00:06:10.904 ultimately just an interface specification, which is 00:06:10.904 --> 00:06:14.341 implemented in the form of cables and connectors. The 00:06:14.341 --> 00:06:18.211 successor to DBI. It has quite a few features, some of which are 00:06:18.211 --> 00:06:24.217 potentially quite interesting to folks like us. What is CEC. That 00:06:26.720 --> 00:06:29.789 is consumer electronics control and it's one of the features 00:06:29.789 --> 00:06:33.426 defined by the HDMI speck. It's defined to simplify system 00:06:33.426 --> 00:06:36.263 integration with a common protocol that allows the user to 00:06:36.263 --> 00:06:40.267 command the control up to 15 devices. CEC is what allows the 00:06:40.267 --> 00:06:45.739 HDMI connected devices to turn on the TV, change the input and 00:06:45.739 --> 00:06:49.242 that kind of thing. If you have a fire TV stick or chrome pass, 00:06:49.242 --> 00:06:54.648 but not apple TV, no support for CEC on apple TV. Anyway, you 00:06:54.648 --> 00:06:57.550 turn it on and it automatically changes the input on your TV and 00:06:57.550 --> 00:07:01.755 that sort of thing, that is CEC. It's also been adopted into some 00:07:01.755 --> 00:07:06.493 other technologies that we'll talk about in a second. For 00:07:06.493 --> 00:07:08.928 instance, these don't necessarily look like HDMI 00:07:08.928 --> 00:07:12.465 devices because they're basically not. There is -- 00:07:12.465 --> 00:07:18.338 import. Let me do MHL first. MHL is an industry standard for 00:07:18.338 --> 00:07:21.574 mobile audio video interface that allows consumers to connect 00:07:21.574 --> 00:07:25.879 portable consumer device to high def TVs and audio receptors, et 00:07:25.879 --> 00:07:30.417 cetera. MHL is a consortium founded by Samsung and various 00:07:30.417 --> 00:07:34.988 others. Interestingly the MHL remote control protocol allows 00:07:34.988 --> 00:07:38.224 you to use your TV's remote control to operate the MHL 00:07:38.224 --> 00:07:44.864 device. So for instance, say you have a Samsung but not a G6 00:07:44.864 --> 00:07:49.269 because they got rid of it in the G6. In theory you can use 00:07:49.269 --> 00:07:52.472 the TV remote to control your device. I think this is more 00:07:52.472 --> 00:07:56.910 commonly used with the -- inside the car for automobile car 00:07:56.910 --> 00:08:00.814 stereos and stuff like that. Symport is a proprietary 00:08:00.814 --> 00:08:06.319 alternative to MHL which was made by Visa. And based on the 00:08:06.319 --> 00:08:11.257 VESA not VISA. It's based on the display port standard and 00:08:11.257 --> 00:08:15.862 integrated in the common micro USB ports as well. Both of these 00:08:15.862 --> 00:08:22.435 are connector agnostic which is kind of bizarre if you think 00:08:22.435 --> 00:08:25.038 about it. The standard is designed to permit port sharing 00:08:25.038 --> 00:08:27.841 with the most commonly used ports. Which is why they usually 00:08:27.841 --> 00:08:33.046 double as micro USB connectors or USB type C, that newfangled 00:08:33.046 --> 00:08:36.616 everyone is jumping on board recently. There is a ton that 00:08:36.616 --> 00:08:39.619 could be discussed here. So much so that I'm starting to think 00:08:39.619 --> 00:08:42.555 this could be its own research topic. But that's not where I 00:08:42.555 --> 00:08:48.995 started. So it's not where we're going. The early versions of the 00:08:48.995 --> 00:08:53.099 HDMI speck don't really interest us all that much. Pretty much 1 00:08:53.099 --> 00:08:56.636 through 1.2 is basic stuff that we don't really care about in 00:08:56.636 --> 00:09:00.774 this talk. The thing to remember here is that 1.2A is the lowest 00:09:00.774 --> 00:09:05.178 version with fully featured CEC. There are differences when you 00:09:05.178 --> 00:09:10.650 get to the upper versions from 1.2A as far as CEC goes as well 00:09:10.650 --> 00:09:17.557 as other parts of it. 1.2A is the lowest we want to look at 00:09:17.557 --> 00:09:21.194 for vulnerabilities or any interesting functionality. 00:09:21.194 --> 00:09:26.666 Versions 1.3 to 1.3C adds cool capabilities if you're an AV 00:09:26.666 --> 00:09:31.337 person. But not much of interest to us here. Version 1.4 is 00:09:31.337 --> 00:09:35.075 definitely the suite spot for our purposes as it's most widely 00:09:35.075 --> 00:09:40.213 deployed. If you have something at home it's very likely 1.4, it 00:09:40.213 --> 00:09:46.186 could be 1.3 unless you bought one 8 years ago. We're going to 00:09:46.186 --> 00:09:51.191 keep an eye, or at least I am on 2.0 since it implements new fuzz 00:09:51.191 --> 00:09:55.395 able features and CEC commands. I'm going to start testing that 00:09:55.395 --> 00:09:59.032 as soon as I find something that supports HDMI 2.0. I'm sure 00:09:59.032 --> 00:10:01.034 they're out there, I just honestly haven't looked very 00:10:01.034 --> 00:10:07.941 hard. One interesting thing to note about CEC in 2.0 is the 00:10:07.941 --> 00:10:11.211 extensions quote, provide expanded command and control of 00:10:11.211 --> 00:10:14.380 consumer electronics devices. And that's it. That all I know. 00:10:14.380 --> 00:10:19.385 I'm not an HDMI adopter personally, so I don't have 00:10:19.385 --> 00:10:22.422 access to the full speck. And I haven't been able to find it 00:10:22.422 --> 00:10:26.059 online. If you are able to find it online, let me know, that 00:10:26.059 --> 00:10:32.832 would be very interesting. So some interesting 1.4 features 00:10:32.832 --> 00:10:35.902 since I mentioned before it's kind of the suite spot. The 00:10:35.902 --> 00:10:39.305 audio return channel can be interesting. It allows audio to 00:10:39.305 --> 00:10:43.276 be returned to the sender. I'm not sure exactly what we could 00:10:43.276 --> 00:10:47.413 attack there. Could make for interesting command and control, 00:10:47.413 --> 00:10:50.650 maybe if you have a payload that is CEC capable you can have it 00:10:50.650 --> 00:10:55.421 sending stuff back over the arch. I don't know. However ATC 00:10:55.421 --> 00:10:59.392 is quite interesting. It's HDMI ethernet connection and supports 00:10:59.392 --> 00:11:02.395 up to 100 megabits per second. It's pretty much standard 00:11:02.395 --> 00:11:07.700 networking over HDMI. So in this picture you can see that's kind 00:11:07.700 --> 00:11:12.305 of what most people might have going on if they wanted their 00:11:12.305 --> 00:11:16.876 devices to have network connectivity. And in theory, I 00:11:16.876 --> 00:11:20.513 threw in the apple TV there again just for another whack at 00:11:20.513 --> 00:11:26.519 that. But essentially if you enable it in all of your devices 00:11:26.519 --> 00:11:29.522 that are capable of it, you can go with this configuration, 00:11:29.522 --> 00:11:32.458 which if you didn't have an apple TV could be completely 00:11:32.458 --> 00:11:34.928 dependent on the TV for network connectivity. The TV is 00:11:34.928 --> 00:11:38.665 connected to the network, regular network. And everything 00:11:38.665 --> 00:11:42.569 else is connected to the network as well over HDMI which may not 00:11:42.569 --> 00:11:45.338 be something you expected. You might think this thing is 00:11:45.338 --> 00:11:50.476 connected over an AV cable. So it's not network connected but 00:11:50.476 --> 00:11:56.482 it may actually be. A few details about CEC itself. In 00:12:00.019 --> 00:12:03.189 HDMI CEC is implemented as a one-wire bidirectional serial 00:12:03.189 --> 00:12:08.294 bus. Buy itself it's quite slow, 100 bits per second. It uses the 00:12:08.294 --> 00:12:11.097 AV link protocol which is another industry standard to 00:12:11.097 --> 00:12:13.233 perform remote control functions. You can essentially 00:12:13.233 --> 00:12:16.703 relay the remote control demands to other devices without having 00:12:16.703 --> 00:12:21.641 line of sight. It should be noted that in HDMI CEC wiring is 00:12:21.641 --> 00:12:24.143 mandatory however the functionality is optional. 00:12:28.348 --> 00:12:31.451 Notable implementations. The commercial brands use various 00:12:31.451 --> 00:12:35.421 trade names to market their CEC functionalities as you can see. 00:12:35.421 --> 00:12:39.726 What libraries they're using under the hood, I don't know. If 00:12:39.726 --> 00:12:46.966 any of you know, I would love to know. As for the open source 00:12:46.966 --> 00:12:51.871 implementations, we are LIB CEC from pulse 8. Which is a dual 00:12:51.871 --> 00:12:54.240 license. So it may be running under the hood on some of these 00:12:54.240 --> 00:12:59.379 devices. I haven't found any though, yet. It's also pretty 00:12:59.379 --> 00:13:03.816 FAT CEC plus plus code place and has multiple example clients 00:13:03.816 --> 00:13:07.453 which is handy from my perspective for developing a 00:13:07.453 --> 00:13:14.127 fuzzer. As you can imagine the Android implementation is mostly 00:13:14.127 --> 00:13:17.363 java which is somewhat less likely to be terribly 00:13:17.363 --> 00:13:21.501 interesting. Still could be but I kind of put it lower on the 00:13:21.501 --> 00:13:27.507 let's play with this list. So CEC addressing is pretty similar 00:13:29.776 --> 00:13:33.413 although at the same time a little bit bizarre compared to 00:13:33.413 --> 00:13:37.050 IP addressing. The physical address is similar to a regular 00:13:37.050 --> 00:13:41.854 IP address in its appearance like 1.1.1.1. However it's more 00:13:41.854 --> 00:13:45.658 akin to the hardware mac address as far as functionality goes. 00:13:48.161 --> 00:13:52.498 It's determined by which physical port on the TV or your 00:13:52.498 --> 00:13:58.204 AV receiver the device is connected to. The root display, 00:13:58.204 --> 00:14:04.677 AKA the TV is always 0.0.0.0. Did I say three or four zeros? 00:14:04.677 --> 00:14:08.347 You get the picture. In some implementations they won't 00:14:08.347 --> 00:14:14.353 initialize if you don't have something at 0.0.0.0. One of the 00:14:17.390 --> 00:14:20.626 major uses of the physical address is to allow for CEC 00:14:20.626 --> 00:14:23.996 switching so you can't have the concept of regular network 00:14:23.996 --> 00:14:29.736 switches except for CEC. That's essentially what forced them to 00:14:29.736 --> 00:14:34.140 have a physical address in addition to the logical address. 00:14:34.140 --> 00:14:38.644 The logical address is a four bit address negotiated on the 00:14:38.644 --> 00:14:44.217 HDMI network by the device. It's used in basically all CEC 00:14:44.217 --> 00:14:49.856 messaging as a source and destination. Non-CEC capable 00:14:49.856 --> 00:14:52.325 devices get a physical address but not a logical one because 00:14:52.325 --> 00:14:58.164 they don't even support CEC. There's kind of the mapping of 00:14:58.164 --> 00:15:01.667 general logical addresses. It's not that exciting of course. If 00:15:01.667 --> 00:15:05.271 you were interested in know why you plug in one HDMI device and 00:15:05.271 --> 00:15:11.144 you got, you know, address 4 instead of address 1, it's 00:15:11.144 --> 00:15:13.146 because it was a play back device and that's where they 00:15:13.146 --> 00:15:19.152 start. The CEC protocol is simple. Essentially what you're 00:15:24.490 --> 00:15:28.895 dealing with is blocks of ten bits. The first eight bits are 00:15:28.895 --> 00:15:33.032 the information, the trailing two bits are end of message bit 00:15:33.032 --> 00:15:37.937 and an act bit. The end of message bit should be set to 00:15:37.937 --> 00:15:40.840 one. If you don't have any data following that, but of course we 00:15:40.840 --> 00:15:43.609 play with that. Because who knows what the device will do 00:15:43.609 --> 00:15:49.615 when it's getting improperly formatted messages. Ladder 00:15:52.084 --> 00:15:55.655 block, the first 8 blocks are slid across the source and 00:15:55.655 --> 00:16:00.092 destination logical addresses. They're four bits each. Blacks 00:16:00.092 --> 00:16:06.098 have two controlling bits which I mentioned earlier. Data blocks 00:16:10.770 --> 00:16:15.374 are the same thing. Instead of divide into two four bit areas 00:16:15.374 --> 00:16:21.380 it's one 8-bit area. An on code block is a data block except the 00:16:24.183 --> 00:16:30.790 data that it has in it is a not code. Pretty difficult. Here is 00:16:30.790 --> 00:16:34.794 your second quiz -- just kidding. Here is some examples 00:16:34.794 --> 00:16:41.100 of a few messages. 0F by itself is a broadcast ping. 0 is the 00:16:41.100 --> 00:16:47.106 source and F is the destination. F is broadcast. For a second one 00:16:49.141 --> 00:16:53.179 we have 1 as the source, F is broadcast as the destination. 00:16:53.179 --> 00:16:56.616 The out cast is 82 which is essentially I want to be active 00:16:56.616 --> 00:17:01.287 source. Active sourcing meaning input to the TV. And the last 00:17:01.287 --> 00:17:05.625 thing is the -- two data blocks of the parameter that represents 00:17:05.625 --> 00:17:07.793 the physical address of the thing that is going to become 00:17:07.793 --> 00:17:14.567 the active source. The third example, one is the source, 0 is 00:17:14.567 --> 00:17:19.538 the destination which is the TV. We have an out code of 64 and we 00:17:19.538 --> 00:17:23.142 have data. We have the source, the destination, the out code 00:17:23.142 --> 00:17:27.713 which is set OS D string which is onset display. I use that one 00:17:27.713 --> 00:17:30.349 as an example because it's string based. If we're going to 00:17:30.349 --> 00:17:35.021 try to attack it, it's kind of a fun one. And we have message 00:17:35.021 --> 00:17:39.992 parameters and the first is 44 which is essentially bit flags 00:17:39.992 --> 00:17:44.196 for how to display whatever you want to display and the rest is 00:17:44.196 --> 00:17:51.237 an ASCII string. Generally speaking, source, destination, 00:17:51.237 --> 00:17:54.774 op code, data. Source, destination, op code, data. The 00:17:54.774 --> 00:17:58.077 ping is essentially a message where the header's end of 00:17:58.077 --> 00:18:05.518 message is set to one and therefore there is no data 00:18:05.518 --> 00:18:07.954 blocks it used to pull for devices. You saw the example 00:18:07.954 --> 00:18:12.558 before of 0F. It's also used for logical address allocation. 00:18:12.558 --> 00:18:16.662 Essentially what you do, I want to be one, anyone one. You don't 00:18:16.662 --> 00:18:21.901 get a response? You're one. It's a lot like IP addressing. I'm 00:18:21.901 --> 00:18:27.640 hoping this isn't a bad thing. Do I keep talking or ...? >> 00:18:27.640 --> 00:18:32.378 Yes. >> All right. Just a second. I didn't want to be 00:18:32.378 --> 00:18:38.384 rude. >> Is he doing a good job? >> Yes, ...(applause)... >> I 00:18:42.088 --> 00:18:47.093 could take a bigger shot. That means I get a bigger shot, 00:18:47.093 --> 00:18:49.095 right. Because they said yes. >> Yes. >> Excellent. Extra 00:18:49.095 --> 00:18:54.867 information while they're preparing that, the CEC 00:18:54.867 --> 00:18:58.204 protocol. It's basically a big ending all the time. Most 00:18:58.204 --> 00:19:01.574 significant bit first, the text is only printable ASCII which I 00:19:01.574 --> 00:19:06.612 find interesting since obviously a lot of consumers are not in 00:19:06.612 --> 00:19:14.420 ASCII language territory. >> Keep going. Keep going until we 00:19:14.420 --> 00:19:20.426 tell you ... >> All right. Sorry. Messages? >> Stop. >> 00:19:24.964 --> 00:19:29.035 Well played, sir, well played. >> Well, what the hell. Anyway, 00:19:29.035 --> 00:19:34.974 you all know the drill. We have a new speaker. It is very hard 00:19:34.974 --> 00:19:37.910 to get accepted at DEFCON so I think we owe him another round 00:19:37.910 --> 00:19:43.916 of applause. ..(applause)... to DEFCON. >> To DEFCON. >> Do not 00:19:51.524 --> 00:19:55.928 introduce Jeff with tesla. How about the tesla talk, yesterday? 00:19:55.928 --> 00:20:01.534 Did you guys go to that? That was awesome. All right. He'll 00:20:01.534 --> 00:20:09.542 just keep your car secure. But you know ... >> Get the last 00:20:09.542 --> 00:20:15.548 little bit out of there. Where was it? No, I'm kidding. I 00:20:20.186 --> 00:20:23.923 mentioned before ... Messages can be directly dressed, 00:20:23.923 --> 00:20:28.394 broadcast or either. Devices should ignore a message coming 00:20:28.394 --> 00:20:31.197 from address 15 unless the message evokes a broadcast 00:20:31.197 --> 00:20:34.600 response. The messages have been sent by a CEC switch or the 00:20:34.600 --> 00:20:40.606 message is standby which is basically power off. Wrong way. 00:20:46.145 --> 00:20:48.681 The CEC protocol has transmission flow control. There 00:20:48.681 --> 00:20:54.120 are three mechanisms for that, for reliable frame transfer. 00:20:54.120 --> 00:20:58.190 Frame transmissions, up to five. Flow control frame validation 00:20:58.190 --> 00:21:00.893 which is essentially ignore messages with the wrong number 00:21:00.893 --> 00:21:04.597 of argument. That is going to be implementation specific at least 00:21:04.597 --> 00:21:08.667 that is my hope. Messages assume correctly received when it's 00:21:08.667 --> 00:21:11.504 been transmitted and acknowledged. And messages to 00:21:11.504 --> 00:21:15.207 have been acted upon when the center does not receive a future 00:21:15.207 --> 00:21:17.409 abort within one second although that's typically 100 00:21:17.409 --> 00:21:23.783 milliseconds. This could be used for fuzzing, obviously. So 00:21:23.783 --> 00:21:26.986 moving onto attack vectors and thoughts about things we might 00:21:26.986 --> 00:21:33.225 be able to play with. HDMI network exploitation by CEC is 00:21:33.225 --> 00:21:40.799 kind of my holy grail. In addition since we have the ATC 00:21:40.799 --> 00:21:45.738 concept where we can set up networking over a not expected 00:21:45.738 --> 00:21:50.242 medium, I think it could lead to interesting scenarios where you 00:21:50.242 --> 00:21:55.781 have, you set up a network connectivity and you can attack 00:21:55.781 --> 00:22:00.586 it further if it has a server listening code or you can use it 00:22:00.586 --> 00:22:03.856 for faster command and control or whatever else. Obviously 100 00:22:03.856 --> 00:22:05.858 megabits per second is slightly greater than 500 bits per 00:22:05.858 --> 00:22:10.296 second. This can be a great place to hide on a network. Who 00:22:10.296 --> 00:22:16.101 is going to look on your blue ray player. Generally I would 00:22:16.101 --> 00:22:20.105 say yes, the blue ray player is at home but what about at work 00:22:20.105 --> 00:22:23.042 or enterprise, well think about most enterprises they're going 00:22:23.042 --> 00:22:27.213 to have something that is CEC capable. It may just be the 00:22:27.213 --> 00:22:34.386 teleconferencing system or any number of things. Not saying 00:22:34.386 --> 00:22:40.125 it's your No. 1 target but could be interesting. There is also a 00:22:40.125 --> 00:22:43.829 range of target able devices that I alluded to before. TVs, 00:22:43.829 --> 00:22:48.033 blue ray players, receivers, TV sticks, chrome cast, Amazon, et 00:22:48.033 --> 00:22:54.640 cetera. Some game consoles. Of course the more interesting area 00:22:54.640 --> 00:22:56.809 that most people are going to want to know about are mobile 00:22:56.809 --> 00:23:00.913 phones and tablets and devices that implement MHL or slim port 00:23:00.913 --> 00:23:06.919 are almost always CEC capable, they're supposed to be. So what 00:23:10.022 --> 00:23:14.727 are the actual attack surface? Well, somewhat debatable but I 00:23:14.727 --> 00:23:18.297 think these are the four most interesting. CEC commands, CEC 00:23:18.297 --> 00:23:23.068 vendor specific commands, who knows who wrote that and how and 00:23:23.068 --> 00:23:25.104 everything elevators. The problem you have to discover 00:23:25.104 --> 00:23:29.074 those unless you find some kind of documentation. HTC commands 00:23:29.074 --> 00:23:35.080 to set up and turn on. And the HTC functionality itself. So as 00:23:37.850 --> 00:23:42.454 far as finding vulnerabilities, we have various approaches and 00:23:42.454 --> 00:23:46.258 some of which I'm better at than others. First I want to identify 00:23:46.258 --> 00:23:50.763 at risk messages and fuzz them. We can do source code analysis. 00:23:50.763 --> 00:23:54.900 It can be hard to come by except for CEC and the Android 00:23:54.900 --> 00:24:00.372 implementation. We do reverse engineering, it can be hard to 00:24:00.372 --> 00:24:04.576 get firmware so it depends on your situation whether or not 00:24:04.576 --> 00:24:08.781 they offer firmware downloads, et cetera. Or if you have 00:24:08.781 --> 00:24:12.251 another way of getting on a device and you can possibly just 00:24:12.251 --> 00:24:18.691 rip the code that way and look at it. In general you're going 00:24:18.691 --> 00:24:21.827 to want to expect different architectures, you're not going 00:24:21.827 --> 00:24:27.533 to see as far as I know any XED6 unless someone actually create 00:24:27.533 --> 00:24:32.871 as computer that has HDMI CEC support. Because a lot of them 00:24:32.871 --> 00:24:36.308 have HDMI but not actually CEC. I think that is coming up 00:24:36.308 --> 00:24:42.314 actually. Popularity of MIMs is probably bit 32. I would agree. 00:24:45.384 --> 00:24:50.556 There is definitely a bit of arm as well. There is something 00:24:50.556 --> 00:24:53.826 called arch which you may or may not have heard of. I have a 00:24:53.826 --> 00:24:58.797 Denon AV receiver and it has an arch processor. MIHs is what 00:24:58.797 --> 00:25:02.801 I've run into the most so far. What are some of the interesting 00:25:02.801 --> 00:25:07.039 messages. Pretty much the string operations. That's a good place 00:25:07.039 --> 00:25:12.578 to start. We have OSD name, OSD is on screen display. Set OS D 00:25:12.578 --> 00:25:17.383 string which is similar. Set time or program title. And of 00:25:17.383 --> 00:25:20.319 course vendor specific messages which you have to discover on 00:25:20.319 --> 00:25:27.092 your own. We need to answer some questions if we're going to 00:25:27.092 --> 00:25:29.328 fuzz. And one of those questions is how can we send arbitrary CEC 00:25:29.328 --> 00:25:31.330 commands and the second is how can we attack if a crash 00:25:31.330 --> 00:25:38.103 occurred and both of those are a little -- can be a little wonky. 00:25:38.103 --> 00:25:43.242 As far as sending messages goes, you're probably going to need 00:25:43.242 --> 00:25:49.381 some sort of hardware as I did say earlier. No lap or desktops 00:25:49.381 --> 00:25:53.819 have HDMI CEC support. If they have HDMI, there is just no CEC 00:25:53.819 --> 00:25:58.257 functionality there. There are a few adapters you can buy. The 00:25:58.257 --> 00:26:04.196 pulse 8USB HDMI converter or adapter is pictured there. There 00:26:07.199 --> 00:26:11.003 is also the range shadow which I for some reason, makes me 00:26:11.003 --> 00:26:14.940 giggle, the name of the company. The range shadow HDMI CEC 00:26:14.940 --> 00:26:21.013 bridge. The big difference here is the pulsate USB HDMI adapter 00:26:21.013 --> 00:26:25.217 actually has the pass throw. You can still look at video 00:26:25.217 --> 00:26:29.688 displayed through that adapter whereas the serial bridge, it 00:26:29.688 --> 00:26:34.226 just sends CEC commands over serial and that's it. One of the 00:26:34.226 --> 00:26:37.796 more interesting things that does support CEC is the 00:26:37.796 --> 00:26:42.768 raspberry pie. Uses LIB CEC and you can compile it which is a 00:26:42.768 --> 00:26:45.838 slight adventure but once you get it running, now you have a 00:26:45.838 --> 00:26:48.574 very portable device you can use for fuzzing as well as 00:26:48.574 --> 00:26:55.147 monitoring your fuzz. It can be hard to watch your fuzz and 00:26:55.147 --> 00:27:01.086 stuff that is going out on the wire while you're sending it. As 00:27:05.591 --> 00:27:09.795 far as the software side of sending messages, the pulse A 00:27:09.795 --> 00:27:14.366 driver is open source as I mentioned. That's dual licensed. 00:27:14.366 --> 00:27:19.938 Pretty recently they started shipping swig based bindings for 00:27:19.938 --> 00:27:27.246 python. And thank you to JAZEL over there who knows far more 00:27:27.246 --> 00:27:30.282 about swig than I do. I was originally trying to create my 00:27:30.282 --> 00:27:34.486 own swig bindings. I was going to use ruby because I'm more 00:27:34.486 --> 00:27:39.224 proficient in ruby. Turns out I didn't realize until I saw their 00:27:39.224 --> 00:27:42.294 versions of the swig bindings that is -- I was never probably 00:27:42.294 --> 00:27:45.297 going to pull that off. There are all sort of call backs and 00:27:45.297 --> 00:27:47.933 disgustingness that goes on there. Even after seeing the 00:27:47.933 --> 00:27:51.803 python version of the swig bindings, I could not convert 00:27:51.803 --> 00:27:58.510 them to ruby without -- I would have to miss DEFCON kind of 00:27:58.510 --> 00:28:02.581 thing. LIB CEC supports a number of small number of devices but 00:28:02.581 --> 00:28:05.284 more than one. Of course those being generally the raspberry 00:28:05.284 --> 00:28:10.422 pie as well as the adapter they make as well as XNO stuff and 00:28:10.422 --> 00:28:16.461 others that are less interesting. The question is can 00:28:16.461 --> 00:28:21.233 we send arbitrary CEC messages with the raspberry pie or the 00:28:21.233 --> 00:28:27.239 CEC? It turns out you can. Although I'm kind of embarrassed 00:28:29.575 --> 00:28:32.044 to tell you how long it took me to go through the code base to 00:28:32.044 --> 00:28:34.046 figure out whether or not it was actually going to try to 00:28:34.046 --> 00:28:36.748 validate my CEC messages but let's say for instance we wanted 00:28:36.748 --> 00:28:42.754 to send a couple extra, four ones. Can we do that? Yes. Onto 00:28:52.598 --> 00:28:56.068 the fuzzing process. It has been done before, specifically 00:28:56.068 --> 00:28:59.571 fuzzing CEC. Davis as I mentioned before with python and 00:28:59.571 --> 00:29:04.042 the rainbow tech serial API and serial bridge. I didn't know 00:29:04.042 --> 00:29:08.714 that until late in the research. And the rainbow tech device is 00:29:08.714 --> 00:29:11.149 nice because it has a very simple serial API. Looking at 00:29:11.149 --> 00:29:15.721 the code it's like bang X, send message, awesome. LIB CEC 00:29:15.721 --> 00:29:21.727 totally different story. Much larger API. The rainbow tech and 00:29:23.962 --> 00:29:27.766 associated fuzzer from Davis don't have a lot of complex 00:29:27.766 --> 00:29:34.239 functionality, however, they do the basic job. I already started 00:29:34.239 --> 00:29:37.075 doing the LIB CEC thing so I just stuck with it. Only I 00:29:37.075 --> 00:29:41.079 didn't want to regurgitate what has already been done. I went 00:29:41.079 --> 00:29:44.116 with the LIB CEC plus python since they ship that PIE CEC 00:29:44.116 --> 00:29:47.319 client. Granted it's pretty minimal. So you're going to 00:29:47.319 --> 00:29:50.922 write all kinds of your own code. You can also use the 00:29:50.922 --> 00:29:56.528 raspberry pie for that which I do have. And did use a little. 00:29:56.528 --> 00:30:03.201 Maybe some day I'll port it to ruby. Generally speaking the 00:30:03.201 --> 00:30:06.271 fuzzing process, the major steps are ID the targets and inputs 00:30:06.271 --> 00:30:10.676 which is already a given. Generate fuzz data, execute fuzz 00:30:10.676 --> 00:30:16.148 data. Monitor for exceptions and determine exploitability. For 00:30:16.148 --> 00:30:19.317 generating fuzz data, it started with the long strings and 00:30:19.317 --> 00:30:22.354 string. Based messages, threw in some format string, some 00:30:22.354 --> 00:30:26.425 parameter views, a message is not expected to have any 00:30:26.425 --> 00:30:30.295 parameter, I'll give it six or messages expecting to have four, 00:30:30.295 --> 00:30:35.267 I'll give it two. That kind of thing. Simple bit flipping and I 00:30:35.267 --> 00:30:40.138 adopted some of what Davis had previously done. As far as 00:30:40.138 --> 00:30:44.743 executing fuzz data, essentially all I did was pull a device, 00:30:44.743 --> 00:30:50.549 send a message and pull it again. In the straight black box 00:30:50.549 --> 00:30:53.085 scenario, I don't know anything about the device, I don't have a 00:30:53.085 --> 00:30:56.088 shell or a debugger or anything else, it's just about what I 00:30:56.088 --> 00:31:02.794 could do. Then onto monitoring for exceptions. Check for the 00:31:02.794 --> 00:31:07.499 act. I can pull it again. If I have a debugger or the 00:31:07.499 --> 00:31:10.902 capability of debugging, I obviously use that. If I have a 00:31:10.902 --> 00:31:14.406 shell but maybe not a debugger, I can check if the service or 00:31:14.406 --> 00:31:18.443 app is still running. If it's a TV that you're fuzzing you'll 00:31:18.443 --> 00:31:20.946 probably notice it crash and we'll see an example of that 00:31:20.946 --> 00:31:25.751 later. Which is fun, it's kind of hard to automate unless 00:31:25.751 --> 00:31:28.053 you're like Charlie miller and you have 50 million interns 00:31:28.053 --> 00:31:33.191 working for you or whatever. If there is an exception, obviously 00:31:33.191 --> 00:31:35.594 we want to record hopefully the message that you believe sent 00:31:35.594 --> 00:31:41.833 it, the state and the debug details if you have any. If you 00:31:41.833 --> 00:31:45.203 have a shell but not a debugger then you're kind of in a 00:31:45.203 --> 00:31:48.073 situation where you can at least monitor the process. In the case 00:31:48.073 --> 00:31:52.010 of the Samsung blue ray player that I played with, thank you to 00:31:52.010 --> 00:31:55.480 [indiscernible] over there since he had a root shell on it, so 00:31:55.480 --> 00:31:58.784 that was kind of an ideal target. I could get on the 00:31:58.784 --> 00:32:02.788 shell. In that particular instance the blue ray player has 00:32:02.788 --> 00:32:05.891 bash but not the watch command so it was a little loop. Not 00:32:05.891 --> 00:32:10.996 exactly rocket science. Something you also want to do if 00:32:10.996 --> 00:32:13.999 you're in that situation is monitor the TTY output. If you 00:32:13.999 --> 00:32:18.436 have it which is in our case that is how Ricky discovered you 00:32:18.436 --> 00:32:24.943 could get on the device. So in this case you can see around the 00:32:24.943 --> 00:32:29.548 middle, I haven't been able to recause this and know if it's 00:32:29.548 --> 00:32:32.250 purely related or not. But you can see how there's a couple 00:32:32.250 --> 00:32:36.388 fatal messages about starting the background widget manager. 00:32:36.388 --> 00:32:38.857 This was a while after starting the device. So I don't know why 00:32:38.857 --> 00:32:42.027 the background widget manager would be starting randomly ten 00:32:42.027 --> 00:32:45.063 minutes after I booted the thing but I don't know for sure. The 00:32:45.063 --> 00:32:50.235 implication could be that it crashed and restarted but 00:32:50.235 --> 00:32:53.905 obviously that is a stretch. So we need to determine 00:32:53.905 --> 00:32:57.609 exploitability, right. That is an adventure unless you have a 00:32:57.609 --> 00:33:02.080 debugger. It's purely black box. So you do your best. It's very 00:33:02.080 --> 00:33:09.888 specific to each device that you're messing with. 00:33:09.888 --> 00:33:11.957 Complications for fuzzing which I probably already covered. 00:33:11.957 --> 00:33:16.761 Getting ahold of the devices since obviously if you want to 00:33:16.761 --> 00:33:19.364 get one of every blue ray player, I hope you have some 00:33:19.364 --> 00:33:24.836 money. At least they're not 400 bucks like they used to be. But 00:33:24.836 --> 00:33:27.839 they are around you, sometimes it's hard to realize that 00:33:27.839 --> 00:33:31.109 something is CEC capable until you play with it. For instance 00:33:31.109 --> 00:33:34.379 the HP chrome book 11, actually has CEC and I had gotten one for 00:33:34.379 --> 00:33:39.084 my son and boom, I played with that. Although it's flaky and 00:33:39.084 --> 00:33:45.090 not when I'm fuzzing it. You can also emulate using QEMU and some 00:33:48.159 --> 00:33:52.964 firmware. Something I'd like to look into. Speed is, it's so 00:33:52.964 --> 00:33:57.569 slow, if you're going to fuzz multiple devices you want do 00:33:57.569 --> 00:34:02.374 that in parallel. The one thing you can do is reverse engineer 00:34:02.374 --> 00:34:04.776 the targets as best you can in the beginning in order to focus 00:34:04.776 --> 00:34:08.513 your fuzz. Some other complications, again, debugger, 00:34:08.513 --> 00:34:11.850 you need access to the device. There is probably no debugger on 00:34:11.850 --> 00:34:17.856 it anyways in complaining for it is probably a PITA. You might be 00:34:20.358 --> 00:34:23.328 able to pull it off. You might not. Keep an eye out though for 00:34:23.328 --> 00:34:26.932 GDBC server files because you may be able to use GDB server 00:34:26.932 --> 00:34:30.201 files to debug it when will is no debugger there locally. 00:34:30.201 --> 00:34:33.204 Obviously collecting data can be an adventure depending on how 00:34:33.204 --> 00:34:36.207 much access you have. As well as the implications and 00:34:36.207 --> 00:34:39.544 reproduction. And for me reproduction was a total 00:34:39.544 --> 00:34:47.319 adventure. That's one area I need to improve the fuzzer. Some 00:34:47.319 --> 00:34:51.122 targets we need to talk about. At least that I have access to. 00:34:51.122 --> 00:34:53.959 Again the Samsung blue ray player which is MIPs based, 00:34:53.959 --> 00:34:57.128 thanks Ricky. As well as John Anderson, I don't think he is 00:34:57.128 --> 00:35:03.635 here. He is one heck of a solderer, let me tell you. So 00:35:03.635 --> 00:35:06.838 that was great because we had a local -- to get on the device 00:35:06.838 --> 00:35:08.940 and rip the file system that kind of thing. I also had access 00:35:08.940 --> 00:35:12.243 to a Phillips blue ray player, Samsung TV, Panasonic TV which 00:35:12.243 --> 00:35:16.648 we'll see a video of. Chrome cast, Amazon fire TV stick. 00:35:16.648 --> 00:35:22.120 Kindle fire, galaxy S5 and S4 I believe actually. Galaxy note 00:35:22.120 --> 00:35:26.858 and that one particular HP chrome book 11. So I think 00:35:26.858 --> 00:35:31.563 obviously the more interesting part is what results did you 00:35:31.563 --> 00:35:37.402 have? I had some. I didn't have a ton. You're not going to see a 00:35:37.402 --> 00:35:43.408 full CEC purely -- CEC purely exploit. Sorry. The two device 00:35:49.080 --> 00:35:53.084 I'm going to talk about as far as being interesting are the 00:35:53.084 --> 00:35:55.286 Panasonic TV and the Samsung blue ray player. I'm 00:35:55.286 --> 00:35:58.556 intentionally not giving model numbers because I haven't root 00:35:58.556 --> 00:36:02.394 caused and reported some of this stuff if it's even reportable. 00:36:02.394 --> 00:36:05.363 Although I highly doubt they're going to respond to anything. 00:36:05.363 --> 00:36:08.900 Having worked at the TDI, vendors like that just don't -- 00:36:08.900 --> 00:36:12.704 almost never respond to that kind of, they don't know, that 00:36:12.704 --> 00:36:14.906 department doesn't usually know what a vulnerability is. It's 00:36:14.906 --> 00:36:18.810 frightening. So I don't know if you can read it, the fuzzy. 00:36:18.810 --> 00:36:24.816 Suddenly this is the Panasonic television, it suddenly just 00:36:27.652 --> 00:36:31.990 said, hey, I'm trying to upgrade from the SD card. Put in an SD 00:36:31.990 --> 00:36:38.329 card. I'm like, what? That was kind of a -- that could be 00:36:38.329 --> 00:36:42.033 expected functionality. I did find some that are specific 00:36:42.033 --> 00:36:46.404 commands. I don't know what they do yet for Panasonic. But that 00:36:46.404 --> 00:36:51.309 seems bizarre. Why do you want someone on the HDMI CEC network 00:36:51.309 --> 00:36:55.280 be capable of triggering an upgrade? You're going to have an 00:36:55.280 --> 00:37:01.219 SD card anyway, you're local. I don't know. It just seems weird. 00:37:04.556 --> 00:37:08.059 So here is a video, the Panasonic television as well. 00:37:08.059 --> 00:37:15.834 And you can't really tell, it's going to shut off. It's on 00:37:15.834 --> 00:37:23.675 obviously. Starts the de-fuzzer for me and really quickly it 00:37:23.675 --> 00:37:29.280 turns off. So I'm pressing the power button trying to turn it 00:37:29.280 --> 00:37:34.018 back on and obviously squat is happening. Maybe it's not 00:37:34.018 --> 00:37:37.956 obvious but I can tell you. Don't pull the serial number off 00:37:37.956 --> 00:37:43.962 there. Unplugging it. I reprod this a number of times so if I 00:37:46.197 --> 00:37:53.772 wait 6 or 7 seconds, it will be all right. The first time I did 00:37:53.772 --> 00:37:57.242 this it was works TV and I thought I totally bricked it. I 00:37:57.242 --> 00:38:00.779 was somewhat excited and totally scared at the same time. I'm 00:38:00.779 --> 00:38:06.684 pressing power. Nothing is happening. Super exciting video, 00:38:06.684 --> 00:38:12.423 I know. Had to cut the audio out because I dropped the F bomb in 00:38:12.423 --> 00:38:19.230 the middle of it. So employed again and I'm not going to make 00:38:19.230 --> 00:38:23.668 you wait through that. But it does not start the second time 00:38:23.668 --> 00:38:26.971 either. I wait ten seconds, I don't know and still doesn't 00:38:26.971 --> 00:38:32.277 start. That's not where I wanted to go. You get to this screen 00:38:32.277 --> 00:38:40.218 where it's functional again. Ton the Samsung blue ray player. 00:38:40.218 --> 00:38:44.756 Because we got a local shell on it we were able to rip the 00:38:44.756 --> 00:38:48.293 binaries and whatnot. There is a binary called app player which 00:38:48.293 --> 00:38:53.798 handles the CEC functionality. I did manual RE and rudimentary 00:38:53.798 --> 00:38:59.270 analysis with ghetto, I had a python that JAZEL PMed me with a 00:38:59.270 --> 00:39:06.177 bit. I said let's look for band functions. It's brutal how many 00:39:06.177 --> 00:39:09.948 times you'll see code and I see Fritz smiling, how many times 00:39:09.948 --> 00:39:12.650 you see people that they wrote the code 20 years ago and every 00:39:12.650 --> 00:39:17.121 function they use is banned now. Has it been updated? Of course 00:39:17.121 --> 00:39:21.226 not. I did this quick, let's look at the band functions and 00:39:21.226 --> 00:39:28.132 see how often we're going to see these things. So here is just a 00:39:28.132 --> 00:39:34.639 couple of those. Store copy shows up 333 times. These are 00:39:34.639 --> 00:39:40.345 all jump and link register and MIHs call. These are just what I 00:39:40.345 --> 00:39:46.351 call jailers. Just jailers. 409. 310. Print out which is not 00:39:49.988 --> 00:39:54.125 always exploit able to say the least. But the variants of print 00:39:54.125 --> 00:40:01.399 out, 11,685 calls. So I'm doing that, right. Then I started to 00:40:01.399 --> 00:40:05.236 cross reference them with at least symbolically debugger 00:40:05.236 --> 00:40:09.374 symbolically CEC name space and it got way less interesting 00:40:09.374 --> 00:40:13.011 really quick. Which was very disappointing but I did find 00:40:13.011 --> 00:40:15.880 there are three MEN copies two of which I'd already found just 00:40:15.880 --> 00:40:18.716 by doing reverse engineering and looking at the receive. And 00:40:18.716 --> 00:40:22.887 looking at receive functions and anything that had RECV in it. 00:40:22.887 --> 00:40:27.892 And I found the two copies. Which as far as I can tell, I 00:40:27.892 --> 00:40:31.062 can't confirm they're not exploit able. Because I can't 00:40:31.062 --> 00:40:36.067 tell anywhere that the size of the copy is limited. But it may 00:40:36.067 --> 00:40:39.704 just -- at some point you reach the OS L, the operating system 00:40:39.704 --> 00:40:47.378 abstraction layer and you, it gets ugly at that point. I don't 00:40:47.378 --> 00:40:51.616 have the debugger at this point and I can't look at stuff and 00:40:51.616 --> 00:40:57.188 see what sizes would be impassed in. So the third man copy was 00:40:57.188 --> 00:41:01.659 not exploit able. There are 73 print outs and none of them call 00:41:01.659 --> 00:41:08.700 the system or anything else. So you can see or maybe you can't 00:41:08.700 --> 00:41:11.336 see in the lower right hand corner is where the MEN copies 00:41:11.336 --> 00:41:17.342 are located. Not exciting overly. But ... So if we can 00:41:22.080 --> 00:41:27.251 pull off a exploit what can we do? You can enable ATC, I beat 00:41:27.251 --> 00:41:30.955 that down. I'm not going to go over that again. We enable the 00:41:30.955 --> 00:41:34.492 LAN, we can attack land services possibly and enable higher speed 00:41:34.492 --> 00:41:40.298 ex-filtration. Possibly control an NHL device which are getting 00:41:40.298 --> 00:41:44.035 pretty popular. Maybe use it as a beach head for attacking 00:41:44.035 --> 00:41:46.904 others devices and of course you can hide there like nobody's 00:41:46.904 --> 00:41:52.477 business. I don't know of anyone who has ever thought about, hey, 00:41:52.477 --> 00:41:58.483 maybe they're persisting on this TV or blue ray player. So this 00:42:01.519 --> 00:42:05.022 is some of the things that I'd like to do moving forward. I'd 00:42:05.022 --> 00:42:09.394 like to unuglyfy my python because it is pretty awful. 00:42:09.394 --> 00:42:14.465 Before I put that out on ZDIs GitHub page, it's embarrassing 00:42:14.465 --> 00:42:19.137 at the moment. I'm more of a ruby person. Would like to 00:42:19.137 --> 00:42:21.272 integrate it into a bigger better fuzz framework that has 00:42:21.272 --> 00:42:25.209 more capability and more management and interface et 00:42:25.209 --> 00:42:28.780 cetera. Now it's purely command line. Ultimately I would like to 00:42:28.780 --> 00:42:33.484 exploit CEC and at first I would like to bind a shell to the 00:42:33.484 --> 00:42:36.254 network interface and then moving forward I would like to 00:42:36.254 --> 00:42:41.259 enable ATC and bind the shell to that interface. And ideally be 00:42:41.259 --> 00:42:45.463 able to exploit CEC and bind the shell straight up on CEC so 00:42:45.463 --> 00:42:51.369 there is no communication over the regular network. Also going 00:42:51.369 --> 00:42:54.205 to be exploring the attack surface of 3D and audio return 00:42:54.205 --> 00:42:58.910 channel and more with ADC. Especially because 2.0 has quite 00:42:58.910 --> 00:43:06.284 a few future adds to the CEC capabilities. And of course more 00:43:06.284 --> 00:43:11.889 devices. Luckily working at TDI allows us access to a lot of 00:43:11.889 --> 00:43:16.727 mobile devices and all sorts of whatnot. So that helps. But it's 00:43:16.727 --> 00:43:20.264 still only a few things and only a few things are CEC capable. So 00:43:20.264 --> 00:43:25.169 I'd love some additional help. And emulation would be great 00:43:25.169 --> 00:43:29.173 because I don't have to have direct access to some of those 00:43:29.173 --> 00:43:33.511 devices. In conclusion, this stuff is becoming more and more 00:43:33.511 --> 00:43:37.682 pervasive and invasive. Some of the old [indiscernible] types 00:43:37.682 --> 00:43:41.085 may be new again. I do think at least in Samsung's case they're 00:43:41.085 --> 00:43:43.354 benefiting from the fact that the code is just straight up 00:43:43.354 --> 00:43:48.025 newer. It was written probably I don't know, four or five years 00:43:48.025 --> 00:43:50.962 ago as opposed to 20 years ago. Hopefully some newer developers 00:43:50.962 --> 00:43:57.034 have walked in and realized, hey, let's not call sir copy all 00:43:57.034 --> 00:44:00.972 the time. Et cetera. For most of these devices it's hard to 00:44:00.972 --> 00:44:06.410 upgrade them, sometimes impossible. But in general let's 00:44:06.410 --> 00:44:10.882 face it, the risk in this situation, you're vulnerability 00:44:10.882 --> 00:44:14.519 times your exposure and times your impact, is not super-high. 00:44:14.519 --> 00:44:21.125 I'm not going to try to float that to you. But the exposure is 00:44:21.125 --> 00:44:24.495 definitely growing. Those devices are becoming, getting 00:44:24.495 --> 00:44:27.231 everywhere. The impact is probably highest for your 00:44:27.231 --> 00:44:29.901 privacy because we're talking about stuff that can film you 00:44:29.901 --> 00:44:35.907 and all that stuff. Here is some links if you want to know more. 00:44:37.942 --> 00:44:41.846 The code is not up on ZDI's GitHub yet. As I said, it's a 00:44:41.846 --> 00:44:47.852 little awful right now. HDMI.org is the HDMI consortium or 00:44:50.154 --> 00:44:53.824 whatever. They have useful information. If you're 00:44:53.824 --> 00:44:56.294 interested in what a did the presentation in it's called 00:44:56.294 --> 00:45:01.465 reveal dot J OS. And the website that's pretty useful when you're 00:45:01.465 --> 00:45:04.835 first figuring stuff out is called first CEComatic. That's 00:45:04.835 --> 00:45:07.505 kind of a web app that allows you to pick, I want the source 00:45:07.505 --> 00:45:12.076 to be 4. And I want the destination to be broadcast. 00:45:12.076 --> 00:45:14.779 What does that message look like and it will figure it out for 00:45:14.779 --> 00:45:17.048 you. It does the reverse where you can type stuff in and see 00:45:17.048 --> 00:45:23.054 what it is. That's all I have. ...(applause)... any questions? 00:45:31.195 --> 00:45:37.201 Sure? >> (question is off mic). >> As far as I know no, the CEC 00:45:49.947 --> 00:45:55.953 protocol has no concept of security at all. Yeah. They 00:45:58.689 --> 00:46:03.294 definitely keep some information private for HDMI adopters only. 00:46:03.294 --> 00:46:07.665 I don't think there is any consideration at all. At least 00:46:07.665 --> 00:46:14.372 not from our type of security perspective. Sure. Any other 00:46:14.372 --> 00:46:20.378 questions? >> (question is off mic). >> Local J tag out to USB 00:46:23.047 --> 00:46:25.082 converter. I thought about showing it. But interrupt the 00:46:25.082 --> 00:46:31.589 boot process, give it your own boot command. Establishes Telnet 00:46:31.589 --> 00:46:37.595 on the interface and then with a known root password. Any others? 00:46:40.231 --> 00:46:46.237 >> (off mic). >> Can you say that again a little louder? 00:46:55.312 --> 00:46:57.782 Other than like the protocol management part where you 00:46:57.782 --> 00:47:00.785 obviously can't stomp on other people when they're talking, 00:47:00.785 --> 00:47:06.791 there is no other limitation. Sir? Squat so far. It's flaky 00:47:17.768 --> 00:47:21.205 enough, like sometimes I connected up and the video would 00:47:21.205 --> 00:47:25.009 come up for two seconds and go down on its own. It's a bit of 00:47:25.009 --> 00:47:34.952 an adventure. Thanks very much. Oops. Oh I have DBI coin slash 00:47:34.952 --> 00:47:45.696 bottle opener. I love you guys. (off mic). Come on up if you 00:47:45.696 --> 00:47:47.698 want one. Thank you very much. ...(applause)...