1 00:00:00,000 --> 00:00:06,160 All right, let me go ahead and get started. Can everybody hear me? No problems? All right. 2 00:00:07,820 --> 00:00:15,860 This talk is Real-Time Steganography with RTP. I'm Druid, founder of Computer Academic Underground. 3 00:00:16,640 --> 00:00:21,840 HD and I co-founded the Austin Hackers Association, and I'm currently employed by Tipping Point DV Labs 4 00:00:21,840 --> 00:00:23,680 doing VoIP security research. 5 00:00:25,400 --> 00:00:31,720 A quick overview of what I'm going to be talking about. Real briefly, I'm going to talk about what VoIP is, 6 00:00:31,900 --> 00:00:38,660 what RTP is, what it's used for, a little bit about audio steganography, and then also briefly 7 00:00:38,660 --> 00:00:40,700 some previous research in the area. 8 00:00:41,380 --> 00:00:45,640 Next, I'm going to talk about using steganography with real-time transport, 9 00:00:46,180 --> 00:00:52,560 kind of the problems and challenges that I encountered while attempting to develop this project. 10 00:00:53,700 --> 00:00:58,260 After that, I'm going to speak about my implementation, which is called SteganRTP. 11 00:00:59,500 --> 00:01:07,000 Basically, a little bit about it, the goals that I set forth, the architecture, operational flow, 12 00:01:07,880 --> 00:01:10,860 the different message structures that I'm using in the protocol, 13 00:01:11,180 --> 00:01:15,360 the different functional subsystems of the tool and what they're used for, 14 00:01:15,540 --> 00:01:22,800 and then which of the challenges that I identified in the previous section I was able to meet, which I didn't. 15 00:01:23,680 --> 00:01:30,100 After that, I'm going to attempt a live demo, and then speak a little bit about conclusions 16 00:01:30,100 --> 00:01:33,240 and what I intend to do with this project moving forward. 17 00:01:33,640 --> 00:01:37,360 And then after that, Q&A will be in one of the Q&A rooms. 18 00:01:40,140 --> 00:01:45,560 So, VoIP and RTP, again, real briefly, this is one slide. 19 00:01:45,700 --> 00:01:49,260 If you don't know what voice over IP is, it's basically internet telephony. 20 00:01:49,720 --> 00:01:53,460 It's what a lot of the traditional telephony networks are moving towards. 21 00:01:54,280 --> 00:01:57,040 RTP is the real-time transport protocol. 22 00:01:57,600 --> 00:02:05,740 Other than IAX, almost all other VoIP protocols utilize this for the audio channel of the call. 23 00:02:06,360 --> 00:02:09,120 There's a number of different signaling protocols used. 24 00:02:09,320 --> 00:02:17,340 There's SIP, H323, IAX, some others, but almost all of them use RTP for the audio. 25 00:02:19,560 --> 00:02:23,180 So, a little bit about audio steganography, just so you have some idea. 26 00:02:23,680 --> 00:02:31,660 How this actually works, basically, steganography is, it comes from the Greek root word, 27 00:02:31,720 --> 00:02:34,640 steganos and grapheon, which literally means covered writing. 28 00:02:35,080 --> 00:02:41,220 The primary goal of steganography is to hide the fact that covert communication is taking place. 29 00:02:42,560 --> 00:02:49,980 And with modern methods of steganography, it's essentially hiding one piece of data inside another piece of data. 30 00:02:51,440 --> 00:02:53,340 So, some terms I'm going to be using. 31 00:02:54,300 --> 00:03:00,160 When I say the word message, I'm essentially talking about the data that's going to be hidden or extracted. 32 00:03:01,300 --> 00:03:05,100 Cover medium is the medium in which data is going to be hidden. 33 00:03:05,460 --> 00:03:12,760 It's also sometimes referred to as the cover image, cover audio, you know, whatever the type of cover medium is. 34 00:03:13,340 --> 00:03:16,520 Stego medium is a medium in which data is already hidden. 35 00:03:17,340 --> 00:03:23,480 And redundant bits are essentially bits of data in the cover medium that you can manipulate and modify. 36 00:03:23,680 --> 00:03:28,100 That won't compromise the medium's perceptible integrity. 37 00:03:28,480 --> 00:03:35,100 Specifically with audio, that's, you know, things you can change to where the human ear will still hear the same audio, 38 00:03:35,360 --> 00:03:37,200 but it's digitally different. 39 00:03:40,220 --> 00:03:45,980 Two different types of covert channels are the primary types of steganography used. 40 00:03:46,180 --> 00:03:51,440 They're storage-based, which is essentially data that's embedded into a static cover medium, 41 00:03:51,540 --> 00:03:53,640 like an image or an MP3. 42 00:03:53,680 --> 00:03:59,680 So, if you have an image or an MP3 file or something like that, and you extract it from that static piece of data. 43 00:04:00,280 --> 00:04:03,020 Essentially, that covert channel is persistent. 44 00:04:03,280 --> 00:04:09,300 You can embed the data, you know, five years ago and extract it now, and the data will still be there. 45 00:04:09,500 --> 00:04:23,180 You also have timing-based covert channels, which are essentially signals that are sent by modulating the behavior of either the environment that the system is running in or of the tool itself. 46 00:04:23,680 --> 00:04:25,960 And that type of communication is transient. 47 00:04:26,240 --> 00:04:32,580 A good example of this is, you know, producing a load that changes the CPU response time. 48 00:04:32,800 --> 00:04:37,560 So, if you have, you know, a very quick CPU response time, you might interpret that as zero, 49 00:04:37,680 --> 00:04:40,560 and if it's above a certain threshold, you might interpret that as a one. 50 00:04:40,720 --> 00:04:49,240 By modulating your application's behavior, you can signal that data to an observing process or application. 51 00:04:51,800 --> 00:04:53,660 Digitally embedding a message, you know, it's a very complex process. 52 00:04:53,680 --> 00:04:56,820 A message in a cover medium generally involves two basic steps. 53 00:04:57,160 --> 00:05:01,120 You're going to identify the redundant bits of the cover medium, 54 00:05:01,200 --> 00:05:06,000 and then you're going to decide which of those you want to use and manipulate them to embed your data. 55 00:05:08,480 --> 00:05:15,460 Usually, you can get away with using the least significant bit of cover medium's word value size. 56 00:05:16,300 --> 00:05:20,980 Sometimes, depending on the type of cover medium, you can get away with using two 57 00:05:20,980 --> 00:05:23,660 or even three of the least significant bits. 58 00:05:26,820 --> 00:05:34,380 But in most digital mediums I've used steganography with, one is plenty for what you're trying to do. 59 00:05:36,640 --> 00:05:42,860 Media formats, in general, tend to be very inaccurate data formats, because they don't need to be accurate. 60 00:05:43,060 --> 00:05:47,520 The human ear is not very good at differentiating sounds. 61 00:05:48,400 --> 00:05:53,660 For example, if you were to record an orchestra performance with two different sounds, 62 00:05:53,660 --> 00:05:57,460 or two different recording devices in the same manner, 63 00:05:57,560 --> 00:06:02,040 you're going to end up with two completely different recordings when looked at digitally. 64 00:06:02,280 --> 00:06:05,600 But when you play them back, they're going to sound fairly identical. 65 00:06:07,400 --> 00:06:13,420 Changes in an audio bit stream can be done so slightly that when played back, 66 00:06:13,600 --> 00:06:15,440 the human ear won't be able to tell the difference. 67 00:06:16,460 --> 00:06:22,640 And also, with audio, like I said, you can usually use the least significant bit from each byte or each, 68 00:06:22,640 --> 00:06:27,980 depending on the size of the word value, to embed your message. 69 00:06:30,680 --> 00:06:36,220 Here's a quick example of doing audio embedding in an 8-bit audio file. 70 00:06:37,320 --> 00:06:43,060 So let's assume that we have these 8 bytes in a cover audio file. 71 00:06:43,840 --> 00:06:48,820 If we want to, and there's binary, I've highlighted the least significant bits for you. 72 00:06:49,040 --> 00:06:51,360 If we wanted to hide the byte 214, 73 00:06:51,360 --> 00:06:55,980 we replace the least significant bit from each byte to hide our message. 74 00:06:56,320 --> 00:06:59,260 And here's a comparison of the original plus the modified. 75 00:06:59,520 --> 00:07:03,020 If you'll notice, only about half of those values actually changed. 76 00:07:03,240 --> 00:07:08,640 So the impact of making these manipulations can be very, very small. 77 00:07:10,780 --> 00:07:13,360 Some previous research in the area. 78 00:07:14,700 --> 00:07:18,580 Steganography using audio as a cover medium is nothing at all new. 79 00:07:18,920 --> 00:07:21,340 There's a number of steg tools that will operate on this. 80 00:07:21,360 --> 00:07:26,880 They operate on different static files like MP3s, Waves, VOCs, AUs, etc. 81 00:07:29,520 --> 00:07:34,140 With VoIP steganography, there have been some previous research efforts. 82 00:07:35,040 --> 00:07:41,800 A lot of their uses of steganography or steganographic techniques aren't really used for steganography. 83 00:07:42,040 --> 00:07:48,800 For example, there's one project that uses the redundant bits in the audio to widen the actual audio band. 84 00:07:49,140 --> 00:07:51,340 So it's using a steganographic method. 85 00:07:51,360 --> 00:07:53,100 It's using a steganographic technique for an overt manner. 86 00:07:54,120 --> 00:07:59,800 There's another one that replaces RTCP, which is the real-time protocols control protocol. 87 00:08:00,420 --> 00:08:05,520 And then there's also one that does watermarking of audio for integrity checking and things like that. 88 00:08:06,900 --> 00:08:12,100 Some of the deficiencies of those research efforts are, like I mentioned, 89 00:08:12,200 --> 00:08:16,540 they don't really achieve steganography with using these techniques. 90 00:08:16,680 --> 00:08:18,420 They're used for other purposes. 91 00:08:18,960 --> 00:08:20,840 Also, some of them are just theory papers. 92 00:08:21,360 --> 00:08:27,400 They don't really explain what they're doing or how they intend to accomplish what they're talking about. 93 00:08:28,160 --> 00:08:33,740 And I've only found one that actually had a public proof of concept, and that came out a week and a half ago. 94 00:08:35,280 --> 00:08:40,560 I'm not going to talk too much more about this because I actually have an analysis paper I'm going to be publishing in about a month or so 95 00:08:40,560 --> 00:08:46,100 over all of the different projects that I've found prior to doing this research. 96 00:08:48,380 --> 00:08:57,080 So, moving forward, I'm going to talk about utilizing steganographic techniques with an active communications channel like RTP. 97 00:08:58,420 --> 00:09:00,280 Real quick, some context terminology. 98 00:09:01,220 --> 00:09:08,860 Because I'm talking about steganography as well as networking, both of the disciplines use certain terms for different meanings. 99 00:09:09,120 --> 00:09:13,520 So, just to be clear, when I say a packet, I'm talking about it in the network sense. 100 00:09:13,980 --> 00:09:16,080 It's a network data packet. 101 00:09:16,100 --> 00:09:20,440 In this case, it's normally going to refer to an RTP packet. 102 00:09:21,040 --> 00:09:24,980 When I say message, I'm using that in the steganographic term. 103 00:09:25,960 --> 00:09:28,720 It's the data that's going to be embedded or extracted. 104 00:09:29,500 --> 00:09:35,740 One thing that might be a little confusing is the protocol I've designed to run in the steganographic channel 105 00:09:35,740 --> 00:09:39,640 uses formatted data messages, which look like packets. 106 00:09:39,960 --> 00:09:44,440 So, just to be clear, when I say messages, that's what I'm talking about, 107 00:09:44,520 --> 00:09:46,080 even though it might look like a packet. 108 00:09:46,100 --> 00:09:52,260 And hopefully, I'll be able to use these terms consistently so as not to confuse anyone. 109 00:09:54,260 --> 00:09:59,400 As I said earlier, in steganography, you generally have two general types of application. 110 00:09:59,780 --> 00:10:00,940 You have storage and timing. 111 00:10:01,520 --> 00:10:08,400 Almost all existing tools and uses of steganography that I've found regarding audio or VOIP 112 00:10:08,400 --> 00:10:13,720 use a storage type of method, and that's the same type that I'm going to be using. 113 00:10:14,300 --> 00:10:16,080 They implement separate methods. 114 00:10:16,080 --> 00:10:17,420 There are separate hide and retrieve modes. 115 00:10:19,080 --> 00:10:25,480 And the closest things I've found to a real-time use of steganography 116 00:10:25,840 --> 00:10:30,780 is the project that came out about two weeks ago, which is called VO squared IP. 117 00:10:31,580 --> 00:10:38,320 It's basically embedding a secondary audio channel encoded in a different codec 118 00:10:38,820 --> 00:10:41,540 inside an overt audio channel running in RTP. 119 00:10:41,840 --> 00:10:43,340 So, it's similar to what I'm doing, 120 00:10:43,340 --> 00:10:48,620 but instead of embedding a data communications protocol like I'm doing, 121 00:10:48,720 --> 00:10:50,760 they're actually embedding different audio. 122 00:10:51,100 --> 00:10:54,880 And there's a couple of deficiencies in their research, 123 00:10:55,060 --> 00:10:57,280 which I'm going to be including in my analysis paper. 124 00:11:01,800 --> 00:11:10,280 So, basically, what RTP provides is a streaming media mechanism for VOIP 125 00:11:10,280 --> 00:11:13,000 to transport the audio of a call. 126 00:11:13,340 --> 00:11:19,800 And it provides the opportunity to establish a real-time covert communications channel within that. 127 00:11:21,180 --> 00:11:25,800 So, RTP packet payloads are essentially just encoded multimedia. 128 00:11:27,200 --> 00:11:30,280 During my research, I focused on RTP audio only, 129 00:11:30,620 --> 00:11:32,140 but you can also embed video. 130 00:11:32,500 --> 00:11:34,040 You can embed text. 131 00:11:34,300 --> 00:11:37,460 RTP can basically transport any type of real-time data. 132 00:11:38,880 --> 00:11:42,420 The frequency, locations, and number of redundant bits 133 00:11:42,420 --> 00:11:46,480 are determined by whichever codec is used to encode that data. 134 00:11:47,260 --> 00:11:51,920 And codecs like G711, which is what I used for my research, 135 00:11:52,180 --> 00:11:54,680 uses a one-byte sample encoding. 136 00:11:55,440 --> 00:11:57,120 And like I mentioned earlier, 137 00:11:57,260 --> 00:12:01,700 that's generally pretty resilient to least significant bit changes to the audio. 138 00:12:03,040 --> 00:12:06,940 Codecs with larger samples might provide for one or more bits, 139 00:12:07,080 --> 00:12:11,720 but I just stuck to one with my testing. 140 00:12:14,160 --> 00:12:15,660 And that's my cat. 141 00:12:17,460 --> 00:12:20,040 All right, so audio codec word sizes. 142 00:12:20,920 --> 00:12:24,760 I focused on G711 because it's fairly straightforward. 143 00:12:25,000 --> 00:12:26,820 It uses an eight-bit sample word size. 144 00:12:27,480 --> 00:12:30,160 There's a number of other codecs. 145 00:12:30,180 --> 00:12:33,280 I only listed a few here because I found these other ones interesting. 146 00:12:33,940 --> 00:12:37,160 Speaks actually has a dynamic variable word size. 147 00:12:37,360 --> 00:12:39,380 It changes its sample size on the fly. 148 00:12:39,600 --> 00:12:42,000 So that would present an interesting challenge 149 00:12:42,000 --> 00:12:43,720 to a steganographic embedder. 150 00:12:43,860 --> 00:12:47,660 And ILBC actually uses a class-based bit distribution. 151 00:12:48,060 --> 00:12:50,360 What it does is it takes all of the audio samples, 152 00:12:50,620 --> 00:12:53,280 it classifies the bits in each sample, 153 00:12:53,400 --> 00:12:56,420 and then it rips all those bits apart and groups them by class, 154 00:12:56,540 --> 00:12:58,220 and then embeds that in RTP. 155 00:12:58,460 --> 00:13:01,580 So in that case, you may have all the least significant bits 156 00:13:01,580 --> 00:13:04,180 all at one end of the RTP packet payload. 157 00:13:04,760 --> 00:13:08,540 So that would require its own type of custom embedder as well. 158 00:13:10,140 --> 00:13:11,080 Some throughput. 159 00:13:11,080 --> 00:13:13,000 I was able to achieve for G711. 160 00:13:13,380 --> 00:13:17,000 Most of my testing, I had a 160-byte RTP payload. 161 00:13:17,600 --> 00:13:19,780 Using an eight-bit sample word size 162 00:13:19,780 --> 00:13:23,180 and utilizing just the least significant bit from each sample word, 163 00:13:23,380 --> 00:13:27,940 that's basically eight samples needed to embed one byte of data. 164 00:13:28,280 --> 00:13:32,700 At 50 or so packets in either direction, 165 00:13:32,880 --> 00:13:35,380 you get about 1K per second. 166 00:13:38,780 --> 00:13:41,060 So the problems and challenges I ran into 167 00:13:41,080 --> 00:13:43,500 trying to use steganography with RTP. 168 00:13:44,160 --> 00:13:50,960 Probably the most significant one is that RTP utilizes UDP for its transport. 169 00:13:51,280 --> 00:13:54,000 UDP is connectionless and unreliable. 170 00:13:55,080 --> 00:13:58,360 Due to the transport, the message data that's being split 171 00:13:58,360 --> 00:14:02,200 across these multiple packets might arrive out of order 172 00:14:02,200 --> 00:14:03,920 or some of them might not arrive at all. 173 00:14:07,340 --> 00:14:10,800 So next one was cover medium size limitations. 174 00:14:11,080 --> 00:14:14,420 As I showed you a minute ago with how much data could actually be embedded, 175 00:14:17,040 --> 00:14:20,680 using fairly small streaming type packets, 176 00:14:20,860 --> 00:14:22,660 there's not a whole lot of room to work with 177 00:14:22,660 --> 00:14:25,120 when you're only using a single bit out of each sample. 178 00:14:29,440 --> 00:14:34,400 So when I use the RTP payload for a steganographic purpose, 179 00:14:34,660 --> 00:14:38,440 the data is inevitably going to be split across multiple packets. 180 00:14:38,440 --> 00:14:42,880 So we need to have some mechanism for reassembling them on the receiving system. 181 00:14:44,000 --> 00:14:45,220 Next is latency. 182 00:14:45,740 --> 00:14:50,160 RTP is extremely sensitive to network latency and quality of service issues. 183 00:14:50,800 --> 00:14:53,020 When we're taking these packets in, 184 00:14:53,140 --> 00:14:56,380 and we may need to manipulate them or not before sending them on, 185 00:14:56,560 --> 00:14:58,940 we can't hold onto them for too long 186 00:14:58,940 --> 00:15:04,040 or we're going to start affecting the covert nature of the communications. 187 00:15:04,380 --> 00:15:08,340 It's going to be audibly noticeable to a user 188 00:15:08,440 --> 00:15:10,220 in their user experience 189 00:15:11,180 --> 00:15:14,200 if we're messing with the RTP stream too much. 190 00:15:15,000 --> 00:15:17,620 So another thing about RTP is that 191 00:15:17,620 --> 00:15:21,700 it essentially sets up two packet streams for a call, 192 00:15:21,820 --> 00:15:22,880 one in either direction. 193 00:15:23,060 --> 00:15:25,240 And when you start adding conferencing and things like that, 194 00:15:25,320 --> 00:15:26,080 you get more. 195 00:15:26,420 --> 00:15:27,880 But between two parties, 196 00:15:27,980 --> 00:15:30,300 you basically have one RTP stream going in one direction 197 00:15:30,300 --> 00:15:31,520 and one going in the other. 198 00:15:33,020 --> 00:15:36,860 The challenge there is that you need to be able to correlate those 199 00:15:36,860 --> 00:15:39,180 so that you can hook into the correct streams 200 00:15:39,180 --> 00:15:42,060 and make sure your communication is going to the correct places. 201 00:15:44,880 --> 00:15:46,920 Another challenge is compressed audio. 202 00:15:47,300 --> 00:15:49,840 These codecs can be compressed in the payload. 203 00:15:50,840 --> 00:15:55,780 So to successfully embed into a compressed payload, 204 00:15:55,980 --> 00:15:57,900 you would essentially have to uncompress, 205 00:15:58,100 --> 00:16:00,920 add your information, recompress, 206 00:16:00,940 --> 00:16:02,720 and then repackage that and send it on. 207 00:16:02,860 --> 00:16:04,880 Or skip those packets entirely 208 00:16:04,880 --> 00:16:06,840 if there's only service. 209 00:16:06,840 --> 00:16:07,920 There are certain ones that are being compressed. 210 00:16:09,740 --> 00:16:13,100 You also have to deal with media gateway audio modifications. 211 00:16:14,760 --> 00:16:16,880 As RTP traverses the network, 212 00:16:17,060 --> 00:16:19,900 it may cross one or more of these intermediary devices. 213 00:16:21,180 --> 00:16:25,060 What they can do is re-encode the data in a different codec. 214 00:16:25,100 --> 00:16:26,660 They can change the sizes. 215 00:16:27,060 --> 00:16:29,820 They can do any number of things to the RTP stream 216 00:16:29,820 --> 00:16:31,920 which might compromise the integrity 217 00:16:31,920 --> 00:16:33,280 of your steganographic channel. 218 00:16:36,840 --> 00:16:40,060 So basically, identification of any of these has to be considered. 219 00:16:41,200 --> 00:16:44,240 And you have to be able to find a way to overcome that 220 00:16:44,720 --> 00:16:47,520 if those types of devices are being traversed. 221 00:16:50,440 --> 00:16:53,620 Also, an interesting thing about RTP is that 222 00:16:54,320 --> 00:16:57,540 endpoint devices can change audio codecs on the fly. 223 00:16:57,740 --> 00:17:01,700 They may be operating a G711 for the first five minutes of the call 224 00:17:01,700 --> 00:17:05,160 and then switch to something else as, you know, 225 00:17:05,160 --> 00:17:06,800 their network latency. 226 00:17:06,840 --> 00:17:07,560 And if that network latency becomes higher, 227 00:17:07,600 --> 00:17:09,220 it needs a more efficient codec. 228 00:17:09,940 --> 00:17:11,900 So you have to be able to track that 229 00:17:11,900 --> 00:17:16,240 and change your encoding and embedding methods on the fly. 230 00:17:22,260 --> 00:17:23,800 All right, so now I'm going to talk about 231 00:17:24,300 --> 00:17:25,600 my particular implementation. 232 00:17:27,560 --> 00:17:29,880 And this is essentially a reference implementation. 233 00:17:30,200 --> 00:17:31,440 And by calling it that, you know, 234 00:17:31,460 --> 00:17:33,380 I only have to worry about conveying the functionality. 235 00:17:33,780 --> 00:17:35,280 I don't really need to secure my code 236 00:17:36,840 --> 00:17:37,340 and secure code. 237 00:17:39,540 --> 00:17:40,880 So about stegan RTP. 238 00:17:41,060 --> 00:17:44,000 First, it's the most awesome tool name I've ever come up with. 239 00:17:44,160 --> 00:17:45,620 And that's usually my major motivation 240 00:17:45,620 --> 00:17:47,380 for working on any particular project. 241 00:17:48,960 --> 00:17:51,600 This implementation basically requires 242 00:17:52,680 --> 00:17:57,240 that the application be either on the endpoint device 243 00:17:57,640 --> 00:17:59,060 or an active man in the middle. 244 00:18:00,400 --> 00:18:02,740 However, I demonstrated at USEC West 245 00:18:02,740 --> 00:18:06,240 that you can do passive injection or RTP audio. 246 00:18:06,840 --> 00:18:09,240 In this case, it would be exactly the same 247 00:18:09,240 --> 00:18:11,760 if you wanted to do a passive type injection, 248 00:18:12,540 --> 00:18:16,120 but I haven't implemented that in my particular tool. 249 00:18:16,920 --> 00:18:18,320 Right now, it runs on Linux. 250 00:18:18,500 --> 00:18:20,460 It uses a Windows Curses interface. 251 00:18:22,720 --> 00:18:23,920 And for receiving, 252 00:18:24,660 --> 00:18:27,240 it only has to be able to observe the inbound RTP stream. 253 00:18:27,360 --> 00:18:29,660 It doesn't actually have to be a man in the middle 254 00:18:29,660 --> 00:18:30,640 or anything like that, 255 00:18:30,720 --> 00:18:32,920 as it does for the outbound RTP stream. 256 00:18:34,720 --> 00:18:36,760 So you can pair it with ARTPoS. 257 00:18:36,760 --> 00:18:37,880 You don't have to have any ARP-Spoops, 258 00:18:38,040 --> 00:18:38,360 or any other ARP-Spoops, 259 00:18:38,360 --> 00:18:40,000 or any other ARP-Sports in that architecture. 260 00:18:43,520 --> 00:18:44,280 You can do that, 261 00:18:44,280 --> 00:18:44,600 So that was my first goal. 262 00:18:44,920 --> 00:18:46,620 The second goal was to achieve the kind of architecture 263 00:18:46,620 --> 00:18:47,140 to be able to do stegan RTP 264 00:18:47,140 --> 00:18:49,480 with the help of an ARP-Spoop. 265 00:18:49,480 --> 00:18:52,960 So I'm going to use ARP-Spoop 266 00:18:52,960 --> 00:18:53,820 and I'm going to use ARP-Spoop 267 00:18:53,820 --> 00:18:58,760 to do stegan RTP. 268 00:19:01,080 --> 00:19:04,140 I'm going to use ARP-Spoop 269 00:19:04,140 --> 00:19:04,580 and I'm going to use ARP-Spoop 270 00:19:04,580 --> 00:19:06,740 to do stegan RTP. 271 00:19:06,740 --> 00:19:12,860 an active man-in-the-middle or operating on the endpoint, and I wanted simultaneous transfer 272 00:19:12,860 --> 00:19:17,100 of multiple types of data. I didn't want to just send a secondary audio stream. I wanted 273 00:19:17,100 --> 00:19:20,860 to be able to send chat data, file data, remote shell, etc. 274 00:19:22,020 --> 00:19:28,720 So here's a quick look at the architecture. The phones are basically your soft phone or 275 00:19:28,720 --> 00:19:34,840 your client application. The gray boxes are host systems. The green boxes are the application. 276 00:19:34,840 --> 00:19:41,280 And as you can see, there's the two RTP streams going in either direction. For the outbound 277 00:19:41,280 --> 00:19:47,840 or sending towards the more remote endpoint, the application needs to bridge that stream, 278 00:19:48,020 --> 00:19:51,020 and then it needs to be able to observe it coming in the other direction. 279 00:19:51,930 --> 00:19:56,700 Here's the man-in-the-middle. It looks almost exactly the same, except that instead of the 280 00:19:56,700 --> 00:20:02,160 application running on the endpoint devices or the endpoint hosts, they're out there somewhere 281 00:20:02,160 --> 00:20:04,740 along the path that RTP takes. 282 00:20:05,380 --> 00:20:10,760 So here's a quick look at the process flow. Basically, the tool initializes. It identifies 283 00:20:10,760 --> 00:20:15,140 an RTP session based on some constraints that you give it on the command line. It hooks 284 00:20:15,140 --> 00:20:21,060 the packets for those RTP streams. It reads packets. It determines whether that's an 285 00:20:21,060 --> 00:20:25,440 inbound or an outbound packet. For inbound, it immediately sends it because we don't need 286 00:20:25,440 --> 00:20:30,560 to modify it or do anything else to it. We just need to cache it and look at it after 287 00:20:31,240 --> 00:20:32,580 we go ahead and send it along. 288 00:20:34,740 --> 00:20:38,620 For outbound, we extract any potential message data, decrypt that potential message data, 289 00:20:38,760 --> 00:20:44,100 and then check an identification checksum. That tells us whether it actually is or is 290 00:20:44,100 --> 00:20:47,340 not message data. If it is, we send it to a message handler. 291 00:20:47,980 --> 00:20:53,420 For outbound, we check and see if there's any data that we have waiting to go out. If 292 00:20:53,420 --> 00:20:59,440 there is, we read it. We create a new stag message for it. We encrypt it. We embed it 293 00:20:59,440 --> 00:21:03,540 into the RTP packet, and then we send it on. If there wasn't any data waiting to go out, 294 00:21:03,600 --> 00:21:04,720 we just pass the packet on. 295 00:21:05,460 --> 00:21:11,760 So, identifying an RTP session, I basically use libfindrtp, which is a previous project 296 00:21:11,760 --> 00:21:20,200 of mine. It looks, given some constraints, watches the network for RTP sessions, and 297 00:21:20,200 --> 00:21:23,160 then it identifies that based on the signaling. 298 00:21:23,420 --> 00:21:28,200 So one of its deficiencies is it has to see the beginning of the call in order to work. 299 00:21:28,320 --> 00:21:34,260 If you have an active RTP session going, it won't actually identify that. However, you 300 00:21:34,740 --> 00:21:38,480 pass all of that information on the command line to the tool if you already know 301 00:21:38,480 --> 00:21:41,340 there's an active RTP stream and then it'll hook it directly. 302 00:21:42,460 --> 00:21:46,620 And it supports SIP and skinny signaling 303 00:21:46,620 --> 00:21:50,460 protocols for identification. So hooking packets, I'm basically using 304 00:21:50,460 --> 00:21:54,480 the Linux net filter hook points. You basically just add an IP 305 00:21:54,480 --> 00:21:58,660 tables rule with the target of queue. What that does is it passes the packets 306 00:21:58,660 --> 00:22:02,560 to a user space queuing agent. It's basically 307 00:22:02,560 --> 00:22:06,480 just an API for reading and manipulating packets and then telling 308 00:22:06,480 --> 00:22:10,480 net filter whether to drop them or pass them or anything you would normally do with 309 00:22:10,480 --> 00:22:14,480 IP tables. Quick look at the net filter hook 310 00:22:14,480 --> 00:22:18,480 points. The two we're interested in are called pre-routing and 311 00:22:18,480 --> 00:22:21,900 post-routing. You'll see that on the top left and top right. 312 00:22:22,320 --> 00:22:26,420 Essentially the pre-routing hook point gets packets before the local system has 313 00:22:26,420 --> 00:22:29,280 done anything with them and the post-routing gets 314 00:22:30,060 --> 00:22:32,460 all the packets after the local system has 315 00:22:32,460 --> 00:22:35,740 completely finished with them. And that's what I'm interested in for mine 316 00:22:36,360 --> 00:22:39,680 because I want to try to maintain the integrity of the Stego 317 00:22:39,680 --> 00:22:44,360 channel. So hooking packets, basically 318 00:22:44,360 --> 00:22:47,560 the tool registers itself as a user space queuing agent for net filter 319 00:22:48,180 --> 00:22:52,400 and then it creates those two rules that I mentioned. And then it's able 320 00:22:52,400 --> 00:22:56,320 to read packets from the queue, modify them if I need to, place them back 321 00:22:56,320 --> 00:23:00,200 into the queue and then tell the queue to accept the packet for forwarding. 322 00:23:02,460 --> 00:23:07,620 Inbound packets, like I said we can immediately accept them because we don't need to modify 323 00:23:07,620 --> 00:23:12,260 them. That hopefully helps with some of the latency issues with RTP. It just immediately 324 00:23:12,260 --> 00:23:19,300 sends the packet on. That basically allows for very low impact on the latency. With 325 00:23:19,300 --> 00:23:24,020 the copy of the packet we extract the message, we decrypt the message, we verify if it actually 326 00:23:24,020 --> 00:23:27,540 is a message or is just, you know, an RTP packet that didn't have anything embedded 327 00:23:27,540 --> 00:23:32,300 into it. And then we send the message if it is valid to a message. 328 00:23:32,460 --> 00:23:38,440 handler. For outbound packets, we pull for data that's waiting to go out from the 329 00:23:38,440 --> 00:23:43,400 tool. If there isn't any, we immediately send the packet. We create a new message 330 00:23:43,400 --> 00:23:47,660 based on the properties of the RTP packet we're going to be embedding into. 331 00:23:48,580 --> 00:23:53,780 We read as much of the waiting data as will fit in the message that's going to 332 00:23:53,780 --> 00:23:58,760 be embedded. We encrypt it and then we embed the message into the RTP payload 333 00:23:58,760 --> 00:24:06,900 as cover medium. Then we send it. So some session timeout stuff... If 334 00:24:06,900 --> 00:24:12,360 there's no RTP packets seen for the timeout period, it bails and it starts 335 00:24:12,360 --> 00:24:18,260 looking for a new session to hook into. The inbound message handler 336 00:24:18,260 --> 00:24:23,220 basically receives all valid incoming messages as determined by the 337 00:24:23,220 --> 00:24:28,600 the main packet system. When it receives a control message, it handles 338 00:24:28,600 --> 00:24:33,100 any internal state changes or administrative tasks that might be required. 339 00:24:33,760 --> 00:24:36,540 And you see I've got a couple in there like echo request, echo reply, 340 00:24:37,260 --> 00:24:42,420 a replay of a missing message, closing files, opening files, things like that. 341 00:24:43,560 --> 00:24:46,980 And then it also receives incoming user chat data, 342 00:24:47,160 --> 00:24:50,100 receives incoming file data, and receives incoming shell data. 343 00:24:51,400 --> 00:24:53,780 So a quick look at packets and messages. 344 00:24:53,900 --> 00:24:56,400 I'm not going to go into all of these in detail because it's pretty dry. 345 00:24:56,400 --> 00:24:59,320 But here's what an RTP packet looks like. 346 00:24:59,480 --> 00:25:03,360 I've highlighted a couple of the fields that we're going to be interested in later. 347 00:25:03,960 --> 00:25:05,460 PT is the payload type. 348 00:25:05,540 --> 00:25:09,620 That basically tells you what audio codec the payload's encoded with. 349 00:25:10,180 --> 00:25:11,380 There's a sequence number. 350 00:25:11,460 --> 00:25:12,460 There's a timestamp. 351 00:25:12,560 --> 00:25:15,880 And then the RTP payload, obviously, is what we're interested in. 352 00:25:18,260 --> 00:25:21,760 The message format I'm using for my communications protocol, 353 00:25:22,020 --> 00:25:23,740 which runs in the Stegna graphic channel, 354 00:25:24,300 --> 00:25:26,080 is basically just a checksum. 355 00:25:26,080 --> 00:25:31,400 ID field, it's 32-bits, a 16-bit sequence number, and then a TLV structure. 356 00:25:33,080 --> 00:25:37,080 I tried to keep this header information as short as possible 357 00:25:37,080 --> 00:25:42,320 because of the space constraints while simultaneously trying to pack 358 00:25:42,320 --> 00:25:44,280 as much functionality into it as possible. 359 00:25:46,280 --> 00:25:48,940 Message header fields, like I said, we have a 32-bit ID. 360 00:25:49,160 --> 00:25:51,020 That's basically what we're going to use to identify 361 00:25:51,020 --> 00:25:53,780 whether the message is a valid Steg message or not. 362 00:25:54,280 --> 00:25:55,920 And that is a... 363 00:25:56,080 --> 00:26:01,500 a 32-bit hash of a key hash, which is from user input, 364 00:26:01,700 --> 00:26:05,180 and the sequence type and length, which is the remainder of the header. 365 00:26:06,040 --> 00:26:09,440 The sequence number is your standard incrementing sequence number. 366 00:26:09,920 --> 00:26:14,040 The type tells us what type of Steg message it's going to be. 367 00:26:14,400 --> 00:26:17,800 And the length is the remaining size after the header. 368 00:26:19,980 --> 00:26:21,080 Some message types. 369 00:26:22,240 --> 00:26:25,620 There's a number of control messages, those echo response, 370 00:26:25,620 --> 00:26:29,980 echo replies, echo requests, opening files, closed files. 371 00:26:30,120 --> 00:26:31,060 Those are all control messages. 372 00:26:31,660 --> 00:26:37,180 We also have chat data, file data, and shell input data and output data. 373 00:26:39,260 --> 00:26:42,080 Control messages can basically be stacked 374 00:26:42,080 --> 00:26:46,600 if they will all fit into a single RTP message or RTP packet. 375 00:26:46,960 --> 00:26:49,660 And it's essentially another TLV structure. 376 00:26:49,880 --> 00:26:52,000 It's control type, length, and then value. 377 00:26:53,480 --> 00:26:54,560 Control types. 378 00:26:54,700 --> 00:26:55,380 Like I said, 379 00:26:55,380 --> 00:27:00,700 we have echo request, echo reply, resending of any types of missing messages. 380 00:27:01,560 --> 00:27:04,220 Start file, end file for file transfers. 381 00:27:06,000 --> 00:27:07,760 Echo request is pretty straightforward. 382 00:27:08,580 --> 00:27:09,980 It's a sequence and a payload. 383 00:27:10,440 --> 00:27:11,660 Same thing for reply. 384 00:27:12,340 --> 00:27:15,640 Resend, we just tell it what message we want resent. 385 00:27:16,980 --> 00:27:21,180 Start file, we give it an arbitrary file ID and then the file name. 386 00:27:21,520 --> 00:27:23,860 Close file just passes the file ID. 387 00:27:24,900 --> 00:27:25,720 Chat data. 388 00:27:25,880 --> 00:27:27,320 You can see there's no extra header information. 389 00:27:27,640 --> 00:27:31,360 That's determined by the primary steg messages type field. 390 00:27:32,420 --> 00:27:35,640 For file data, it's almost the same except we include the file ID. 391 00:27:35,860 --> 00:27:40,240 And for shell data, it's determined by the steg messages header. 392 00:27:42,180 --> 00:27:44,160 So, functional subsystems. 393 00:27:45,080 --> 00:27:47,460 Basically, we have the encryption system. 394 00:27:47,720 --> 00:27:49,020 It's not really encryption. 395 00:27:49,200 --> 00:27:52,940 Right now, I'm just using pseudo-crypt with XOR against a bitpad. 396 00:27:52,940 --> 00:27:56,180 I use XOR because it's lightweight. 397 00:27:56,380 --> 00:27:57,540 I can implement it quickly. 398 00:27:58,980 --> 00:28:04,720 And it uses a SHA-1 hash as its bitpad, 399 00:28:04,900 --> 00:28:09,200 which is a hash of a password that's supplied to the tool by the user. 400 00:28:10,240 --> 00:28:13,740 The XOR operation is begun at an offset into the hash, 401 00:28:13,960 --> 00:28:19,440 which is determined by the RTP header fields that I highlighted earlier. 402 00:28:21,320 --> 00:28:22,520 Basically, it... 403 00:28:23,280 --> 00:28:27,980 It's a 32-bit hash against the user-supplied key hash, 404 00:28:28,200 --> 00:28:30,560 the RTP sequence number, the RTP timestamp, 405 00:28:30,660 --> 00:28:36,100 and we modulus that by 20 to get an offset into the 20-byte pad. 406 00:28:37,300 --> 00:28:38,540 The embedding system. 407 00:28:39,160 --> 00:28:42,540 Right now, this only operates on G711 codec. 408 00:28:45,080 --> 00:28:48,820 I'm using the commonly significant bit embedding method. 409 00:28:49,620 --> 00:28:52,320 The properties of the RTP packet. 410 00:28:52,940 --> 00:28:56,340 It tells you what your total available size is for embedding 411 00:28:56,680 --> 00:28:58,500 based on the codec and things like that. 412 00:29:00,500 --> 00:29:05,380 It's essentially the payload size divided by the word size times eight. 413 00:29:05,440 --> 00:29:06,640 Since I'm using a single bit, 414 00:29:06,780 --> 00:29:10,440 I need eight bits to embed one byte of data. 415 00:29:11,480 --> 00:29:14,440 And the payload size for the STAG message 416 00:29:14,440 --> 00:29:18,720 is the total available minus the message header length, 417 00:29:18,880 --> 00:29:22,460 which earlier was shown in the diagram. 418 00:29:23,720 --> 00:29:27,660 The extracting system is basically just a reverse of the embedding function. 419 00:29:27,840 --> 00:29:29,500 It passed through the crypto function, 420 00:29:29,760 --> 00:29:35,180 a verification of that ID field to make sure that it's a valid message. 421 00:29:36,340 --> 00:29:38,320 The outbound data polling system, 422 00:29:38,460 --> 00:29:42,960 I basically implemented it as just a big linked list of file descriptors 423 00:29:42,960 --> 00:29:45,360 that may or may not have data waiting to go out. 424 00:29:45,480 --> 00:29:49,680 We can poll those, and they're in a particular order for preference. 425 00:29:49,880 --> 00:29:52,880 So, raw messages will always go out 426 00:29:52,880 --> 00:29:54,920 first if there's one waiting to go out. 427 00:29:55,080 --> 00:29:58,100 After that, control messages will go out, chat data, 428 00:29:58,280 --> 00:30:01,060 input from the remote shell service, 429 00:30:01,260 --> 00:30:04,640 output from the local shell service if you're running one, 430 00:30:04,760 --> 00:30:07,300 and then individual file transfer data 431 00:30:07,300 --> 00:30:09,860 for any number of particular files you may have going. 432 00:30:12,420 --> 00:30:15,360 And then, like I said, they're prioritized in that order. 433 00:30:16,340 --> 00:30:17,960 The message caching system, 434 00:30:18,640 --> 00:30:21,080 all inbound and outbound messages are cached. 435 00:30:21,540 --> 00:30:26,060 We need to do that so that if the remote tool requests a resend, 436 00:30:26,120 --> 00:30:27,840 we can look it up in the cache and send it along. 437 00:30:28,140 --> 00:30:31,240 Also, if we start receiving out-of-order messages, 438 00:30:31,580 --> 00:30:35,200 we can cache them, wait for the one we're expecting to come in, 439 00:30:35,320 --> 00:30:38,120 and then go back to the cache for the subsequent messages. 440 00:30:40,160 --> 00:30:44,600 The challenges met in the time I had up to the conference, 441 00:30:45,080 --> 00:30:47,340 up to about 8 p.m. last night, 442 00:30:50,120 --> 00:30:51,060 was unreliable traffic. 443 00:30:51,080 --> 00:30:54,520 Basically, the message's sequence number in the caching system 444 00:30:54,520 --> 00:30:57,400 provides requests and identification of recent messages, 445 00:30:58,460 --> 00:31:00,020 reordering of out-of-order messages, 446 00:31:00,300 --> 00:31:02,920 and it also provides replay protection 447 00:31:02,920 --> 00:31:07,240 in case someone's somehow hooking your steg 448 00:31:07,240 --> 00:31:09,280 and then replaying things. 449 00:31:12,080 --> 00:31:13,700 Cover medium size limitations. 450 00:31:14,400 --> 00:31:18,180 Fortunately, there are plenty of RTP packets being sent every second 451 00:31:18,180 --> 00:31:19,560 in the average RTP session. 452 00:31:19,560 --> 00:31:24,980 As such, even though we're restricted to how much data we can put in each one, 453 00:31:25,260 --> 00:31:27,760 we can spread the data out over multiple packets. 454 00:31:28,260 --> 00:31:32,560 For user chat, interactive shell access, and transfer of small files, 455 00:31:32,840 --> 00:31:37,400 throughput, like my example, was perfectly fine for me. 456 00:31:39,620 --> 00:31:40,220 Latency. 457 00:31:40,380 --> 00:31:43,400 To address the sensitivity of RTP to latency, 458 00:31:43,680 --> 00:31:46,980 I made a couple of architectural decisions that I've already mentioned. 459 00:31:47,460 --> 00:31:49,140 I designed the packet hooks. 460 00:31:49,560 --> 00:31:50,580 I made sure that I had the data pooling system 461 00:31:50,580 --> 00:31:52,460 to pass RTP packets immediately 462 00:31:52,460 --> 00:31:54,320 if we don't need to do anything to them. 463 00:31:55,400 --> 00:31:57,600 As I mentioned earlier, I also went with XOR 464 00:31:57,600 --> 00:31:58,620 rather than real crypto 465 00:31:59,900 --> 00:32:01,760 to cut down on the impact 466 00:32:01,760 --> 00:32:03,900 of how long I was having to handle these packets. 467 00:32:06,060 --> 00:32:07,220 In this case, 468 00:32:07,260 --> 00:32:08,920 crypto really only needs to provide 469 00:32:08,920 --> 00:32:11,420 a little bit of obfuscation and some entropy 470 00:32:11,420 --> 00:32:15,600 to protect against some rudimentary steganalysis of the stream. 471 00:32:16,360 --> 00:32:19,380 I'm not actually using it to try to protect the data. 472 00:32:19,560 --> 00:32:22,680 My goal was primarily just to achieve steganography, 473 00:32:22,860 --> 00:32:25,380 which is hiding the fact that the communication was taking place. 474 00:32:26,900 --> 00:32:28,260 Tracking the RTP streams. 475 00:32:28,580 --> 00:32:32,440 Luckily, I had already done this with a previous project of mine. 476 00:32:32,800 --> 00:32:34,420 I'm using that for identification, 477 00:32:34,720 --> 00:32:37,660 and then I'm using libIbq for tracking and hooking the packets, 478 00:32:37,800 --> 00:32:40,280 which is the NetFilter user space queuing library. 479 00:32:42,060 --> 00:32:43,140 Audio codec switching. 480 00:32:44,500 --> 00:32:47,540 To handle those devices that switch codecs mid-session 481 00:32:47,540 --> 00:32:48,560 and change things around, 482 00:32:48,560 --> 00:32:50,620 I designed the embedding system 483 00:32:50,620 --> 00:32:52,780 to operate on individual packets. 484 00:32:54,600 --> 00:32:57,360 The parameters used to perform the embedding 485 00:32:57,360 --> 00:32:58,960 are derived from the RTP packet 486 00:32:58,960 --> 00:33:00,220 that it's about to target. 487 00:33:00,860 --> 00:33:03,400 If the RTP session's switching codecs, 488 00:33:03,420 --> 00:33:04,200 changing things around, 489 00:33:04,480 --> 00:33:05,520 we really don't care. 490 00:33:05,840 --> 00:33:08,740 As long as we support the codec 491 00:33:08,740 --> 00:33:11,020 that the audio is encoded in, 492 00:33:11,160 --> 00:33:13,160 then the embedding system will work on it. 493 00:33:13,300 --> 00:33:16,120 Otherwise, it just passes that packet unmodified. 494 00:33:22,460 --> 00:33:24,980 Okay, so now I'm going to attempt to do a live demo. 495 00:33:25,940 --> 00:33:27,020 Hopefully, it will work. 496 00:33:27,660 --> 00:33:29,280 If it crashes all over the place, 497 00:33:29,340 --> 00:33:30,300 you can heckle me and laugh. 498 00:33:34,780 --> 00:33:37,480 And I need to set up my... 499 00:33:45,480 --> 00:33:45,840 Okay. 500 00:33:47,500 --> 00:33:48,540 Up here in the top right corner, 501 00:33:48,540 --> 00:33:51,760 I have a soft phone. 502 00:33:52,200 --> 00:33:55,460 Actually, I need to show you something else first. 503 00:34:00,800 --> 00:34:02,560 Might help if you had some idea 504 00:34:02,560 --> 00:34:03,360 of what I was doing. 505 00:34:05,880 --> 00:34:07,840 Here's a quick look at the demo scenario. 506 00:34:08,340 --> 00:34:13,300 I'm basically going to be demoing both types of operation, 507 00:34:13,680 --> 00:34:15,140 the active man in the middle 508 00:34:15,140 --> 00:34:17,380 as well as the application running on the endpoint. 509 00:34:18,000 --> 00:34:18,520 I'm going to show you how to do that. 510 00:34:19,480 --> 00:34:22,300 And here's what the demo environment looks like. 511 00:34:23,160 --> 00:34:27,120 The WinXP host is the laptop I'm running the presentation on. 512 00:34:27,380 --> 00:34:28,980 It's going to be running a soft phone, 513 00:34:29,100 --> 00:34:31,360 which is the standalone endpoint. 514 00:34:31,800 --> 00:34:34,160 The Astra server is going to act as the other endpoint. 515 00:34:34,400 --> 00:34:37,040 It's also going to have an instance of the tool running on it. 516 00:34:37,240 --> 00:34:40,380 And then the Slackware box is the active man in the middle, 517 00:34:40,460 --> 00:34:43,500 which will be running the other instance of the tool 518 00:34:43,500 --> 00:34:46,360 and will be ARP poisoning to receive traffic 519 00:34:46,360 --> 00:34:48,060 from the other two endpoints. 520 00:34:52,720 --> 00:34:54,440 All right, so now I'll switch back. 521 00:35:08,480 --> 00:35:11,020 All right, so in the Astra box, 522 00:35:12,800 --> 00:35:16,280 we have Astra running over here. 523 00:35:20,200 --> 00:35:24,400 On this one, we're going to run the tool 524 00:35:24,400 --> 00:35:26,100 with password of password. 525 00:35:26,740 --> 00:35:31,140 And then we're going to be targeting the WinXP box, 526 00:35:31,260 --> 00:35:33,940 which is .1, and the dash S basically says 527 00:35:33,940 --> 00:35:36,000 we're going to run the shell service on this endpoint. 528 00:35:39,940 --> 00:35:43,200 And on the man in the middle box, 529 00:35:43,500 --> 00:35:45,420 we have ARP spoof running. 530 00:35:45,600 --> 00:35:47,700 It's basically spoofing both of the other devices 531 00:35:47,700 --> 00:35:49,160 so that it receives all the traffic. 532 00:35:49,940 --> 00:35:53,260 And then we're going to run almost the same command over here, 533 00:35:53,360 --> 00:35:56,300 except we're going to target the other host system, 534 00:35:56,400 --> 00:35:58,340 and we're not going to run the shell service on this side. 535 00:36:00,400 --> 00:36:01,020 All right. 536 00:36:02,040 --> 00:36:05,420 And then we're going to get some audio data 537 00:36:06,580 --> 00:36:08,660 going in one direction from my mic, 538 00:36:08,760 --> 00:36:10,740 and then audio in the other direction 539 00:36:10,740 --> 00:36:11,720 will be coming from Astra. 540 00:36:11,820 --> 00:36:13,640 I'm just going to dial into the Astra server 541 00:36:13,640 --> 00:36:15,400 and let it play the voice prompts. 542 00:36:15,400 --> 00:36:18,700 For that side of the connection. 543 00:36:21,100 --> 00:36:23,160 And hopefully you'll be able to hear this. 544 00:36:26,440 --> 00:36:29,320 Although you don't need to really hear the audio too much. 545 00:36:34,900 --> 00:36:35,600 All right. 546 00:36:36,200 --> 00:36:38,980 So you can see over here on the tool, 547 00:36:39,140 --> 00:36:41,320 it basically was watching for the session 548 00:36:41,320 --> 00:36:43,500 based on the constraints I gave it on the command line. 549 00:36:43,680 --> 00:36:45,340 It found the RTP session 550 00:36:45,340 --> 00:36:46,280 and it hooked the packets, 551 00:36:46,420 --> 00:36:47,700 and now we're ready to go. 552 00:36:50,320 --> 00:36:52,360 On this side, it'll basically say local, 553 00:36:52,580 --> 00:36:53,920 and then whatever you've typed. 554 00:36:54,180 --> 00:36:56,560 On the remote side, it'll say remote, 555 00:36:56,620 --> 00:36:58,820 and whatever the remote person typed. 556 00:37:03,740 --> 00:37:06,000 So this guy's going to say... 557 00:37:07,820 --> 00:37:09,020 Can I have some files? 558 00:37:10,860 --> 00:37:12,400 This guy's going to send... 559 00:37:14,500 --> 00:37:15,580 Big dot text. 560 00:37:18,580 --> 00:37:19,700 Small dot text. 561 00:37:19,880 --> 00:37:21,760 And you see up in the top right in the output status, 562 00:37:22,480 --> 00:37:23,760 it's sending the files, 563 00:37:24,580 --> 00:37:27,100 and it gives you a confirmation once those are done. 564 00:37:28,600 --> 00:37:29,680 And he says, yay! 565 00:37:36,340 --> 00:37:39,500 And he's going to request using the shell. 566 00:37:39,740 --> 00:37:40,900 That guy says, okay. 567 00:37:42,480 --> 00:37:46,320 He issues the slash shell command, 568 00:37:46,480 --> 00:37:48,400 which will switch from chat mode into shell mode. 569 00:37:49,600 --> 00:37:51,460 And you see this is basically interfacing 570 00:37:51,460 --> 00:37:54,200 with the shell running on the remote side. 571 00:37:57,300 --> 00:37:59,720 Does some commands, does whatever he's going to do, 572 00:38:00,400 --> 00:38:01,540 switches back to shell mode. 573 00:38:03,540 --> 00:38:04,020 Yay! 574 00:38:05,300 --> 00:38:07,400 And that's pretty much it for the demo. 575 00:38:07,560 --> 00:38:08,600 And it didn't crash. 576 00:38:08,820 --> 00:38:09,500 I'm amazed. 577 00:38:10,920 --> 00:38:13,340 Basically, if this side shuts down, 578 00:38:14,200 --> 00:38:15,480 it'll come back over here, 579 00:38:15,620 --> 00:38:18,540 and after about 45 seconds or so, 580 00:38:18,600 --> 00:38:20,880 it'll realize it hasn't received any stag messages. 581 00:38:21,000 --> 00:38:22,420 It'll start sending echo requests 582 00:38:22,420 --> 00:38:25,220 and trying to confirm that the remote side is still there. 583 00:38:25,540 --> 00:38:26,900 I'm not going to wait for that, 584 00:38:26,940 --> 00:38:28,040 because I don't have that much time. 585 00:38:28,820 --> 00:38:31,200 But that's basically it for the demo. 586 00:38:35,040 --> 00:38:36,980 And essentially, all of that data 587 00:38:36,980 --> 00:38:38,840 that was going between the two clients 588 00:38:38,840 --> 00:38:42,740 was being split up, embedded into the RTP audio payloads, 589 00:38:43,380 --> 00:38:44,540 and then sent across the wire. 590 00:38:48,780 --> 00:38:49,420 . 591 00:39:04,440 --> 00:39:05,360 All right. 592 00:39:05,580 --> 00:39:06,040 . 593 00:39:07,360 --> 00:39:08,880 So some conclusions. 594 00:39:09,420 --> 00:39:11,700 Basically, I met all of my design goals. 595 00:39:12,240 --> 00:39:14,860 I met most of the challenges that I identified. 596 00:39:15,240 --> 00:39:18,060 The two that I didn't tackle were the compressed audio 597 00:39:18,060 --> 00:39:19,600 and the media gateway interference. 598 00:39:20,480 --> 00:39:24,020 I planned to work on both of those. 599 00:39:24,200 --> 00:39:26,160 The compressed audio should be pretty straightforward. 600 00:39:26,520 --> 00:39:27,940 You just need to create uncompressing 601 00:39:28,660 --> 00:39:29,500 and compressing functions. 602 00:39:30,160 --> 00:39:32,460 The media gateway one will probably be 603 00:39:32,460 --> 00:39:33,220 a little more difficult. 604 00:39:33,660 --> 00:39:34,260 . 605 00:39:36,040 --> 00:39:37,600 To prevent this type of thing, 606 00:39:37,760 --> 00:39:40,160 VoIP deployments should be using SRTP, 607 00:39:40,380 --> 00:39:42,000 which is essentially the secure version 608 00:39:42,000 --> 00:39:43,460 of real-time transport protocol. 609 00:39:43,880 --> 00:39:46,360 It prevents the man-in-the-middle scenario entirely, 610 00:39:46,580 --> 00:39:49,560 because the contents of the RTP payloads are encrypted, 611 00:39:49,780 --> 00:39:52,640 and you can't really modify them in transit. 612 00:39:52,960 --> 00:39:55,480 It'll prevent most of the endpoint-type scenarios, 613 00:39:55,620 --> 00:40:00,800 unless the tool that's doing the steganographic embedding 614 00:40:00,800 --> 00:40:03,620 is also part of the soft phone 615 00:40:03,620 --> 00:40:07,780 or prior to it actually being put into RTP and encrypted. 616 00:40:09,700 --> 00:40:10,820 Future work? 617 00:40:10,980 --> 00:40:14,280 I want to improve my G711 codex embedding algorithm. 618 00:40:14,680 --> 00:40:16,860 Right now, I'm basically embedding 619 00:40:16,860 --> 00:40:18,500 in every single sample word. 620 00:40:18,920 --> 00:40:21,660 By doing some silence and voice detection, 621 00:40:21,940 --> 00:40:26,480 we can prevent some more rudimentary steganalysis 622 00:40:26,480 --> 00:40:32,320 by only embedding into the more random-looking data 623 00:40:32,320 --> 00:40:34,440 where there's actually speech going on. 624 00:40:34,660 --> 00:40:38,380 With G711 in particular, silence is fairly normalized 625 00:40:38,380 --> 00:40:39,760 in the encoded data. 626 00:40:41,200 --> 00:40:43,460 I want to create embedding algorithms 627 00:40:43,460 --> 00:40:45,000 for additional audio codex. 628 00:40:45,080 --> 00:40:47,580 I also want to tackle some video codex. 629 00:40:48,320 --> 00:40:50,520 I plan to replace the encryption system 630 00:40:50,520 --> 00:40:52,720 with real crypto rather than XOR. 631 00:40:53,580 --> 00:40:56,460 That was kind of just a stopgap proof of concept 632 00:40:56,460 --> 00:40:59,100 to get things running. 633 00:41:00,260 --> 00:41:01,480 I want to support 634 00:41:02,640 --> 00:41:04,060 larger steg messages 635 00:41:04,060 --> 00:41:06,180 by adding some fragmentation features. 636 00:41:07,760 --> 00:41:10,160 And I want to expand the shell access functionality 637 00:41:10,160 --> 00:41:12,040 into a services framework 638 00:41:12,040 --> 00:41:13,540 so you can provide other things 639 00:41:13,540 --> 00:41:17,040 than just shell access across the channel. 640 00:41:18,020 --> 00:41:20,300 I should have a white paper going into 641 00:41:20,300 --> 00:41:22,640 much more excruciating detail than I did here, 642 00:41:23,320 --> 00:41:24,960 out sometime in the next month, 643 00:41:25,040 --> 00:41:28,920 hopefully before the next uninformed journal goes out. 644 00:41:29,840 --> 00:41:31,960 And the source code I uploaded 645 00:41:32,320 --> 00:41:36,640 to the SourceForge project page about two hours ago. 646 00:41:37,000 --> 00:41:38,680 You can go get this right now. 647 00:41:38,740 --> 00:41:42,860 There's both the CVS access as well as a packaged release. 648 00:41:43,160 --> 00:41:44,160 You can grab either one. 649 00:41:44,600 --> 00:41:47,420 But in order to build it, you're going to need libfindrtp, 650 00:41:48,100 --> 00:41:49,620 which is also on SourceForge. 651 00:41:51,960 --> 00:41:55,560 And I'm going to be taking Q&A in the Q&A room, 652 00:41:55,680 --> 00:41:57,840 but I think I have about five minutes 653 00:41:57,840 --> 00:41:58,860 before I have to do that. 654 00:41:58,860 --> 00:42:01,380 So I'll take a few questions here if anyone has any. 655 00:42:02,600 --> 00:42:03,080 Yes? 656 00:42:03,360 --> 00:42:07,140 How much latency does the stego add 657 00:42:07,140 --> 00:42:09,120 to the normal or competing? 658 00:42:10,400 --> 00:42:13,320 One of the things I'm doing is, like I mentioned, 659 00:42:13,400 --> 00:42:15,420 if I don't have to do anything to the packet 660 00:42:15,420 --> 00:42:18,900 I send it on unmodified, that's almost instantaneous. 661 00:42:19,160 --> 00:42:20,840 I haven't seen any latency with those. 662 00:42:21,060 --> 00:42:22,360 If you're just doing chat, 663 00:42:22,620 --> 00:42:25,140 you might have one or two modified packets 664 00:42:25,140 --> 00:42:26,520 every few seconds. 665 00:42:26,900 --> 00:42:28,760 Depends on how long it takes you to type in. 666 00:42:28,860 --> 00:42:31,440 If you're sending a file, 667 00:42:31,680 --> 00:42:33,780 it's modifying things fairly consistently. 668 00:42:34,960 --> 00:42:38,540 Using my XOR encryption or pseudo-encryption 669 00:42:38,540 --> 00:42:40,260 and my current embedding method, 670 00:42:40,460 --> 00:42:43,200 I think it was about a millisecond 671 00:42:43,200 --> 00:42:44,660 to a millisecond and a half. 672 00:42:46,140 --> 00:42:47,900 One of the things I'm going to have to pay 673 00:42:47,900 --> 00:42:49,600 real close attention to when I replace 674 00:42:49,600 --> 00:42:51,920 the encryption system with real crypto 675 00:42:51,920 --> 00:42:55,040 is how much more latency that creates. 676 00:42:55,420 --> 00:42:57,600 If it starts to become more noticeable, 677 00:42:57,880 --> 00:42:58,500 the stego is going to be more noticeable. 678 00:42:58,500 --> 00:42:58,840 the stego is going to be more noticeable. 679 00:42:58,860 --> 00:43:01,000 The stego analysis is going to pick up on that real fast. 680 00:43:01,340 --> 00:43:03,920 The stego analysis is going to pick up on that real fast. 681 00:43:03,940 --> 00:43:04,800 Right, right. 682 00:43:05,380 --> 00:43:07,780 Yeah, so far I haven't had any problems 683 00:43:07,780 --> 00:43:11,420 with Jitter or any of the RTP's effects 684 00:43:12,040 --> 00:43:13,140 dealing with latency. 685 00:43:14,300 --> 00:43:15,700 Anyone else? Yes? 686 00:43:16,120 --> 00:43:18,040 How sensitive are you to packet loss 687 00:43:18,040 --> 00:43:19,960 and how many packets do you take 688 00:43:19,960 --> 00:43:21,580 before your error is rolled? 689 00:43:22,180 --> 00:43:23,420 Before what breaks down? 690 00:43:23,640 --> 00:43:24,520 Before your error is rolled. 691 00:43:25,920 --> 00:43:27,780 You mentioned that you were able 692 00:43:27,780 --> 00:43:28,980 to do forward error correction. 693 00:43:30,120 --> 00:43:30,640 Right. 694 00:43:31,080 --> 00:43:33,440 I'm not actually doing any type of, like, 695 00:43:33,440 --> 00:43:35,460 forward error correction or anything like that. 696 00:43:35,600 --> 00:43:37,720 I did look at that in the beginning, 697 00:43:38,300 --> 00:43:40,680 but due to the limited amount of space, 698 00:43:41,000 --> 00:43:41,840 but due to the limited amount of space, 699 00:43:41,840 --> 00:43:43,240 doing forward error correction 700 00:43:43,600 --> 00:43:45,480 would take a lot more room 701 00:43:45,480 --> 00:43:47,340 than just requesting the recent packet. 702 00:43:48,940 --> 00:43:49,460 Essentially, 703 00:43:49,680 --> 00:43:51,560 the way it works now is if I miss 704 00:43:51,560 --> 00:43:52,540 a packet coming in, 705 00:43:52,820 --> 00:43:55,340 I start caching other incoming packets 706 00:43:55,340 --> 00:43:57,760 until I get 707 00:43:57,760 --> 00:43:58,680 the one I'm expecting, 708 00:43:58,880 --> 00:44:01,020 either by sending a recent request 709 00:44:01,020 --> 00:44:01,960 or something like that, 710 00:44:02,080 --> 00:44:03,960 and then I immediately go back to the cache, 711 00:44:04,140 --> 00:44:05,800 which is much, much faster than waiting 712 00:44:05,800 --> 00:44:06,640 for them to come in. 713 00:44:07,260 --> 00:44:09,520 So far I haven't actually had the tool 714 00:44:10,400 --> 00:44:13,160 get out of sync or anything like that, 715 00:44:13,260 --> 00:44:15,260 but most of my testing has been in the lab, 716 00:44:15,400 --> 00:44:18,180 so I'd be interested to find out 717 00:44:18,180 --> 00:44:19,480 if anyone's actually running this 718 00:44:19,480 --> 00:44:20,360 in live environments 719 00:44:20,360 --> 00:44:22,840 and if they get poor results 720 00:44:22,840 --> 00:44:24,780 or if it works fine. 721 00:44:24,960 --> 00:44:26,860 I'm sure my caching system 722 00:44:26,860 --> 00:44:28,320 could probably use some improvement, 723 00:44:28,560 --> 00:44:30,680 but so far I haven't run into any problems. 724 00:44:31,860 --> 00:44:32,440 Yes? 725 00:44:37,540 --> 00:44:39,900 It depends on what you're doing. 726 00:44:41,360 --> 00:44:42,520 Using XOR, 727 00:44:42,640 --> 00:44:43,920 you run into some problems 728 00:44:43,920 --> 00:44:45,520 with stag analysis 729 00:44:45,520 --> 00:44:47,060 against things like ASCII. 730 00:44:47,140 --> 00:44:48,520 ASCII has certain properties 731 00:44:48,520 --> 00:44:52,000 that when you're doing statistical analysis 732 00:44:52,000 --> 00:44:53,080 on the payloads, 733 00:44:53,100 --> 00:44:54,880 even if you're using XOR 734 00:44:54,880 --> 00:44:57,120 to kind of obfuscate it, 735 00:44:57,200 --> 00:44:58,780 you'll still start to notice 736 00:44:58,780 --> 00:44:59,700 those types of patterns. 737 00:45:00,880 --> 00:45:02,640 One of the things I tried to do 738 00:45:02,640 --> 00:45:04,540 was create more of a binary protocol 739 00:45:04,540 --> 00:45:07,400 than an ASCII protocol 740 00:45:07,400 --> 00:45:09,260 to help prevent that type of thing, 741 00:45:09,640 --> 00:45:12,100 but depending on which type 742 00:45:12,100 --> 00:45:13,140 of encryption you're using, 743 00:45:13,660 --> 00:45:16,380 like AES may have a different type 744 00:45:16,380 --> 00:45:18,620 of analysis signature 745 00:45:18,620 --> 00:45:20,180 than, you know, triple DES 746 00:45:20,180 --> 00:45:21,520 or some of the other ones. 747 00:45:23,500 --> 00:45:24,780 Really just, you know, 748 00:45:24,800 --> 00:45:24,860 it really depends on what you're doing. 749 00:45:24,880 --> 00:45:25,960 I'd have to test. 750 00:45:26,340 --> 00:45:28,760 Yeah, what I was just basically thinking 751 00:45:28,760 --> 00:45:30,380 when you were talking about real crypto 752 00:45:30,380 --> 00:45:32,900 is algorithms like AES 753 00:45:32,900 --> 00:45:33,920 and triple DES 754 00:45:33,920 --> 00:45:35,980 are more or less statistically balanced, 755 00:45:36,120 --> 00:45:38,120 so if you thought you could count up 756 00:45:38,120 --> 00:45:39,840 the ones versus zeros 757 00:45:39,840 --> 00:45:41,760 in columns of your bytes, 758 00:45:41,940 --> 00:45:45,660 would that be a giveaway? 759 00:45:46,040 --> 00:45:46,980 It may be. 760 00:45:47,220 --> 00:45:48,640 It also kind of depends 761 00:45:48,640 --> 00:45:50,000 on the audio codec. 762 00:45:50,260 --> 00:45:52,800 Some audio codecs, when it encodes the audio, 763 00:45:52,940 --> 00:45:54,300 like I said with G711, 764 00:45:54,300 --> 00:45:56,120 the silence looks fairly normalized. 765 00:45:56,340 --> 00:45:58,260 You get a lot of 7Fs, 7Es, 766 00:45:58,440 --> 00:45:59,760 FFs, FEs. 767 00:45:59,900 --> 00:46:01,840 When you start playing 768 00:46:01,840 --> 00:46:03,440 with those particular bytes, 769 00:46:03,640 --> 00:46:05,200 it may become more noticeable. 770 00:46:06,180 --> 00:46:07,920 Like I said, it also depends 771 00:46:07,920 --> 00:46:09,180 on the codec you're using. 772 00:46:10,300 --> 00:46:10,920 Yes? 773 00:46:12,160 --> 00:46:12,780 . 774 00:46:14,740 --> 00:46:15,360 . 775 00:46:15,360 --> 00:46:15,600 . 776 00:46:15,600 --> 00:46:16,260 . 777 00:46:16,260 --> 00:46:17,080 . 778 00:46:17,080 --> 00:46:17,280 . 779 00:46:24,300 --> 00:46:25,100 . 780 00:46:28,140 --> 00:46:28,660 . 781 00:46:29,180 --> 00:46:29,720 . 782 00:46:29,720 --> 00:46:29,920 . 783 00:46:29,920 --> 00:46:30,520 . 784 00:46:30,520 --> 00:46:30,620 . 785 00:46:30,620 --> 00:46:31,120 . 786 00:46:31,120 --> 00:46:31,140 . 787 00:46:35,880 --> 00:46:36,920 . 788 00:46:36,920 --> 00:46:36,940 . 789 00:46:36,940 --> 00:46:36,960 . 790 00:46:36,960 --> 00:46:36,980 . 791 00:46:39,880 --> 00:46:40,920 . 792 00:46:47,280 --> 00:46:48,320 . 793 00:46:48,320 --> 00:46:52,680 probably write a smaller one that would work on embedded devices. I wouldn't 794 00:46:52,680 --> 00:46:58,060 suggest using mine. If you wanted to do something like, you know, exploit a system 795 00:46:58,060 --> 00:47:02,260 and then load this as, like, shell code, you definitely have to use, like, a 796 00:47:02,260 --> 00:47:10,120 Metasploit, you know, multi-stage loader to even get it anywhere near that box. You 797 00:47:10,120 --> 00:47:14,840 could probably do a more slimmed down version if you just wanted chat data or 798 00:47:14,840 --> 00:47:19,080 you just wanted to send files. That'd be quite a bit smaller than implementing 799 00:47:19,080 --> 00:47:26,160 all the different features that I have. I think I only have about a minute left 800 00:47:26,160 --> 00:47:31,460 before I have to move to the Q&A room. Does anyone else have a question? Yes. 801 00:47:46,740 --> 00:47:53,940 Yes. That's a good point. I actually am doing that. If I have, you know, a message that's 802 00:47:53,940 --> 00:47:58,260 smaller than the payload I'm going to be embedding into, I go ahead and randomize 803 00:47:58,260 --> 00:48:02,080 the bit changes for the rest of the message to keep it uniform within that 804 00:48:02,080 --> 00:48:07,900 particular message. Doing that for packets I'm also not embedding anything 805 00:48:07,900 --> 00:48:13,260 in might be something to do. Like I mentioned, I haven't done any steg analysis 806 00:48:13,260 --> 00:48:14,640 against this at all. 807 00:48:14,840 --> 00:48:19,340 Yet, because I've been working on implementing it so far. So those types of 808 00:48:19,340 --> 00:48:28,360 things I'll definitely be looking at. Any more? I guess that's it then. Thank you 809 00:48:28,360 --> 00:48:28,700 very much.