1 00:00:00,167 --> 00:00:06,083 >>This is Jose Molina and he'll talk about more problems with home automation stuff. Let's 2 00:00:06,083 --> 00:00:12,083 give him a big party track welcome? Applause (Applause) >> Perfect. Hi, everyone, it's nice 3 00:00:18,792 --> 00:00:22,542 to have so many people here, great, this is going to be a fun -- going to be a fun talk. So, 4 00:00:22,542 --> 00:00:29,167 it's good you are here, you can drink, have fun, this is the party track-- all right. I will 5 00:00:29,167 --> 00:00:32,708 just start with the questions for you, and it is the following: If I were here to 6 00:00:32,708 --> 00:00:39,250 tell you someone can control every appliance in your room, except the locks and maybe the 7 00:00:39,250 --> 00:00:45,500 thermostat but everything else like the TV, lights, the blinds, everything else, would you stay 8 00:00:45,500 --> 00:00:51,500 at that room or would you check out tonight? Not the locks. They cannot do you any physical harm 9 00:00:54,333 --> 00:01:00,500 and they cannot steal your shit but everything else is controlled by someone. Okay? So 10 00:01:00,500 --> 00:01:06,542 think about it. I will come back to this talk, to this question later. So who am I? I am a 11 00:01:06,542 --> 00:01:10,958 security consultant based in San Francisco. This part of the talk is brought to you by my mom 12 00:01:10,958 --> 00:01:17,625 I want the second last name to be said so my name is Dr. Jesus Maria Molina Terriza. So, I'm a 13 00:01:17,625 --> 00:01:20,625 spanish guy. I'm from La Mancha where we roll our (indiscernable)and all that 14 00:01:20,625 --> 00:01:26,417 stuff. My website is -- My Twitter handle is @verifythentrust. And give me 15 00:01:26,417 --> 00:01:32,375 tequila and I will give you more videos which are more fun. All these video I sell have 16 00:01:32,375 --> 00:01:39,792 plausibility, meaning I can say someone else did it with the iPad. All right. What did I do? 17 00:01:39,792 --> 00:01:44,583 This is kind of the romantic side of security where someone goes to a place and they see 18 00:01:44,583 --> 00:01:50,583 something is broken and they will try to hack into or something, this is kind of this 19 00:01:53,917 --> 00:01:58,667 talk. I have 48 hours to do this cause I was checking out, in the process I was able to control 20 00:01:58,667 --> 00:02:02,542 200 + rooms at a five-star hotel by using an insecure home automation protocol. So I was 21 00:02:02,542 --> 00:02:06,583 able to raise the blinds, the TVs, switch on everything, in 200 plus rooms. While I was a 22 00:02:06,583 --> 00:02:11,375 guest in the hotel, In China, okay, so give me credit for this, you know, because it was 23 00:02:11,375 --> 00:02:17,375 kind of scary! (Laughter) I did not hack anything. I abused something. Okay, So that is 24 00:02:19,917 --> 00:02:26,000 different things! The good thing is this is a story with a happy ending. Right, because I talked 25 00:02:26,000 --> 00:02:31,083 with Starwood and they were okay with this talk. Actually, they supported it, they say go ahead 26 00:02:31,083 --> 00:02:37,417 and do it. I talk with the CIO, by the way that was the most awkward talk in the world. My 27 00:02:37,417 --> 00:02:41,667 lawyer was on the phone with me, his lawyer was on the phone with him. We were like, Hi, how are 28 00:02:41,667 --> 00:02:45,667 you doing? We know you did something in our hotel! Explain what you did to us. (Laughter) 29 00:02:45,667 --> 00:02:51,792 But the fact is that they disabled the system right away and they have changed the policy 30 00:02:51,792 --> 00:02:58,667 on all hotels which are the seratones and the -- (Inaudible) -- because of this. They did the 31 00:02:58,667 --> 00:03:06,458 correct steps, you know, they did very good at that. Well, let's go to the talk. Um, the 32 00:03:06,458 --> 00:03:12,458 hotel is the St. Regis -- in China is the city, hotel is there in the 20 top stories of a 33 00:03:15,500 --> 00:03:22,833 skyscraper beautiful place. This is kind of like Die hard three take over Die Hard one. You 34 00:03:22,833 --> 00:03:30,292 know, -- but the feature of the hotel except that really caught my attention was an iPad. This 35 00:03:30,292 --> 00:03:34,542 ipad was is able to control, appears in every room and is able to control every feature of 36 00:03:34,542 --> 00:03:39,125 the room. So, the ipad comes in every room, With the iPad you can raise the blinds, switch on 37 00:03:39,125 --> 00:03:45,333 the lights and put the music on, switch on the channel for the TV, all that stuff, right. So, 38 00:03:45,333 --> 00:03:51,583 I was there in the room and I was like, okay, so can I control the room with my laptop run it 39 00:03:51,583 --> 00:03:55,708 along with my ipad. So, the first thing I did was, I said, whoa what is communicating 40 00:03:55,708 --> 00:04:01,417 between the ipad and the things in the room? So, the ipad is open to inspection and tampering 41 00:04:01,417 --> 00:04:06,875 so I arose the ipad and where was the ipad connected to? The ipad was connected to the guest 42 00:04:06,875 --> 00:04:13,167 network at the hotel. If you go to the hotel and you know the guess network is open. You can 43 00:04:13,167 --> 00:04:17,208 -- you have to be for the Internet but you can be neighborly with all the people 44 00:04:17,208 --> 00:04:22,458 connected to. So, the guest network is open to inspection and tampering. So, the 45 00:04:22,458 --> 00:04:27,792 automation protocol these guys used from the iPad to every feature in the room needs to be 46 00:04:27,792 --> 00:04:34,667 secure. Well, it was not! Hence the talk here. All right. I checked what was connecting, 47 00:04:34,667 --> 00:04:40,667 what was sending the iPad to every device and I found out it was telegrams from single port. 48 00:04:43,417 --> 00:04:50,333 So I went ahead and checked in the Internet what was this port about. I decide that there was a 49 00:04:50,333 --> 00:04:56,333 KNX, who in this room knows what KNX is? No one. All right. So KNX is a super extended protocol 50 00:05:01,750 --> 00:05:07,625 for home automation in Europe and China and Asian Europe really really oh centered there. 51 00:05:07,625 --> 00:05:10,417 Because it's a standard. In China, KNX is the only home automation standard. If you want 52 00:05:10,417 --> 00:05:13,125 to make a deal in the airport you have to deploy KNX. This is kind of serious. In the 1990s 53 00:05:13,125 --> 00:05:19,333 and it is very simple to deploy, you can see this is an activator so basically it you plack all 54 00:05:19,333 --> 00:05:25,333 the devices to the activator, and there is another wire, a wire protocol another wire you 55 00:05:30,333 --> 00:05:36,333 can send messages to and switch on the lights, raise the blinds and everything. Right? So it's 56 00:05:40,417 --> 00:05:45,375 an open standard and with open it means closed and that's another interesting fact here 57 00:05:45,375 --> 00:05:50,208 right? (Laughter) First time I saw this I was like okay I will go to the Internet and download 58 00:05:50,208 --> 00:05:54,583 the standards and see what happens. But you have to pay a thousand Euros to the lowest 59 00:05:54,583 --> 00:06:01,250 standard and that's an open standard. So but the KNX people decided to give the standard to 60 00:06:01,250 --> 00:06:07,875 Universities so universities created open source clients and that's how I was able to 61 00:06:07,875 --> 00:06:12,375 understand the standard, by taking all these clients, looking at the code and then I 62 00:06:12,375 --> 00:06:17,333 could make out what was going on there. And another fun fact is that there is absolutely no 63 00:06:17,333 --> 00:06:24,333 security. Okay. So, this is interesting. This is from the 1990s where there was physical 64 00:06:24,333 --> 00:06:29,292 securities around all these wires so they didn't need to put any security. However, they 65 00:06:29,292 --> 00:06:35,292 decided to create a evolution of the protocal called KNXIP which ended up being KNX messages with 66 00:06:39,000 --> 00:06:45,000 IP frames but didn't put any security either. And that is known since 2006. So, 2006 there 67 00:06:47,167 --> 00:06:52,625 was a document saying hey there is no security and these people said there needs to be security 68 00:06:52,625 --> 00:06:58,625 but no idea anything except six months ago the KNX people send a new protocol evolution, new 69 00:07:01,292 --> 00:07:07,083 version of the protocal that has does have -- that does have some security on it that they say but 70 00:07:07,083 --> 00:07:13,583 I cannot download it so I really know. Maybe in 5,000 years I can check it out! So how this works 71 00:07:13,583 --> 00:07:21,583 in the hotel. So every room has a single IP. That is the IP that I saw they were communicating 72 00:07:21,583 --> 00:07:27,583 through. That is a KNX IP router. This KNX IP router what it does, it converts these IP 73 00:07:30,208 --> 00:07:36,500 information into KNX information. KNX it's a wired protocol so all this goes 74 00:07:36,500 --> 00:07:41,500 through wires and as you see the wire protocol KNX has a different way of forming 75 00:07:41,500 --> 00:07:47,208 addresses. They are like three numbers. The first number there, you see like three numbers with 76 00:07:47,208 --> 00:07:52,583 the slashes. The first number is the area line. The second number is the area number. Second 77 00:07:52,583 --> 00:07:55,958 number is the line number and the third number is the device number. As you can see there a 78 00:07:55,958 --> 00:08:01,958 light will have 222 and a TV will have 223. So, it's kind of easy to guess, right? The rest 79 00:08:07,375 --> 00:08:12,042 of the hotel so the rest of the hotel if I wept to connect to another room you see the 80 00:08:12,042 --> 00:08:18,042 difference there? Like there was another IP address that room is 777, next room is 7778. The IP 81 00:08:20,375 --> 00:08:26,292 address is correct I think. So then if you look at the device numbers for each device, like 82 00:08:26,292 --> 00:08:32,292 222 in the room 7778, there was like 232. Okay? So it was a little more difficult than that. 83 00:08:34,625 --> 00:08:41,917 You know there are different floors --but I went to different rooms and I was able to tell but 84 00:08:41,917 --> 00:08:48,292 what next number for each room. So, I was like I have them up for each IP address and room, 85 00:08:48,292 --> 00:08:55,458 oh, nice, that's maybe for me? Alright, So the protocol said now that I know that every room 86 00:08:55,458 --> 00:09:00,500 has an IP address that every device in every room has an address, right? So, the only 87 00:09:00,500 --> 00:09:05,792 thing I need to do now is code the protocol. The protocol goes like this, you know, I send a 88 00:09:05,792 --> 00:09:12,500 connect request to the IP address, it says hey, yes, and they give me like a window of 89 00:09:12,500 --> 00:09:18,292 that I have to use after that. I create a request and it sends back connector response, saying, 90 00:09:18,292 --> 00:09:23,542 hey, that's good. You are connected to the KNX network. After this I send a permanent 91 00:09:23,542 --> 00:09:30,333 request and after this moment I can send anything I want to the KNX network. Meaning that I can 92 00:09:30,333 --> 00:09:34,875 send anything to switch on the lights and switch off the lights, open the blinds close 93 00:09:34,875 --> 00:09:42,042 the blinds. This packet I sent internally is called a kenney and it's what goes into the KNX 94 00:09:42,042 --> 00:09:48,042 network. At the end I disconnect request and that's it! If I have the protocol to connect to the 95 00:09:51,292 --> 00:09:57,000 KNX network I have the IP address for every room and I have the address KNX address for 96 00:09:57,000 --> 00:10:04,500 every device, what can I do with it? I can raise every blind of the hotel at will. So what I'm 97 00:10:04,500 --> 00:10:10,500 sending to the wire to the Kenney thing that I was talking about. So you see, it's really 98 00:10:13,167 --> 00:10:18,833 simple. Like UDP and enveloping a kenny frame. So, all these numbers, they don't make any 99 00:10:18,833 --> 00:10:23,583 sense to you. They didn't make any sense to me in the 40 hours I was in the room but after 100 00:10:23,583 --> 00:10:28,125 researching I was able to understand. This is like part of the code of one of the open 101 00:10:28,125 --> 00:10:31,292 source plans I was told you. This is not from the standard. This is like something I said. 102 00:10:31,292 --> 00:10:35,625 And I saw there's a lot of things there but the only important things you have to see 103 00:10:35,625 --> 00:10:41,625 there is there's an address and an action. The Address is the address of the device I want to 104 00:10:41,625 --> 00:10:46,917 switch on. The action is depending on the device and that's specified in the only 105 00:10:46,917 --> 00:10:52,583 open document that KNX has, which is how you use, what action do you use for each 106 00:10:52,583 --> 00:10:58,500 device. For example, a light bulb, to switch on and off is AP and AP1. To raise the 107 00:10:58,500 --> 00:11:02,833 thermostat, which is also controlled by a room it is like different stuff that you have to 108 00:11:02,833 --> 00:11:10,208 send but it's like you code it and that's it. All right, so the question is: Can I switch, 109 00:11:10,208 --> 00:11:15,042 and that was kind of the quest here, can I switchd a TV on in every room. If you have been 110 00:11:15,042 --> 00:11:19,667 following the talk and I hope you have, you would understand that if I can switch one light 111 00:11:19,667 --> 00:11:26,417 bulb I can switch every device because I don't need the device, the device numbers and I need 112 00:11:26,417 --> 00:11:32,417 the device numbers for my room and if I can switch on the TV or blinds in my room, if I know the 113 00:11:35,208 --> 00:11:42,500 IP address of every room, then I can switch every TV on every room. Okay. So if I said you can 114 00:11:42,500 --> 00:11:50,292 switch one light bulb that means I can switch every TV. I want to show you exactly that. Oh, by 115 00:11:50,292 --> 00:11:56,292 the way, I was super caffeinated so sorry about that! So let me -- look at the left right there. 116 00:12:02,042 --> 00:12:09,875 See what's going on there? That's the first time I try to do this! (Laughter) That is 117 00:12:09,875 --> 00:12:15,875 happiness, of not being caught. All right. So (Laughter) I was doing that for posterity, so I 118 00:12:28,042 --> 00:12:33,750 wanted to record this. Alright, so you see thelight bulb right there, I used the smallest light 119 00:12:33,750 --> 00:12:37,792 bulb because it was the absolute brightest. (Indiscernable) --raising the blind, turning on 120 00:12:37,792 --> 00:12:43,792 tv's but I think this was the most, the fastest to show, see the light goes on, the light 121 00:12:47,000 --> 00:12:53,708 goes off and I am using my laptop to do this. That was like after a whole night of working 122 00:12:53,708 --> 00:13:00,542 on this and I had to code my own protocal and stuff, you know. Okay, let's go back. Alright. 123 00:13:04,300 --> 00:13:11,200 So we are in like I need to send in a ton of requests which you can use EIBD, which is 124 00:13:11,200 --> 00:13:14,292 a daemon, it's open source, you can download it right now and you can start sending 125 00:13:14,292 --> 00:13:21,167 KNX frames on the wire. Very fast. The problem is that the daemon you can not paralyze, it 126 00:13:21,167 --> 00:13:27,875 works, it connects with a single IP address and I said I wanted to have the power to raise every 127 00:13:27,875 --> 00:13:32,875 TV so I have to code my own in Python. Really simple. Very simple protocol. It's a 128 00:13:32,875 --> 00:13:38,792 free protocal. You need the KNX address of each device in the room. So, what I did is I 129 00:13:38,792 --> 00:13:44,250 pressed the iPad, plop, plop, plop, automated connection and it will give me every address 130 00:13:44,250 --> 00:13:50,375 and action of every device in the room. They have this library of all these things. After this 131 00:13:50,375 --> 00:13:57,250 I get the IP address of each room and KNX area and line. That is required a little more 132 00:13:57,250 --> 00:14:03,458 complexity so what I did is change rooms all the time. I will go, call downstairs, hey, I 133 00:14:03,458 --> 00:14:09,625 don't like this room, can you put me in another room? They will be, okay! (Laughter) Two 134 00:14:09,625 --> 00:14:16,333 hours later, hey, I don't like this room. Too much light coming on! Can I change rooms? They 135 00:14:16,333 --> 00:14:23,375 were like, okay. (Laughter) I was, like, I cannot sleep in this room. So, they end they 136 00:14:23,375 --> 00:14:30,542 give me this room which is the suite. (Laughter) And It's a beautiful duplex suite like 137 00:14:30,542 --> 00:14:35,792 beautiful floor-to-ceiling windows but there is a problem with this room because of what 138 00:14:35,792 --> 00:14:41,792 I've done there is no iPad. (Laughter) I will continue. >> Are there any new speakers here? 139 00:14:45,458 --> 00:14:51,458 Raise your hand. >> Yeah. >> Hey! We got one! (Applause) >> So, What do you think of foam 140 00:14:56,208 --> 00:15:03,333 hinge -- (Inaudible) -- right there? That foam hinge right there? Like right there. Foam 141 00:15:03,333 --> 00:15:09,333 Hinge. We ordered a full-sized foam Stonehenge for you. >> Yeah, I know, I know you told 142 00:15:11,833 --> 00:15:17,833 me. You told me, that's great. I love it. >> All right. >> Cheers! >> Cheers! >> Cheers 143 00:15:20,917 --> 00:15:28,375 (Applause) >> Come on! (Applause) >> That was good. Thank you very much. Do you have 144 00:15:28,375 --> 00:15:32,750 another one? >> Good luck continuing. >> Alright, that was not tequila by the way. That 145 00:15:32,750 --> 00:15:40,500 was some sort of pretty strong stuff. Anyways... so the problem with the suite was there was no 146 00:15:40,500 --> 00:15:46,083 iPad. So, I could not continue my research there. So, I had to call back and say, hey, I really 147 00:15:46,083 --> 00:15:53,500 don't like this room. You know. I don't like duplex's, it's not my thing. You have to go 148 00:15:53,500 --> 00:15:59,667 upstairs to sleep. They changed my room again but the hotel manager came and I was like hey 149 00:15:59,667 --> 00:16:05,667 what's your problem? And then I got -- again, I was in a hotel in China, not afraid of a media 150 00:16:08,458 --> 00:16:14,000 scene but something, anyway, they are asking this question, hey Jose you told us you can 151 00:16:14,000 --> 00:16:19,208 control every room but how do you make sure you can control every room? So we created this 152 00:16:19,208 --> 00:16:26,917 HeartBleed program where outside each room there was the do not disturb light. You see this like 153 00:16:26,917 --> 00:16:32,917 blue and red so the light sits outside the room so I can go outside and see Room 777 and I 154 00:16:35,583 --> 00:16:41,708 can see its heartbeating, 778. and I will see a heartbeating and if I had time I would show 155 00:16:41,708 --> 00:16:47,500 you a video. But ugh, anyway. We can tell whenever I press that button I knew I had hacked that 156 00:16:47,500 --> 00:16:53,875 room. I could switch on the TV in that room I can do anything in that room. So I did that for 157 00:16:53,875 --> 00:16:57,833 a couple of rooms. Alright. Were there other devices connected? Maybe, but the 158 00:16:57,833 --> 00:17:03,292 problem is I tried sending random requests to random addresses that were not used and 159 00:17:03,292 --> 00:17:07,667 at some point someone knocked at my door and I got super scared and I was like oh my God they 160 00:17:07,667 --> 00:17:13,667 caught me, I'm ready to go to Chinese jail. Take me with you! I do my best. But it was the 161 00:17:13,667 --> 00:17:20,083 laundry lady, she was like laundry, laundry. Then she went to the other room -- I guess I 162 00:17:20,083 --> 00:17:23,833 did something there. But this has not been confirmed by the hotel. So, I am not really sure. 163 00:17:23,833 --> 00:17:28,667 I think I probably did something. So, what does it mean? By the way, not the 164 00:17:28,667 --> 00:17:36,667 rainbow guys for the stoner people here next to me. Anyway, for hotels, maybe it is to 165 00:17:36,667 --> 00:17:41,458 update their security policies. They don't include things like home automation or smart tv's 166 00:17:41,458 --> 00:17:46,833 and things like this that we can take over because hotels in time on these devices. Is this a 167 00:17:46,833 --> 00:17:51,917 problem in hotels? The answer is yes. Are these particular hotels, they do not tell which 168 00:17:51,917 --> 00:17:58,250 ones until I talk with them directly-- For the Internet of Things we are -- anybody that deploys their own 169 00:17:58,250 --> 00:18:04,250 protocols, nobody knows if they are deploying and we give extra care when they deploy automation 170 00:18:07,292 --> 00:18:11,875 in certain spaces because they still think you have a cocoon around them or something. What's 171 00:18:11,875 --> 00:18:17,750 the worst that can happen? When they first asked me this question, I was like I only had 172 00:18:17,750 --> 00:18:23,083 one ipad and now it controls every room of the hotel and the guy in the room does not know. I 173 00:18:23,083 --> 00:18:29,208 switch on the TV and every TV in the hotel switches on or I could go with magnetic helmet and say 174 00:18:29,208 --> 00:18:36,958 oh, he once died that and like put my arms up and every blind will switch on like all the TVs 175 00:18:36,958 --> 00:18:42,958 will start to flicker that seems to be the worst thing that could happen. I could go create chaos 176 00:18:47,750 --> 00:18:50,750 -- but they dont think that's the worst thing that could happen now. I think what the 177 00:18:50,750 --> 00:18:56,625 worst thing that could happen and the question they asking me for is because of this. I ask 178 00:18:56,625 --> 00:19:01,375 you: If I can control your room, will you stay in that room tonight? I don't know what your 179 00:19:01,375 --> 00:19:06,125 answer will have been. Probably the answer is like yeah, what's the worst that can happen you 180 00:19:06,125 --> 00:19:11,333 turn on my TV. What they will say is it was Obama, can I control your TV? If I go with an 181 00:19:11,333 --> 00:19:16,750 important news to you, do you want me to control your TV? You just said to me it's okay for 182 00:19:16,750 --> 00:19:22,750 you to stay at your hotel even if your not going to switch on your TV. Well just so you know 183 00:19:25,708 --> 00:19:31,833 saying to a President saying I will only switch your TV on if it's important news I need to 184 00:19:31,833 --> 00:19:39,792 tell you. Your going to say yes because it's the same thing. You are just like give me power over 185 00:19:39,792 --> 00:19:45,750 your TV implicitly you are going to say no to someone that has a reason to do this? Not like me 186 00:19:45,750 --> 00:19:50,375 switching on for sports. People don't care and that's the worst thing that can happen. I talked 187 00:19:50,375 --> 00:19:54,833 to so many reporters, so many people about it and they always ask me the same damn question. I 188 00:19:54,833 --> 00:19:59,458 don't care. You Switch on my light bulb, I don't care you switch on my TV, that's okay. 189 00:19:59,458 --> 00:20:04,750 You are not making any harm to me, your are not stealing any information from me. So go 190 00:20:04,750 --> 00:20:07,125 ahead. This is not a big security problem. Well, I disagree. I disagree. It's not a 191 00:20:07,125 --> 00:20:13,125 big security problem because I cannot do harm to you but at the end is your peace of mind which 192 00:20:26,042 --> 00:20:31,292 I'm playing with so be careful. Thank you very much and have fun. (Applause)