1 00:00:00,417 --> 00:00:06,167 >>Next we've got josh and teddy. I've been looking forward to this talk for a long time. Looks 2 00:00:06,167 --> 00:00:12,167 like they have some really cool stuff to show you. So let's give these guys a big party track 3 00:00:14,792 --> 00:00:21,875 welcome. (Applause.) All right so. >> All right so my name is Josh Datko. This is Teddy Reed. 4 00:00:21,875 --> 00:00:27,208 Today we're going to make a Hardware inplant. Basically I'm going to give a quick 5 00:00:27,208 --> 00:00:32,708 introduction on what NSA playset is about. what were trying to do, were gonna go over some I2C 6 00:00:32,708 --> 00:00:38,083 attack surfaces, you don't know what that is yet but well talk about that, We're going to build 7 00:00:38,083 --> 00:00:43,000 up a hardware implant. 'Re going to start with the attack surface and get the control module, and 8 00:00:43,000 --> 00:00:48,333 get a little GSM going. We're going to show how we can improve this technique. Some suggestions 9 00:00:48,333 --> 00:00:53,083 for future work and improvement that is we think improve on the NSA technique. We're going to 10 00:00:53,083 --> 00:01:00,667 wrap up and do a live demo. So what is the NSA play set? So if you've went to Mike Thompson's 11 00:01:00,667 --> 00:01:06,833 talk. He introduced it, but last year there was a leaked in catalogue there was a lot of 12 00:01:06,833 --> 00:01:11,833 hardware toys and the idea is that we look through them and understand what these 13 00:01:11,833 --> 00:01:19,083 capabilities are so we know how to defend against them, so there 4 talks with this moniker 14 00:01:19,083 --> 00:01:23,208 There's one on Friday that we're in track one now. And right after this one, so there's GSM 15 00:01:23,208 --> 00:01:29,208 sniffing. And at 1400 you see PCIe stuff. So yeah, these, this is kinda of inspired by the NSA 16 00:01:31,917 --> 00:01:36,708 catalog so they have this hardware hacking catalog, They kind of flip through it and like 17 00:01:36,708 --> 00:01:42,125 oh this is interesting. And what do I want to buy and attack this target? And one of this attacks 18 00:01:42,125 --> 00:01:46,708 is this device called wagon bending.  and Wagon bed didn't actually have its own slide in 19 00:01:46,708 --> 00:01:52,208 the catalouge leads us to believe we don't have all the data. We were refer by two other 20 00:01:52,208 --> 00:01:58,833 techs, ironchef and cross beam. What we know about Wagon bed is is was I2C controller board  21 00:01:58,833 --> 00:02:04,208 that somehow attached to a PC in this case, they spelled out a very specific version of the HP 22 00:02:04,208 --> 00:02:07,958 proliant server. which of you have that? I would be really interested if you looked at it 23 00:02:07,958 --> 00:02:12,750 and saw anything. No one has to come forth. So the very specific model of the HP server. And it 24 00:02:12,750 --> 00:02:19,208 was some module or capability, so we could add a GSM module to implement cross beam and so they 25 00:02:19,208 --> 00:02:26,167 could exfiltrate data over GSM. so you know, you kind of look through and this is kind of 26 00:02:26,167 --> 00:02:32,750 nice. But you really wonder how that works. At least I did. So let's identify some of the 27 00:02:32,750 --> 00:02:38,000 requirements for this implant. All we know is that it must attach over I2C. Which we'll go 28 00:02:38,000 --> 00:02:42,583 over that in a second. And it must have some modular component and it has to reach back over 29 00:02:42,583 --> 00:02:47,750 GSM. So those are the requirements from the leaked documents. But the NSA play set, 30 00:02:47,750 --> 00:02:52,042 we have other requirements. We want these tools to be easy to use. So this technique 31 00:02:52,042 --> 00:02:56,500 implementing this technique should be easy and approachable. Needs to be open source 32 00:02:56,500 --> 00:02:59,792 hardware. So I'm a big believer in open source hardware or should at least design 33 00:02:59,792 --> 00:03:05,917 schematics the bomb, everything, so other people can learn from the technique and reimplement 34 00:03:05,917 --> 00:03:11,417 what you're doing. Also wanted the device to be flexible. So I didn't want some one off 35 00:03:11,417 --> 00:03:16,167 hardware implant. I wanted some generic implant that would be useful on multiple platforms. 36 00:03:16,167 --> 00:03:22,208 And lastly, should be fun. There are some single chip solutions that do this, but they're 37 00:03:22,208 --> 00:03:28,125 proprietary, and under NDAs. That's not funny. We want to make it funny. This slide here, 38 00:03:28,125 --> 00:03:34,958 we're going to come back to a couple times. This is the break down of the implement as you go 39 00:03:34,958 --> 00:03:39,542 through, we're going to update this so we know where we're at. So right now, all WE know is 40 00:03:39,542 --> 00:03:44,792 I²C. The middle platform is  the hardware there's some controller, we don't know what 41 00:03:44,792 --> 00:03:48,958 that is it yet. We know it talks to a GSM module, we don't know how it talks to it, But then the 42 00:03:48,958 --> 00:03:56,708 GSM capability gets you some reach back. So what is I²C? It's a serial bus it typically found 43 00:03:56,708 --> 00:04:03,750 on embedded systems because it's four wires. You just need data and clock and power and ground. 44 00:04:03,750 --> 00:04:07,500 It's a multimaster which basically means what its sounds you can have multiple masters in 45 00:04:07,500 --> 00:04:13,375 the bus. There is some you know collisions detecting. There's some details to the protocol. 46 00:04:13,375 --> 00:04:18,167 There's multiple slave devices. These are addressable so you can write to the device. if you guys 47 00:04:18,167 --> 00:04:21,333 like to do anything like temperature sensors or any of that kine of stuff anything that 48 00:04:21,333 --> 00:04:25,958 don't have an address that you can talk to standard speed. So not a very fast protocol. 49 00:04:25,958 --> 00:04:31,208 standard speed is about a hundred KHz. It could go theoretical 3.2 mega bits per 50 00:04:31,208 --> 00:04:35,833 second. But overall, it's not really fast. It's meant for E prom and these kind of low 51 00:04:35,833 --> 00:04:42,167 embedded devices. So if you are a visual person, this is a visual example. So the top 52 00:04:42,167 --> 00:04:48,083 picture will show this bus. You see you have multiple masters. You have the E prom slave device 53 00:04:48,083 --> 00:04:52,792 on this bus a sensor slave, So if you're ever doing any kind of reverse engineering I²C, 54 00:04:52,792 --> 00:04:58,542 typically looking for those two data lines. Also look for pull up resisters, so you see those 55 00:04:58,542 --> 00:05:03,208 pull up resisters coming up from the voltage reel.   some of the system will let your processors 56 00:05:03,208 --> 00:05:07,792 actually have pull up processors internally. So they may not be there. But umm, that's usually a 57 00:05:07,792 --> 00:05:12,833 good sign. And at the bottom you see a  logic analyzer dump and basically the master that 58 00:05:12,833 --> 00:05:18,208 controls the clock and sets the frequency and depending on the rise and fall of the data line 59 00:05:18,208 --> 00:05:24,792 that decodes to a different value and that's how they communicate. So okay, now we 60 00:05:24,792 --> 00:05:32,583 know some things about I²C. Let's start thinking about how we can use I²C to attack the PC. 61 00:05:32,583 --> 00:05:40,250 I²C, even though it's embedded protocol, it shows up commonly on computers. One thing it'll 62 00:05:40,250 --> 00:05:46,042 show up is on ram. There's an E prom typically that has some settings and data about the ram. 63 00:05:46,042 --> 00:05:50,875 So that could be potential attack surface. You could certainly attach a SOIC8 clip. 64 00:05:50,875 --> 00:05:57,542 Either on the E prom or solder wires to it. That's not fun. You got open a cage and you gotta do 65 00:05:57,542 --> 00:06:03,708 some soldering. This is not fun. You could do it. But it didn't meet the fun requirement. PCI 66 00:06:03,708 --> 00:06:09,792 and PCIE, this is one'sest entering because PCIe has a SIM box, which is an I²C, if we make 67 00:06:09,792 --> 00:06:15,792 a PCIe card, put that in, we can use I²C. Imagine if you made some sort of card, you cut that 68 00:06:18,083 --> 00:06:23,333 into a device, you can get onto I²C, and so whats nice about I²C from a tech point of view, 69 00:06:23,333 --> 00:06:28,917 there's no hot detect. It doesn't launch any drivers, you just kind of add to the bus 70 00:06:28,917 --> 00:06:34,083 unless you're actively probing for the device, you would not know something's on I²C. that 71 00:06:34,083 --> 00:06:38,125 can be interesting, but again, you got to open a case. Screwdriver and that stuff. were 72 00:06:38,125 --> 00:06:45,833 gonna camp it up. So battery controllers, so if you have a laptop that has batteries, 73 00:06:45,833 --> 00:06:51,250 there's no I²C battery controller. That could be a nice way to get in. But then you're 74 00:06:51,250 --> 00:06:56,208 only talking laptops that didn't really meet the whole general purpose thing. So if there's 75 00:06:56,208 --> 00:07:02,250 only there was an adapter that kind of fit every PC or server that had some sort of I²C 76 00:07:02,250 --> 00:07:09,458 protocol? What about video? It's on a video adapter. Why is that right? If you ever wondered why 77 00:07:09,458 --> 00:07:17,292 you plugged in your video adapter, you could automatically detect the resolution. So that 78 00:07:17,292 --> 00:07:22,042 resolution is stored on an E prom on a monitor. So there's I²C come out of every video 79 00:07:22,042 --> 00:07:27,625 adaptor, the way that video adaptor works, is basically with two different protocols. So the 80 00:07:27,625 --> 00:07:32,667 data inside the E prom fits this thing called E did. Which extended display identification 81 00:07:32,667 --> 00:07:37,708 of data that has the information about the resolution. And it uses DDC, which is a data 82 00:07:37,708 --> 00:07:43,458 display channel. But it's basically the transport is an I²C and now ill turn it over to 83 00:07:43,458 --> 00:07:49,458 teddy to talk about EDID. >> How's it going everyone? So think of EDC as the next layer 84 00:07:54,500 --> 00:08:00,750 in the protocol stat above I²C. And there are drivers in whatever operating system or 85 00:08:00,750 --> 00:08:07,458 whatever video card you're using or whatever system OEM, independent service vendor board 86 00:08:07,458 --> 00:08:12,792 that implement it is video adapter, that's running in software lands supporting this 87 00:08:12,792 --> 00:08:19,417 protocol, parsing it as it comes out of the display adapter or whatever you're attaching to 88 00:08:19,417 --> 00:08:25,917 VGA, HDMI, so on and so forth. You can clear this. If you're in LINUX have this application as 89 00:08:25,917 --> 00:08:33,083 part of your standard user and set of binaries. It will query I²C bus and ask you this 90 00:08:33,083 --> 00:08:38,750 information for every display adapter that your system reports is in use. And by use I mean 91 00:08:38,750 --> 00:08:44,875 attached right? It's there. Like josh said, there's no hot spot for any protocol that has to say 92 00:08:44,875 --> 00:08:51,625 im alive. So if you're. Laptops are now try this see what you did you probably don't have 93 00:08:51,625 --> 00:08:55,917 anything if you dont have any external dispplays. Sometimes your monitor will show up in 94 00:08:55,917 --> 00:09:01,917 here too. So we need to code this --to-- so this user line application, you can use to 95 00:09:04,625 --> 00:09:10,625 decode. So now start using our imaginations. We have a hardware implant, but we could try to get 96 00:09:13,625 --> 00:09:19,708 software control with the implant because we're sending data. You can fuzz these 97 00:09:19,708 --> 00:09:26,417 binaries. There's an awesome talk by Andy Davis through NCC for attacking HDMI which does 98 00:09:26,417 --> 00:09:32,167 exactly this. Because this stuff gets extensive. There is an extension protocol and defying 99 00:09:32,167 --> 00:09:38,875 extension blocks, one of which is 50 H localized streaming extension. Which is exactly what 100 00:09:38,875 --> 00:09:45,250 you're thinking right now. A one length encoded string, the size, and then the binary. So if 101 00:09:45,250 --> 00:09:50,333 you're starting to fuzz that, there's a couple bites. Say it's a longer string. Say it's a 102 00:09:50,333 --> 00:09:55,833 smaller string. You get the idea. But more importantly, there's this FFH which is an 103 00:09:55,833 --> 00:10:00,667 extension defined by the OEM. You can't find the specs in those. They're not published. So 104 00:10:00,667 --> 00:10:06,667 you'd have to query NVIDIA ATI and see what they're doing. Or display generator XYZ. And 105 00:10:11,208 --> 00:10:18,833 here's Andy's fuzzer. We've gone and implemented that for the BeagleBone to fit request this 106 00:10:18,833 --> 00:10:24,333 stack of software and hardware. that were gonna release open source, and we have support for 107 00:10:24,333 --> 00:10:31,000 fuzzing the awesome stuff that Andy started, but also trying to discover the formats for those 108 00:10:31,000 --> 00:10:37,917 extension blocks. Yeah. More fuzzing. So let's fuzz the stuff we need to then fuzz more. Yeah. 109 00:10:37,917 --> 00:10:45,792 You got it. And then to expand on this whole mentality and recall the arms to start fuzzing 110 00:10:45,792 --> 00:10:51,875 these things, a lot of other things that supports this protocol, the software protocol. 111 00:10:51,875 --> 00:10:56,542 Let's start expanding that and go to the set top boxes and whatever the hell it is that 112 00:10:56,542 --> 00:11:02,083 supports video and enumerating the extension blocks and throwing them up and hardening 113 00:11:02,083 --> 00:11:08,083 them too. So throw it back to josh now. >> Okay. So, you know your attack surfaces, so were 114 00:11:11,500 --> 00:11:17,500 gonna use a VGA, so how do we do that? Like I said before, we need these four pins. On a VGA 115 00:11:20,917 --> 00:11:27,583 adapter, there pins 5,9, 12 and 15 corresponding to the ground. Basically power. I²C data in 116 00:11:27,583 --> 00:11:33,583 clock. Some older VGA adaptors may not have pin 9 for power so you have to watch out for that. 117 00:11:35,667 --> 00:11:40,208 Now on the first time I tried this I was a dumb dumb. and cut the wrong end of the cable so i 118 00:11:40,208 --> 00:11:46,042 have to fly wire into the VGA adapter and I stripped the cable the wrong way. If you're looking 119 00:11:46,042 --> 00:11:51,292 to power your arduino, of do something cool with yor arduino, then attached to the VGA adapt 120 00:11:51,292 --> 00:11:57,542 get power I²C out run a two wire library and you can communicate with an arduino and do all the 121 00:11:57,542 --> 00:12:00,875 cool stuff. And you could typically do with arduino without having able having to go 122 00:12:00,875 --> 00:12:07,250 over a serial debug. That's a cool biographic way of using your VGA adapter. So now we have 123 00:12:07,250 --> 00:12:12,750 some more information. Right? Now we know the target to video adapter going to be using DDC. 124 00:12:12,750 --> 00:12:17,375 Which is also expert, but now we know it's a more specific version. But we need to fill in 125 00:12:17,375 --> 00:12:23,708 the next block which is the controller, need some sort of platform to kind of help us out 126 00:12:23,708 --> 00:12:28,125 here. So my plaform of choice is the BeagleBone on black. if you havent played with the 127 00:12:28,125 --> 00:12:34,917 BeagleBone black, i highly suggested. it an awesome board, 1ghz arm cortex processer, 512 128 00:12:34,917 --> 00:12:40,000 RAM Really nice feature is these two independent parameter realtime unit. So they have a 5 129 00:12:40,000 --> 00:12:45,000 milisec guarantee execution. And about two months ago, they released a C compiler for it. 130 00:12:45,000 --> 00:12:50,917 there wasn't a lot of attention on these, but If you are into this, the C compiler's out and 131 00:12:50,917 --> 00:12:55,333 you can do some pretty cool stuff with these  ‑ ‑ they're both used like a DMA interface. 132 00:12:55,333 --> 00:13:01,708 It also have crypto accelerators which is kinda interesting feature for AES If you look at 133 00:13:01,708 --> 00:13:05,708 my blog, i have some things where i tried to get it going for open SSL, but I think that's 134 00:13:05,708 --> 00:13:09,042 kind of an interesting. maybe if you have a like a network attached BeagleBone and yoy want 135 00:13:09,042 --> 00:13:14,833 to upload the SSL processing into crypto accelerator. It also has two I²C buses. if youre 136 00:13:14,833 --> 00:13:19,542 doing all I²C, you have 2 independent buses, It's actually it three but you cant use the 137 00:13:19,542 --> 00:13:24,583 other one so we need one more thing. The other thing we need, because we're going to improve 138 00:13:24,583 --> 00:13:28,208 on the implant with some hardware encryption. so we need some hardware encryption 139 00:13:28,208 --> 00:13:32,875 platform and then we're also going to need that mega 320P which well talk about later. 140 00:13:32,875 --> 00:13:38,875 There is a device that can do this. its called the CryptoCape. It has a whole bunch of security 141 00:13:43,417 --> 00:13:49,708 ICs. It has a elliptical curve authenticator. so this will generate ECDSA keys in the chip 142 00:13:49,708 --> 00:13:56,417 where the private key can never be released. Does the same thing for our shell. 256 mac key. Has 143 00:13:56,417 --> 00:14:03,083 an encrypted E prom, AS-128 and CCM mode. Which is nice, you can encrypt for two by packets to 144 00:14:03,083 --> 00:14:06,958 another device. More of that keys stays in the hardware. Battery backed up real time 145 00:14:06,958 --> 00:14:12,000 clock so those are all so useful in any kind of security protocol where that battery os dedicated 146 00:14:12,000 --> 00:14:16,583 on the cape. the BeableBone Has an RTC, but in order to get up the power, you have to power 147 00:14:16,583 --> 00:14:21,000 from the test points. The power rails connected to the main board so this one is a dedicated 148 00:14:21,000 --> 00:14:25,917 RTC. As a trusted platform module which we'll be talking about later  but basically we 149 00:14:25,917 --> 00:14:31,083 need to learn about the trusted platform module now or the TPM is that it does RSA keys or 150 00:14:31,083 --> 00:14:37,083 encryption and those RSA keys keys device. Lastly, it has that mega328p with the arduino 3.3 151 00:14:37,083 --> 00:14:42,625 pro mini bootloader That's also useful. The main thing about the Cryptocape is you can upload 152 00:14:42,625 --> 00:14:46,583 sketches from the Beaglebone to the other program the jumpers, but only if you have the jumpers 153 00:14:46,583 --> 00:14:52,583 on, If you take the jumpers off, you need an ISP pro header to flash the ATmega. So if you 154 00:14:52,583 --> 00:14:57,750 imagine, if you ssome software in the ATmega that you don't want to be manipulated by 155 00:14:57,750 --> 00:15:02,250 software vulnerability,if you take this jumpers off you have this hardware interlock to make 156 00:15:02,250 --> 00:15:07,500 sure that your sketch on the arduino isn't changed and as you see, all sorts of break out and 157 00:15:07,500 --> 00:15:11,625 expansion rooms and do some fun stuff. So now we know what our controller platform is going to 158 00:15:11,625 --> 00:15:15,000 be. and were gonna use the BeagleBone black and the Cryptocape that gonna talk over 159 00:15:15,000 --> 00:15:19,250 I²C to some sort of video adapter, which we haven't shown yet. And that's going to go over 160 00:15:19,250 --> 00:15:25,250 DDC. So now we need the GSM module. The GSM module I picked was seed studio GPRS shield V2. 161 00:15:27,375 --> 00:15:34,542 We can get this from seed studio. It uses the SIM 900chip set. its in an arduino factor, 162 00:15:34,542 --> 00:15:37,750 So it's a arduino shield so if you just kinda want a GSM shields just to play with an 163 00:15:37,750 --> 00:15:42,708 arduino, This is a cool thing to get, Quad band support, it has TCP support, so you could do 164 00:15:42,708 --> 00:15:49,042 like HTTP and get inputs, SIM card holder on the bottom where you can get different service 165 00:15:49,042 --> 00:15:53,333 providers. I've tested it with T‑ Mobile and ATT. so if youre really paranoid you can go with 166 00:15:53,333 --> 00:15:58,917 prepaid, a SIM card with cash. T‑ Mobile I thought had a pretty good deal with the $35 unlimited 167 00:15:58,917 --> 00:16:04,917 talk and text. So for life. those are pretty cool or as long as GSM is surrounding us. So now 168 00:16:06,917 --> 00:16:11,375 we know some more information. Now we know we're going to have the GSM. Is GPRS shield as our 169 00:16:11,375 --> 00:16:16,458 GSm reachback. The way you communicate with GPRS shield is to use serial UART. We're going 170 00:16:16,458 --> 00:16:20,208 to have a serial connection from the beagle bones UR four. there are several UARTs in the beagle 171 00:16:20,208 --> 00:16:27,917 bone. It's going to talk to the GPRS shield and is going to give a reachback over the GSM. This 172 00:16:27,917 --> 00:16:35,458 is kind of where I got in to the rabbit hole, trying to make this. How many hardware people 173 00:16:35,458 --> 00:16:42,750 do we have? Okay so, cool. So basically the BeagleBone comntrol has 460mA. I've got the 174 00:16:42,750 --> 00:16:47,542 CryptoCape. ive goit the GSM shield, All this is being powered from the VGA. There's no 175 00:16:47,542 --> 00:16:54,292 external power, its powered from the monitor. The VGA specs basically say okay, you can have 176 00:16:54,292 --> 00:17:00,667 up to an amp, but wasn't very clear why they'd implement it or if that was the standard. I'm 177 00:17:00,667 --> 00:17:06,792 looking through the GSM shield, ready for talking have max two‑ amp power. So I was starting to 178 00:17:06,792 --> 00:17:13,667 freak out. It's not going to work. So I ended up making this LiPoWer cape. Which I ended up 179 00:17:13,667 --> 00:17:19,167 not needing which we'll talk about later. So the nice thing about the LiPoWer cape you start 180 00:17:19,167 --> 00:17:23,750 with the dual cell LiPo, if you have a switching regulator, you can bring that voltage down, 181 00:17:23,750 --> 00:17:27,708 because otherwise if you have a single cell LiPo on the BeagleBone you can come in the 182 00:17:27,708 --> 00:17:31,917 test point that's under the board and that's only single cell liPo. but you're only gonna 183 00:17:31,917 --> 00:17:37,792 get a limit of 500mA which ids what youll get, On a USB. You get the umph one amp max you 184 00:17:37,792 --> 00:17:42,833 need to come in with the five‑ amp  ‑ ‑   ‑ ‑ regulator with an inducter object on the noise 185 00:17:42,833 --> 00:17:50,458 line| worked pretty well. So it's a nice (indiscernible) it's stackable and  ‑ ‑   ‑ ‑ and 186 00:17:50,458 --> 00:17:56,458 that'll tower this whole device. The one thing we're missing still is what power (inaudible). 187 00:17:59,083 --> 00:18:05,750 So this is the chuck wagon. So the chuck wagon is the code name for this device. And as you can 188 00:18:05,750 --> 00:18:11,750 see, here, right, it's a little DDC to I²C adapter. It's bred word friendly. So fits on a 0.1 189 00:18:15,000 --> 00:18:21,000 encheddar.   ‑ ‑   ‑ ‑ so I can have the 3.3 or five‑ volt. If you do want a 3.35  ‑ ‑   ‑ ‑ 190 00:18:26,417 --> 00:18:32,417 five volts will come from the video. Not all video adapters will supply five‑ volt. So if 191 00:18:34,833 --> 00:18:41,792 you don't see the five‑ volt power, you got to provide five volts. But very small adapter. 192 00:18:41,792 --> 00:18:47,833 And you attach it to the crypto case. And tie up the (indiscernible) sea lion's. The 193 00:18:47,833 --> 00:18:50,750 at megas  ‑ ‑ beagle bone, everything's connected in one bus. And you're set to go. So 194 00:18:50,750 --> 00:18:56,750 we're releasing the schematic, the (indiscernible)s the bombs, these will all be on our web 195 00:18:59,583 --> 00:19:02,958 site. I'm going to go over this. That's pretty simple electrically. Logic level 196 00:19:02,958 --> 00:19:10,750 conversion, power indicator. I put a (indiscernible) on the bottom. I was worried about 197 00:19:10,750 --> 00:19:16,583 people reverse powering the video adapter and blowing up the card. But yeah, so probably not 198 00:19:16,583 --> 00:19:23,292 needed. This is the lay out. So this is. (Audio stopped.) Not necessarily (inaudible) after I 199 00:19:23,292 --> 00:19:28,958 submitted the abstract, this board popped on hack a days. Oh gosh. This is kind of a nice 200 00:19:28,958 --> 00:19:34,958 board. This guy put a video adapt E he put the exmega. The I²C HAKS has been done before, 201 00:19:37,792 --> 00:19:43,792 not necessarily novel, but we're not aware of anyone trying to use it as an excellent tracing 202 00:19:43,792 --> 00:19:50,333 capability (inaudible). So now we have a more complete picture. We have the chuck wagon that's 203 00:19:50,333 --> 00:19:55,125 going to provide the (indiscernible) to the target. With the crypto key. 204 00:19:55,125 --> 00:20:00,708 (Indiscernible) arts up to the GPR shield (indiscernible) to the access. So again, ran into a 205 00:20:00,708 --> 00:20:07,250 problem here where the GSN shield is five volts because it's made for ARD wean know and 206 00:20:07,250 --> 00:20:12,167 automatic level conversion. It's like a (indiscernible) sensor. Then umm, we put everything 207 00:20:12,167 --> 00:20:16,833 together with the power kit which ended up not being needed right? It kind of looks like 208 00:20:16,833 --> 00:20:23,125 this Frankenstein device. So I'm trying to get all the different forms together. (Indiscernible) 209 00:20:23,125 --> 00:20:29,250 lie Poe. There's three stacked case, one is the PowerPoint. Beagle bone. The logic level 210 00:20:29,250 --> 00:20:35,167 converter. The GPI shield. Like I said, I didn't end up needing this. I so I finally measured 211 00:20:35,167 --> 00:20:39,833 the current using the micro current gold, which is an awesome way to measure the 212 00:20:39,833 --> 00:20:45,792 current, (inaudible) resolution very cool. Right? And only peaked out. I saw a peak with 213 00:20:45,792 --> 00:20:51,917 everything turned on. If I turned on the GPS just peaked over 500  milligrams and I 214 00:20:51,917 --> 00:20:57,917 wasn't doing any voice. And it really didn't end up needing a power cable. So miccing  ‑ ‑   ‑ 215 00:20:59,917 --> 00:21:06,417 ‑ U.S. TRed by a hardware implant designer. I highly recommend it. You  ‑ ‑   ‑ ‑ 216 00:21:06,417 --> 00:21:12,125 take out the battery. You have a much smaller (indiscernible) file. And then I just jump 217 00:21:12,125 --> 00:21:16,833 around there to separate the powers. I didn't want to have power coming through the VGA 218 00:21:16,833 --> 00:21:23,833 adapter. I could slip that off and power through a different source. And slip TA on 219 00:21:23,833 --> 00:21:30,208 (indiscernible) port. So when you stick this in a server or desktop or something to look at 220 00:21:30,208 --> 00:21:35,333 that. So all the fly wires (indiscernible) adapters. Obviously this is all one board, 221 00:21:35,333 --> 00:21:40,625 it could look a lot cleaner. But yeah, that's what it looks like when it's attached to the 222 00:21:40,625 --> 00:21:47,542 target. SPOF the software flows get tricky mainly because of this I ² (indiscernible) C. It's 223 00:21:47,542 --> 00:21:53,542 kind of difficult to talk mast tore master. So your target device is a I ² T master. Your  224 00:21:56,208 --> 00:22:01,333 ‑ ‑ the tracking device is a I²C master. You need a (indiscernible) slave to 225 00:22:01,333 --> 00:22:05,083 communicate. This is where the mega comes in. Slave. What the way that you target the target 226 00:22:05,083 --> 00:22:11,083 and the attack communicate is they use it as a mailbox. So they write to the slave device. 227 00:22:13,375 --> 00:22:19,417 Which I arbitrarily pick address 42. They write, there comes a payload. The other guy picks it 228 00:22:19,417 --> 00:22:25,625 up. So there's no notification (indiscernible). But from the beagle (indiscernible)  ‑ ‑   ‑ 229 00:22:25,625 --> 00:22:31,708 ‑ add a GPI (indiscernible). So when the GPIO comes on the mega  ‑ ‑   ‑ ‑ tells the 230 00:22:31,708 --> 00:22:35,417 (indiscernible) bone hay pick up your message and then you could kind of eliminate some pulling 231 00:22:35,417 --> 00:22:42,667 (inaudible). So how do TO use this thing right? We talked about some potential 232 00:22:42,667 --> 00:22:50,500 (indiscernible). That's one way to get some mall ware on to the target. So the NSA basically 233 00:22:50,500 --> 00:22:55,042 said for the rag gamed device they needed a bio (indiscernible) one. So 234 00:22:55,042 --> 00:22:59,375 similarly, you need to have some sort of mall ware on the target that is communicating on the I ² 235 00:22:59,375 --> 00:23:02,958 P. That's going to communicate like some, imagine some kernel module that can communicate I²C 236 00:23:02,958 --> 00:23:08,958 and can talk out (inaudible). Once that's there, that mall ware can be silent or just 237 00:23:11,125 --> 00:23:16,083 waiting for the device to be attached. It's not making any other net work ex‑ cans. 238 00:23:16,083 --> 00:23:23,042 Basically no one's looking at I²C on the process to see what it's doing. So once you connect 239 00:23:23,042 --> 00:23:27,167 it, it'll (indiscernible) for the device. And you attach your implants, and then you 240 00:23:27,167 --> 00:23:33,167 (indiscernible) control. You know, whatever you like. So if you have the software  ‑ ‑   ‑ ‑ 241 00:23:36,167 --> 00:23:42,333 using (indiscernible) data out to GSM. So the attacking computer has the mall ware. And 242 00:23:42,333 --> 00:23:50,208 just starts sending data to the mega (indiscernible). It goes out to GSM. And that could go 243 00:23:50,208 --> 00:23:57,958 out to voice text or make some sort of HD post. So you don't need the SGSHGS SM shield. It's 244 00:23:57,958 --> 00:24:04,417 the modular capability. So you imagine some guy coming up with the server, plug in the device, 245 00:24:04,417 --> 00:24:11,458 (indiscernible) the day, plug it out and use the data. Because it's by‑ directional device, if 246 00:24:11,458 --> 00:24:18,000 that implant has code for the mall ware to run, you can give the mall ware a new code. So you 247 00:24:18,000 --> 00:24:23,958 don't have to go through a protocol net work delivery mall ware. And if you can control the 248 00:24:23,958 --> 00:24:31,125 implant over GSM, then you can control the target over GSM. So why is this significant? Well, a 249 00:24:31,125 --> 00:24:34,833 lot of people think that you know they close, they have their net work connection monitor, 250 00:24:34,833 --> 00:24:40,667 they have something on their USB ports. They have no other ends inside the computerment most 251 00:24:40,667 --> 00:24:46,583 people think of video as being an out. But I²C is by‑ directional. So even if you shut 252 00:24:46,583 --> 00:24:50,792 everything down, you always have this. (Audio stopped.) By‑ directional port that can come 253 00:24:50,792 --> 00:24:56,708 into your computer. And it's basically require. In order to do monitor (indiscernible) 254 00:24:56,708 --> 00:25:00,792 direction, you have to (indiscernible) so on any device, there's going to be an 255 00:25:00,792 --> 00:25:06,167 end THABS typically not monitored or typically not otherwise looked at that most 256 00:25:06,167 --> 00:25:12,292 people don't think of. Like we talked about before, this can work over multiple monitor 257 00:25:12,292 --> 00:25:15,083 adapters.   ‑ ‑   ‑ ‑ general DOR general DOR  ‑ ‑   ‑ ‑ HDMI is probably a little bit better. 258 00:25:15,083 --> 00:25:21,083 There is this top plug event. But yeah, you can put anything on this and get power on any 259 00:25:23,625 --> 00:25:31,083 kind of video adapter and (indiscernible) bust. So there's a couple things that could be 260 00:25:31,083 --> 00:25:34,958 done to improve this. So obviously looks a little Frankensteinish. So you get 261 00:25:34,958 --> 00:25:39,333 everything on one board. You make the implant key, put it on there. Get the SIM card. TPN. 262 00:25:39,333 --> 00:25:45,042 And that would reduce the size of the device. HD (indiscernible) fingerprint  ‑ ‑ 263 00:25:45,042 --> 00:25:51,917   ‑ ‑ much smaller adapter. That would be nice to shrink back down. You could do this from 264 00:25:51,917 --> 00:25:56,417 ADR. You don't necessarily need to use the (indiscernible) bone. Have the benefit of using a lot 265 00:25:56,417 --> 00:26:03,875 less power. And you get LINUX and (indiscernible) net and stuff. But there's nothing 266 00:26:03,875 --> 00:26:06,792 saying you couldn't just do it. You could just do the crypto page if you just apply. 267 00:26:06,792 --> 00:26:13,000 (Indiscernible) and put your own power supply and that's  ‑ ‑ if you think of the crypto page 268 00:26:13,000 --> 00:26:16,583 it's just a argument with a promini  ‑ ‑   ‑ ‑ but an interesting one would be to 269 00:26:16,583 --> 00:26:22,583 combine mic oz man's (indiscernible) within a a an ROF (indiscernible) reflector  ‑ 270 00:26:27,625 --> 00:26:32,625 ‑   ‑ ‑ so, someone wants, looking for a project to do for the hack KA data IO prize, 271 00:26:32,625 --> 00:26:38,625 that'd be pretty cool. And  ‑ ‑ so now. >> So now you have a pretty cheep NSA N plant all the 272 00:26:42,417 --> 00:26:48,125 capabilities from the one that was described in the play book? How do we make that bet SNER we 273 00:26:48,125 --> 00:26:53,083 said TPN a couple times since we're looking working on some NSA level shit, we need to take 274 00:26:53,083 --> 00:27:00,042 this to the next level. So josh and I got together and said if you're going to deliver mall 275 00:27:00,042 --> 00:27:06,042 ware through some GSM back door over ITC into the (indiscernible), if someone's on 276 00:27:08,417 --> 00:27:12,500 that machine looking at what's running, we sure as hell don't want them reverse engineering 277 00:27:12,500 --> 00:27:17,833 our mall ware. Or getting it off the machine. If we had the opportunity to drop in and 278 00:27:17,833 --> 00:27:25,042 implant, we also had the opportunity to put a T plant in there, and  ‑ ‑   ‑ ‑ TPN. And 279 00:27:25,042 --> 00:27:32,792 exfiltrate the public (indiscernible). It's also cool because the crypto locker and 280 00:27:32,792 --> 00:27:38,792 (indiscernible) are popular. We want to continue that popularity contest for using crypto as an 281 00:27:41,042 --> 00:27:45,750 example. We don't endorse using crypto (indiscernible). We love trust and computing. There's a 282 00:27:45,750 --> 00:27:51,542 lot of good things that come from it. This is cool if you want to protect legitimate shit. 283 00:27:51,542 --> 00:27:57,542 Not just your mall ware. All right, suspend that disbelief. The TPN comes on crypto case. 284 00:27:59,708 --> 00:28:06,375 It's already hooked up in this Frankenstein awesome looking thing. So you get that free. 285 00:28:06,375 --> 00:28:11,542 Windows 82 going forwards, in 2004 API commandses  ‑ ‑   ‑ ‑ which means it autogenerates ST 286 00:28:11,542 --> 00:28:17,542 the stuff that needs top on the TPN that we're not aware of and complicated for you. Which 287 00:28:21,167 --> 00:28:25,958 includes the password that it manages and  ‑ ‑   ‑ ‑ enrate a new one encrypt or decrypt with 288 00:28:25,958 --> 00:28:31,958 that, don't worry, window's got your back.   ‑ ‑   ‑ ‑ so it's supereasy and  ‑ ‑   ‑ ‑ to add 289 00:28:37,292 --> 00:28:43,292 a TPN to a hardware inplant for free. We're not creative enough to come up with ourselves. In 290 00:28:45,792 --> 00:28:53,333 2011, there was an awesome paper that described a really complete shock where hiding stuff with 291 00:28:53,333 --> 00:28:59,917 the TPN, hiding malicious stuff in the TPN. It's very hard and includes things like using Intel 292 00:28:59,917 --> 00:29:06,125 TXT. Which is only subset of Intel chips as well as remote access station method. It's a 293 00:29:06,125 --> 00:29:13,583 weird science that's never been done legitimately before. There's a couple open source 294 00:29:13,583 --> 00:29:18,083 implementations which is a reference model for having remote (indiscernible). But 295 00:29:18,083 --> 00:29:21,125 we're missing another key component of that and I'm not going to keep talking about 296 00:29:21,125 --> 00:29:28,208 that. This shit is really hard. We're going to relax that a little bit and say since we did 297 00:29:28,208 --> 00:29:33,250 the hardware implant, we know what TPNs are on there we know what key, we generated that a 298 00:29:33,250 --> 00:29:39,250 priori so we can attest the fact that our mall ware is running on an actual TPN. Because we owned 299 00:29:41,625 --> 00:29:48,667 that to begin with. Cool? Okay, here's the kind of stack, the client server TNT model that 300 00:29:48,667 --> 00:29:54,667 rerelax the 2011 (indiscernible) to. That's essentially create a (indiscernible) TPN. Export that 301 00:29:57,667 --> 00:30:03,667 key. And every time you want to deliver something to that hardware implant  ‑ ‑   ‑ ‑ with 302 00:30:03,667 --> 00:30:10,542 that President Clinton key and then ship it off over GSN to the implant that's going to run 303 00:30:10,542 --> 00:30:16,542 decrypted and execute the payload. So this is kind of the stuff we wrapped most of the 304 00:30:19,250 --> 00:30:26,458 hard, like kind of TPN interaction into. And here's the set of API keys that are 305 00:30:26,458 --> 00:30:32,458 required to pull that little red box off. So putting all of that together, you now have an 306 00:30:35,208 --> 00:30:42,625 encrypted CNC mechanism that will boot strap load, decrypt, and then run your extremely 307 00:30:42,625 --> 00:30:50,208 extremely targeted mall ware to this specific target. And what do we get out of that? So if 308 00:30:50,208 --> 00:30:55,500 we're going to spend the time to go and hardware implant a machine, we want to make sure 309 00:30:55,500 --> 00:31:01,667 that no one has to opportunity to go on that due forensics and pull stuff off. And if we're 310 00:31:01,667 --> 00:31:07,333 sending that data over GSN, if someone were to interrupt that GSN connection, use your 311 00:31:07,333 --> 00:31:14,208 imagination how you would do that. That's actually another talk. Part of this play set. And 312 00:31:14,208 --> 00:31:18,000 if they were to grab the communication that you're sending to your highly targeted 313 00:31:18,000 --> 00:31:23,500 implant, we don't want them to see that whatsoever right? And we also don't want that going to 314 00:31:23,500 --> 00:31:29,500 the wrong implant. So we get a lot of integrity out of puting TPN onto our hardware 315 00:31:31,833 --> 00:31:35,917 (indiscernible) fall. Boom. We're going to give that to you too. We're going to release that 316 00:31:35,917 --> 00:31:40,792 kind of model on get hub. We're going to take a few things out of it though. We don't want to 317 00:31:40,792 --> 00:31:48,458 release general encrypted mall ware (indiscernible). It does have a stub. And then running 318 00:31:48,458 --> 00:31:55,417 the process in memory or injecting into another process. But there's a couple things you 319 00:31:55,417 --> 00:31:59,583 have to fix. So if you're willing to take that challenge and you want to know how this 320 00:31:59,583 --> 00:32:06,250 stuff works or if you're just really interested in computing TPNs, go check this out and pull 321 00:32:06,250 --> 00:32:12,250 it down. Have fun. All right first implement was the TPM. Second improvement, what the 322 00:32:14,542 --> 00:32:20,542 hell there's this bad bio shit out there. There's some cool stuff going on. They're trading 323 00:32:23,458 --> 00:32:28,583 over audio not GSM. Let's do too. Because assuming our attack model with the TPN is also the 324 00:32:28,583 --> 00:32:33,958 GSM connection, someone can interrupt us by just taking out  ‑ ‑ by taking down GSM or 325 00:32:33,958 --> 00:32:40,000 putting up their own base station. So let's  ‑ ‑ and I'm not saying this is the solution. 326 00:32:40,000 --> 00:32:44,542 It's definitely not the solution. There are a lot of caveats that make it wrong. Just 327 00:32:44,542 --> 00:32:50,792 to be creative. Audio could be a way you get stuff in and out of your hardware as well. Reference 328 00:32:50,792 --> 00:32:56,792 to this, yeah, I did some UFI stuff to the core. There were some claims that there's no 329 00:32:59,458 --> 00:33:03,500 audio support in vie YOES. I looked at every sing OEM manufactures since 2012. There's 330 00:33:03,500 --> 00:33:06,750 audio drivers siting in the fire already. Used to exfiltrate is very, very easy. It's already 331 00:33:06,750 --> 00:33:12,750 there. You just have to follow it. So if you were to go to spark fund or pick your favorite 332 00:33:18,958 --> 00:33:24,958 hardware open source site, and you buy an audio module to throw onto your hardware implant, what 333 00:33:27,208 --> 00:33:32,750 you're going to do is get a nice range of frequency. So this is pretty much a frequency of an 334 00:33:32,750 --> 00:33:38,750 apple headset.   ‑ ‑   ‑ ‑ which is us as adults that listen to this loud music, kill our ears 335 00:33:40,792 --> 00:33:45,625 to support. So buying one of these really cheep, three bucks, throw it on your implant and 336 00:33:45,625 --> 00:33:51,583 you'll get this nice wide range of frequencies. And then distance is pretty good too. So 337 00:33:51,583 --> 00:33:57,125 I'm kind of trying to eyeball what the max distance for the $three audio module would be 338 00:33:57,125 --> 00:34:02,458 running at a frequency that's probably the same as an HVAC system. You could probably get 339 00:34:02,458 --> 00:34:08,458 two‑ thirds to the corner of the room there. So that's pretty good. Pretty reliable. All 340 00:34:10,625 --> 00:34:15,833 right. So now we're going to switch into a demo. I think we have five minutes left. That's a 341 00:34:15,833 --> 00:34:20,583 good amount of time. While we're doing that demo, we have a couple prizes to give away. We 342 00:34:20,583 --> 00:34:26,583 have two crypto cage from spark fund. And we have three wagon bed hardware (inaudible). I know 343 00:34:31,875 --> 00:34:36,875 there's not much time left in the con. We threw up two challenges. Easy mode and hard 344 00:34:36,875 --> 00:34:44,167 mode. If you have access, if you can go to this web site, the challenges are kind of simple. 345 00:34:44,167 --> 00:34:48,833 If you solve it, we'll be in the chill out lounge afterwards. The first couple people that come to 346 00:34:48,833 --> 00:34:54,542 us with the answer will give these away. If you don't want it and slap us a really good high 347 00:34:54,542 --> 00:35:00,542 five, we might give you one too. All right, let's do a demo. >> So we have (inaudible). 348 00:35:09,583 --> 00:35:15,583 >> Okay. I can also  ‑ ‑ ehn, we'll see. Yeah so this demo, what I'm going to do, teddy's 349 00:35:26,292 --> 00:35:28,792 going to show the pictures, basically, the idea  ‑ ‑ the whole demo is going to show 350 00:35:28,792 --> 00:35:34,583 (indiscernible) text a command to the implant that is going to run on the target. So I'm going 351 00:35:34,583 --> 00:35:40,333 to text something over GASM, and the target's going to execute it. And so, I'm going to go 352 00:35:40,333 --> 00:35:44,042 through this step by step. This'll be scripted for presentation purposes. But you 353 00:35:44,042 --> 00:35:50,000 can certainly script this. So we're going to start, I've got two computers here. Plus the 354 00:35:50,000 --> 00:35:56,917 whole implant plugged into the laptop. That device is called Z (indiscernible). CDC 355 00:35:56,917 --> 00:36:02,875 (indiscernible) shell. (Indiscernible) guy fan. Agro‑ jag is the laptop, you'll see me 356 00:36:02,875 --> 00:36:08,208 switching between the two. I'm going to show the I ² T device on the buss to show they're the 357 00:36:08,208 --> 00:36:14,208 same. I'm then going to use this truck wagging utility  ‑ ‑   ‑ ‑ show that that's working. And  ‑ 358 00:36:16,875 --> 00:36:22,375 ‑   ‑ ‑ let the implant show the (indiscernible) text. See it come back OT target and the 359 00:36:22,375 --> 00:36:28,375 target's going to execute (indiscernible). Hopefully it works. >> The reason we're using 360 00:36:31,042 --> 00:36:39,000 this wacky (inaudible) here is because josh is using his VGA for the implant right? So wet 361 00:36:39,000 --> 00:36:45,000 can't be presenting (inaudible). >> (Inaudible) so we see both (inaudible) both attack. That's 362 00:36:49,750 --> 00:36:54,500 what that shows you. >> All right, I'm on the (indiscernible). (Audio 363 00:36:54,500 --> 00:37:00,500 stopped.) Yup has the word deck on it. Write it back. If I go back to my host computer, read  364 00:37:00,500 --> 00:37:05,375 ‑ ‑ it says DEF CON. So they just did that loop. Went to the app mega, posted something, the 365 00:37:05,375 --> 00:37:10,042 other guy got. And now we're going to do the (indiscernible). So this have I need some 366 00:37:10,042 --> 00:37:14,667 audience participation. I'm going to text  ‑ ‑ the echo. Sweet. So I need a number to 367 00:37:14,667 --> 00:37:20,375 text this. So that way you know I'm doing this live and all that stuff. So pick a random number. 368 00:37:20,375 --> 00:37:23,917 >> (Speaking simultaneously). >> All right. (Inaudible) two. That works. So I'm texting my 369 00:37:23,917 --> 00:37:28,458 implant echo 42. A hear jack Daniels makes hardware implants. >> It improves your (inaudible) 370 00:37:28,458 --> 00:37:34,458 success. >> Yes. >> (Indiscernible). Okay we'll wait after. I texted it over, a 371 00:37:38,125 --> 00:37:44,125 little paranoid, I texted it |twice. Just to see  ‑ ‑ (inaudible). If I read back from 372 00:37:49,167 --> 00:37:55,125 the chuck wagon device, that's 42. If you imagine, this is all scripted: Umm, right so I'm just 373 00:37:55,125 --> 00:38:01,125 doing this for presentation. >> Should have done the shop before. >> I know. I'm on the 374 00:38:41,833 --> 00:38:45,375 (inaudible). Basically if you just  ‑ ‑ execute what's in here yeah so both (indiscernible)s 375 00:38:45,375 --> 00:38:48,125 have it. And for whatever reason, I'm not saying my history (inaudible). You could 376 00:38:48,125 --> 00:38:51,417 image pass that, execute it, take that command, type it to bash, and then it's going to 377 00:38:51,417 --> 00:38:54,708 implement. >> (Inaudible). (Applause.) >> There we go? >> I do not know what's going on in 378 00:38:54,708 --> 00:38:58,250 here, but it looks awesome. So fuck it, let's do it live. >> New SPAEKers. Cyber. >> I'm 379 00:38:58,250 --> 00:39:01,917 sorry, the track one the entire conference has been a bit lame on their love. So I want to 380 00:39:01,917 --> 00:39:04,833 really hear it for these guys. Come on! >> (Applause.) >> That's what I'm talking 381 00:39:04,833 --> 00:39:08,167 about. >> And we have any time for questions? We have ten minutes for questions. So wile 382 00:39:08,167 --> 00:39:11,083 you're thinking about questions we'll go back to this. I'm going to put something, seemless 383 00:39:11,083 --> 00:39:15,417 shameless self‑ promotions for a book I'm writing. So if with a preorder discouldn't. If you 384 00:39:15,417 --> 00:39:20,333 preorder from tax, (inaudible). Any questions? Yup go head. Yeah, so I've tried to do with a 385 00:39:20,333 --> 00:39:25,208 why splitter. That was the original idea. To have a Y splitter. I'm not sure if it's 386 00:39:25,208 --> 00:39:30,375 just a Y splitter I used, it dropped too much voltage. So I wasn't getting enough power. I'm 387 00:39:30,375 --> 00:39:35,000 not sure if that's just the cheep (inaudible) just trying to do (inaudible). That would be 388 00:39:35,000 --> 00:39:39,958 pretty cool. I did try. It was a fail. Any other questions? Thanks. Not seeing any. Okay 389 00:39:39,958 --> 00:39:45,958 cool, the code is up on  ‑ ‑ get up for that hole demo, thanks so much for copping up. Chill out 390 00:41:33,250 --> 00:41:37,042 lounge. Hay. >> (Inaudible) thank you.