1 00:00:00,542 --> 00:00:06,542 >> I am Chris Littlebury, and this is all about automating home defense. A little about me, 2 00:00:09,458 --> 00:00:14,208 I am a senior penetration tester with knowledge information group. We are hiring, if you 3 00:00:14,208 --> 00:00:20,208 have skills, let us know, and I like building stuff. Couple of pictures there, it's an Xbox 4 00:00:25,375 --> 00:00:30,667 Live Controller that ummm did a randomization thing on it, so you can do rapid fire and it 5 00:00:30,667 --> 00:00:37,208 won't be detected on Xbox Live cause it had a randomizing cadence to it, yea it's 6 00:00:37,208 --> 00:00:43,208 cheating, I used it once and it just sat on the shelf, but  ‑ ‑ one of my first really your own  7 00:00:47,708 --> 00:00:51,625 ‑ ‑ and the other picture is swapping out the 5th gear on my car to get better mileage, 8 00:00:51,625 --> 00:00:57,625 anything I can do with my hands, on stuff, so  ‑ ‑ >> A quick disclaimer. During this talk, 9 00:01:02,667 --> 00:01:06,708 providing ideas, codes that worked for me, things that haven't worked, pretty much just 10 00:01:06,708 --> 00:01:12,708 a trial and error thing, afterwards, definitely open to questions, suggestions. I like 11 00:01:16,583 --> 00:01:22,583 to hear what other folks have to say. >> I am not getting paid to endorse anything, there's a 12 00:01:26,292 --> 00:01:32,458 bunch of products I will be talking about, they work well, some have strength and 13 00:01:32,458 --> 00:01:38,042 weaknesses, we will go over that. Nobody is paying me to be here. And I definitely not 14 00:01:38,042 --> 00:01:43,292 promising an end to burglaries especially if you live in high‑risk areas, sorry you're 15 00:01:43,292 --> 00:01:49,292 screwed ‑ ‑ but you can try to stack the odds in your favor. Definitely not advocating 16 00:01:53,250 --> 00:02:00,375 setting up booby traps in your house. This is a big federal no‑ no. A lot of people approached 17 00:02:00,375 --> 00:02:06,375 me, yeah, I want to build a moat and have a spike pit ‑ ‑ and shit come flying down with 18 00:02:09,375 --> 00:02:17,208 spikes when you open the door when I am home alone  ‑ ‑ you will go to prison. So please  ‑ 19 00:02:17,208 --> 00:02:23,583 ‑ I am not advocating that. Please don't do it. Don't do anything that can result in 20 00:02:23,583 --> 00:02:28,708 hurting other people or property damage. It's something  ‑ ‑ doing something to somebody's 21 00:02:28,708 --> 00:02:34,708 car that's on your property or something, just use your head, don't break shit. >> Lastly, a 22 00:02:41,083 --> 00:02:47,083 live example from my place, stuff I have done, please don't come and test my home, again, I 23 00:02:51,958 --> 00:02:57,083 would love to talk with folks afterwards and have you thought about this and wow  ‑ ‑ I 24 00:02:57,083 --> 00:03:01,625 haven't thought about this, thank you for  ‑ ‑ let's open up a cool discussion about it 25 00:03:01,625 --> 00:03:07,958 instead of showing up at my place at 1:00 in the morning, standing over my bed freaking me 26 00:03:07,958 --> 00:03:13,958 out. Which somebody of yall deviant bastards would do such a thing. >> So, store starts out 27 00:03:17,250 --> 00:03:23,250 once upon a time in South Texas. I was living in San Antonio, below the poverty line and they 28 00:03:25,958 --> 00:03:31,958 like to have a great tourism, Riverwalk, nice place to visit, family affair and everything, 29 00:03:37,000 --> 00:03:42,917 and  ‑ ‑ completely talking trash. Anybody here from San Antonio? >> Thank you. Yes. So 30 00:03:42,917 --> 00:03:48,917 anybody else from San Antonio? I will talk shit so I apologize, I spent 10 years there, I feel 31 00:03:51,583 --> 00:03:57,708 adequately qualified to do so. The crime map in San Antonio is just terrible. Their local 32 00:03:57,708 --> 00:04:03,708 pastimes are DUIs and home invasions, just what they are known for. It's bad. So they 33 00:04:10,583 --> 00:04:18,417 ranked number 3, I forget what year this was, but they were like the third least safe city 34 00:04:18,417 --> 00:04:24,417 in America. So  ‑ ‑ at the time I had this little Honda Civic, and again  ‑ ‑ anybody have a 35 00:04:32,667 --> 00:04:38,667 Honda Civic, or had a Honda Civic  ‑ ‑ keep your hands up if it was stolen. You are my 36 00:04:43,792 --> 00:04:49,792 people. Okay. At the time it was the most‑ stolen car in America and I happened to have it. Air 37 00:04:56,625 --> 00:05:03,875 conditioning, good mileage, worth about $1500, that's all I needed, right? I came out one 38 00:05:03,875 --> 00:05:11,583 morning and the doors were unlocked, people had gone through my stuff but the car was 39 00:05:11,583 --> 00:05:18,875 still there and I was like yeah, this sucks, I would like to be able to do something. I should 40 00:05:18,875 --> 00:05:21,458 be able to out‑smart them. I like to soldering stuff  ‑ ‑ I should be able to out‑smart 41 00:05:21,458 --> 00:05:24,875 them. I had an idea. >> They have a main fuel relay up near the kick panel. You unbolt it, 42 00:05:24,875 --> 00:05:26,875 it's like a 12-pin connector  ‑ ‑ you take this with you and the car completely is immobilized. 43 00:05:26,875 --> 00:05:28,875 Sure, there's a chance somebody breaking in like oh gee, I happen to have one of those and 44 00:05:28,875 --> 00:05:30,875 I will look there, but I roll the dice. Pretty safe bet. >> I also got cheap alarms that pages 45 00:05:30,875 --> 00:05:33,750 you, so I hooked it up without sirens, lights, anything, I removed the relays in it to 46 00:05:33,750 --> 00:05:35,750 trigger the lights and turn signals, so I removed everything. All it does is page 47 00:05:35,750 --> 00:05:38,167 you. >> It's a car, sure, but my car, I wanted to drive it to work. I kept it that way three 48 00:05:38,167 --> 00:05:40,208 months and sure enough, it worked. Early one morning the alarm goes off and I go running 49 00:05:40,208 --> 00:05:42,208 down stairs and there's two respectable gentleman going to work on my steering column. I 50 00:05:42,208 --> 00:05:44,208 persuade them to exit the vehicle, one of them runs, the other tries to establish a kind 51 00:05:44,208 --> 00:05:46,208 dialogue with me. I was able to, through power of persuasion, maybe you should lay down on the 52 00:05:46,208 --> 00:05:48,333 ground and wait until the cops come. I was effective in doing so, they came out, arrested him 53 00:05:48,333 --> 00:05:50,958 and  ‑ ‑ I was like you know what? I think it's time to move away from the shithole, because  54 00:05:50,958 --> 00:05:52,958 ‑ ‑ other neighbors, tons of anecdotal evidence that it was just a bad place. Case in point, 55 00:05:52,958 --> 00:05:55,500 I found this on Reddit a year or so ago, I said that looks like a lot my old apartment complex and 56 00:05:55,500 --> 00:05:57,667 sure as shit, it was my old apartment complex. So somebody got upset, set their ex's car on 57 00:05:57,667 --> 00:06:01,625 fire, burned down a few other things, it was terrible. So I moved up to a nicer area. 58 00:06:01,625 --> 00:06:05,042 Actually this picture is one of the three times in the history of mankind it snowed in San 59 00:06:05,042 --> 00:06:11,042 Antonio and I mean it just dusted a tiny bit, people were trying to sled on it. >> Anyway, 60 00:06:53,792 --> 00:06:59,792 it was a nicer place. I moved up to the third floor, tried to get as high off the ground as 61 00:08:01,042 --> 00:08:06,125 possible, okay, that  ‑ ‑ you make it more difficult to get into, lock exterior doors, even 62 00:08:06,125 --> 00:08:12,125 sliding doors, third floor on the balcony, that kind of thing, stacking the odds in your favor. 63 00:08:38,042 --> 00:08:43,292 You won't keep everybody out but, everywhere I looked, there were all these tips from cops, 64 00:08:43,292 --> 00:08:49,917 and the number one thing that kept popping up was "make your home look occupied." If people 65 00:08:49,917 --> 00:08:57,667 come by, knock on your door, make it look like somebody is home. Lights on timers, leave 66 00:08:57,667 --> 00:09:03,667 TVs on, just stuff that makes it look occupied. You see the other stuff, lock your doors, basic 67 00:09:06,042 --> 00:09:12,042 stuff. >> That got me thinking. Everybody has seen the movie Home Alone, right? Yeah. So I 68 00:09:17,792 --> 00:09:23,792 steal off of that during this talk a little bit, so  ‑‑ I thought okay, I work a weird 69 00:09:26,333 --> 00:09:34,292 schedule, at night, ‑‑ during the day sometimes, all over the place, but I wanted something 70 00:09:34,292 --> 00:09:40,292 that would make the place look normal all the time. At the time the cheapest automation stuff 71 00:09:43,833 --> 00:09:49,833 was the Extent hardware. I am waiting to hear groans. Anybody done that before? It's terrible, 72 00:09:52,792 --> 00:09:58,792 yeah. It's been around since the late 70s, and really cheap hardware, works off of sending 73 00:10:01,292 --> 00:10:07,292 data over your home power line. What it does, included on 120‑ hertz carrier, transmits during 74 00:10:12,083 --> 00:10:19,500 the zero crossing, and it sucks so much that it sends the command three times every time 75 00:10:19,500 --> 00:10:25,500 it  ‑ ‑ it knows it's not reliable, but if you are in a small apartment complex or older 76 00:10:28,250 --> 00:10:35,833 house where the wiring is not that complex, it worked. >> They had this God‑awful GUI you can 77 00:10:35,833 --> 00:10:41,833 program, macros, certain things, none of it worked really well but some of the timers had a 78 00:10:46,083 --> 00:10:52,500 cool feature, security feature you can time, say, you want everything to turn on at 5:00, 79 00:10:52,500 --> 00:10:59,292 every day. They had a security feature where it would turn on anywhere between like 4:50 and  80 00:10:59,292 --> 00:11:05,292 ‑‑ and it would be raining every day. It's a cheapy company, the tech is terrible, but it's doing 81 00:11:12,500 --> 00:11:18,500 what I want it to do. So eventually I moved to a house. Excuse me. >> I moved to a 82 00:11:22,042 --> 00:11:29,792 house, started doing it with exterior lighting  ‑ ‑ So I had lights would come on at 83 00:11:29,792 --> 00:11:35,792 different times, some would use photovoltaic centers, some using the Extend, but it wasn't 84 00:11:38,000 --> 00:11:44,000 anything special, but ‑‑ is this wooden? So knock on wood, I never had issues. It seemed to 85 00:11:46,458 --> 00:11:54,083 be occupied all the time. The neighbors got broken into but mine  ‑ ‑ I didn't have issues. 86 00:11:54,083 --> 00:12:00,083 >> But, eventually, I moved away. So I moved back to Colorado after a 10‑ year 87 00:12:05,583 --> 00:12:11,583 hiatus, crime is a lot better there, I will do it right this time. So, I will do it right. >> 88 00:12:16,000 --> 00:12:23,417 Of course I have to advocate, do not set up booby traps in your house. It would be cool as shit, 89 00:12:23,417 --> 00:12:31,250 but, what are they going to do? My wish list was I wanted efficient lighting. Most of the 90 00:12:31,250 --> 00:12:37,250 stuff out there for doing wall switch and lighting and things are all incandescents, 60, 80, 91 00:12:40,083 --> 00:12:46,083 100 watt bolts per can, the equivalent of a microwave or something. That just wasn't 92 00:12:49,875 --> 00:12:55,875 cool. I wanted efficient lighting, granular control over it, do individual zones, turn 93 00:12:58,458 --> 00:13:03,208 things on and off whenever I choose, have some sort of centralized way to control it  ‑ 94 00:13:03,208 --> 00:13:09,208 ‑ adaptive timing, not always the same schedule, randomization and things. Again, I wanted it 95 00:13:14,167 --> 00:13:18,417 to look like it was lived in as much as possible. Do some geofencing, anybody done the 96 00:13:18,417 --> 00:13:21,667 if-then stuff? No? Okay. >> There's some if‑then geo fencing, I have read it's a 20% 97 00:13:21,667 --> 00:13:27,667 success rate. You establish a geo fence on your phone and leave, once you leave certain 98 00:13:43,417 --> 00:13:49,083 actions happen. Arms your security system or turns lights off, people leave their house 99 00:13:49,083 --> 00:13:55,083 and lights are just on until 10:00 at night. >> I wanted to do my own that I had control 100 00:14:01,417 --> 00:14:07,792 over and, yes. I wanted to be able to do defenses against wireless home automation 101 00:14:07,792 --> 00:14:13,792 attacks. Everybody all around for last year's DEF CON? The Z wave enabled door locks are 102 00:14:19,750 --> 00:14:23,833 encrypted. Instead of breaking the encryption you just did a replay attack  ‑ ‑ replay the 103 00:14:23,833 --> 00:14:30,208 exact same thing over RF and the door was like "welcome home, buddy." Everybody was just ‑ ‑ 104 00:14:30,208 --> 00:14:36,208 holy shit. Funny anecdotes, a week after that I had a dude come to my door, trying to sell 105 00:14:54,875 --> 00:15:02,083 that, Comcast, other places, building out home security system and have that sort of 106 00:15:02,083 --> 00:15:07,333 thing where it's on your smart phone, gee, I can look at cameras, know when my kid's 107 00:15:07,333 --> 00:15:14,792 coming home ‑ ‑ I can spy on my baby at night with infrared cameras, straight up Skynet 108 00:15:14,792 --> 00:15:21,625 shit, but they love it. I can open my garage, unlock my front door. That seemed like a 109 00:15:21,625 --> 00:15:28,750 terrible thing to me. I wanted to be able to defend it. >> Not only that, if somebody really 110 00:15:28,750 --> 00:15:36,083 wants to get in it's just smash and grab. If you have a great alarm system you have a big 111 00:15:36,083 --> 00:15:43,250 giant ADP sign, prominently displayed, it's like please, please, don't screw with this 112 00:15:43,250 --> 00:15:49,250 house. If they really want to, they will do if anyway. I am sure everybody in the room has 113 00:15:51,458 --> 00:15:56,958 friends that during the day people kick in the front door, alarm goes off, they grab stuff 114 00:15:56,958 --> 00:16:02,958 and take off. That's how it is. I wanted to be able to do something that would immediately 115 00:16:05,500 --> 00:16:11,750 react to that and try to mitigate what they can carry. If they kick in the door, alarm 116 00:16:11,750 --> 00:16:17,917 goes off, they are freaking out and something that they have never seen before happens inside 117 00:16:17,917 --> 00:16:23,917 the house that might be like, you know what maybe we should GTF out. >> That was my wish 118 00:16:26,167 --> 00:16:32,167 list. One of the first things I did was Wi‑Fi enable lightbulbs  ‑ ‑ did anybody get in on the 119 00:16:35,708 --> 00:16:41,708 LiFX kickstarter? No? Awesome. So they did, started a while back, took a while to ship the 120 00:16:43,958 --> 00:16:51,542 bulbs, had a bunch of regulator  ‑ ‑ regulation things to do, but in the grand scheme of things 121 00:16:51,542 --> 00:16:57,542 their Wi‑ Fi enabled LED bulbs, big claim to fame is they will do 1000 lumens ‑ ‑ they are 122 00:17:00,333 --> 00:17:08,250 bright as shit. They will always do full color, their full color representation is fantastic if 123 00:17:08,250 --> 00:17:14,250 you are into that, the picture with the blue is my living room, two of them in the ceiling, 124 00:17:18,708 --> 00:17:26,208 it's, yeah, cool. Side note to that, I will talk about later, if the alarm goes off one thing 125 00:17:26,208 --> 00:17:32,208 it can do is the whole house can start flashing red. So  ‑ ‑ [laughter] upstairs, down 126 00:17:35,792 --> 00:17:41,792 stairs, entry way, chandelier, everything, the whole damn house will just light straight out of 127 00:17:45,375 --> 00:17:51,375 aliens sort of thing. Everything  ‑ ‑ if I can rig up a fog machine too  ‑ ‑ leave her 128 00:17:56,708 --> 00:18:02,708 alone, you bitch. So they are great bulbs, at full power draw 17 watts, fits into their  ‑ ‑ 129 00:18:11,292 --> 00:18:18,375 i'm not drawing a ton of power. And you can dim them down, do it all through software. They 130 00:18:18,375 --> 00:18:24,375 recently released an API, so any Ruby fans out here? Good. Good. >> No. Anybody from Python? You 131 00:18:33,125 --> 00:18:39,125 are my people. All right. And I will get to that with the open source, but several different 132 00:18:42,958 --> 00:18:49,625 libraries to work with. The official API is in Ruby, not that bad to work with, you can 133 00:18:49,625 --> 00:18:55,625 port over to python, but yeah. The down side to these bulbs is they are large. They have some 134 00:18:57,750 --> 00:19:04,250 heft to them. You can't put them in normal fixtures that sit sideways. They will start 135 00:19:04,250 --> 00:19:10,250 sagging down when they come in contact with the globe  ‑ ‑ look terrible and heat up a bit. You 136 00:19:13,167 --> 00:19:21,083 can't enclose them. >> The other option is the Philips Hues ‑ ‑ really easy to work with, great 137 00:19:21,083 --> 00:19:27,083 API, has python, so  ‑ ‑ python people. Even lower power consumption 8.5 watts at full 138 00:19:31,792 --> 00:19:37,792 brightness, a little cheaper. Their power output is not the same. You put three in a 139 00:19:39,958 --> 00:19:45,958 fixture, it will be like three 60‑ watt light bulbs, but it's a good option. The color 140 00:19:48,750 --> 00:19:56,250 representation isn't as good, but if you are looking at lighting up a side room, dining 141 00:19:56,250 --> 00:20:03,042 room, if you want to be able to control that remotely, still have the thing flash red, freak 142 00:20:03,042 --> 00:20:09,042 the hell out of people, it's a fantastic choice. >> Couple pictures. Fourth of July at my 143 00:20:11,125 --> 00:20:17,125 place, the camera didn't do it justice. The purple are actually blue and red ones are red, that 144 00:20:20,375 --> 00:20:26,375 was LiFx and Hue bulbs. My living room just, messing around and  ‑ ‑ during my perfect  ‑ ‑ 145 00:20:38,750 --> 00:20:44,750 >> Audience question/comment. [Laughter] >> We're hiring. >> So yeah. Other devices out 146 00:20:53,500 --> 00:20:56,042 there, WeMo devices, they had vulnerabilities last year that are really not good. Fair 147 00:20:56,042 --> 00:20:58,417 enough? They had them come out last year where there was a vulnerability where if they 148 00:20:58,417 --> 00:21:01,125 rapidly cycled them there's a hack where you can recycle, hook up for a load, like motor or 149 00:21:01,125 --> 00:21:03,375 something like that, initially a really large amperage and then settles down. >> Are we 150 00:21:03,375 --> 00:21:05,792 distracting you? >> No just concerning me ‑ >> To our first time speaker ‑ [applause] >> 151 00:21:05,792 --> 00:21:08,625 Thank you. >> We have been doing this four days. Three talks, every hour, I have lost track. 152 00:21:08,625 --> 00:21:11,333 >> I really want to get me one of those little rascals. So, the WeMo devices, you can rapidly 153 00:21:11,333 --> 00:21:14,042 cycle and depending on where the device is hooked up, they can catch fire and burn the place 154 00:21:14,042 --> 00:21:20,042 down. It's bad. So they have since pushed out a firmware update for them, but still not 155 00:21:48,708 --> 00:21:54,708 that secure  ‑ ‑ what I have read, lock down IPv6 on the routers, don't have anything 156 00:22:57,083 --> 00:23:04,833 else and just lock down everything you have. With that said, they are extremely useful 157 00:23:04,833 --> 00:23:10,833 for if you have exterior lighting where you have CFL bulbs, like all around your 158 00:23:15,792 --> 00:23:21,792 house, hook up one of these, talking about 20 watts worth of draw all night, then you can 159 00:23:24,208 --> 00:23:30,625 switch it with one of these switches. The problem being they have timers built in, their own 160 00:23:30,625 --> 00:23:36,625 app and own timers built in, both of which completely suck. Their app is not reliable and 161 00:23:39,875 --> 00:23:46,875 their timers, well they work, sometimes, if you have, like say your external lights you want to 162 00:23:46,875 --> 00:23:52,875 turn on at 8:00 at night and keep them on until 6:00 in the morning, when it comes up on 163 00:23:55,958 --> 00:24:02,542 midnight they will shut off a few seconds, midnight five seconds later they will come 164 00:24:02,542 --> 00:24:08,542 back on and there's no rhyme or reason for it so if somebody is casing your house or whatever, 165 00:24:10,667 --> 00:24:16,667 it's a pretty good indicator  ‑‑ and again, yes, terrible security. There's a link to that 166 00:24:19,083 --> 00:24:25,500 exploit on there too  ‑ ‑ and the slides will be available and everything. >> So, creating a 167 00:24:25,500 --> 00:24:31,500 home defense server, available 24/7, low power consumption, hook up to an UPS, integrate 168 00:24:34,875 --> 00:24:40,875 with sensors, be able to pull your own sensor network, and integrate with your existing 169 00:24:44,667 --> 00:24:52,000 home security system. It would be more of a supplement. Can you build one on your own, and have 170 00:24:52,000 --> 00:24:59,333 it respond, do stuff, but I am of the mindset I like someone monitoring. If they call the 171 00:24:59,333 --> 00:25:06,208 cops, the cops come out. Whereas if I see something in a text message, hi, I am Chris, I built 172 00:25:06,208 --> 00:25:12,208 this Rube Goldberg system at my house, can you go check it out. Sir, this is 911, don't ever 173 00:25:17,667 --> 00:25:24,292 call back. If it supplements your home security system you at least have a little bit of 174 00:25:24,292 --> 00:25:30,292 clout. >> Couple of slides integrated in, but the raspberry pi is a good choice. And again, 175 00:25:33,250 --> 00:25:39,250 how many people mess with raspberry pi? they're fantastic, they're wonderful. >> I had a 176 00:25:41,417 --> 00:25:47,417 little experience with pis before. I built a Wi‑Fi enabled barbecue smoker just because, 177 00:25:50,458 --> 00:25:56,458 shit, I didn't know if I could. I got some meat probes, a probe for a GE oven that I found, all 178 00:25:59,500 --> 00:26:05,500 the other therma probes I could find were worthless after 240 degrees. I found one good to 179 00:26:13,750 --> 00:26:19,750 400, put a rail server on there  ‑ ‑ what's that? Sorry, ADD. I put a rail server on the front 180 00:26:24,917 --> 00:26:32,042 end, I had rails experience at the time and just didn't know any better. Any rails coders 181 00:26:32,042 --> 00:26:38,042 here? >> Good. But it worked and it was one of those proof of concepts where I could build not 182 00:26:41,958 --> 00:26:48,042 only the sensor portion, but have a front‑ end riding on the same hardware, all self‑ 183 00:26:48,042 --> 00:26:54,042 contained, on wireless and do fun stuff with it. >> So, creating a home defense server, 184 00:26:57,000 --> 00:27:03,042 anybody familiar with wiring in  just regular home systems where you have a long line of sensors 185 00:27:03,042 --> 00:27:08,583 and everything has to be  ‑ ‑ for it to be okay  ‑ ‑ yeah. There's two different ways of 186 00:27:08,583 --> 00:27:15,542 doing it. You can have a closed loop or open, and either way  most of the newer ones you can 187 00:27:15,542 --> 00:27:22,250 program them through  ‑ ‑ to do either way. Stick the pi online with that and put it in the mix 188 00:27:22,250 --> 00:27:29,917 and put relay  ‑ ‑ the power you want to wire in and have it connected to its own network, 189 00:27:29,917 --> 00:27:35,917 say you have your own PIR sensor, or your own what‑ have‑ you. You can then send a signal 190 00:27:40,542 --> 00:27:48,292 to that pi, it can trip it and fire off the security system. Another thing you can do, they 191 00:27:48,292 --> 00:27:54,292 have a panic button, wireless panic buttons, take one of those apart and solder on, run 192 00:27:54,292 --> 00:28:01,667 transistor over that, something happens you hit that, when it goes to the alarm company it 193 00:28:01,667 --> 00:28:08,042 will go in as silent alarm instead of oh a motion or door alarm. Straight across. Silent 194 00:28:08,042 --> 00:28:14,042 alarm, old Betsy fell down or old Betsy is being robbed by hoodlums, whatever. >> A lot of 195 00:28:22,458 --> 00:28:29,292 ways to graft it in and I highly recommend grafting it into the alarm system. There are a lot of 196 00:28:29,292 --> 00:28:35,292 different open source out there for  ‑ ‑ Magic Monkey did the original version  ‑ ‑ the big 197 00:28:39,083 --> 00:28:45,083 giant LED bulbs, and great, great tool, only thing is it wouldn't do multiple bulbs, if 198 00:28:48,125 --> 00:28:54,125 you want to flash your entire down stairs red it would be one bulb, one bulb, kind of sucked. 199 00:28:58,417 --> 00:29:04,417 >> And then  ‑ ‑ sorry, he was the job scripter on that and Sharp did the LiFX Python which 200 00:29:09,292 --> 00:29:15,292 was built off of that, later on, LiFX came out with the official API, written in Ruby, we have 201 00:29:21,458 --> 00:29:27,458 all been over this. You can make it work. It's a good API, I just have this thing against, and 202 00:29:29,833 --> 00:29:35,833 there is  ‑ ‑ I can't pronounce this guy's name or project name, but they have an API for the 203 00:29:38,458 --> 00:29:44,667 WeMo devices and it works fantastic. Code support and command line support. It's great 204 00:29:44,667 --> 00:29:50,667 stuff. You can control all these things just from command line or different scripts. So from there 205 00:29:54,083 --> 00:29:59,000 I created a front‑end service where I wanted something like weights to control the stuff, 206 00:29:59,000 --> 00:30:05,000 front end. You can do rails, rails sucks. It's heavy. Python has flask ‑‑ Ruby has Sinatra ‑‑ 207 00:30:07,250 --> 00:30:13,250 back end services for each of the tech screen readers, their own services and on their own 208 00:30:25,208 --> 00:30:31,417 ports. So if one of them fails, then just that service fails, so I don't lose everything in my 209 00:30:31,417 --> 00:30:39,333 house sort of thing. >> Also, I wanted to have a database keep track of it all ‑ I ended up put 210 00:30:39,333 --> 00:30:47,208 up on separate pi, really light weight, fast, and not that complicated. I wasn't looking 211 00:30:47,208 --> 00:30:52,458 for giant enterprise‑ level stuff, just wanted something quick. On a separate pi, 212 00:30:52,458 --> 00:30:58,458 separate room. If you go that route I highly recommend you put external swap on, get a powered 213 00:31:05,625 --> 00:31:11,625 USB hub, hard drive on it and set up swab, even if you have a great SD card, you look at the 214 00:31:14,958 --> 00:31:20,958 log, just swapping out all the time and all those read/writes, are hell on those cards, so  ‑ ‑ 215 00:31:23,708 --> 00:31:30,833 finally creating a monitoring service with alerts and one of the services go down, be nice to 216 00:31:30,833 --> 00:31:36,708 know about it. >> Again, all the code we are talking about here will be available on a GetHub 217 00:31:36,708 --> 00:31:42,750 after the conference. I am going to do a disclaimer right now that my code is terrible. I am 218 00:31:42,750 --> 00:31:49,500 not a developer. I am a pen tester, so my code works, not pretty, for the ones that are 219 00:31:49,500 --> 00:31:56,375 professional Devs, like nice polished code, it may be offensive to you. So just ‑ ‑ 220 00:31:56,375 --> 00:32:02,375 but it works. >> Moving on. I wanted to be able to determine if I am walking into a room and 221 00:32:04,833 --> 00:32:11,625 things happen. I want my place to know if I am there or not. Originally I wanted to do 222 00:32:11,625 --> 00:32:18,083 Bluetooth, pair to my phone and know if I am walking into a room, it will see my phone, 223 00:32:18,083 --> 00:32:24,083 okay, he's here, and then whatever else happens, update it in the database I am there, 224 00:32:26,375 --> 00:32:32,375 certain other things. So I played around with it, it was kind of a pain in the ass. You 225 00:32:34,958 --> 00:32:40,958 have to create a connection, open the device after it's been paired ‑ ‑ while being pulled, 226 00:32:45,417 --> 00:32:52,875 you have to do the request for the RS  ‑ ‑ the signal strength identifier. You do that, pull 227 00:32:52,875 --> 00:32:56,875 it, while being pulled say oh by the way what's the signal strength, come back with a 228 00:32:56,875 --> 00:33:02,167 number and from there you say oh the phone is within this amount of distance. You put a couple of 229 00:33:02,167 --> 00:33:07,875 those in different rooms and you can determine where something is but if you get to aggressive 230 00:33:07,875 --> 00:33:14,750 with that it will break your wireless interface on your phone. Not just Bluetooth but 231 00:33:14,750 --> 00:33:21,292 regular 802.11 as well. That was a fun one to find out when I  ‑ ‑ but it worked, for a bit. >> 232 00:33:21,292 --> 00:33:27,292 From there I went to do it with 802.11, your phones will  ‑ ‑ beacon every 60 seconds if you 233 00:33:37,708 --> 00:33:42,875 are not doing anything but as soon as you turn them on, start doing stuff your MAC address 234 00:33:42,875 --> 00:33:48,875 will be all over the place. >> There's a command line utility where you can go through and 235 00:33:51,708 --> 00:33:58,875 parse out what MAC is being seen and what signal strength it is. If you have neighbors and stuff 236 00:33:58,875 --> 00:34:05,917 that you don't care about, I will be lower signal strength and you can grit that out. But 237 00:34:05,917 --> 00:34:12,875 if you have a certain set you want to keep track of, significant other, kids, 238 00:34:12,875 --> 00:34:19,917 whatever, a list of things that it will look for. >> If you are really curious about it, the 239 00:34:19,917 --> 00:34:26,625 Tshark command on the very bottom will bust out just way more information than you will 240 00:34:26,625 --> 00:34:33,250 ever want to know about wireless packets and you can do all sorts of magic with it. I did a python 241 00:34:33,250 --> 00:34:39,250 way with scapy and it's ugly, it's very, very ugly, but it works and so what I have been 242 00:34:42,500 --> 00:34:49,417 doing, I have a flat file of MAC I want to keep track of. It fires up, starts looking for 243 00:34:49,417 --> 00:34:57,042 those, when it sees it, it updates the database that okay, it's been seen, what time it's 244 00:34:57,042 --> 00:35:02,708 been seen and a separate process goes through the database to look at time stamps, outside of 245 00:35:02,708 --> 00:35:08,708 certain time, okay, it hasn't been seen in this amount of time so I am not there, other rules 246 00:35:11,208 --> 00:35:14,375 now apply. Lights will be turning off, at pre‑determined times, still random, that way it 247 00:35:14,375 --> 00:35:20,375 knows if I am home so I am not sitting watching TV and the whole living room goes dark. >> 248 00:35:25,375 --> 00:35:31,375 Again, proximity monitoring looks for a  ‑ ‑ signal strength actually, I just went over all 249 00:35:44,167 --> 00:35:51,125 that. Adaptive scheduling. I created a SmartCron system ‑ ‑ everybody familiar with weather 250 00:35:51,125 --> 00:35:57,375 integral  ‑ ‑ they have a fantastic API free for developers. Every day at 1:00 251 00:35:57,375 --> 00:36:03,375 my  ‑ ‑ will pull down the source schedule for the day, sunrise, sunset, that sort of 252 00:36:06,250 --> 00:36:12,250 thing and from there block off randomized times of, okay, I want to turn off my outside 253 00:36:15,125 --> 00:36:21,125 lights sometimes around sunrise, turn them on somewhere around sunset, bunch of other stuff. It 254 00:36:25,083 --> 00:36:31,083 shifts every day, and things are built in, cloud cover, UV index, moves interior lights if  ‑ ‑ 255 00:36:35,208 --> 00:36:39,042 again  ‑ ‑ >> So, for the fun stuff. Defenses against wireless based attack. You saw this last 256 00:36:39,042 --> 00:36:42,500 year. Does anybody go to the fox hunting thing on Thursday? Really early on Thursday, I went 257 00:36:42,500 --> 00:36:46,542 to the Wrapping 7 party before and was not able to get there. No? So the fox hunting is RF 258 00:36:46,542 --> 00:36:50,625 direction finding, really cool stuff. The only way I can think of to defend against these sort 259 00:36:50,625 --> 00:36:56,583 of Z wave attacks, a replay attack or somebody trying to jam 345 Meg sensor data  ‑ ‑ newer 260 00:36:56,583 --> 00:37:01,500 alarm systems that use those, should be able to determine if somebody is transmitting on the 261 00:37:01,500 --> 00:37:06,125 band and where from. Anybody familiar with the Doppler effect? >> For the ones that 262 00:37:06,125 --> 00:37:12,125 aren't, ambulance goes by, high‑ pitched coming and regular pitch as it goes by, lower pitch as 263 00:37:33,083 --> 00:37:39,083 it  ‑ ‑ same with RF. You have the signal, switch through it fast enough you can get a good 264 00:38:00,500 --> 00:38:06,500 idea of where it's coming from. I have a setup that works against 345 and 900 mess  ‑ ‑ so 265 00:38:09,500 --> 00:38:15,500 if anything does key up, outside of a certain parameter for where it's located, I haven't actually 266 00:38:18,875 --> 00:38:25,792 stepped past my front door but anything outside my house will pick up  ‑‑ it uses the Agrello 267 00:38:25,792 --> 00:38:31,792 DF message format, whereas it's signal quality, the system I use called the picodopp  ‑‑ fixed at 268 00:38:33,875 --> 00:38:39,875 7 for signal quality but I don't care, I just want to know where it is. The text there you see is 269 00:38:44,375 --> 00:38:50,375 an actual output from a test I was doing ‑ ‑ and the numbers 327, 316, 312, 319, those are 270 00:38:53,958 --> 00:38:59,958 all numerical bearings off the antenna array of where the signal is coming from. I was 271 00:39:01,958 --> 00:39:07,958 able to sit outside with one of the sensors, one of the 345 sensors, and key it off, the 272 00:39:11,208 --> 00:39:18,833 system says hey, there's something coming from outside and  ‑ ‑ you can pipe that into 273 00:39:18,833 --> 00:39:24,833 a database as well, have that do time stamps, if it's a bunch you know somebody is jamming, it's 274 00:39:28,667 --> 00:39:33,708 from outside, up know somebody is trying to do a Z wave attack. The possibilities are endless. 275 00:39:33,708 --> 00:39:39,708 If you put two together, correlate the two and have real‑ time triangulation. It's fun. >> 276 00:39:43,250 --> 00:39:49,250 Lastly, again, a lot of folks want to just kick in the front door. Alarm goes off, they don't 277 00:39:51,958 --> 00:39:59,875 care. They want to steal things. The best thing you can do is try to make it an inhospitable 278 00:39:59,875 --> 00:40:05,875 environment for them. They want to be quiet, anonymous, just get in and out and nothing happen, 279 00:40:10,958 --> 00:40:18,708 right? So I talked about earlier on the whole house will flash red, that's a good way to do it, 280 00:40:18,708 --> 00:40:25,833 especially if it's at night, the whole suburban house is horrible, you can flash exterior 281 00:40:25,833 --> 00:40:31,833 lights as well. Do something that is going to be electronically activated and do 282 00:40:34,125 --> 00:40:40,125 something in a safe way. Again, safe way, nobody wants to be sued. One thing you can do is 283 00:40:42,375 --> 00:40:48,375 hook up a 12-volt solenoid or  ‑ ‑ for door lock, people who  ‑ ‑ car handles, these real high‑ 284 00:40:51,917 --> 00:40:57,833 powered solenoids you can push/pull with. Have it set up somewhere to knock over 285 00:40:57,833 --> 00:41:04,917 something. Alarm goes off, people come in, all of a sudden they  ‑ ‑ something upstairs. 286 00:41:04,917 --> 00:41:10,917 What the hell was that? It will buy you a few seconds, and don't create anything that can do 287 00:41:14,875 --> 00:41:20,875 harm. >> With that said, so this is purely theoretical. I don't want anybody to ever do anything 288 00:41:31,250 --> 00:41:37,250 like this, especially with doors  ‑ ‑ everybody knows, don't do this. Don't build your 289 00:41:41,542 --> 00:41:46,667 own fireworks either. You can go buy firecrackers, around the fourth of July they are very 290 00:41:46,667 --> 00:41:53,208 cheap. Do not break these open or combine them into something, again, this is Chris Littlebury 291 00:41:53,208 --> 00:41:59,208 at DEF CON 2014 saying do not create your own fireworks. >> So they make these things for model 292 00:42:03,167 --> 00:42:09,458 rockets, I have a good friend, figuring out a way to light these, dude, they are rocket 293 00:42:09,458 --> 00:42:15,042 igniters. I said dude, tell me more about this. This is the middle thing with the black  ‑ ‑ 294 00:42:15,042 --> 00:42:21,042 wires that come in, really thin wire at the end and spark plug material on top of it. What 295 00:42:26,750 --> 00:42:32,750 happens, you put power in, shorts out, ignites the spark plug and it creates fire. >> If 296 00:42:37,250 --> 00:42:43,250 you have it taped up to a bunch of firecrackers like that, it will go boom. For the sake of 297 00:42:48,958 --> 00:42:55,583 argument, if I were going to do something like this I would do them one‑ on‑ one, separate 298 00:42:55,583 --> 00:43:00,458 channel for each one, fire one off individually, it would be like a bang, bang bang, bang, 299 00:43:00,458 --> 00:43:07,333 not something that sounds like the kid from home alone put something in the the thing and 300 00:43:07,333 --> 00:43:13,333 lit it all on fire have it sound something realistic. But inside a closed space it will be super 301 00:43:15,375 --> 00:43:20,083 loud. Your mileage may vary, may be completely illegal, do it somewhere nothing will catch on 302 00:43:20,083 --> 00:43:25,458 fire. These things fly off in the air. I have found them on the roof of my car testing them 303 00:43:25,458 --> 00:43:28,375 out. It's a lot of shit. To give you an idea  ‑ ‑ [firecracker sounds] >> That was just 304 00:43:28,375 --> 00:43:31,958 12‑volts with just that one strand that you saw before. Again, you can do that with pi, 305 00:43:31,958 --> 00:43:37,958 just drive a relay and apply four volt and boom it goes. So from here, I don't have any Z 306 00:43:56,000 --> 00:44:02,000 wave integration yet, it's not open‑source, shit's expensive. I would like to be able to do 307 00:44:08,083 --> 00:44:14,083 that. I would like to integrate SDR scanning into the 345 band for the wireless sensors, that 308 00:44:20,958 --> 00:44:24,625 sort of thing, to be able to read those on the fly, not just the hard line. If there's any 309 00:44:24,625 --> 00:44:30,625 SDR guy that's know how to pull information out of 345 meg AM ‑ ‑ signal, and actually use it, 310 00:44:33,042 --> 00:44:39,042 talk to me afterwards. That would be awesome. >> There's the 345 900 Meg receiver, 311 00:44:42,458 --> 00:44:48,833 transmitter that  ‑ ‑ wanted to spend time in the hacking village, see how that works out. 312 00:44:48,833 --> 00:44:56,542 That came out a day before I got on the plane to come here. I want to hear ideas from you 313 00:44:56,542 --> 00:45:02,542 guys. If you have awesome stories that don't include giant pits with spikes at the bottom  314 00:45:07,042 --> 00:45:13,042 ‑ ‑ no, no. Question? >> [indiscernible] >> Shut the door after the  ‑ ‑ no, that may be a 315 00:45:21,000 --> 00:45:27,000 good idea but that also could be some sort of booby trap, that theoretic firework thing if 316 00:45:30,333 --> 00:45:36,333 somebody implemented such a thing, not that I would, but if it did and the door was shut, 317 00:45:38,792 --> 00:45:45,125 they were not able to have a timely egress outside the establishment, were to be maybe 318 00:45:45,125 --> 00:45:51,125 burned alive, that would be bad. >> Anyway, I am running out of time, I apologize, any 319 00:46:02,708 --> 00:46:08,708 questions, there's my Twitter, e‑ mail, all that. Come find me afterwards. Yes. [Applause]