1 00:00:00,000 --> 00:00:06,000 >> I'm going to kick it over to pdogg 77 and the Duke Zip. >> Thank you. Good morning Defcon! 2 00:00:12,333 --> 00:00:17,833 [Audience noise, comments.] >> Good Morning Defcon!!!! [Applause] >> So welcome to our 3 00:00:17,833 --> 00:00:22,833 talk, it's on Steganography and commonly used HF radio protocols. We have tons of 4 00:00:22,833 --> 00:00:28,083 content for 45 minutes we've cut this talk about a million times so we are going to just jump 5 00:00:28,083 --> 00:00:35,083 into it. First off, I'm pdogg, Paul like when pdogg is taken on Twitter, someone beats me to it, 6 00:00:35,083 --> 00:00:40,417 I'm pdogg77. Uhm, as a day job, I'm a security researcher at a start up called Confer 7 00:00:40,417 --> 00:00:45,958 Technologies Inc. We're doing some cool things with end point security threat sharing. Well, 8 00:00:45,958 --> 00:00:50,833 if that's interesting to you, check us out at confer.net. But I mention that because this has 9 00:00:50,833 --> 00:00:56,042 nothing to do with my day job, it has to do with amateur radio. Amateur radio has been a hobby 10 00:00:56,042 --> 00:01:02,042 of mine since I was a little kid, thanks Dad. Uhm, I'm now an extra classed, licensed ham as 11 00:01:02,042 --> 00:01:08,083 well as an ARL volunteer examiner. We'll talk about that a little later. This is my 12 00:01:08,083 --> 00:01:12,000 second trip to Defcon, so if there's any first timers out in the audience, come on up here 13 00:01:12,000 --> 00:01:19,583 next time please… and I'll turn it over to Brent. >> Hey everybody, my names Brent, I go 14 00:01:19,583 --> 00:01:24,125 by thedukezip on Instagram and Twitter. I actually don't work in the security industry 15 00:01:24,125 --> 00:01:29,417 whatsoever. I work as a software and systems engineer. Specifically dealing with radio 16 00:01:29,417 --> 00:01:34,583 protocols and devices, but hacking all the things has been a passion of mine for way longer 17 00:01:34,583 --> 00:01:39,792 than that so, I love being here. I'm also an amateur radio operator since 2006 and I 18 00:01:39,792 --> 00:01:47,417 upgraded to my extra class last year at Defcon actually. I'm also a volunteer examiner. So, 19 00:01:47,417 --> 00:01:52,375 one very important warning, we're going to talk about hiding messages inside amateur radio 20 00:01:52,375 --> 00:01:58,167 communications. And we're going to talk about using cryptography layered on top of that.Then 21 00:01:58,167 --> 00:02:02,875 we're releasing a tool that does all of this for you. This is completely against the FCC 22 00:02:02,875 --> 00:02:08,167 regulations, as far as our interpretation goes, so we do not actually transmit any of 23 00:02:08,167 --> 00:02:15,833 this over the air, and we are not recommending that you do so either. Okay! So, another 24 00:02:15,833 --> 00:02:20,792 warning, this was a project that kind of started as a fun conversation over drinks at a 25 00:02:20,792 --> 00:02:25,583 Massachusetts meet up called Mass Hackers. Ahh, we are talking about cryptography. We 26 00:02:25,583 --> 00:02:30,958 believe we are just using cryptography libraries, that we're just calling using the 27 00:02:30,958 --> 00:02:35,792 correct methods. But, if you're trying to hide your stuff from 3 letter agencies, you probably 28 00:02:35,792 --> 00:02:40,250 want to audit the code. If you find something we did incorrectly, we'd love to hear 29 00:02:40,250 --> 00:02:47,625 from you, you can let us know and we'd be happy to fix it as well. So… >> So what are we 30 00:02:47,625 --> 00:02:52,625 really talking about? We set out to demonstrate to ourselves and hopefully to you that it's 31 00:02:52,625 --> 00:02:59,333 somehow possible to create a really low infrastructure, fairly long range, covert, short 32 00:02:59,333 --> 00:03:03,708 message protocol that could be used in many ways. Whether it was point to point, broadcast, 33 00:03:03,708 --> 00:03:09,125 or mesh. And for reasons we'll talk about pretty soon, we wanted to use common, off the 34 00:03:09,125 --> 00:03:13,708 shelf consumer radio and computer equipment and some kind of commonly used digital 35 00:03:13,708 --> 00:03:20,042 communications mode that was already in use. Why would you want to do that? Well, the vast 36 00:03:20,042 --> 00:03:24,667 majority of us are dependent on some kind of short message communication all the time in 37 00:03:24,667 --> 00:03:31,417 our day-to-day lives. Whether it' something like Twitter or SMS what not. But all of those 38 00:03:31,417 --> 00:03:35,208 communication mechanisms are really dependent on some third party to provide the 39 00:03:35,208 --> 00:03:40,292 infrastructure whether that's an ISP or a cell phone provider or someone actually building the 40 00:03:40,292 --> 00:03:45,292 platform on which we communicate and those third parties don't always have our best interests 41 00:03:45,292 --> 00:03:50,500 at heart right. So we could subject to censorship or spying, or in extreme cases these people 42 00:03:50,500 --> 00:03:55,667 want off switches on these communications, right. So Mom and ApplePie at Defcon I guess, 43 00:03:55,667 --> 00:03:59,917 we believe it's a fundamental human right to communicate without that form of 44 00:03:59,917 --> 00:04:04,542 interference. That's why we're talking a look at this stuff and one of the reasons we think you 45 00:04:04,542 --> 00:04:08,750 should be interested in this as well. So you could use a method like this, hopefully to 46 00:04:08,750 --> 00:04:13,458 communicate in these ways and we'll highlight some portions in the talk where relatively small 47 00:04:13,458 --> 00:04:18,750 changes to things we are doing could result in new protocols. So you could definitely take 48 00:04:18,750 --> 00:04:22,625 forth this research and create something that is completely different but along a similar 49 00:04:22,625 --> 00:04:29,667 line. If that doesn't motivate you, then most likely there are bad actors doing something like 50 00:04:29,667 --> 00:04:34,625 this anyway, and I think it's important to actually look at what is possible, what's some of 51 00:04:34,625 --> 00:04:40,292 these communication mechanisms might look like. How we could find it, etc. so we could combat 52 00:04:40,292 --> 00:04:46,292 really bad actors using techniques like this. >> So Paul mentioned we want to have all 53 00:04:49,667 --> 00:04:54,875 these communications without the use of any infrastructure whatsoever, that obviously 54 00:04:54,875 --> 00:04:59,375 includes the internet - which we are all very familiar with. It just so happens that amateur 55 00:04:59,375 --> 00:05:04,250 radio operators are experts in communicating in worldwide without any infrastructure 56 00:05:04,250 --> 00:05:10,083 whatsoever It is a real cool hobby and you may hear us refer to it as amateur radio and ham 57 00:05:10,083 --> 00:05:14,708 radio, the terms are kind of interchangeable. Uhm, you get to do really cool stuff like 58 00:05:14,708 --> 00:05:21,042 transmit with up to 1500 WATTS of power, which is a heck of a lot if you are not familiar with 59 00:05:21,042 --> 00:05:25,583 that. You get to do cool things like bounce signals off of the moon or off the ionosphere over 60 00:05:25,583 --> 00:05:30,583 to the other side of the earth. Or practice sending a message to a satellite and having it 61 00:05:30,583 --> 00:05:34,167 repeated on the other side of the globe so…. All kinds of really cool stuff you can do 62 00:05:34,167 --> 00:05:40,375 with amateur radio. One thing that is important to mention is, after we submitted this talk to 63 00:05:40,375 --> 00:05:44,958 Defcon, this group calling themselves Luizlabs released a tool called AirChat, it's 64 00:05:44,958 --> 00:05:51,208 similar in some ways but very different in other ways. It also uses encryption over amateur 65 00:05:51,208 --> 00:05:58,625 radio but they are making absolutely no intentions to hide that. They're basically just 66 00:05:58,625 --> 00:06:03,458 transmitting encryption, anybody listening would know that. Where as we're doing Steganography, 67 00:06:03,458 --> 00:06:08,208 anybody listening should think that it's some innocuous normal message that they would totally 68 00:06:08,208 --> 00:06:15,083 expect to hear but buried inside it would be something completely different. So, you know, good 69 00:06:15,083 --> 00:06:20,917 stenography, good OPSEC. This is actually a picture from the tv show Lost, of which I was a huge 70 00:06:20,917 --> 00:06:25,833 fan of and there was this numbers station on this island that continuously transmitted 4, 71 00:06:25,833 --> 00:06:32,417 8, 15, 16, 23, 42. Uhm, but number stations are a real thing. There are stations you 72 00:06:32,417 --> 00:06:37,333 can tune in to on a short wave radio and there's some creepy music and some person comes on 73 00:06:37,333 --> 00:06:43,667 and the air and starts reading off numbers and 99.99% of the time the people in the world 74 00:06:43,667 --> 00:06:48,125 actually have no idea what they mean. We think that, or some people think that they may be 75 00:06:48,125 --> 00:06:54,458 secret instruction for spies across the world or something. But, they're not trying to hide 76 00:06:54,458 --> 00:06:59,167 it. They're just sending numbers and everybody knows it means something secret and you don't 77 00:06:59,167 --> 00:07:04,083 know what it is. We're talking about doing things like having a radio in a pelican case and you 78 00:07:04,083 --> 00:07:08,292 can run into the woods, throw an antenna up in a tree and start transmitting your secret message 79 00:07:08,292 --> 00:07:12,500 and then take it all down and run away. And if you're a receiver you can have a 30, 40 80 00:07:12,500 --> 00:07:17,208 foot antenna in the rafters of your attic and nobody would even know that you were listening in. 81 00:07:22,333 --> 00:07:27,125 >> So how are we going to hide? We'll talk a little bit about the protocols that are used over 82 00:07:27,125 --> 00:07:33,083 amateur radio and HF radio for digital communications. These protocols are very much 83 00:07:33,083 --> 00:07:39,042 different than some of the traditional networking protocols we think of. In most cases they 84 00:07:39,042 --> 00:07:44,000 don't have some of the features we would typically look at to use for a covert channel. The 85 00:07:44,000 --> 00:07:50,667 protocols are extremely tight, they're the utilization of bandwidth and power is 86 00:07:50,667 --> 00:07:55,542 restricted because it's thought of as a Hallmark of good amateur radio engineering not to use 87 00:07:55,542 --> 00:07:59,458 anymore spectrum than need. And not to use anymore power than you need. So you look at the 88 00:07:59,458 --> 00:08:05,042 design of these protocols and they are really designed in that way. Then you can look at maybe 89 00:08:05,042 --> 00:08:09,542 doing some sort of timing or substitution or error timing between symbols. Or substituting 90 00:08:09,542 --> 00:08:15,375 one symbol for another, etc. and those are visible and the more you use these protocols the more 91 00:08:15,375 --> 00:08:19,833 you can stop seeing that stuff on the screen and you can start hear it with your ear. We also 92 00:08:19,833 --> 00:08:21,833 took off the table what's termed auspicious emissions, hum or adding additional tones or 93 00:08:21,833 --> 00:08:26,958 signals along with the transmitted signals, that is also against the rules, along 94 00:08:26,958 --> 00:08:32,958 with everything else we are talking about. It's extremely visible and again amateur radio 95 00:08:35,250 --> 00:08:41,250 operators have a tune ear for that and it's thought of as bad practice so it's murk more 96 00:08:43,750 --> 00:08:48,542 likely to get noticed. The candidate protocol for this really has to be in widespread 97 00:08:48,542 --> 00:08:53,042 use. It doesn't matter if you find an ideal protocol for a betting Steganography if you are 98 00:08:53,042 --> 00:08:59,417 the only person transmitting on that protocol it's still a bit fishy. And then again we're 99 00:08:59,417 --> 00:09:02,958 looking for protocols that needed no special hardware or closed software. You can find 100 00:09:02,958 --> 00:09:07,875 great packet radio protocols, etc. but usually they require some sort of proprietary 101 00:09:07,875 --> 00:09:12,375 interface or software, etc. We were doing something you can do with standard radios and 102 00:09:12,375 --> 00:09:17,917 computer equipment. So, predominantly we're talking about what in the amateur world 103 00:09:17,917 --> 00:09:23,542 is termed sound card digital mode, or a mode that is modulated and demodulated with 104 00:09:23,542 --> 00:09:29,917 only a standard sound card and more or less a pc, a standard computer system. So the output 105 00:09:29,917 --> 00:09:34,833 and input of the sound card are wired to the microphone and output of the transceiver and 106 00:09:34,833 --> 00:09:38,625 then somehow usually through like a serial interface, your keying the microphone on the 107 00:09:38,625 --> 00:09:43,958 transmitter. There are countless numbers of these protocols, anything from these well 108 00:09:43,958 --> 00:09:50,792 designed, well documented to something someone threw together in their garage. So, if you're a 109 00:09:50,792 --> 00:09:55,083 protocols person, there's endless stuff to play with here, go take a look. Some were the 110 00:09:55,083 --> 00:09:59,667 modes were developed specifically for this kind of use but older modes, such as 111 00:09:59,667 --> 00:10:04,708 radio teletype have been in use for a very long time and have been adopted to be transmitted 112 00:10:04,708 --> 00:10:10,000 and received as well. But most of the examples up here are very common protocols, they suffer 113 00:10:10,000 --> 00:10:15,500 from the problem we were talking about, they are very tight. There's almost no room to shove 114 00:10:15,500 --> 00:10:20,958 in any extra information here. The other thing to know about these protocols is they are more 115 00:10:20,958 --> 00:10:25,958 or less keyboard to keyboard chat. You can send freeform text, whatever you would like 116 00:10:25,958 --> 00:10:29,833 during your transmit cycle and then switch over and then the other person talking to you does 117 00:10:29,833 --> 00:10:36,750 the same thing. So it's more or less a back and forth chat. So, we need to find another type of 118 00:10:36,750 --> 00:10:42,750 protocol. Enter this protocol named JT65, it was developed by Joe Taylor in 2005. Originally 119 00:10:53,458 --> 00:10:56,667 detailed in a paper he wrote. It was designed for earth-moon-earth communications. 120 00:10:56,667 --> 00:11:01,000 Bouncing signals off the moon and returning then back to earth. It's a very long glossy 121 00:11:01,000 --> 00:11:05,083 path of course. This protocol has some error corrections built into it. It's extremely power 122 00:11:05,083 --> 00:11:08,833 efficient with about 25 watts of on a good day with decent conditions.Can communicate 123 00:11:08,833 --> 00:11:13,167 worldwide with JT65. It's kind of an in between chat keyboard to keyboard chat protocol, And 124 00:11:13,167 --> 00:11:17,500 some of the more packet protocols, we will talk more about the structure. It has an 125 00:11:17,500 --> 00:11:22,083 extremely low data rate. It's one of the tradeoffs here, all of this is a tradeoff, for 126 00:11:22,083 --> 00:11:27,250 privacy in the communication we are traducing a lot of bandwidth you will see. Good news it is an 127 00:11:27,250 --> 00:11:32,125 open source implementation, uhm, it is in 4 trained the error correction code is in C. So we 128 00:11:32,125 --> 00:11:36,958 did deal with the 4 trand code because we wanted to stick as close to the real implementation 129 00:11:36,958 --> 00:11:43,208 as possible. So what does a JT65 Communication look like? This is a screen shot of one of the more 130 00:11:43,208 --> 00:11:49,500 common clients that is in use. Basically, amateur radio operators use this protocol to 131 00:11:49,500 --> 00:11:55,750 exchange a few little bits of information that compose a communication. Amateur radio 132 00:11:55,750 --> 00:12:03,750 call signs, the 4 digit grid locater, in a system that is detailed in a bibliography notes 133 00:12:03,750 --> 00:12:08,708 as well as a signal report. How well one side is receiving the other communication.It's sort of 134 00:12:08,708 --> 00:12:13,167 a time dependent mode. Transmissions begin at the top of a minute and are around 47 135 00:12:13,167 --> 00:12:17,292 seconds long with about 13 seconds of silence. So it requires some clock 136 00:12:17,292 --> 00:12:23,042 synchronization between the receiver and the transmitter. When they are used on HF 137 00:12:23,042 --> 00:12:28,458 frequencies, generally hams congregate around these watering hole frequencies, which are 138 00:12:28,458 --> 00:12:35,458 displayed on these slides. And for the radio folks in the room, it's uppers sideband am. So, 139 00:12:35,458 --> 00:12:42,167 you're getting about 3000 Hz of usable paths there. And multiple JT65 conversations will happen 140 00:12:42,167 --> 00:12:49,750 within that path. You can see on the waterfall display up there, there's one that is fairly 141 00:12:49,750 --> 00:12:55,833 strong. Kind of to the left, around 500 Hz. So let's talk about how this protocol actually 142 00:12:55,833 --> 00:12:59,958 works because we need to understand how we can hide in it. Here's one of those 143 00:12:59,958 --> 00:13:03,333 structured messages that I talked about. These are 2 amateur radio call signs and the 144 00:13:03,333 --> 00:13:07,292 grid locator. Hopefully these are not still someones real call signs. If they are, we're sorry. 145 00:13:07,292 --> 00:13:13,875 The protocol puts that message through a custom packing routine that understands or has look up 146 00:13:13,875 --> 00:13:21,292 tables for an amateur call sign, the prefix, the suffix, pieces of that grid locator etc. And 147 00:13:21,292 --> 00:13:27,583 you get a 72 bit message, it's shown here as 12.6 symbols and it's usually manipulated in 148 00:13:27,583 --> 00:13:33,667 those 12.6 bit symbols. Remember we have a one minute transmit time and we're talking about 72 149 00:13:33,667 --> 00:13:39,333 bits so you can do the math. We're not talking about streaming HD video. That's the 150 00:13:39,333 --> 00:13:44,708 source encoding, then it goes through a very important step, it's transformed into a 63 151 00:13:44,708 --> 00:13:50,708 symbol message through Reed Solomon encoder. Sorry… hum, and then the resulting symbols go 152 00:13:57,625 --> 00:14:03,625 through a series of shuffling operations interleaving operations as well as a grey 153 00:14:03,625 --> 00:14:10,208 coding to result in 63 more symbols which are the final symbols. In the original paper, 154 00:14:10,208 --> 00:14:14,417 Joe Taylor says that some of these steps were down to improve the error correction capability 155 00:14:14,417 --> 00:14:18,792 of the protocol. From here it's modulated into audio and we will talk about how that happens. You 156 00:14:18,792 --> 00:14:25,500 have these symbols here that are shown just as regular numbers. Those numbers are put through 157 00:14:25,500 --> 00:14:31,500 this formula so JT65 is an MSK multiple shift keying protocol and you can see the formula 158 00:14:34,167 --> 00:14:40,042 there, do the math. You put in the number you get it's home. One second.. these guys are 159 00:14:40,042 --> 00:14:45,042 coming up here. The actual packet, and that's our term, uhm, I don't know if it's really 160 00:14:45,042 --> 00:14:51,292 used out there is 120 slices. A full half of the packet is a synchronization tone. A 161 00:14:51,292 --> 00:14:56,625 demodulator uses to find these signals and find the relative value of each symbol value 162 00:14:56,625 --> 00:15:00,417 there. So that is how it's transmitted on the air. That synch tone becomes really, 163 00:15:00,417 --> 00:15:07,458 really perceptible to your ear and you almost start singing it to yourself. This is the alien 164 00:15:07,458 --> 00:15:12,417 music that we've talked about. You'll hear some of it later. You start singing it to yourself 165 00:15:12,417 --> 00:15:16,250 when you are working on a long project with it. How are we going to hide Reed Solomon 166 00:15:16,250 --> 00:15:20,667 Codes? We're going to shove in some errors, I'll cut some time off this slide…so we can do 167 00:15:20,667 --> 00:15:26,875 this. And, we did it in multiple ways throughout the process of the project. In the end and what 168 00:15:26,875 --> 00:15:32,500 we're going to talk about is we're basically going to encrypt and pack our own custom message 169 00:15:32,500 --> 00:15:36,833 and apply forward message correction on top of that. Basically a truncated message of 170 00:15:36,833 --> 00:15:44,417 the same version of the Reed Solomon code used in JT65. Reed Solomon codes are everywhere, 171 00:15:44,417 --> 00:15:48,000 there's prior work in Steganography code so if you want to hide information in Reed 172 00:15:48,000 --> 00:15:54,833 Solomon code just look at that paper. >> Pardon the interruption. For first time 173 00:15:54,833 --> 00:16:01,292 speakers it's hard to get accepting and these guys did it so give them a round of 174 00:16:01,292 --> 00:16:07,292 applause, please. [Applause]. >> Brand new tradition. >> As you were... . >> I would like to see 175 00:16:21,542 --> 00:16:27,917 you ‑‑ >> I'm transferring the microphone over to Brent. >> So how are we actually going to do 176 00:16:27,917 --> 00:16:33,917 the steganography. Say we want to hide inside the JT65. Say we want to hide DEF CON 22. Right, 177 00:16:44,042 --> 00:16:51,000 we're going to put it through that same stuff the JT65 uses and convert it to 12 six bit 178 00:16:51,000 --> 00:16:56,792 symbols and we will add an additional 8 bit symbols, the same one JT65 uses. We're not 179 00:16:56,792 --> 00:17:07,167 make it quite as big but we will make it big so you can tolerate errors from interference or 180 00:17:07,167 --> 00:17:13,125 inside the transmission. This allows us to tolerate 4 errors in the steganography portion of 181 00:17:13,125 --> 00:17:19,542 the message. Now we also have to pick places we're going to stick this in the message. So we allow 182 00:17:19,542 --> 00:17:24,208 the user to input a key that the receiver would also have to have knowledge of and we'll take the 183 00:17:24,208 --> 00:17:30,208 hash and generate 20 locations for that. Now there's 63 possible locations. So we'll 184 00:17:33,417 --> 00:17:39,417 take the bits and monitor by 63 and it gives us all those numbers but of course we will 185 00:17:41,833 --> 00:17:47,833 have a few left over because 256 is not divisible evenly by 63 so 252‑255 we'll just throw those 186 00:17:49,833 --> 00:17:56,542 out so there's not an uneven biased to the symbols zero through three. So it will all 187 00:17:56,542 --> 00:18:02,167 work out in the end. We promise you. >> It made sense at 4:00 a.m. >> It made sense at 188 00:18:02,167 --> 00:18:06,625 4:00 a.m. Right? For this example these are the 20 locations you would get out. So 189 00:18:06,625 --> 00:18:12,458 we can take some innocuous message, two call signs and the grid locater. This is the 63 190 00:18:12,458 --> 00:18:17,042 symbols. And the 20 locations generated and we'll start with the first by the. Location 9 we 191 00:18:17,042 --> 00:18:22,583 replace with 42. You go through all 20 symbols and what you end up with the original message on 192 00:18:22,583 --> 00:18:27,125 the top and new message on the bottom that can be recovered both into the innocuous message 193 00:18:27,125 --> 00:18:32,083 and if you know the key and can reorder those symbols in the correct order and no where 194 00:18:32,083 --> 00:18:38,083 they're located from that key you will be able to get the message as well. This will go a 195 00:19:00,667 --> 00:19:06,583 long distance fan you pick up interference you can still get both messages out of it. But we 196 00:19:06,583 --> 00:19:11,167 want to do encryption too. We like encryption. Yes? So there's 12 six bit symbols. Seventy‑two 197 00:19:11,167 --> 00:19:15,125 bits. Most of the encryption standards I know use 8 bits. So if you divide 72 by 8 you get 9 198 00:19:15,125 --> 00:19:20,083 bits which is a co‑incidence and we love that fact and this guy does too. So what question was 199 00:19:20,083 --> 00:19:26,083 we created a packing function. (So what we did). You have 9 eight bits. There's no magic 200 00:19:35,708 --> 00:19:41,708 here. We decided to do it where you have 8 data bits and 1 bite, header. Why would you want a 201 00:19:50,000 --> 00:19:56,000 header in this message? We thought it would be cool if you had a long age in would take 202 00:19:58,750 --> 00:20:04,500 multiple transmission to get across. It would be feet if the receiver could see you received 203 00:20:04,500 --> 00:20:11,208 packet 100 or packet 2 of three and when you get the third you can reassemble the whole thing. 204 00:20:11,208 --> 00:20:16,667 So we basically use it to keep track of packet numbers for assembly. In the case of a 205 00:20:16,667 --> 00:20:22,667 stream safe cypher. The remaining 6 bits are used for the total number of packets, 206 00:20:32,708 --> 00:20:39,208 packet number or because we have a stream cypher we need to track how many bytes are actually used 207 00:20:39,208 --> 00:20:46,458 in the last transmission. In a block it's simpler. You have that slide for the first packet 208 00:20:46,458 --> 00:20:53,417 and 7 bits to track the packet number. This gives us the limitation of one message if you 209 00:20:53,417 --> 00:20:57,750 want to call it that. It would be limited to 1 kilobyte the of data. If you have more than that 210 00:20:57,750 --> 00:21:03,417 you can do multiple longer transmissions and reassemble again. It's not really a 211 00:21:03,417 --> 00:21:09,417 limitation. It's really what's cool on the slide at 4:00 a.m. So we went through all this and 212 00:21:13,000 --> 00:21:18,750 we had a problem and we'll talk about some statistical analysis we did on this data. But what we 213 00:21:18,750 --> 00:21:23,750 found by doing this was it was really trivial to pick up the steganography if I messages. You 214 00:21:23,750 --> 00:21:29,750 end up with the symbol number 32 way more than any other symbol. It was very, very obvious. If 215 00:21:32,833 --> 00:21:38,833 you knew what to look for. So we came up with something cool we're calling bit swapping. >> 216 00:21:41,458 --> 00:21:48,458 Or bit Magic introduce classroom engagement. >> You take the 8 bits and swap them with 1 bit 217 00:21:48,458 --> 00:21:55,625 each of the 8 data bytes, and this particular diagram may not give you a warm fuzzy feeling 218 00:21:55,625 --> 00:22:01,625 because it forms a pattern in the data bytes but when you convert it to the 6 bits it 219 00:22:04,375 --> 00:22:10,375 distributes the bits among all the bit locations. So doing statistical analysis on this in 220 00:22:14,875 --> 00:22:21,917 the end it comes out very much flatter distribution. It looks good to us. So the tool we are 221 00:22:21,917 --> 00:22:28,292 releasing we will demonstrate is kind of a multi-layered software. The bottom layer, base 222 00:22:28,292 --> 00:22:34,292 layer is just built off the original force trans code and c source code we've compelled to 223 00:22:41,042 --> 00:22:44,042 make it accessible and C source code from JT65 protocol and compiled with F2Pl and be 224 00:22:44,042 --> 00:22:47,750 accessible from Python.C code is just a binary we can call. On top of that we made it easier to 225 00:22:47,750 --> 00:22:50,750 access with a wrapper layer in Python on and for our libraries there's actually two JT65 226 00:22:50,750 --> 00:22:58,583 StegaH  is where the encryption and steganography that you can call is in this library and the 227 00:22:58,583 --> 00:23:04,667 JT65 sound which is a python library for all the audio, N coding and G coding. You can 228 00:23:04,667 --> 00:23:10,667 create your own tool to do this however you wanted. The analysis package which we'll talk about 229 00:23:12,667 --> 00:23:20,208 JT65 analysis fan you want to mess around with the protocol and change things around and 230 00:23:20,208 --> 00:23:27,500 experiment and see how you can make yours different this comes with black tests so you can make 231 00:23:27,500 --> 00:23:32,625 sure if you're experiment doesn't break anything. Play with that if you want to. If not 232 00:23:32,625 --> 00:23:38,625 we did it for fun. This is where we demo the tool. We hope the AV does not blow up. You can see 233 00:23:41,792 --> 00:23:47,792 that, right? Okay. >> So I'll show you the help output from the tool. There's two basic 234 00:23:54,375 --> 00:24:00,208 functions N code and D code. There's a bunch of options here. You can inject additional nose 235 00:24:00,208 --> 00:24:05,208 if you want to try to hide where your message is embedded and interactive mode for listening 236 00:24:05,208 --> 00:24:11,833 to messages live on the air, places to embed your messages, the JT65 protocol if you look 237 00:24:11,833 --> 00:24:16,042 into it more there's options like a frequency, a base frequency and mode. For examples 238 00:24:16,042 --> 00:24:19,083 for cyphers and encryption we have super secure stuff. Okay. All the way up to real things 239 00:24:19,083 --> 00:24:22,458 like GPG and 1 time Pad. There's trade offs using these and you will figure out what they are 240 00:24:22,458 --> 00:24:25,833 but we have shown all as examples so do what you will. For the output you can print the 241 00:24:25,833 --> 00:24:29,375 symbols to the terminal or wave file you can broadcast over the air but we did not or for the 242 00:24:29,375 --> 00:24:33,292 input the same thing. So let me show you what happens when you encode a message here. It's 243 00:24:33,292 --> 00:24:36,083 cutting me off. Okay. Let me run it then. what you can see here is we've encoded this message. 244 00:24:36,083 --> 00:24:38,417 The innocuous message is two call signs plus a grid locater. Anybody listening would see just 245 00:24:38,417 --> 00:24:40,750 see that on their tool. Our steg message is Defcon22, we're using the queue from example 246 00:24:40,750 --> 00:24:43,833 pdogthedukezip and printing out the symbols to standard output and you can see what symbols 247 00:24:43,833 --> 00:24:49,833 will get transmitted over the air. If you kind of wanted to kind of follow along the 248 00:24:56,875 --> 00:25:02,875 different stuff this tool uses you can enable verbose mode where you see that source 249 00:25:08,333 --> 00:25:14,333 encoding stuff where you get 12 symbols and add in the error and the final message is displayed 250 00:25:19,167 --> 00:25:25,000 here too. But the cool stuff of course is the audio which I know you all want to hear. So here 251 00:25:25,000 --> 00:25:32,208 we'll do the exact same message but I will put to an wave file, and I will go ahead and play 252 00:25:32,208 --> 00:25:38,375 that wave file. example same message but I'll play that for you. >> Sing along. >> I love 253 00:25:38,375 --> 00:25:43,542 singing these things. After you've been listening for 4 months every night you will love 254 00:25:43,542 --> 00:25:48,625 singing it too. >> (Beeping noises). >> We affectionately refer to this as the alien music 255 00:25:48,625 --> 00:25:54,625 because it sounds bizarre. Especially when you're listening to the real air waves and you've 256 00:26:13,375 --> 00:26:19,375 got multiple messages happening at the same time at different base frequencies. Of course you 257 00:26:22,167 --> 00:26:28,167 have the static in the background and other noise. It sounds really creepy and we 258 00:26:41,417 --> 00:26:47,333 might have an example of that coming up as well. But it goes on for a minute but we want to 259 00:26:47,333 --> 00:26:53,250 do it as quickly as possible. So let me show you what happens if you run the actual tool that the 260 00:26:53,250 --> 00:26:58,583 most common tool everyone uses to use this protocol, WSJTX. So if you were to open that wave 261 00:26:58,583 --> 00:27:04,583 file or hear it over the air waves what you get is all you'll see is that innocuous message. 262 00:27:11,208 --> 00:27:17,208 There's no other indication here that there are errors in the message or secret cryptographic 263 00:27:19,292 --> 00:27:25,292 data. Close that out. Whoops. I went past it. If you go to decode that file with our tool, 264 00:27:42,750 --> 00:27:47,833 you can see both the original and the innocuous message and the steganographic message as 265 00:27:47,833 --> 00:27:53,833 well. >> So we wanted to play with this in different form factors. One of the things we 266 00:28:05,417 --> 00:28:12,500 envisioned as we worked on this project a portable feed reader and that led to this. This is 267 00:28:12,500 --> 00:28:18,792 raspberry pie with a display on it. It can be run on batteries and plugged into that which is 268 00:28:18,792 --> 00:28:23,833 pretty common short wave receiver. Basically building a receiving station for this for 269 00:28:23,833 --> 00:28:31,500 under $200 running on batteries. We were going to demo this here but we're in RF hell in this 270 00:28:31,500 --> 00:28:37,500 room and receiving those low power transmissions is not going to be possible. So videos didn't 271 00:28:42,083 --> 00:28:48,083 happen. >> [Off mic] >> That is connected to short wave receiver. >> I hear the aliens. 272 00:29:06,292 --> 00:29:12,292 >> The pie is decoding. >> This is the part where the lap top dies? No anyway since we're 273 00:29:22,167 --> 00:29:28,167 short on time Brent will fix the lap top and what I will do is talk about some of the analysis 274 00:29:38,458 --> 00:29:41,917 that we worked on. I'm hoping I get an analysis slide. So we wanted to look at this protocol 275 00:29:41,917 --> 00:29:47,917 and basically figure out how would you locate if someone was going to do ‑‑ if someone was 276 00:29:50,083 --> 00:29:56,000 doing these types of activities and generating the JT65 packet. If you've been paying attention 277 00:29:56,000 --> 00:30:02,833 you have some limited population of real JT65 messages in the universe. Right? It's the 278 00:30:02,833 --> 00:30:06,833 structured communication that goes through predictable error correction algorithm, et cetera. 279 00:30:06,833 --> 00:30:12,208 Then you'e shoving a bunch of errors in it. This gives you a lot of other statistics about 280 00:30:12,208 --> 00:30:18,542 the packet that's been received. One of which is a confidence value. That confidence value is 281 00:30:18,542 --> 00:30:24,542 essentially the demodulator as it then signals into the various tones and it gives you the value 282 00:30:24,542 --> 00:30:29,208 which is how sure it was the given signal was correctly demodulated. So our thought 283 00:30:29,208 --> 00:30:35,208 process was you take the numbers of errors in a packet and signals to noise ratios or 284 00:30:38,583 --> 00:30:44,583 confidences and do some sort of analysis and figure out whether a packet was suspect or fishy. 285 00:30:47,875 --> 00:30:55,583 There's great pictures of this that we don't have right now but there's been analysis tool or 286 00:30:55,583 --> 00:31:02,042 analysis section of our tool which will take in either a single JT65 packet or multiple 287 00:31:02,042 --> 00:31:09,583 and it will produce graphic analysis of this for you or it will output all these statistics 288 00:31:09,583 --> 00:31:15,250 in basically a comma separated value and you can import them into any tool of your choice. So 289 00:31:15,250 --> 00:31:23,000 you can process these in bulk. We listen to probably around 3,000 transmissions on 290 00:31:23,000 --> 00:31:29,000 20 meters. Called those basically a population of natural packets. And we 291 00:31:33,375 --> 00:31:40,667 generated 60 of our own packets and through the could over cable which is basically a stereo 292 00:31:40,667 --> 00:31:45,708 audio cable demodulated that on the bench. When you look at that ideal scenario where you have a 293 00:31:45,708 --> 00:31:51,708 lot of packets received over the air and just a few that were generated with the stego tool 294 00:31:53,792 --> 00:31:59,792 and you had a clean transmission line the packets were extremely obvious and Brent will bring me 295 00:32:13,958 --> 00:32:17,792 to the next slide right now. Please. Thank you Brent. [Applause]. You should always 296 00:32:17,792 --> 00:32:22,167 co‑present and have a back up lap top. The analysis module, yes, graphics and pictures and 297 00:32:22,167 --> 00:32:26,500 you can see those things. So we thought finding steganography is pretty easy. Here's the pictures 298 00:32:26,500 --> 00:32:31,042 I was talking about on the upper left hand side. That's the population of natural packets. 299 00:32:31,042 --> 00:32:35,458 On the light hand side you can see the orange dots, they are the stego packets. This graph is 300 00:32:35,458 --> 00:32:38,583 numbers of error on the X axis and standard deviation of that confidence value on the Y axis. 301 00:32:38,583 --> 00:32:44,583 You will notice this is the really non-populated area of the graph that you see in the 302 00:32:47,208 --> 00:32:53,250 natural packets. Then awful our stego packets show up there when we did it on the lab bench 303 00:32:53,250 --> 00:32:57,917 because you're essentially taking the low error packets and shoving a bunch of errors into 304 00:32:57,917 --> 00:33:03,500 them and they more or less slide into this place that it's obvious they exist. So I closed 305 00:33:03,500 --> 00:33:08,958 the lap top, I was done, I had a drink and finished. Brent said it's probably not that easy, 306 00:33:08,958 --> 00:33:14,958 Paul. Because you're not taking into account any of the interference that would be 307 00:33:17,792 --> 00:33:20,583 normally received over the air. You're not taking into account weather interference, bad 308 00:33:20,583 --> 00:33:23,792 transmitters, et cetera, et cetera, et cetera. Transmits on top of each other is problematic 309 00:33:23,792 --> 00:33:27,958 in this protocol. So what would happen if you actually ‑‑ again because we can't send these 310 00:33:27,958 --> 00:33:33,625 packets legally ‑‑ what would happen if you actually simulated the behavior, if you took the 311 00:33:33,625 --> 00:33:39,542 real error values and real signal to noise values, et cetera out these packets on the 312 00:33:39,542 --> 00:33:43,583 left hand side of the graph when you substituted them into your Stego packets and pretending 313 00:33:43,583 --> 00:33:47,333 that you received those Stego packets over the air, the tool supports that too. You can take 314 00:33:47,333 --> 00:33:53,625 a population of real world packets and model your stego pocket against them. In that 315 00:33:53,625 --> 00:33:59,958 case not so much. The same measurement value it turns out that there is a lot of error 316 00:33:59,958 --> 00:34:05,958 that you get on these transmissions in the real world. So it's not that simple. We 317 00:34:09,583 --> 00:34:14,750 tried other measurement signal to noise ratio. Not quite. I'm not a statistician. You've 318 00:34:14,750 --> 00:34:19,500 probably already notice that already. There was already enough math here to make my 319 00:34:19,500 --> 00:34:24,958 brain hurt. There are some statistical methods we think could tease out a few of these 320 00:34:24,958 --> 00:34:31,750 packets. For example you can see we can get some out here but still not all of them. So it's 321 00:34:31,750 --> 00:34:36,875 actually a little harder for the amateur hobbyist nonprofessional to detect than we thought. We 322 00:34:36,875 --> 00:34:41,708 did observe some interesting patterns. This is the frequency of error symbol and the location 323 00:34:41,708 --> 00:34:48,250 of those error symbols that we had seen. In the real population of packets this is about 14,000 324 00:34:48,250 --> 00:34:53,750 packets received at random time at various intervals over weeks. And you can see they're 325 00:34:53,750 --> 00:34:57,958 definitely not random when you look at the real world. What symbols happen as errors in the 326 00:34:57,958 --> 00:35:04,250 real world and what symbol error locations show up in the real world. We didn't emulate this. 327 00:35:04,250 --> 00:35:08,417 If you were going to use a method take into account what happens in the real world. We 328 00:35:08,417 --> 00:35:14,417 don't know why this is ourselves but we have theories. On the bottom you will see two 329 00:35:17,208 --> 00:35:23,208 pictures. Those are 200 stego packets basically the same message encrypted and encoded 330 00:35:25,917 --> 00:35:31,917 with the same key. And you'll see that the locations and symbols really show off as very 331 00:35:37,292 --> 00:35:43,292 unnatural peaks there so that's certainly an issue. What about distance? So our theoretical 332 00:35:46,333 --> 00:35:51,375 maximum number of errors we could decode is 10. We could theoretically have 10 errors 333 00:35:51,375 --> 00:35:57,042 across the packet when we were done and decode the actual JT65 and our encoded message. That's 334 00:35:57,042 --> 00:36:03,042 an absolute best case scenario. Turns out more likely 6 or 7 or so we could tolerate. Out of our 335 00:36:06,292 --> 00:36:11,917 large population of packets we looked at how far away the sender claimed to be from the 336 00:36:11,917 --> 00:36:17,625 receiver and the receiver was that wire antenna in my attic and they were out over a 337 00:36:17,625 --> 00:36:23,500 thousand miles. Maybe several thousand miles, couple thousand miles. So it's definitely 338 00:36:23,500 --> 00:36:27,833 possible that something like this could be a worldwide short messaging protocol either if A, 339 00:36:27,833 --> 00:36:33,833 conditions were perfect or you had repeating stations. Obviously there's 340 00:36:33,833 --> 00:36:39,000 vulnerabilities and limitations to this. We made trade off. Analysis and detection is a 341 00:36:39,000 --> 00:36:45,500 problem. We talked about what hobbyists can do with stock tools on a bench. If your 342 00:36:45,500 --> 00:36:50,458 adversary is much differently equipped than that you might have a problem. Transmitter 343 00:36:50,458 --> 00:36:56,125 location is also a problem. There was a talk yesterday on Fox hunting and they do fox 344 00:36:56,125 --> 00:37:01,000 hunting here and it's well understood problem in game especially by the 3 letter 345 00:37:01,000 --> 00:37:05,875 agency. We certainly think if you can observe transmitters from multiple locations you can 346 00:37:05,875 --> 00:37:11,833 better tease out what the error symbols that are injected are. Except for the GPG mode we're 347 00:37:11,833 --> 00:37:17,042 not doing anything with signing these transmissions so there's a message forgery problem. You can 348 00:37:17,042 --> 00:37:23,000 address that but you're trading more band width. >> So how do you get this tool? We've been 349 00:37:23,000 --> 00:37:30,083 working on it for many months. Much longer than we probably ever thought we would but today 350 00:37:30,083 --> 00:37:33,042 this morning right before we came on stage we made that public. So this is on 351 00:37:33,042 --> 00:37:39,042 gethub/pdogg/jt65stego. There is a version on the conference DVD as well. I would recommend 352 00:37:41,875 --> 00:37:48,708 pulling the hub version. We made modifications after we submitted it for the DVD but either one 353 00:37:48,708 --> 00:37:56,042 they're both compatible with each other and work great. So we hope we showed you how you can 354 00:37:56,042 --> 00:38:01,500 definitely embed hidden messages inside the protocols in digital radio. If you don't want to do 355 00:38:01,500 --> 00:38:07,833 what we did you can take the ideas and pick your own protocol and implement it. There's lots 356 00:38:07,833 --> 00:38:12,333 of different ways you can hide these things. We only just started to scratch the surface 357 00:38:12,333 --> 00:38:18,333 basically. Some things we can do is look into more ways to defect and make sure it's undetectable 358 00:38:24,208 --> 00:38:30,208 and working into other protocols as well as I mentioned. So this is actually an older version of 359 00:38:32,292 --> 00:38:38,292 the presentation but there's a ham examine here. On Sunday in the crypto and privacy village 360 00:38:40,458 --> 00:38:46,125 you can head on down there noon and take the test and if you're not familiar with the material 361 00:38:46,125 --> 00:38:51,375 but you want to get into it there's a cram session at 9:00 a.m. in the wireless 362 00:38:51,375 --> 00:38:56,917 village which is listed there. If you see the pictures with these light up badges those are 363 00:38:56,917 --> 00:39:04,750 the volunteers that will be helping to administer the exam and if you pass any level of the 364 00:39:04,750 --> 00:39:10,625 test there's 3 levels you'll be going home with a really cool medallion that's somewhat like 365 00:39:10,625 --> 00:39:14,667 this. They're pretty awesome some come by and check that out for sure. I hope to see you 366 00:39:14,667 --> 00:39:19,333 there. >> But don't do any of this. And this is actually on the test. So we've actually 367 00:39:19,333 --> 00:39:24,917 given you some answers. Don't do any of this. >> Does the person that organizes the exam in the 368 00:39:24,917 --> 00:39:30,917 room? Do you want me to mention you? Or be humble? There he is. So we want to thank everybody in 369 00:39:33,000 --> 00:39:39,000 the room for coming to see this. We're kind of running up on the edge of time. We especially want 370 00:39:41,625 --> 00:39:47,333 to thank lots of people from the Massachusetts group, MassHackers. We have questions. 371 00:39:47,333 --> 00:39:53,583 We want to thank everyone from Mass Hackers. They've heard portions of this talk and we 372 00:39:53,583 --> 00:39:59,000 bounce ideas off them as well. It does look like we have time for a few questions if there are 373 00:39:59,000 --> 00:40:05,000 any. Right over here. Right over here, your hand was up first. >> [Off mic] >> So the question is 374 00:40:31,417 --> 00:40:35,292 really around the time synchronization and especially when we talk about mobile 375 00:40:35,292 --> 00:40:41,167 scenarios that might have not access to a network. GPS was the option. That would be one option 376 00:40:41,167 --> 00:40:47,167 if you can receive time from somewhere that was reliable, you can do that synchronization. The 377 00:40:49,250 --> 00:40:53,667 other option I personally have thought about but we didn't implement in the tool is 378 00:40:53,667 --> 00:40:58,542 honestly if you listen to one of these JT65 watering hole frequencies long enough you have 379 00:40:58,542 --> 00:41:02,500 transmissions starting when you want to start your transmission and all I need is relative 380 00:41:02,500 --> 00:41:07,500 clocks. I don't need to know exactly what time it is I need to know when the beginning of a 381 00:41:07,500 --> 00:41:14,458 minute is. Yes people are transmitting at the beginning of a minute. It is pretty exact. 382 00:41:14,458 --> 00:41:20,542 It's not 100 percent exact. If you look into it because what can happen is the transmitter 383 00:41:20,542 --> 00:41:24,792 can transmit before the start of the minute and it can still be decoded because the symbols are 384 00:41:24,792 --> 00:41:30,167 missing in the transmission. But one of the thoughts I had when we were ‑‑ when I thought about 385 00:41:30,167 --> 00:41:35,625 that actually was you could always use receiving signals as a relative thing and you can 386 00:41:35,625 --> 00:41:41,625 send the signal through a signal you received based on an offset. >> [Off mic] >> Did we look at 387 00:41:57,375 --> 00:42:02,875 having the data in the message and using the forward error correction to change that 388 00:42:02,875 --> 00:42:08,875 message into what we wanted to see? I'm not sure I totally understand. >> [Off mic] >> I 389 00:42:22,708 --> 00:42:28,375 think there's probably various places you could actually do the steganography injection in that 390 00:42:28,375 --> 00:42:35,458 process and there are various levels that you can actually use the ‑‑ what we thought about for 391 00:42:35,458 --> 00:42:42,042 example using the real innocuous message as the key so you were actually transmitting a key and 392 00:42:42,042 --> 00:42:47,125 that has problems as well and the advantage would be you wouldn't have to necessarily 393 00:42:47,125 --> 00:42:52,083 know the key. You would just have to go through at that algorithm, there are probably 394 00:42:52,083 --> 00:42:57,000 multiple places where you could embed the stego. There are probably multiple other ‑‑ this 395 00:42:57,000 --> 00:43:03,000 protocol or others. >> I think there's time for one more. >> [Off mic] >> Okay so the 396 00:43:12,792 --> 00:43:19,958 question was if you remove the cryptography would it remove the FCC regulations in you can talk 397 00:43:19,958 --> 00:43:27,625 to a lawyer. We're not lawyers first of all. Our understanding or our personal interpretation 398 00:43:27,625 --> 00:43:34,000 is that you cannot hide a message inside of a transmission. So for us hiding 399 00:43:34,000 --> 00:43:38,208 if without the encryption would still count. Now there may be other people that have a 400 00:43:38,208 --> 00:43:42,750 different interpretation of that and I know some are in the room actually they actually may know 401 00:43:42,750 --> 00:43:50,542 more than I do because they were both hams and lawyers. So that's a good question for them. There 402 00:43:50,542 --> 00:43:56,625 are some exceptions to using encryption. You can talk to ‑‑ if you're sending commands to 403 00:43:56,625 --> 00:44:01,125 space station there's work around but we're obviously we are not doing that. Somebody 404 00:44:01,125 --> 00:44:06,667 mentioned two days ago if you control an RC aircraft and sending back telemetry data that 405 00:44:06,667 --> 00:44:12,667 is also allowed but aside from that, you know ‑‑ don't quote us on that but just don't do it. 406 00:44:15,750 --> 00:44:18,750 We're not saying you should do it. Okay. All right. I think we're out of time but we would 407 00:44:18,750 --> 00:44:24,125 be happy to answer more questions outside. We'll probably be at bar con after 408 00:44:24,125 --> 00:44:30,625 this. If you see us around the conference we will talk about amateur radio or pretty much 409 00:44:30,625 --> 00:44:36,625 anything like puppies. Thank you for coming. Thank you. [Applause].