1 00:00:00,000 --> 00:00:13,640 Without much ado, because I hear this speaker is very popular here, so it is without much ado, my pleasure to introduce to you, Tri-Catch HCF, who we're going to give a talk on, Packet Whisperer. 2 00:00:20,460 --> 00:00:28,880 Thank you everybody for being here. If you can't hear in the back because it's loud, let me know, I'll speak louder, and we'll run forward with this. 3 00:00:29,400 --> 00:00:42,220 Welcome to DEF CON. Welcome to one of my favorite villages. We're going to spend the next 50 minutes, because we're going to have 10 minutes for Q&A and transition, covering some of my favorite, absolutist, bestest things. 4 00:00:42,380 --> 00:00:58,120 I love packets. I love networks. I love cryptography, especially text-based steganography. And I love red team stuff. So what we're going to cover here is real world stuff I've done for a while. 5 00:00:58,880 --> 00:01:04,600 I'm not going to talk about theory and what could be done. Everything we're discussing actually is a real thing. 6 00:01:05,140 --> 00:01:11,600 We're going to talk about what it is, why it is, and a little bit of background. First, a little bit about me. 7 00:01:13,000 --> 00:01:20,940 Hey, I got a promotion yesterday. Yay! So now I'm technical director of red team ops, and I can focus more on strategic stuff. 8 00:01:22,220 --> 00:01:28,520 The most critical thing in the prior roles is I used to mop fish juice out of a cod locker at a fish and chip shop. 9 00:01:29,240 --> 00:01:36,580 Never forget where you're from. And wherever you are right now, wherever your kids are right now, be where you're going to be. 10 00:01:39,360 --> 00:01:50,300 We'll talk a little bit about DNS. It's not going to be a DNS class. It's more of a very high-level overview, but I like everybody to be on the same sheet of music, so you know where I'm coming from, where you're coming from. 11 00:01:50,480 --> 00:01:56,680 A little bit about text-based steganography. Then we're going to talk about traditional text-based steganography. 12 00:01:56,760 --> 00:01:58,760 Traditional standard DNS. 13 00:01:58,880 --> 00:02:07,620 And then we're going to talk about some really fantastic things you can do when you marry those together. 14 00:02:09,260 --> 00:02:11,860 And, of course, a little tool called Packet Whisper. 15 00:02:13,200 --> 00:02:21,740 Let's cover a scenario first. Anybody out there in a SOC, anybody out there in DFIR world, at some point, alarms trigger. 16 00:02:22,340 --> 00:02:26,180 There's something on a system. You dig a little deeper. There's a little lateral movement. 17 00:02:26,500 --> 00:02:28,860 Now you've found out there was somebody in your network. 18 00:02:28,880 --> 00:02:33,240 And they were gathering data onto a staging server in your network space. 19 00:02:33,580 --> 00:02:35,500 So you start tracking them down, right? 20 00:02:36,820 --> 00:02:42,920 Well, good news. You hit that staging server. It doesn't look like anything left. 21 00:02:43,340 --> 00:02:47,300 You checked everything. The packet captures. No USB was connected. 22 00:02:48,100 --> 00:02:55,820 Great. Let's go have a beer. We'll leave the paperwork to the other guys to talk to the CISO in the C-suite, because we're done. No data was lost. 23 00:02:55,820 --> 00:02:56,720 Yes. 24 00:02:59,780 --> 00:03:02,200 Or did they merely lose the scent? 25 00:03:03,500 --> 00:03:06,140 Let's dive into a little bit about the DNS here, right? 26 00:03:06,560 --> 00:03:08,900 DNS. Really simple, right? 27 00:03:09,000 --> 00:03:11,780 It turns system names into IP addresses. 28 00:03:12,140 --> 00:03:15,300 And, in reverse, it turns IP addresses into system names. 29 00:03:15,940 --> 00:03:20,200 The great thing about DNS, of course, is it's open just about everywhere. 30 00:03:20,480 --> 00:03:24,180 Because it's hard to operate a network that's going to connect to other networks. 31 00:03:24,180 --> 00:03:27,940 If you're not using some form of DNS in most scenarios. 32 00:03:28,500 --> 00:03:29,580 So it's always there. 33 00:03:30,460 --> 00:03:35,040 It's UDP. So, of course, standard UDP joke applies. You may get it, you may not. 34 00:03:38,220 --> 00:03:40,640 IPv4 and IPv6 are options as well. 35 00:03:41,120 --> 00:03:44,020 The real issue about DNS, of course, is not just UDP. 36 00:03:44,540 --> 00:03:45,760 It's high latency. 37 00:03:46,380 --> 00:03:48,640 Not only are you not guaranteed to get an answer back, 38 00:03:48,920 --> 00:03:53,700 but you're not exactly going to do a million requests in the space of a few seconds. 39 00:03:53,700 --> 00:03:55,480 That sounds like a broken DNS server. 40 00:03:58,820 --> 00:04:00,420 So really simple flow, right? 41 00:04:00,520 --> 00:04:04,420 I need to get to Google.com. 42 00:04:04,500 --> 00:04:06,040 www.google.com. 43 00:04:06,160 --> 00:04:11,120 So my system says, hey, does anybody know how I find www.google.com? 44 00:04:11,620 --> 00:04:13,400 And my system hasn't seen it before. 45 00:04:13,620 --> 00:04:17,040 And it goes out to the local server, DNS server. 46 00:04:17,180 --> 00:04:18,960 And it says, hey, do you guys know how to get there? 47 00:04:19,640 --> 00:04:21,940 It keeps asking and asking up. 48 00:04:22,080 --> 00:04:23,680 The DNS servers ask each other. 49 00:04:23,700 --> 00:04:28,360 Until somebody knows what the heck this thing is or does not know. 50 00:04:28,840 --> 00:04:32,080 Either way, you get an IP address back or you don't. 51 00:04:38,440 --> 00:04:42,260 If your local server doesn't have it, your local server has a list of buddies. 52 00:04:43,340 --> 00:04:47,120 DNS resolution server is either iterative or recursive. 53 00:04:47,120 --> 00:04:48,100 It'll either go through a list. 54 00:04:48,420 --> 00:04:50,320 Hey, do you know? Hey, do you know? Hey, do you know? 55 00:04:51,080 --> 00:04:52,980 Or it'll pass that trust. 56 00:04:53,700 --> 00:04:53,860 Up. 57 00:04:54,460 --> 00:04:57,680 Hey, if you don't know it, you can go ask other people on my behalf. 58 00:04:58,240 --> 00:05:01,600 If you've been following some of the headlines recently, 59 00:05:01,920 --> 00:05:06,440 well, if you've been following certain security topics in the larger industry recently, 60 00:05:07,520 --> 00:05:12,220 there's been more and more concern about the fact that DNS traffic goes everywhere. 61 00:05:12,660 --> 00:05:15,400 And we'll talk about why that's gaining traction. 62 00:05:18,820 --> 00:05:22,700 The DNS hierarchies are built on levels of trust. 63 00:05:22,700 --> 00:05:26,140 At some point, somebody has to speak up and say, 64 00:05:26,300 --> 00:05:31,640 I am the person that knows the home address of that server. 65 00:05:32,100 --> 00:05:32,780 Absolutely. 66 00:05:32,800 --> 00:05:38,240 It is 40.12.111.60. 67 00:05:38,760 --> 00:05:41,820 And you, as the requesting system, 68 00:05:42,220 --> 00:05:43,740 sits back and goes, 69 00:05:44,560 --> 00:05:46,920 all right, that sounds pretty good. 70 00:05:47,100 --> 00:05:50,340 And then you make a request out to that IP address. 71 00:05:50,340 --> 00:05:53,360 Your system doesn't actually transfer data from a name. 72 00:05:53,540 --> 00:05:55,160 It's using that IP address. 73 00:06:00,680 --> 00:06:04,020 So two types, iterative and recursive. 74 00:06:04,240 --> 00:06:08,540 What really matters to us, though, is the DNS queries. 75 00:06:08,760 --> 00:06:11,880 The labels don't allow a whole lot of data. 76 00:06:12,520 --> 00:06:16,340 And as we'll see in existing DNS exfiltration techniques, 77 00:06:18,140 --> 00:06:19,860 they try to shove a lot in there. 78 00:06:20,340 --> 00:06:23,200 It's not a protocol you're ever going to use 79 00:06:23,200 --> 00:06:26,720 to exfiltrate gigabytes and terabytes of data 80 00:06:27,080 --> 00:06:29,280 unless you're really, really, really, really patient. 81 00:06:30,020 --> 00:06:32,940 But there's plenty of other sensitive data you can fit into 82 00:06:32,940 --> 00:06:35,800 a few K, a few hundred K. 83 00:06:35,920 --> 00:06:37,040 That'll work just fine. 84 00:06:37,140 --> 00:06:38,620 And it's done all the time. 85 00:06:40,160 --> 00:06:43,140 It's all based on fully qualified domain names. 86 00:06:44,640 --> 00:06:48,920 So angry.bobcats.surprisegifts.com. 87 00:06:50,340 --> 00:06:52,220 That is going to be a separate DNS reply 88 00:06:52,220 --> 00:06:57,060 than happy.puppies.surprisegifts.com. 89 00:06:57,540 --> 00:06:59,760 And even though it's all surprise gifts, 90 00:06:59,920 --> 00:07:01,540 it'll generate its own query. 91 00:07:01,860 --> 00:07:04,300 The labels are case insensitive. 92 00:07:05,180 --> 00:07:07,520 That matters for our purposes as well. 93 00:07:07,980 --> 00:07:10,260 So mix case all you want. 94 00:07:10,360 --> 00:07:11,520 DNS doesn't care. 95 00:07:11,720 --> 00:07:12,900 DNS won't notice. 96 00:07:20,820 --> 00:07:23,640 There are a couple of protocols that are multicast. 97 00:07:23,780 --> 00:07:25,360 This is also going to be interesting 98 00:07:25,360 --> 00:07:26,920 for some of our use cases. 99 00:07:28,480 --> 00:07:32,100 MDNS, multicast DNS, it's DNS compatible. 100 00:07:33,080 --> 00:07:37,580 It's essentially a peer-to-peer self-organizing network. 101 00:07:37,800 --> 00:07:40,840 Think of those device self-discovery systems 102 00:07:40,840 --> 00:07:41,700 like Bonjour. 103 00:07:41,840 --> 00:07:44,100 You just plug in, hey, guys, I'm here. 104 00:07:44,300 --> 00:07:45,160 Is anybody else here? 105 00:07:45,400 --> 00:07:47,500 And it goes out to the entire subnetwork. 106 00:07:47,600 --> 00:07:49,220 You're slash 24, right? 107 00:07:49,220 --> 00:07:53,860 1 through 254.255 is your broadcast address. 108 00:07:54,620 --> 00:07:56,720 So MDNS, multicast DNS, 109 00:07:57,000 --> 00:07:59,660 and local link multicast name resolution 110 00:08:00,220 --> 00:08:01,600 on its port as well, 111 00:08:01,740 --> 00:08:04,080 these are both multicast. 112 00:08:04,540 --> 00:08:07,120 Interesting thing on this particular set of protocols 113 00:08:07,120 --> 00:08:11,490 is a request goes to everybody on the subnetwork. 114 00:08:11,880 --> 00:08:13,120 You don't have to have fancy equipment. 115 00:08:14,140 --> 00:08:16,500 We'll talk about promiscuous mode in a second. 116 00:08:16,700 --> 00:08:18,440 But if you ever run Wireshark, 117 00:08:20,120 --> 00:08:20,780 let's see. 118 00:08:23,480 --> 00:08:24,720 If you're on Wireshark, 119 00:08:24,800 --> 00:08:26,680 you can just go ahead and monitor port 53 120 00:08:26,680 --> 00:08:28,480 or just type DNS in the filter. 121 00:08:28,740 --> 00:08:30,020 And you're sitting on a network. 122 00:08:30,340 --> 00:08:32,040 You're at a coffee shop or wherever. 123 00:08:32,260 --> 00:08:33,460 On most networks, 124 00:08:34,000 --> 00:08:37,820 you're going to see a lot of various types of DNS requests 125 00:08:37,820 --> 00:08:40,760 coming from other systems that have nothing to do with you. 126 00:08:41,020 --> 00:08:42,840 And they aren't asking you specifically. 127 00:08:43,380 --> 00:08:44,580 They're asking everybody, 128 00:08:45,220 --> 00:08:47,220 hey, does anybody know what this thing is? 129 00:08:47,220 --> 00:08:50,740 That's why DNS cache poisoning is a thing. 130 00:08:50,900 --> 00:08:53,280 You want to get into, of course, 131 00:08:53,400 --> 00:08:55,320 that flow that says, 132 00:08:55,460 --> 00:08:59,180 I totally speak for surprisegifts.com. 133 00:09:03,300 --> 00:09:04,920 That's the speed run on DNS. 134 00:09:05,540 --> 00:09:07,300 Text-based steganography. 135 00:09:08,020 --> 00:09:11,300 This stuff I've been fascinated with since I was a little kid. 136 00:09:11,480 --> 00:09:12,680 It was super fun. 137 00:09:12,860 --> 00:09:13,840 And it still is. 138 00:09:14,100 --> 00:09:16,000 There are a lot of different categories. 139 00:09:16,000 --> 00:09:21,620 The taxonomy of steganography is much larger 140 00:09:21,620 --> 00:09:26,020 than is typically covered in any particular article 141 00:09:26,020 --> 00:09:26,980 or journal or blog. 142 00:09:27,760 --> 00:09:31,420 These days, when we talk about steganography, 143 00:09:31,560 --> 00:09:34,180 we're talking about hiding data in images. 144 00:09:34,720 --> 00:09:35,540 That's cool. 145 00:09:35,720 --> 00:09:36,300 It's fun. 146 00:09:36,340 --> 00:09:36,900 It's not bad. 147 00:09:37,720 --> 00:09:39,200 It's kind of limiting, though. 148 00:09:39,380 --> 00:09:41,680 It's like, wow, I want to send a bunch of messages. 149 00:09:42,000 --> 00:09:42,780 All right. 150 00:09:42,820 --> 00:09:44,600 I'm going to exfil this entire... 151 00:09:46,520 --> 00:09:48,620 hundred gigabytes worth of data 152 00:09:48,620 --> 00:09:50,480 I got off of that giant cloud. 153 00:09:50,840 --> 00:09:52,680 Let's embed it all in images. 154 00:09:53,220 --> 00:09:54,040 It's clunky. 155 00:09:54,120 --> 00:09:54,980 It's kind of terrible. 156 00:09:55,480 --> 00:09:57,320 Honestly, for most use case purposes, 157 00:09:58,480 --> 00:10:01,660 if you're going to see image-based steganography in the wild, 158 00:10:01,760 --> 00:10:04,640 and you DFIR SOC folks know this better than I do, 159 00:10:04,820 --> 00:10:07,120 it's usually going to be along the lines 160 00:10:07,120 --> 00:10:08,520 of some sort of tradecraft, 161 00:10:08,760 --> 00:10:09,620 a little bit of information. 162 00:10:10,340 --> 00:10:11,560 Headline last week, 163 00:10:11,760 --> 00:10:13,840 there was an engineer 164 00:10:13,840 --> 00:10:16,120 who was arrested. 165 00:10:16,220 --> 00:10:19,900 It appears he was using image-based steganography 166 00:10:19,900 --> 00:10:22,020 to embed trade secrets 167 00:10:22,020 --> 00:10:24,700 of his aeronautics employer 168 00:10:24,700 --> 00:10:27,440 to bring them to another country. 169 00:10:28,120 --> 00:10:32,220 So image-based steganography does get used, absolutely. 170 00:10:32,860 --> 00:10:34,840 But it's sort of that fringe case. 171 00:10:35,040 --> 00:10:38,260 It's not how the typical bad guys 172 00:10:38,260 --> 00:10:39,680 are moving data around. 173 00:10:41,140 --> 00:10:43,560 Another problem with image-based steganography 174 00:10:43,560 --> 00:10:45,960 is it's a well-known vector. 175 00:10:46,280 --> 00:10:47,460 Google for it. 176 00:10:47,540 --> 00:10:49,180 Anytime you Google for steganography, 177 00:10:49,440 --> 00:10:52,740 you're going to find something about image-based steganography. 178 00:10:52,920 --> 00:10:55,820 Back up to all of these options here, 179 00:10:56,720 --> 00:11:00,200 you'll have to specifically put in text-based steganography 180 00:11:00,200 --> 00:11:01,880 to bring up most of these topics. 181 00:11:06,360 --> 00:11:09,060 Text-based in that vast world. 182 00:11:09,200 --> 00:11:11,220 Some really approachable examples 183 00:11:11,220 --> 00:11:13,240 if you haven't heard of it or used it before. 184 00:11:13,560 --> 00:11:18,060 The classic one is prisoners or soldiers deployed. 185 00:11:18,100 --> 00:11:20,680 They're trying to communicate with their friends and family. 186 00:11:20,760 --> 00:11:22,920 The first letter of every sentence. 187 00:11:23,200 --> 00:11:24,520 Just pull it off, 188 00:11:24,620 --> 00:11:27,140 and you'll have the message I'm trying to send you. 189 00:11:27,440 --> 00:11:31,660 Or the seventh letter of every other word. 190 00:11:32,040 --> 00:11:33,360 It's just really... 191 00:11:34,500 --> 00:11:37,960 It's a cipher on top of the actual text. 192 00:11:38,420 --> 00:11:39,840 Code words for communication 193 00:11:40,260 --> 00:11:42,860 are technically text-based steganography. 194 00:11:42,860 --> 00:11:43,960 You're hiding meaning. 195 00:11:44,280 --> 00:11:45,480 You're hiding data. 196 00:11:46,780 --> 00:11:48,800 The standard code phrase is, 197 00:11:48,840 --> 00:11:51,820 I found the bagels to be delicious this morning. 198 00:11:52,340 --> 00:11:53,840 Well, the agreement was, 199 00:11:53,920 --> 00:11:55,460 that means get the hell out of town. 200 00:11:55,560 --> 00:11:57,000 This whole operation just collapsed. 201 00:11:57,640 --> 00:11:59,600 Technically counts as text-based steganography. 202 00:12:00,000 --> 00:12:01,200 Some of the more amusing ones, 203 00:12:01,840 --> 00:12:03,980 fonts, spacing, and themes. 204 00:12:04,200 --> 00:12:05,500 Now that we're in the era 205 00:12:05,500 --> 00:12:07,460 over the last 20 or 30 years 206 00:12:07,460 --> 00:12:09,320 of changing the appearance of text. 207 00:12:09,580 --> 00:12:12,240 So you can actually use 208 00:12:12,240 --> 00:12:14,340 the number of spaces between words 209 00:12:14,340 --> 00:12:16,740 as an encoding scheme. 210 00:12:17,300 --> 00:12:18,460 Think about binary. 211 00:12:18,640 --> 00:12:19,680 It's just zero and one. 212 00:12:19,960 --> 00:12:20,480 Alright. 213 00:12:20,600 --> 00:12:22,960 What if it's one space or two spaces? 214 00:12:23,340 --> 00:12:25,880 Some fonts, you can't tell the difference. 215 00:12:26,420 --> 00:12:28,920 You could transmit war and peace 216 00:12:28,920 --> 00:12:31,080 purely as ASCII text. 217 00:12:31,760 --> 00:12:33,900 And have one or two spaces 218 00:12:33,900 --> 00:12:36,140 representing the ones or zeros 219 00:12:36,140 --> 00:12:37,880 of the entire set of data 220 00:12:37,880 --> 00:12:39,060 you're trying to exfiltrate. 221 00:12:39,360 --> 00:12:40,900 That's pretty cool too, I think. 222 00:12:43,060 --> 00:12:45,340 Our particular friend, however, 223 00:12:45,580 --> 00:12:48,100 transforming data into text. 224 00:12:50,200 --> 00:12:52,460 I really like this because 225 00:12:52,460 --> 00:12:55,540 it lets you hide the data 226 00:12:55,540 --> 00:12:56,940 truly in plain sight 227 00:12:56,940 --> 00:12:58,860 and it gives you a whole lot of flexibility. 228 00:12:59,300 --> 00:13:01,260 You tailor the ciphers 229 00:13:01,260 --> 00:13:03,640 to either look like nothing unusual 230 00:13:04,080 --> 00:13:07,340 or exactly what somebody is expecting 231 00:13:07,340 --> 00:13:08,440 to be okay. 232 00:13:09,120 --> 00:13:10,900 So you've seen some, 233 00:13:10,900 --> 00:13:12,160 there was any time you see 234 00:13:12,160 --> 00:13:14,080 like a privilege escalation attack, right? 235 00:13:14,240 --> 00:13:15,660 And the classic example is 236 00:13:15,660 --> 00:13:16,440 somebody takes a photo 237 00:13:16,440 --> 00:13:18,720 of their air blind boarding pass 238 00:13:18,720 --> 00:13:20,760 and just puts pilot on top. 239 00:13:21,040 --> 00:13:22,380 And then you walk in and you say, 240 00:13:22,440 --> 00:13:23,480 look, it says I'm a pilot. 241 00:13:23,660 --> 00:13:24,720 And it says big sharpie 242 00:13:24,720 --> 00:13:26,620 and it's hilariously bad. 243 00:13:27,000 --> 00:13:28,540 You do the same thing 244 00:13:28,540 --> 00:13:30,420 when we're encoding data 245 00:13:31,100 --> 00:13:32,740 into text strings. 246 00:13:33,400 --> 00:13:34,800 We're going to make it exactly 247 00:13:34,800 --> 00:13:36,060 what they want to see. 248 00:13:36,360 --> 00:13:39,180 It's fantastic for bypassing 249 00:13:39,180 --> 00:13:40,880 data white listing codes. 250 00:13:40,900 --> 00:13:44,600 So if you have that sensitive network 251 00:13:44,600 --> 00:13:47,020 and you have a locked down enclave 252 00:13:47,020 --> 00:13:48,480 and it's totally okay 253 00:13:48,480 --> 00:13:49,780 because the only thing 254 00:13:49,780 --> 00:13:51,280 that's ever going to leave 255 00:13:52,000 --> 00:13:53,700 outbound from this network, 256 00:13:53,940 --> 00:13:55,480 we've got everything locked down. 257 00:13:55,620 --> 00:13:56,840 Only IP addresses. 258 00:13:57,340 --> 00:13:58,780 Nothing will ever go wrong. 259 00:14:00,540 --> 00:14:02,240 Transform your data 260 00:14:02,240 --> 00:14:03,900 into a list of IP addresses 261 00:14:03,900 --> 00:14:06,060 and ship it out. 262 00:14:06,360 --> 00:14:07,700 Odds are they're just like 263 00:14:07,700 --> 00:14:10,820 anybody here who does application development 264 00:14:10,820 --> 00:14:12,240 or has worked in AppSec 265 00:14:12,820 --> 00:14:13,840 knows that when you look at 266 00:14:13,840 --> 00:14:15,140 most filters and fields, 267 00:14:15,680 --> 00:14:18,040 you're lucky if they're doing 268 00:14:18,040 --> 00:14:19,380 a strip and clip approach 269 00:14:19,380 --> 00:14:21,680 and the IP address is going to be limited 270 00:14:21,680 --> 00:14:23,760 to only numbers and four dots 271 00:14:23,760 --> 00:14:25,680 in the right sequence. 272 00:14:25,960 --> 00:14:27,600 There's going to be a way to bypass that. 273 00:14:28,220 --> 00:14:30,340 And you can use the ciphers 274 00:14:30,340 --> 00:14:31,720 as a form of social engineering 275 00:14:31,720 --> 00:14:33,520 against the analysts 276 00:14:33,520 --> 00:14:34,780 who are going to review it too. 277 00:14:38,020 --> 00:14:39,680 Cloakify exfiltration toolset. 278 00:14:39,900 --> 00:14:40,800 I presented this to you 279 00:14:40,820 --> 00:14:41,680 a couple years ago. 280 00:14:41,840 --> 00:14:42,960 It was an old technique of mine 281 00:14:42,960 --> 00:14:43,980 and it was time to share. 282 00:14:44,380 --> 00:14:46,740 And it turns any file type 283 00:14:46,740 --> 00:14:48,120 into a list of strings. 284 00:14:48,480 --> 00:14:49,560 Very simple to do. 285 00:14:49,620 --> 00:14:50,660 That was my entire goal. 286 00:14:50,980 --> 00:14:53,520 Our kids are able to use it 287 00:14:53,520 --> 00:14:55,420 and it can be quite amusing. 288 00:14:55,760 --> 00:14:57,780 So you can turn an entire zip file 289 00:14:57,780 --> 00:14:59,340 into a list of Pokemon 290 00:14:59,340 --> 00:15:01,960 or a list of popular websites 291 00:15:01,960 --> 00:15:04,440 or a list of dessert ingredients. 292 00:15:04,920 --> 00:15:06,960 And then when you've transferred that 293 00:15:06,960 --> 00:15:08,200 wherever it needed to go, 294 00:15:10,820 --> 00:15:11,940 the original file back. 295 00:15:12,280 --> 00:15:14,140 Anybody who ever looks at anything along the way, 296 00:15:14,280 --> 00:15:16,660 they saw exactly what you wanted to see. 297 00:15:18,420 --> 00:15:20,400 So you have a spreadsheet. 298 00:15:23,320 --> 00:15:24,560 Here's a Cloakify workflow. 299 00:15:24,960 --> 00:15:26,180 Again, this is just a speed run. 300 00:15:26,360 --> 00:15:27,720 Check out the GitHub repository. 301 00:15:28,040 --> 00:15:28,420 It's free. 302 00:15:29,680 --> 00:15:32,520 You just select Cloakify file. 303 00:15:32,760 --> 00:15:34,800 You select from any number of the ciphers 304 00:15:34,800 --> 00:15:35,480 in the middle there. 305 00:15:35,560 --> 00:15:36,480 Sorry, it's tiny text. 306 00:15:36,820 --> 00:15:39,200 You decide if you want to add noise in the front. 307 00:15:40,820 --> 00:15:41,240 In this particular shot, 308 00:15:41,380 --> 00:15:44,440 we have turned a zip file, bounty.zip, 309 00:15:45,240 --> 00:15:46,720 into a list 310 00:15:46,720 --> 00:15:48,840 of lat long coordinates 311 00:15:48,840 --> 00:15:49,820 of Pokemon. 312 00:15:50,960 --> 00:15:52,780 And it looks absolutely nothing 313 00:15:52,780 --> 00:15:53,960 like the zip file 314 00:15:53,960 --> 00:15:55,160 it originally was. 315 00:15:55,460 --> 00:15:56,240 That's perfect. 316 00:15:58,200 --> 00:15:59,300 Some of the ciphers, 317 00:15:59,340 --> 00:16:00,500 you want to turn it into a bunch of emoji? 318 00:16:00,720 --> 00:16:01,680 Turn it into a bunch of emoji. 319 00:16:02,140 --> 00:16:04,100 You want to turn it into password hashes? 320 00:16:04,300 --> 00:16:05,600 Turn it into password hashes. 321 00:16:06,980 --> 00:16:08,180 Why would you want to do that? 322 00:16:08,320 --> 00:16:09,200 I got good stories. 323 00:16:10,900 --> 00:16:11,920 So there it is. 324 00:16:12,560 --> 00:16:13,240 The slides, 325 00:16:13,320 --> 00:16:15,240 everything is going to be posted next week. 326 00:16:16,320 --> 00:16:17,380 So don't worry about 327 00:16:17,380 --> 00:16:18,480 having to take too many notes. 328 00:16:18,520 --> 00:16:20,700 You can just pull it down probably at the end of next week. 329 00:16:21,280 --> 00:16:22,260 This is already out there. 330 00:16:22,560 --> 00:16:25,080 I'm just saying the slide deck will be out there. 331 00:16:25,160 --> 00:16:26,680 Cloakify has been out there for a few years. 332 00:16:30,120 --> 00:16:31,540 Alright, we're getting closer to the good stuff. 333 00:16:32,580 --> 00:16:33,260 Traditional DNS 334 00:16:34,080 --> 00:16:34,420 exfiltration. 335 00:16:35,600 --> 00:16:37,220 If you've been doing any, again, 336 00:16:37,340 --> 00:16:39,520 SOC work, response work, DFIR, 337 00:16:39,840 --> 00:16:41,340 if you've been building 338 00:16:41,340 --> 00:16:43,180 controls to defend your systems, 339 00:16:44,140 --> 00:16:45,460 DNS tunneling and 340 00:16:45,460 --> 00:16:47,540 exfiltration are probably 341 00:16:47,540 --> 00:16:48,860 not strangers to you. 342 00:16:49,160 --> 00:16:51,360 Frankly, if you've ever tried to bypass the 343 00:16:51,360 --> 00:16:53,260 in-flight Wi-Fi, DNS 344 00:16:53,260 --> 00:16:55,480 tunneling has probably been your 345 00:16:55,480 --> 00:16:57,080 friend. Because again, 346 00:16:57,300 --> 00:16:58,940 DNS is open everywhere, right? 347 00:16:59,120 --> 00:17:01,040 Yes. Including airplanes. 348 00:17:01,540 --> 00:17:03,340 Before you get past that 349 00:17:03,340 --> 00:17:04,920 lock screen, that 350 00:17:05,600 --> 00:17:07,500 locked landing page, that forced portal 351 00:17:07,500 --> 00:17:09,540 where they make you pay for your in-flight Wi-Fi, 352 00:17:10,440 --> 00:17:11,480 some of the airlines 353 00:17:11,480 --> 00:17:13,440 have locked it down. But for a very long 354 00:17:13,440 --> 00:17:15,200 time, all the DNS 355 00:17:15,200 --> 00:17:17,340 requests were just going through. And there were 356 00:17:17,340 --> 00:17:18,640 tools that would let you tunnel 357 00:17:18,640 --> 00:17:21,240 HTTP, HTTPS over 358 00:17:21,240 --> 00:17:23,380 DNS. Rockstar! Power to the 359 00:17:23,380 --> 00:17:25,240 people! DNS 360 00:17:25,240 --> 00:17:27,160 based data exfiltration. 361 00:17:28,180 --> 00:17:29,300 That's been more 362 00:17:29,300 --> 00:17:29,960 of a 363 00:17:32,660 --> 00:17:33,660 hmmm, adversarial 364 00:17:33,660 --> 00:17:35,420 operation. I don't want to go all 365 00:17:35,600 --> 00:17:37,440 spooky APTO, it's all APTs. 366 00:17:38,200 --> 00:17:39,620 But whatever the attacker 367 00:17:39,620 --> 00:17:41,660 group is, whoever it is, there are plenty 368 00:17:41,660 --> 00:17:43,000 of tools out there. 369 00:17:43,700 --> 00:17:45,540 Go check GitHub, Google 370 00:17:45,540 --> 00:17:47,580 forum, that will help you do 371 00:17:47,580 --> 00:17:49,240 DNS based data 372 00:17:49,240 --> 00:17:49,980 exfiltration. 373 00:17:52,940 --> 00:17:53,540 There are 374 00:17:53,540 --> 00:17:54,920 some, let's see, do I have it on the next one? 375 00:17:55,960 --> 00:17:57,560 Yeah, problems coming up. We'll get to 376 00:17:57,560 --> 00:17:59,680 some problems. Typically how it works 377 00:17:59,680 --> 00:18:01,560 is the attacker has 378 00:18:01,560 --> 00:18:03,620 to own the server 379 00:18:03,620 --> 00:18:05,480 that is the name server 380 00:18:05,600 --> 00:18:07,560 the DNS name server for that domain. 381 00:18:08,000 --> 00:18:09,000 So typically 382 00:18:09,560 --> 00:18:11,520 I can't do DNS based 383 00:18:11,520 --> 00:18:13,560 data exfiltration to 384 00:18:13,560 --> 00:18:15,200 www.google.com. 385 00:18:15,360 --> 00:18:16,260 I don't own it. 386 00:18:16,860 --> 00:18:19,160 But I own Joe's 387 00:18:19,160 --> 00:18:21,800 super-secret-awesome-bagel-shop.com 388 00:18:21,800 --> 00:18:22,600 and 389 00:18:23,380 --> 00:18:25,200 wham! All the DNS 390 00:18:25,200 --> 00:18:27,220 requests that look up my 391 00:18:27,220 --> 00:18:29,080 domain are going to go to my 392 00:18:29,340 --> 00:18:31,320 designated name server because 393 00:18:31,320 --> 00:18:32,900 part of my web server 394 00:18:33,320 --> 00:18:34,980 presence in the world is 395 00:18:35,600 --> 00:18:37,600 dominating who my authoritative 396 00:18:38,140 --> 00:18:39,200 name server is. 397 00:18:40,100 --> 00:18:41,300 That's a pretty high bar 398 00:18:41,300 --> 00:18:42,120 for a lot of attacks. 399 00:18:43,120 --> 00:18:45,220 We'll get to that why in just a moment. 400 00:18:45,880 --> 00:18:47,060 So here is typical 401 00:18:47,600 --> 00:18:48,760 DNS data based 402 00:18:49,440 --> 00:18:51,380 exfiltration. Sorry, DNS 403 00:18:51,380 --> 00:18:53,400 based exfiltration. You've got 404 00:18:53,400 --> 00:18:55,100 some data you want to get out the door. 405 00:18:55,440 --> 00:18:57,480 Bad admin, bad Bob, 406 00:18:57,740 --> 00:18:59,260 way to go Alice, good password. 407 00:18:59,780 --> 00:19:01,500 She probably has a password manager. 408 00:19:01,920 --> 00:19:03,680 You simply encode or encrypt 409 00:19:03,680 --> 00:19:05,180 that data you're trying to get out. 410 00:19:05,600 --> 00:19:06,760 And then 411 00:19:07,280 --> 00:19:09,180 you make the payload a subdomain 412 00:19:09,180 --> 00:19:10,200 to 413 00:19:11,500 --> 00:19:13,460 subdomain.myevilserver.com 414 00:19:13,460 --> 00:19:15,420 I have told the world that the 415 00:19:15,420 --> 00:19:16,020 name server 416 00:19:18,400 --> 00:19:20,300 for myevilserver.com 417 00:19:20,300 --> 00:19:21,600 is a certain 418 00:19:21,600 --> 00:19:23,560 box over there 419 00:19:23,560 --> 00:19:25,100 and my designated 420 00:19:25,100 --> 00:19:27,080 box is going to get all of these 421 00:19:27,600 --> 00:19:28,620 subdomain DNS requests 422 00:19:29,500 --> 00:19:31,580 which have the encrypted, encoded 423 00:19:31,580 --> 00:19:33,540 payload right there 424 00:19:33,540 --> 00:19:34,980 as a subdomain. 425 00:19:35,600 --> 00:19:36,840 Now we're still limited to about 426 00:19:37,500 --> 00:19:39,160 255-ish bytes 427 00:19:39,160 --> 00:19:40,460 per DNS request. 428 00:19:41,140 --> 00:19:42,860 So that's still one 429 00:19:42,860 --> 00:19:45,100 DNS request for every 430 00:19:45,100 --> 00:19:46,640 250 plus bytes. 431 00:19:47,340 --> 00:19:48,920 It's a niche scenario 432 00:19:49,540 --> 00:19:51,020 but it's a very real world scenario. 433 00:19:51,240 --> 00:19:52,220 This is happening a lot. 434 00:19:53,680 --> 00:19:54,900 And again, here we go. 435 00:19:55,060 --> 00:19:57,440 The query, the fully qualified domain name 436 00:19:57,440 --> 00:19:59,120 which is the subdomain and the domain 437 00:19:59,120 --> 00:20:01,880 goes to evilserver.myevilserver.com 438 00:20:01,880 --> 00:20:03,580 It goes ahead and strips off 439 00:20:03,580 --> 00:20:04,960 the subdomain 440 00:20:05,600 --> 00:20:06,860 and then it decrypts it 441 00:20:07,380 --> 00:20:09,400 and voila, there's the exfiltrated data. 442 00:20:09,720 --> 00:20:11,220 Win for the bad guys. 443 00:20:13,260 --> 00:20:14,980 Here are some problems with that. 444 00:20:15,920 --> 00:20:17,460 Giant red flags! 445 00:20:18,180 --> 00:20:19,440 If you've got a good 446 00:20:19,440 --> 00:20:21,380 SYN system, you 447 00:20:21,380 --> 00:20:23,440 and your SOC analysts are going to 448 00:20:23,440 --> 00:20:25,340 be triggering on this type of activity 449 00:20:25,340 --> 00:20:27,160 all the time because 450 00:20:27,160 --> 00:20:29,500 the attacker has to control 451 00:20:29,500 --> 00:20:30,360 the infrastructure. 452 00:20:31,160 --> 00:20:32,400 A lot of organizations 453 00:20:32,400 --> 00:20:34,040 Oh, we'll get to that in just a moment. 454 00:20:35,600 --> 00:20:37,740 One of the first things a good response team 455 00:20:37,740 --> 00:20:38,520 is going to look at 456 00:20:38,960 --> 00:20:41,320 as they're doing a formal analysis of what's 457 00:20:41,320 --> 00:20:43,140 been happening, let me look at the traffic 458 00:20:43,140 --> 00:20:44,320 that came off of that server. 459 00:20:45,120 --> 00:20:47,500 Anything that looks like a weird subdomain 460 00:20:47,500 --> 00:20:49,000 name, bam! 461 00:20:49,280 --> 00:20:50,180 Dogs on bacon. 462 00:20:54,380 --> 00:20:54,780 Attribution. 463 00:20:55,320 --> 00:20:57,580 So I've got to control the server, right? 464 00:20:58,540 --> 00:20:59,100 Uh oh. 465 00:20:59,240 --> 00:21:01,560 Well, who are the bad guys? 466 00:21:01,900 --> 00:21:03,660 I don't know. Let's find out who owns the server. 467 00:21:03,660 --> 00:21:05,860 When you have a lot 468 00:21:05,860 --> 00:21:07,180 of available data, 469 00:21:08,320 --> 00:21:09,500 attribution is 470 00:21:09,500 --> 00:21:10,960 actually fairly straightforward. 471 00:21:11,360 --> 00:21:13,420 It's not easy, but when you have 472 00:21:13,420 --> 00:21:15,500 enough available data, attribution 473 00:21:15,500 --> 00:21:17,380 is pretty solid. 474 00:21:17,640 --> 00:21:19,200 You have the visibility on 475 00:21:19,200 --> 00:21:21,580 when that domain was registered, 476 00:21:21,960 --> 00:21:23,640 how it interacted with 477 00:21:23,640 --> 00:21:25,320 the DNS server, the name server, 478 00:21:25,560 --> 00:21:27,680 or any other requests coming into 479 00:21:27,680 --> 00:21:29,500 that name server. It requires you 480 00:21:29,500 --> 00:21:31,760 have access to a lot of infrastructure, of course. 481 00:21:31,880 --> 00:21:33,620 Who has access to all 482 00:21:33,660 --> 00:21:34,180 the infrastructure? 483 00:21:35,220 --> 00:21:37,600 Basically, everybody that's not us that is 484 00:21:37,600 --> 00:21:39,640 a government or a large, giant company 485 00:21:39,640 --> 00:21:40,940 that handles network infrastructure. 486 00:21:41,680 --> 00:21:43,280 And the parties that 487 00:21:43,280 --> 00:21:45,480 are entrusted with processing 488 00:21:45,480 --> 00:21:47,420 that data. So again, 489 00:21:47,460 --> 00:21:49,400 it's out there. That trail of breadcrumbs 490 00:21:49,400 --> 00:21:51,480 lead back. There's only 491 00:21:51,480 --> 00:21:53,620 so much you can do with the 492 00:21:53,620 --> 00:21:55,340 hey, I'm not in your political boundaries, 493 00:21:55,560 --> 00:21:57,400 you'll never get me. At some point, 494 00:21:57,420 --> 00:21:59,440 you don't want people to know it was you 495 00:21:59,440 --> 00:22:01,140 even if they can't touch you 496 00:22:01,660 --> 00:22:02,160 legally. 497 00:22:04,400 --> 00:22:04,900 Resiliency. 498 00:22:05,360 --> 00:22:06,700 Take that server down. 499 00:22:07,140 --> 00:22:09,500 Uh-oh. That was a problem. I worked really 500 00:22:09,500 --> 00:22:10,600 hard to get into that organization. 501 00:22:10,980 --> 00:22:12,760 Now I have no way of getting the data out. 502 00:22:13,000 --> 00:22:14,600 This is going to look bad on my report. 503 00:22:16,860 --> 00:22:17,860 SOC blacklisting 504 00:22:17,860 --> 00:22:19,460 an active attack, a detected 505 00:22:19,460 --> 00:22:21,200 attack, is going to cut me off short. 506 00:22:21,640 --> 00:22:23,300 Also, more and more organizations 507 00:22:23,300 --> 00:22:26,060 are implementing DNS whitelisting. 508 00:22:26,360 --> 00:22:27,540 You can't connect 509 00:22:27,540 --> 00:22:29,520 to a DNS server that they don't specifically 510 00:22:29,520 --> 00:22:30,560 say is okay. 511 00:22:31,220 --> 00:22:33,420 And odds are, if you're 512 00:22:33,660 --> 00:22:35,420 working on the blue team side, you're already 513 00:22:35,420 --> 00:22:37,620 doing that or you have a roadmap to do that. 514 00:22:37,860 --> 00:22:39,640 If you're on the blue team side and you're 515 00:22:39,640 --> 00:22:41,520 not doing that, oh for the 516 00:22:41,520 --> 00:22:43,740 love of God, look into DNS whitelisting. 517 00:22:45,040 --> 00:22:47,280 The stuff it's going to break will annoy your 518 00:22:47,280 --> 00:22:49,500 employees, but it won't 519 00:22:49,500 --> 00:22:50,460 interrupt their workflow. 520 00:22:51,640 --> 00:22:53,060 If that makes sense. 521 00:22:54,300 --> 00:22:55,460 Now for the good stuff. 522 00:22:56,020 --> 00:22:57,280 We got through all the background. 523 00:22:57,540 --> 00:22:59,080 Thanks, folks. Combining 524 00:22:59,080 --> 00:23:01,540 DNS queries and text-based 525 00:23:01,540 --> 00:23:02,160 steganography. 526 00:23:04,120 --> 00:23:05,500 So what have 527 00:23:05,500 --> 00:23:05,880 we got here? 528 00:23:06,380 --> 00:23:09,540 DNS queries look up 529 00:23:09,540 --> 00:23:10,440 system names, right? 530 00:23:11,260 --> 00:23:12,480 Cloakify turns 531 00:23:13,300 --> 00:23:15,540 any list of data into 532 00:23:15,540 --> 00:23:17,640 any file into a list 533 00:23:17,640 --> 00:23:18,880 of strings we want. 534 00:23:19,560 --> 00:23:21,400 So if 535 00:23:21,400 --> 00:23:21,920 we 536 00:23:23,180 --> 00:23:24,020 decide 537 00:23:24,020 --> 00:23:27,440 to use Cloakify to transform our 538 00:23:27,440 --> 00:23:29,580 data into a list of common 539 00:23:29,580 --> 00:23:30,500 system names 540 00:23:30,500 --> 00:23:33,340 and then generate DNS queries 541 00:23:33,660 --> 00:23:35,640 using that 542 00:23:35,640 --> 00:23:36,140 list, 543 00:23:37,260 --> 00:23:38,740 we're getting closer, 544 00:23:39,660 --> 00:23:41,260 we can transfer data 545 00:23:41,260 --> 00:23:43,400 to any system 546 00:23:43,400 --> 00:23:45,480 that's able to see the DNS 547 00:23:45,480 --> 00:23:47,620 broadcast messages, MDNS, 548 00:23:47,860 --> 00:23:48,680 LLMNR, 549 00:23:49,320 --> 00:23:51,760 or to any system or appliance 550 00:23:51,760 --> 00:23:53,480 that handles DNS 551 00:23:53,480 --> 00:23:55,640 query traffic along 552 00:23:55,640 --> 00:23:57,840 the DNS path, whether it's iterative 553 00:23:57,840 --> 00:23:59,360 or recursive. 554 00:24:00,160 --> 00:24:01,440 DNS queries 555 00:24:01,440 --> 00:24:03,640 go all over the world. 556 00:24:03,660 --> 00:24:04,740 Especially when you start 557 00:24:04,740 --> 00:24:05,600 looking at the cloud. 558 00:24:06,860 --> 00:24:09,360 We can do this, transfer it without 559 00:24:09,360 --> 00:24:11,180 using any DNS query 560 00:24:11,180 --> 00:24:13,500 fields that usually make 561 00:24:13,500 --> 00:24:15,260 an analyst go, ah, this is 562 00:24:15,260 --> 00:24:15,640 bad. 563 00:24:16,900 --> 00:24:19,160 We don't need an attacker-controlled 564 00:24:19,160 --> 00:24:21,200 DNS server anymore either, 565 00:24:21,340 --> 00:24:23,220 which is a really huge plus 566 00:24:23,220 --> 00:24:25,580 if you're trying to get the data 567 00:24:25,580 --> 00:24:27,320 out. So 568 00:24:28,340 --> 00:24:29,560 the sending 569 00:24:29,560 --> 00:24:30,940 and receiving systems never 570 00:24:31,450 --> 00:24:32,740 connect to each other directly. 571 00:24:34,000 --> 00:24:35,340 A great use case 572 00:24:35,340 --> 00:24:37,620 might be your favorite coffee shop. 573 00:24:37,860 --> 00:24:39,540 And you know your victim 574 00:24:39,540 --> 00:24:41,160 where you staged the data 575 00:24:41,160 --> 00:24:43,460 likes to show up before their work shift. 576 00:24:44,040 --> 00:24:45,540 You show up and wait 577 00:24:45,540 --> 00:24:46,400 for them to show up. 578 00:24:46,980 --> 00:24:48,940 And then you've had to trigger something 579 00:24:49,660 --> 00:24:50,800 as soon as they connect, 580 00:24:50,980 --> 00:24:53,000 start exfiltrating that data out 581 00:24:53,000 --> 00:24:54,560 because the coffee shop configured 582 00:24:54,560 --> 00:24:57,480 their network so you can see 583 00:24:57,480 --> 00:24:59,420 all the traffic. Or it's a broadcast protocol 584 00:24:59,420 --> 00:25:01,140 and you just pull it all out. 585 00:25:01,960 --> 00:25:03,200 There is no evidence 586 00:25:04,000 --> 00:25:05,400 any data was ever 587 00:25:05,400 --> 00:25:06,500 transmitted to you. 588 00:25:07,940 --> 00:25:09,560 If you've got a perimeter router 589 00:25:09,560 --> 00:25:10,580 that you've compromised, 590 00:25:11,200 --> 00:25:13,500 you're seeing all the network traffic through, right? 591 00:25:14,040 --> 00:25:15,160 You're in the DMZ 592 00:25:15,160 --> 00:25:17,520 or it's using a third-party server. 593 00:25:18,000 --> 00:25:19,720 Now we're looking at third-party attacks. 594 00:25:20,020 --> 00:25:21,640 If I can get into your 595 00:25:21,640 --> 00:25:23,980 network service provider, your ISP, 596 00:25:24,060 --> 00:25:25,680 I can see all that data 597 00:25:25,680 --> 00:25:26,720 going back and forth. 598 00:25:27,240 --> 00:25:29,600 We've got some caveats coming up. We'll deal with them. 599 00:25:30,480 --> 00:25:31,680 And if they're 600 00:25:31,680 --> 00:25:32,980 resolving DNS or 601 00:25:33,660 --> 00:25:34,740 DNS server or 602 00:25:34,740 --> 00:25:36,520 involved network appliance 603 00:25:36,520 --> 00:25:38,560 is external to the organization, 604 00:25:39,520 --> 00:25:39,880 yes. 605 00:25:40,620 --> 00:25:43,100 We'll see how to build the query so that data 606 00:25:43,100 --> 00:25:45,460 will get out of the organization's 607 00:25:45,460 --> 00:25:45,740 network. 608 00:25:47,220 --> 00:25:49,240 I want to reiterate something here. 609 00:25:51,440 --> 00:25:52,880 Any infrastructure 610 00:25:52,880 --> 00:25:54,880 outside of your organization 611 00:25:54,880 --> 00:25:56,520 that can see the requests. 612 00:25:59,740 --> 00:26:01,020 One more time. 613 00:26:01,940 --> 00:26:03,380 BGP hijacks 614 00:26:03,660 --> 00:26:04,420 have gotten sophisticated. 615 00:26:04,880 --> 00:26:06,800 It's no longer a nation state trying to 616 00:26:06,800 --> 00:26:07,740 siphon all your stuff. 617 00:26:08,100 --> 00:26:10,200 The criminal groups in the last several months 618 00:26:10,200 --> 00:26:11,560 within the year 619 00:26:11,560 --> 00:26:14,320 have been using BGP hijacks 620 00:26:14,320 --> 00:26:16,120 to say send all of the data 621 00:26:16,120 --> 00:26:17,340 through this path 622 00:26:17,340 --> 00:26:19,540 where I have controls for. 623 00:26:24,520 --> 00:26:26,080 The problem with that 624 00:26:26,080 --> 00:26:27,700 is especially these new attacks, 625 00:26:28,020 --> 00:26:29,840 they've started to poison 626 00:26:29,840 --> 00:26:32,000 the broader DNS cache. 627 00:26:33,660 --> 00:26:35,020 The BGP hijack 628 00:26:35,620 --> 00:26:37,880 of google.com 629 00:26:37,880 --> 00:26:39,060 DNS 630 00:26:40,100 --> 00:26:41,420 8888. We all know it 631 00:26:41,420 --> 00:26:42,020 and love it, right? 632 00:26:42,560 --> 00:26:44,240 That happened a couple weeks ago. 633 00:26:45,620 --> 00:26:47,780 8888 had a BGP hijack 634 00:26:47,780 --> 00:26:49,440 attack associated with it. 635 00:26:49,840 --> 00:26:51,060 Didn't last very long. 636 00:26:51,500 --> 00:26:52,680 Didn't have to. 637 00:26:52,880 --> 00:26:54,820 The attackers are using 638 00:26:55,420 --> 00:26:56,660 DNS cache poisoning. 639 00:26:56,960 --> 00:26:59,300 And the time to live values 640 00:26:59,300 --> 00:27:00,560 and the forged responses 641 00:27:00,560 --> 00:27:03,600 are going to persist in all of the 642 00:27:03,660 --> 00:27:05,220 those downstream servers now 643 00:27:05,220 --> 00:27:06,840 and your attackers have 644 00:27:08,340 --> 00:27:09,300 persistent, relatively, 645 00:27:10,340 --> 00:27:11,300 persistent access 646 00:27:11,300 --> 00:27:13,620 to all of your DNS queries now. 647 00:27:13,940 --> 00:27:15,620 So it's not just can I get the data 648 00:27:15,620 --> 00:27:16,380 out in five minutes. 649 00:27:16,660 --> 00:27:19,000 You may have hours, you may have days. 650 00:27:20,060 --> 00:27:21,540 And the only thing that's going 651 00:27:21,540 --> 00:27:22,380 to be in the logs 652 00:27:22,380 --> 00:27:25,740 are DNS queries to google.com 653 00:27:25,740 --> 00:27:27,720 to strange domains. 654 00:27:27,960 --> 00:27:29,100 We'll see some use cases 655 00:27:29,100 --> 00:27:30,700 as we walk through the tool. 656 00:27:33,740 --> 00:27:35,900 Which brings us to Packet Whisperer. 657 00:27:36,500 --> 00:27:37,460 Alright, so it's sending 658 00:27:37,460 --> 00:27:38,120 data everywhere. 659 00:27:39,660 --> 00:27:41,320 It broadcasts to the 660 00:27:41,320 --> 00:27:43,580 broadcast address through protocols on the local network. 661 00:27:43,700 --> 00:27:45,020 Why isn't this thing called Packet Shout? 662 00:27:46,260 --> 00:27:47,700 It didn't sound real good. 663 00:27:47,880 --> 00:27:49,220 I'm also not really good at marketing. 664 00:27:49,660 --> 00:27:50,520 But also, 665 00:27:51,140 --> 00:27:53,500 go to a vendor party. I'm sure you've been to 666 00:27:53,500 --> 00:27:55,620 a few already. And whisper 667 00:27:55,620 --> 00:27:57,100 to a friend. Just talk to a friend. 668 00:27:57,460 --> 00:27:59,780 Nobody can hear you over all the noise. 669 00:28:00,120 --> 00:28:01,440 You were totally screened out. 670 00:28:01,580 --> 00:28:03,420 All you were doing was talking to somebody. 671 00:28:03,660 --> 00:28:05,060 Doesn't ring any bells. 672 00:28:05,160 --> 00:28:06,280 Doesn't ring any alarms. 673 00:28:07,980 --> 00:28:09,680 Packet Whisperer is a nice little tool 674 00:28:09,680 --> 00:28:11,320 that does all these steps for you. 675 00:28:11,840 --> 00:28:12,940 I mean, sure, Cloakify is fun. 676 00:28:13,260 --> 00:28:14,900 And there are a lot of things you can do with it. 677 00:28:14,940 --> 00:28:16,000 Try it out. Maybe you'll like it. 678 00:28:16,300 --> 00:28:18,900 But if all you want to do is exfiltrate data 679 00:28:18,900 --> 00:28:20,580 via DNS like this, 680 00:28:21,300 --> 00:28:23,640 Packet Whisperer wraps up all these pieces 681 00:28:23,640 --> 00:28:24,100 for you. 682 00:28:24,460 --> 00:28:26,360 You just give it a payload name. 683 00:28:26,940 --> 00:28:28,200 It encodes the payload. 684 00:28:29,040 --> 00:28:30,980 You choose the cipher. 685 00:28:31,120 --> 00:28:31,860 We'll get into the modes. 686 00:28:33,660 --> 00:28:33,820 We'll get into the test queries. 687 00:28:34,600 --> 00:28:37,080 You do the packet capture however 688 00:28:37,080 --> 00:28:38,800 you do your packet capture. 689 00:28:39,400 --> 00:28:41,780 Maybe you've got tcpdump. 690 00:28:42,060 --> 00:28:43,780 Maybe you've got tshark. 691 00:28:43,940 --> 00:28:45,560 Maybe you just own 692 00:28:45,560 --> 00:28:47,240 that network appliance 693 00:28:47,240 --> 00:28:49,600 that is going to be 694 00:28:49,600 --> 00:28:50,900 your point of capture. 695 00:28:51,740 --> 00:28:53,440 Once you've got that capture, 696 00:28:53,640 --> 00:28:54,300 that PCAP, 697 00:28:55,320 --> 00:28:57,180 just send the PCAP 698 00:28:57,180 --> 00:28:59,860 loaded up into Packet Whisperer. 699 00:28:59,900 --> 00:29:01,040 It'll do all the stuff. 700 00:29:01,260 --> 00:29:03,100 It'll extract it from the PCAP. 701 00:29:03,660 --> 00:29:05,160 It'll decloakify it for you. 702 00:29:05,240 --> 00:29:07,260 And you'll have the file 703 00:29:07,260 --> 00:29:08,760 that you exfiltrated 704 00:29:09,420 --> 00:29:10,740 from the target organization. 705 00:29:12,920 --> 00:29:14,300 So on our transmitter, 706 00:29:15,540 --> 00:29:17,240 again, cloakify the payload 707 00:29:17,240 --> 00:29:18,860 into a list of DNS query targets. 708 00:29:19,880 --> 00:29:21,460 We create a single 709 00:29:21,460 --> 00:29:23,240 DNS request for each item 710 00:29:23,240 --> 00:29:24,200 on the cloaked list. 711 00:29:25,060 --> 00:29:27,780 Do not exfiltrate gigabytes of data. 712 00:29:28,080 --> 00:29:28,880 I mean, you can 713 00:29:29,540 --> 00:29:30,980 be the one that did it, 714 00:29:30,980 --> 00:29:33,120 but it will take a very, very long time. 715 00:29:33,460 --> 00:29:34,700 It takes minutes 716 00:29:34,700 --> 00:29:37,100 to get a few K out, 717 00:29:37,180 --> 00:29:38,940 depending on how you're doing this. 718 00:29:40,220 --> 00:29:41,580 In certain cases, 719 00:29:42,380 --> 00:29:43,760 it's now time to transmit, 720 00:29:43,880 --> 00:29:44,520 to send it out, 721 00:29:44,540 --> 00:29:45,400 to make the DNS requests. 722 00:29:46,180 --> 00:29:47,880 It'll create a knock sequence. 723 00:29:49,120 --> 00:29:50,080 Standard crypto, 724 00:29:51,680 --> 00:29:52,640 standard stealthy, 725 00:29:52,640 --> 00:29:54,940 hey, here's a couple of things I'm going to do. 726 00:29:55,340 --> 00:29:56,660 Sometimes it's port scanning, 727 00:29:56,820 --> 00:29:57,820 if you're a bad guy, 728 00:29:57,920 --> 00:29:59,780 a specific series of ports. 729 00:30:00,980 --> 00:30:01,580 Sometimes, in this case, 730 00:30:01,600 --> 00:30:04,000 it's going to be a list of distinct queries. 731 00:30:04,200 --> 00:30:05,000 Why do I need that? 732 00:30:06,420 --> 00:30:08,020 Because everybody else 733 00:30:08,020 --> 00:30:10,620 is doing DNS queries on that same path. 734 00:30:11,580 --> 00:30:12,700 And when you're doing 735 00:30:12,700 --> 00:30:13,700 network address translation, 736 00:30:14,180 --> 00:30:16,140 all I can see is it's coming from the same 737 00:30:16,140 --> 00:30:17,780 base address of an organization. 738 00:30:18,160 --> 00:30:20,120 That IP address got sanitized. 739 00:30:20,320 --> 00:30:21,580 So in those cases, 740 00:30:22,020 --> 00:30:24,160 if the DNS query is not unique, 741 00:30:25,240 --> 00:30:26,580 you need that knock sequence. 742 00:30:26,620 --> 00:30:27,300 And it says, hey, 743 00:30:27,460 --> 00:30:29,000 now we need to look for this. 744 00:30:31,180 --> 00:30:32,440 There's a better way, though, 745 00:30:32,860 --> 00:30:34,900 if it turns out you're going to be 746 00:30:34,900 --> 00:30:36,160 going outside of an organization, 747 00:30:36,340 --> 00:30:37,660 all that stuff is sanitized. 748 00:30:37,700 --> 00:30:40,060 We'll see some unique requests going forward. 749 00:30:40,340 --> 00:30:41,740 Again, generate that DNS request. 750 00:30:42,000 --> 00:30:44,400 And we have to pause between each DNS request. 751 00:30:44,700 --> 00:30:46,600 If you do 10,000 DNS requests 752 00:30:46,600 --> 00:30:47,320 all in a row, 753 00:30:47,760 --> 00:30:48,980 it's going to multi-thread. 754 00:30:49,320 --> 00:30:51,260 And it's going to show up all over the place. 755 00:30:51,560 --> 00:30:52,920 And we're totally out of luck. 756 00:30:53,660 --> 00:30:55,080 So that's definitely an issue. 757 00:30:55,160 --> 00:30:55,980 We'll talk more about that. 758 00:30:55,980 --> 00:30:56,660 The packet capture, 759 00:30:57,920 --> 00:30:59,240 again, whatever your favorite 760 00:30:59,240 --> 00:31:01,180 packet capture tool is, 761 00:31:01,260 --> 00:31:02,500 all we're looking for is a PCAP. 762 00:31:02,840 --> 00:31:04,800 We just need a standard PCAP 763 00:31:04,800 --> 00:31:05,900 with the DNS queries, 764 00:31:06,760 --> 00:31:08,960 and then the tool will take care of the rest for you. 765 00:31:09,180 --> 00:31:12,040 The extractor decoder takes the PCAP 766 00:31:12,040 --> 00:31:14,080 and just pulls out the DNS queries. 767 00:31:15,020 --> 00:31:17,220 And if a knock sequence was used, 768 00:31:17,340 --> 00:31:18,420 it's looking for the knock sequence. 769 00:31:18,620 --> 00:31:19,520 It's part of the workflow. 770 00:31:19,640 --> 00:31:20,140 We'll see it. 771 00:31:21,180 --> 00:31:23,960 And pulls out those queries from the PCAP 772 00:31:23,960 --> 00:31:25,080 once it's made that association. 773 00:31:26,660 --> 00:31:27,580 And decloakifies 774 00:31:27,580 --> 00:31:28,840 the extracted payload. 775 00:31:34,860 --> 00:31:35,780 Doing a time check. 776 00:31:35,820 --> 00:31:36,580 We're doing a good 20 minutes. 777 00:31:38,580 --> 00:31:39,400 Transmitting options. 778 00:31:39,600 --> 00:31:41,940 This is where you're actually going to be using this 779 00:31:41,940 --> 00:31:42,760 in the real world. 780 00:31:42,800 --> 00:31:43,680 Again, this is not theory. 781 00:31:45,240 --> 00:31:46,480 Common system names 782 00:31:46,480 --> 00:31:48,420 make great ciphers, 783 00:31:48,440 --> 00:31:49,640 but they also have some limitations. 784 00:31:51,200 --> 00:31:53,620 If your DNS requests are for 785 00:31:53,620 --> 00:31:54,820 www.google, 786 00:31:55,980 --> 00:31:56,300 if they're for YouTube, 787 00:31:56,460 --> 00:31:58,180 if they're for GitHub, 788 00:31:58,840 --> 00:32:00,560 if it's for common systems, 789 00:32:01,140 --> 00:32:03,840 well, you're going to defeat data blacklisting 790 00:32:03,840 --> 00:32:05,080 much of the time. 791 00:32:05,200 --> 00:32:07,020 Do a test run just to double check. 792 00:32:07,320 --> 00:32:08,880 But the important thing is 793 00:32:08,880 --> 00:32:10,860 you're not going to be generating 794 00:32:10,860 --> 00:32:13,080 any data that raises alarms 795 00:32:13,080 --> 00:32:14,500 either in the alerts 796 00:32:14,500 --> 00:32:16,780 or when an analyst goes ahead 797 00:32:16,780 --> 00:32:17,820 and takes a look at it. 798 00:32:19,200 --> 00:32:21,620 This is really only 799 00:32:21,620 --> 00:32:22,960 a good use 800 00:32:22,960 --> 00:32:24,760 if you're connected 801 00:32:24,760 --> 00:32:26,180 on the same subnetwork. 802 00:32:26,680 --> 00:32:28,860 This method really needs 803 00:32:28,860 --> 00:32:30,880 the transmitter's IP address 804 00:32:30,880 --> 00:32:32,900 available so that 805 00:32:32,900 --> 00:32:34,160 you can deconflict. 806 00:32:34,600 --> 00:32:37,000 If you send common system names 807 00:32:37,000 --> 00:32:38,760 out over a 808 00:32:38,760 --> 00:32:39,500 NATed perimeter, 809 00:32:40,760 --> 00:32:42,440 it's going to blend with everybody else's 810 00:32:42,440 --> 00:32:44,280 common names. You have no way 811 00:32:44,280 --> 00:32:46,360 to differentiate which is which. 812 00:32:47,360 --> 00:32:48,600 So back to that 813 00:32:48,600 --> 00:32:49,560 knock sequence. 814 00:32:49,960 --> 00:32:52,700 When I see a knock sequence in the packet 815 00:32:52,960 --> 00:32:53,800 traffic, it goes, 816 00:32:53,940 --> 00:32:57,000 oh, 10.1.10.7.2 817 00:32:57,000 --> 00:32:58,400 just gave me the knock sequence. 818 00:32:58,780 --> 00:33:00,760 Give me all DNS requests 819 00:33:00,760 --> 00:33:04,240 from 10.7.1.1.1.2 820 00:33:04,240 --> 00:33:05,540 whatever I just said. 821 00:33:05,740 --> 00:33:06,340 And 822 00:33:06,930 --> 00:33:08,960 it'll go ahead and strip that out 823 00:33:08,960 --> 00:33:09,660 for you. 824 00:33:10,740 --> 00:33:12,960 Now, that's going to be a problem 825 00:33:12,960 --> 00:33:14,660 if that address had 826 00:33:14,660 --> 00:33:16,420 other people and other systems 827 00:33:16,420 --> 00:33:18,520 also generating similar 828 00:33:18,520 --> 00:33:19,540 traffic, right? 829 00:33:19,920 --> 00:33:22,460 So I find this method works particularly 830 00:33:22,960 --> 00:33:24,920 well if it is a device 831 00:33:24,920 --> 00:33:26,700 that doesn't typically reach out 832 00:33:26,700 --> 00:33:28,780 to the internet. That could raise 833 00:33:28,780 --> 00:33:30,800 a little bit of concern, but it won't 834 00:33:30,800 --> 00:33:32,760 be generating all this traffic. It's 835 00:33:32,760 --> 00:33:34,600 a device that's normally just connecting to 836 00:33:34,600 --> 00:33:36,680 internal infrastructure, and it should 837 00:33:36,680 --> 00:33:38,400 never be going to Facebook.com. 838 00:33:41,360 --> 00:33:42,240 Alright, that's one. 839 00:33:42,480 --> 00:33:44,820 And it just looks like this. Go down to GitHub. 840 00:33:45,480 --> 00:33:47,040 I provide some ciphers 841 00:33:47,040 --> 00:33:48,360 for you to use. They're operational. 842 00:33:49,140 --> 00:33:50,780 But go to GitHub and build 843 00:33:50,780 --> 00:33:52,940 your own list. The other 844 00:33:52,960 --> 00:33:54,200 one is the underlying Cloakify tool. It's 845 00:33:54,200 --> 00:33:56,500 really easy to create your own ciphers. 846 00:33:56,580 --> 00:33:58,980 I didn't want to create it if it wasn't easy to use 847 00:33:58,980 --> 00:34:01,180 and tailor and modify 848 00:34:01,180 --> 00:34:02,640 for your operational needs. 849 00:34:03,400 --> 00:34:04,840 And there you have it. 850 00:34:04,900 --> 00:34:06,760 A list. This is exactly what your 851 00:34:06,760 --> 00:34:08,140 traffic ends up looking like. 852 00:34:11,380 --> 00:34:12,660 Second transmitting option. 853 00:34:13,400 --> 00:34:14,360 Distinct, repeating, 854 00:34:14,600 --> 00:34:17,160 fully qualified domain names. 855 00:34:17,840 --> 00:34:19,140 That is a mouthful. 856 00:34:20,900 --> 00:34:22,620 A lot of you are probably already like, 857 00:34:22,960 --> 00:34:24,240 I get it, fully qualified domain names. 858 00:34:25,000 --> 00:34:26,420 When you're going to be 859 00:34:26,720 --> 00:34:28,660 moving that data where 860 00:34:28,660 --> 00:34:30,620 those IP addresses cannot be 861 00:34:30,620 --> 00:34:32,780 determined, the only way 862 00:34:32,780 --> 00:34:34,600 you're going to be able to figure out 863 00:34:34,600 --> 00:34:36,460 that it's your exfiltrated data 864 00:34:36,460 --> 00:34:38,420 is give it a unique tag. 865 00:34:41,640 --> 00:34:42,820 However you choose to 866 00:34:42,820 --> 00:34:44,440 do that, the best route 867 00:34:44,880 --> 00:34:46,720 is through subdomains, unique 868 00:34:46,720 --> 00:34:47,480 subdomains. 869 00:34:48,480 --> 00:34:50,540 And we can repeat them. Because 870 00:34:50,540 --> 00:34:51,340 they're unique, 871 00:34:52,960 --> 00:34:54,960 nobody else is going to be 872 00:34:54,960 --> 00:34:55,980 generating traffic 873 00:34:56,820 --> 00:34:58,700 looking for that domain. Remember, 874 00:34:58,940 --> 00:35:00,860 a key thing about packet whisper 875 00:35:00,860 --> 00:35:02,100 and its whole methodology, 876 00:35:03,100 --> 00:35:04,860 the DNS queries don't 877 00:35:04,860 --> 00:35:05,880 have to succeed. 878 00:35:07,060 --> 00:35:08,160 Failure is irrelevant. 879 00:35:08,520 --> 00:35:10,780 We just need the request to go out. 880 00:35:10,880 --> 00:35:12,660 That is our route of exfiltration. 881 00:35:16,960 --> 00:35:17,860 And so, 882 00:35:19,060 --> 00:35:20,600 if you are a 883 00:35:20,600 --> 00:35:22,940 Buckaroo Banzai fan, and you want to do 884 00:35:22,960 --> 00:35:23,680 DNS queries using 885 00:35:23,680 --> 00:35:25,440 the Red Lectroids cipher, 886 00:35:25,600 --> 00:35:27,220 the Red Lectroids cipher 887 00:35:27,220 --> 00:35:28,320 that comes with the tool 888 00:35:28,320 --> 00:35:29,620 is all of the Johns. 889 00:35:30,080 --> 00:35:32,660 In Buckaroo Banzai, aliens invaded 890 00:35:32,660 --> 00:35:34,600 the planet about 80 years ago. 891 00:35:35,220 --> 00:35:36,280 60 years ago. 892 00:35:36,680 --> 00:35:39,600 And they all picked the same name, 893 00:35:39,700 --> 00:35:40,880 John, because they didn't understand 894 00:35:40,880 --> 00:35:42,540 human culture. And they all work at 895 00:35:42,540 --> 00:35:44,240 yoyodyne propulsion systems. 896 00:35:44,740 --> 00:35:46,760 So if you do DNS queries 897 00:35:47,340 --> 00:35:47,900 using 898 00:35:52,180 --> 00:35:52,740 the 899 00:35:52,960 --> 00:35:53,980 Red Lectroids cipher, 900 00:35:54,180 --> 00:35:56,800 this will get outside of your organization. 901 00:35:57,600 --> 00:35:58,940 Because at some point 902 00:35:58,940 --> 00:36:00,260 it's going to try to resolve it. 903 00:36:00,280 --> 00:36:02,240 Unless it's seriously locked down. 904 00:36:02,540 --> 00:36:04,920 In most cases, that's going to get out. 905 00:36:05,060 --> 00:36:06,600 Because those subdomains 906 00:36:06,600 --> 00:36:07,420 do not exist. 907 00:36:10,680 --> 00:36:11,320 However, 908 00:36:12,120 --> 00:36:14,940 DNS caching will ruin that every time. 909 00:36:15,180 --> 00:36:16,280 Once I ask for 910 00:36:16,280 --> 00:36:17,600 john.warfen 911 00:36:19,580 --> 00:36:20,680 .yoyodyne.com 912 00:36:20,680 --> 00:36:22,940 wherever that DNS response is cached, 913 00:36:22,960 --> 00:36:23,900 I'm stuck. 914 00:36:24,780 --> 00:36:26,860 If my collection point is above 915 00:36:26,860 --> 00:36:28,820 that DNS cache, I'm never 916 00:36:28,820 --> 00:36:30,100 going to see further requests. 917 00:36:30,720 --> 00:36:32,420 How do we bypass that? 918 00:36:32,760 --> 00:36:35,260 What if I can't get my collection point? 919 00:36:35,380 --> 00:36:36,880 If we cannot set up 920 00:36:36,880 --> 00:36:38,920 our collection point downstream 921 00:36:38,920 --> 00:36:40,820 from the DNS caching 922 00:36:40,820 --> 00:36:42,380 point, we've got a problem. 923 00:36:42,640 --> 00:36:44,880 The solution is to 924 00:36:44,880 --> 00:36:46,880 make sure we add random noise 925 00:36:46,880 --> 00:36:49,200 into each subdomain 926 00:36:49,200 --> 00:36:50,840 name. So that it will 927 00:36:50,840 --> 00:36:52,860 never cache. We're never 928 00:36:52,960 --> 00:36:54,940 going to repeat the same 929 00:36:54,940 --> 00:36:57,060 request. That's a problem 930 00:36:57,060 --> 00:36:57,940 because 931 00:36:58,660 --> 00:37:00,780 the way that Cloakify encodes the data 932 00:37:00,780 --> 00:37:02,880 it's a repeating series 933 00:37:02,880 --> 00:37:05,140 of base64 934 00:37:05,140 --> 00:37:06,200 encoded data. 935 00:37:06,420 --> 00:37:08,180 So we need 66, 67 936 00:37:08,180 --> 00:37:10,760 repeating values in order 937 00:37:10,760 --> 00:37:12,280 to transmit 938 00:37:12,960 --> 00:37:14,820 the cloak. Or we're never going to be able 939 00:37:14,820 --> 00:37:15,620 to decloak it. 940 00:37:17,840 --> 00:37:18,480 So, 941 00:37:19,140 --> 00:37:20,840 we can use a common list 942 00:37:20,840 --> 00:37:21,880 of root strings. 943 00:37:23,220 --> 00:37:25,000 And we can add a bunch of noise 944 00:37:25,000 --> 00:37:25,620 to it 945 00:37:26,480 --> 00:37:28,140 to sort of make it look like 946 00:37:28,140 --> 00:37:29,300 blendy, weird traffic. 947 00:37:29,660 --> 00:37:31,920 And then start making those DNS requests. 948 00:37:32,460 --> 00:37:34,400 First thing that may pop into your mind 949 00:37:34,760 --> 00:37:36,560 well that sounds kind of stupid because 950 00:37:36,560 --> 00:37:38,460 we're back to the traditional 951 00:37:38,460 --> 00:37:39,940 DNS exfiltration model 952 00:37:40,480 --> 00:37:41,840 where somebody says, 953 00:37:42,120 --> 00:37:43,760 look I encrypted a bunch of crap 954 00:37:43,760 --> 00:37:45,580 and I'm making a DNS request. 955 00:37:46,060 --> 00:37:48,360 Well we're right back to every single SOC 956 00:37:48,360 --> 00:37:49,980 and SIM infrastructure 957 00:37:50,620 --> 00:37:52,820 alerting all over the place and tracking it down. 958 00:37:54,600 --> 00:37:56,640 So we carefully select 959 00:37:56,640 --> 00:37:58,860 the domains that we're 960 00:37:58,860 --> 00:37:59,480 going to query 961 00:37:59,480 --> 00:38:01,860 when we're doing randomized noise. 962 00:38:02,680 --> 00:38:04,680 I love CloudFront for this 963 00:38:05,340 --> 00:38:05,940 because 964 00:38:05,940 --> 00:38:08,460 all of your content domain 965 00:38:08,460 --> 00:38:10,760 servers, distributed network 966 00:38:10,760 --> 00:38:12,020 content servers 967 00:38:12,020 --> 00:38:14,500 there's an acronym, I'm tired, sorry 968 00:38:15,640 --> 00:38:16,560 they're all 969 00:38:16,560 --> 00:38:18,460 full of junk in the front 970 00:38:18,460 --> 00:38:20,180 and they all go to CloudFront 971 00:38:20,180 --> 00:38:22,220 or they all go to any of the other 972 00:38:22,960 --> 00:38:24,920 CDN servers out there, right? 973 00:38:25,420 --> 00:38:26,600 So what we do 974 00:38:26,600 --> 00:38:28,640 is let's hijack 975 00:38:28,640 --> 00:38:31,360 let's not use the word hijack 976 00:38:31,360 --> 00:38:33,060 we're not attacking CloudFront 977 00:38:34,580 --> 00:38:36,600 we go ahead and generate 978 00:38:36,600 --> 00:38:38,880 some randomness but we use 979 00:38:38,880 --> 00:38:40,580 those 66, 67 980 00:38:41,760 --> 00:38:42,960 minimum strings 981 00:38:42,960 --> 00:38:45,020 that will let us encode 982 00:38:45,020 --> 00:38:46,300 our base64 payload. 983 00:38:46,760 --> 00:38:48,920 And if you look at what we do at the bottom 984 00:38:48,920 --> 00:38:50,960 the yellow piece is the 985 00:38:50,960 --> 00:38:52,940 root of our cypher string. I'm sorry 986 00:38:52,960 --> 00:38:54,520 if that's low and you're sitting down 987 00:38:54,520 --> 00:38:56,380 and you can't see it, but 988 00:38:56,960 --> 00:38:59,000 the first six or so 989 00:38:59,000 --> 00:39:00,740 characters of all that 990 00:39:00,740 --> 00:39:02,940 weird looking stuff are the actual 991 00:39:02,940 --> 00:39:03,940 cypher. 992 00:39:04,800 --> 00:39:07,040 Then there's about seven or eight 993 00:39:07,040 --> 00:39:08,720 random characters 994 00:39:08,720 --> 00:39:10,600 of CRUD that 995 00:39:10,600 --> 00:39:12,740 matches the format of CloudFront 996 00:39:12,740 --> 00:39:14,700 requests dot CloudFront 997 00:39:14,700 --> 00:39:16,260 dot net. Remember 998 00:39:16,700 --> 00:39:18,680 we don't need it to successfully 999 00:39:18,680 --> 00:39:20,860 resolve, we need it to go 1000 00:39:20,860 --> 00:39:22,760 out as a DNS request chain. 1001 00:39:22,960 --> 00:39:24,960 So now we've got 1002 00:39:24,960 --> 00:39:27,000 some options because it will never repeat 1003 00:39:27,620 --> 00:39:28,840 that's up to the code to be 1004 00:39:28,840 --> 00:39:30,780 random and there's plenty of entropy in here 1005 00:39:31,380 --> 00:39:32,760 because we're counting it on 1006 00:39:32,760 --> 00:39:34,920 never to repeat, we're never 1007 00:39:34,920 --> 00:39:36,380 worried about DNS caching. 1008 00:39:41,640 --> 00:39:42,880 Alright, there are some 1009 00:39:42,880 --> 00:39:43,440 issues here. 1010 00:39:44,540 --> 00:39:46,980 There are any number of ciphers for PacketWhisper 1011 00:39:46,980 --> 00:39:48,900 that you can use. You may not 1012 00:39:48,900 --> 00:39:50,920 want to create your own. What if I just want to use 1013 00:39:50,920 --> 00:39:52,940 it out of GitHub? Try CacheHTML. 1014 00:39:52,960 --> 00:39:54,880 Out of the box. What if 1015 00:39:54,880 --> 00:39:56,680 somebody else is doing exfiltration too? 1016 00:39:57,460 --> 00:39:59,000 I am not your problem at that 1017 00:39:59,000 --> 00:40:00,840 point. The tool 1018 00:40:00,840 --> 00:40:02,860 is not your problem. If you 1019 00:40:02,860 --> 00:40:04,760 have that many people in your DNS chain 1020 00:40:04,760 --> 00:40:06,260 that are running around going, oh no! 1021 00:40:07,380 --> 00:40:08,980 Just shut it down and go home. 1022 00:40:09,200 --> 00:40:09,980 Meet me on the beach. 1023 00:40:10,460 --> 00:40:12,800 We'll have drinks. You know we all got stories 1024 00:40:12,800 --> 00:40:14,360 to share, each and every one of us. 1025 00:40:14,840 --> 00:40:16,780 Call me. DM me. 1026 00:40:16,840 --> 00:40:18,520 They're open. So 1027 00:40:18,520 --> 00:40:21,080 yeah, tailoring 1028 00:40:21,080 --> 00:40:22,820 your cipher of course, making 1029 00:40:22,960 --> 00:40:24,900 it your own list of whatever words 1030 00:40:24,900 --> 00:40:26,820 you deem appropriate. Maybe 1031 00:40:26,820 --> 00:40:28,100 it's all, you know. 1032 00:40:28,740 --> 00:40:30,760 The fourth thing I love that is not 1033 00:40:30,760 --> 00:40:31,840 part of this talk is tacos. 1034 00:40:32,340 --> 00:40:34,840 What if I decide that I'm going to 1035 00:40:34,840 --> 00:40:37,000 use that CloudFrontNet 1036 00:40:37,880 --> 00:40:38,360 random 1037 00:40:38,880 --> 00:40:40,600 methodology, except I'm going to go to 1038 00:40:40,600 --> 00:40:42,840 robertos.com. Sorry Robertos, 1039 00:40:42,900 --> 00:40:43,820 I love your tacos. 1040 00:40:44,760 --> 00:40:46,660 Nobody else is probably using that cipher. 1041 00:40:46,800 --> 00:40:48,860 The problem is the moment you tailor it, 1042 00:40:49,020 --> 00:40:50,880 well now it's the taco guy. 1043 00:40:51,760 --> 00:40:52,940 And that's a little 1044 00:40:52,960 --> 00:40:54,700 hard to hide out in the open. 1045 00:40:54,920 --> 00:40:56,900 If you're using the same cipher as everybody else 1046 00:40:56,900 --> 00:40:58,640 is, oh it's mystery 1047 00:40:58,640 --> 00:40:59,580 hacker group everywhere. 1048 00:41:00,860 --> 00:41:02,920 So again, check the GitHub repository 1049 00:41:02,920 --> 00:41:04,940 for Cloakify. It'll show you 1050 00:41:04,940 --> 00:41:06,840 all of the options on how to 1051 00:41:06,840 --> 00:41:08,680 make your own unique ciphers. 1052 00:41:08,760 --> 00:41:10,960 It's really straightforward. And if it's not 1053 00:41:10,960 --> 00:41:12,860 then blame me and contact me 1054 00:41:12,860 --> 00:41:14,700 and I will make it better. 1055 00:41:15,820 --> 00:41:16,380 Receiving. 1056 00:41:17,140 --> 00:41:18,900 Capture that data any way you want. 1057 00:41:19,420 --> 00:41:20,540 Wireshark, Tshark, 1058 00:41:20,620 --> 00:41:22,860 TCP dump. Capture tools 1059 00:41:22,960 --> 00:41:24,840 on network appliances. If you're a network 1060 00:41:24,840 --> 00:41:26,920 engineer out there, you know you've got better 1061 00:41:26,920 --> 00:41:29,100 stuff out there than Wireshark. 1062 00:41:30,200 --> 00:41:30,760 Capture 1063 00:41:30,760 --> 00:41:32,960 utilities on wall displays 1064 00:41:32,960 --> 00:41:33,980 and kiosks. 1065 00:41:34,400 --> 00:41:36,360 They are 100% a thing. 1066 00:41:36,840 --> 00:41:38,580 I have done this before. 1067 00:41:39,140 --> 00:41:41,220 This happy little wall kiosk 1068 00:41:41,220 --> 00:41:43,120 lets you do packet captures. 1069 00:41:43,400 --> 00:41:44,560 I don't know why. 1070 00:41:44,760 --> 00:41:46,960 I've never known who's ever needed to debug 1071 00:41:46,960 --> 00:41:47,520 a wall 1072 00:41:49,360 --> 00:41:50,900 kiosk to see all the 1073 00:41:50,900 --> 00:41:52,840 traffic on the network. And yes, 1074 00:41:52,960 --> 00:41:53,500 here we are. 1075 00:41:55,040 --> 00:41:56,660 This is why we can't have nice 1076 00:41:56,660 --> 00:41:57,080 things. 1077 00:41:59,020 --> 00:42:00,280 So, there we go. 1078 00:42:00,540 --> 00:42:02,560 However, you're going to go ahead 1079 00:42:02,560 --> 00:42:03,840 and pull the data. 1080 00:42:04,540 --> 00:42:06,620 Don't worry about only filtering 1081 00:42:06,620 --> 00:42:08,720 on the query names. PacketWhisperer is 1082 00:42:08,720 --> 00:42:10,440 going to take care of all that for you. 1083 00:42:10,680 --> 00:42:12,640 Minimum hassle. But if you need to 1084 00:42:12,640 --> 00:42:13,980 minimize your capture bandwidth, 1085 00:42:14,300 --> 00:42:16,420 because your point of collection, you 1086 00:42:16,420 --> 00:42:18,120 were the threat team 1087 00:42:18,120 --> 00:42:20,460 that did that BGP 1088 00:42:20,460 --> 00:42:22,520 attack on 8888. 1089 00:42:23,280 --> 00:42:24,900 Yeah, maybe only capture 1090 00:42:24,900 --> 00:42:27,100 53 so that you're not capturing 1091 00:42:27,100 --> 00:42:28,900 terabytes of data to sift through. 1092 00:42:29,020 --> 00:42:30,440 I have not tested this 1093 00:42:30,440 --> 00:42:31,900 on terabytes of data. 1094 00:42:32,300 --> 00:42:34,980 So, I guess if you're a nation state, you can do your own research 1095 00:42:34,980 --> 00:42:36,580 too and build your own code. 1096 00:42:36,740 --> 00:42:38,780 And then submit a pull request because 1097 00:42:38,780 --> 00:42:40,180 it's about supporting the community. 1098 00:42:45,620 --> 00:42:47,080 I have names in mind. 1099 00:42:47,100 --> 00:42:47,780 I'm not going to talk. 1100 00:42:48,260 --> 00:42:51,060 Must be positioned to capture that packet traffic. 1101 00:42:51,260 --> 00:42:52,100 That's the only 1102 00:42:52,880 --> 00:42:54,180 requirement, people. 1103 00:42:55,420 --> 00:42:57,180 So, name servers along the way. 1104 00:42:57,220 --> 00:42:58,640 We talked about multiple points already. 1105 00:42:58,860 --> 00:43:01,000 I won't drill into that repeatedly. 1106 00:43:01,700 --> 00:43:02,660 Be creative. 1107 00:43:03,080 --> 00:43:05,420 I like network taps in my operations. 1108 00:43:05,660 --> 00:43:06,760 Wherever I can get into 1109 00:43:06,760 --> 00:43:08,020 network compliance somewhere 1110 00:43:08,020 --> 00:43:10,080 and just click in a network tap. 1111 00:43:10,280 --> 00:43:12,200 That implies some sort of physical access. 1112 00:43:12,620 --> 00:43:13,880 But again, if you're a bad guy, 1113 00:43:14,560 --> 00:43:16,200 and, you know, bad guys are relative. 1114 00:43:16,420 --> 00:43:17,220 Pick you're a bad guy. 1115 00:43:17,560 --> 00:43:20,460 And they've hijacked DNS and 1116 00:43:20,460 --> 00:43:22,660 now all that's going through their stuff anyway. 1117 00:43:22,960 --> 00:43:24,760 They were able to do that without touching 1118 00:43:24,760 --> 00:43:25,580 a thing. 1119 00:43:27,920 --> 00:43:28,820 Oh, on the 1120 00:43:28,820 --> 00:43:30,180 same WiFi network, 1121 00:43:30,520 --> 00:43:32,340 capturing device in promiscuous mode. 1122 00:43:32,540 --> 00:43:33,540 That's pretty awesome. 1123 00:43:34,520 --> 00:43:36,480 If that's not going to work 1124 00:43:36,480 --> 00:43:38,420 because of whatever scenario or reason, 1125 00:43:38,700 --> 00:43:40,740 then go ahead 1126 00:43:40,740 --> 00:43:42,240 and use one of the modes that does 1127 00:43:42,830 --> 00:43:43,080 multicast. 1128 00:43:44,500 --> 00:43:46,860 WiFi networks, not all of them will let you 1129 00:43:46,860 --> 00:43:48,300 see even other DNS requests. 1130 00:43:48,720 --> 00:43:50,580 I've noticed in the last couple years in my operations 1131 00:43:50,580 --> 00:43:52,160 more and more 1132 00:43:52,960 --> 00:43:54,100 WiFi networks are using 1133 00:43:54,600 --> 00:43:55,400 client isolation. 1134 00:43:56,000 --> 00:43:57,820 So I can't see network shares, 1135 00:43:58,000 --> 00:43:59,840 I can't see DNS requests, I can't see anything. 1136 00:44:00,060 --> 00:44:01,600 It's really ruining a lot of fun. 1137 00:44:01,780 --> 00:44:02,860 And that's a good thing. 1138 00:44:03,980 --> 00:44:06,160 Making sure you're collecting on the right network path. 1139 00:44:07,140 --> 00:44:08,340 Standard wisdom applies. 1140 00:44:08,640 --> 00:44:09,520 It's not a problem. 1141 00:44:10,040 --> 00:44:10,980 Until it is. 1142 00:44:11,220 --> 00:44:13,280 And then it's a real problem because you went through 1143 00:44:13,280 --> 00:44:14,360 all that trouble to get it, right? 1144 00:44:14,500 --> 00:44:15,520 And now you can't get it out. 1145 00:44:15,860 --> 00:44:17,140 If you're a defender, you're like, 1146 00:44:17,140 --> 00:44:18,880 woo, barely missed that bullet. 1147 00:44:19,720 --> 00:44:20,800 But between 1148 00:44:20,800 --> 00:44:22,720 multi-home systems and everything else, 1149 00:44:22,780 --> 00:44:24,940 if you're going to be setting up a 1150 00:44:24,940 --> 00:44:26,980 collection point, do a quick 1151 00:44:26,980 --> 00:44:27,540 test. 1152 00:44:28,560 --> 00:44:30,840 It'll be an indicator, but what the heck, YOLO. 1153 00:44:31,040 --> 00:44:32,380 And just Google for something, 1154 00:44:32,540 --> 00:44:34,700 search for something weird, or something common 1155 00:44:34,700 --> 00:44:35,840 with a weird domain. 1156 00:44:36,200 --> 00:44:38,740 A test CloudFront domain would be perfect. 1157 00:44:39,220 --> 00:44:41,000 And to see if you can detect 1158 00:44:41,000 --> 00:44:42,760 it. And then you're okay. 1159 00:44:43,080 --> 00:44:44,720 So use dig and trace 1160 00:44:44,720 --> 00:44:46,560 if you're Linux types, Unix types. 1161 00:44:47,140 --> 00:44:48,120 Or Windows equivalent. 1162 00:44:48,440 --> 00:44:49,760 See where those paths are going. 1163 00:44:51,900 --> 00:44:52,460 Extracting. 1164 00:44:52,900 --> 00:44:54,940 Again, do all the magic for you. 1165 00:44:55,040 --> 00:44:56,780 Read through the PCAP. 1166 00:44:56,820 --> 00:44:58,480 Nox sequence we talked about. 1167 00:44:59,160 --> 00:45:00,780 And then it'll 1168 00:45:00,780 --> 00:45:01,940 decloakify for it. 1169 00:45:02,580 --> 00:45:05,000 The only issues I have had, 1170 00:45:05,700 --> 00:45:06,920 other than having to wait 1171 00:45:06,920 --> 00:45:08,900 and be patient, is that occasionally 1172 00:45:08,900 --> 00:45:10,980 a DNS query just goes 1173 00:45:10,980 --> 00:45:12,500 off into the winds. I never see it. 1174 00:45:12,880 --> 00:45:14,700 If it is operationally critical 1175 00:45:14,700 --> 00:45:17,060 and you can't try again 1176 00:45:17,140 --> 00:45:18,440 to exfiltrate, 1177 00:45:18,680 --> 00:45:20,820 well you're usually only missing one or two 1178 00:45:20,820 --> 00:45:22,820 characters out of that base64 payload. 1179 00:45:23,580 --> 00:45:24,920 It's a Python challenge. 1180 00:45:25,320 --> 00:45:26,740 Just brute force it. 1181 00:45:26,840 --> 00:45:27,960 And go have lunch. 1182 00:45:28,320 --> 00:45:29,860 Just randomly add in 1183 00:45:29,860 --> 00:45:33,240 A through F, 0 through 9 1184 00:45:33,240 --> 00:45:34,820 and try to decode it 1185 00:45:34,820 --> 00:45:36,840 and walk it down and have a 1186 00:45:36,840 --> 00:45:38,820 script response to detect 1187 00:45:38,820 --> 00:45:39,960 change in size. 1188 00:45:40,400 --> 00:45:42,480 Walk away and you'll solve it. 1189 00:45:42,600 --> 00:45:44,900 I've only had to do that once specifically. 1190 00:45:45,280 --> 00:45:45,500 ... 1191 00:45:47,260 --> 00:45:48,740 Alright, we talked about selecting 1192 00:45:48,740 --> 00:45:50,960 your query points. Avoiding duplication. 1193 00:45:51,440 --> 00:45:52,920 Again, it's the same on 1194 00:45:52,920 --> 00:45:54,680 QueryPath for all systems. 1195 00:45:54,920 --> 00:45:56,360 It is slow. 1196 00:45:57,700 --> 00:45:58,420 Added service. 1197 00:45:58,820 --> 00:45:59,860 VPN connections. 1198 00:46:00,660 --> 00:46:01,940 It makes sense, right? 1199 00:46:02,080 --> 00:46:04,700 If your system is using a VPN connection, 1200 00:46:05,060 --> 00:46:06,260 everything is encrypted 1201 00:46:06,260 --> 00:46:08,460 all the way out through that VPN 1202 00:46:09,660 --> 00:46:11,140 server's exit point. 1203 00:46:11,240 --> 00:46:13,080 You won't see anything along 1204 00:46:13,080 --> 00:46:14,960 the way. And I keep forgetting that 1205 00:46:14,960 --> 00:46:16,700 sometimes and it's really annoying. 1206 00:46:17,720 --> 00:46:18,600 Frequency analysis. 1207 00:46:19,160 --> 00:46:21,000 Not as huge of an issue 1208 00:46:21,000 --> 00:46:22,100 if you slow down 1209 00:46:22,700 --> 00:46:23,560 what you're doing. 1210 00:46:24,880 --> 00:46:27,220 We already talked about most of the countermeasures 1211 00:46:27,220 --> 00:46:28,000 up front. 1212 00:46:28,680 --> 00:46:31,220 But just remember, canary data and honey data 1213 00:46:31,220 --> 00:46:33,040 really, really, really, really good. 1214 00:46:33,580 --> 00:46:34,620 Data is going to get out. 1215 00:46:34,900 --> 00:46:36,980 If you have a way of your data trying to 1216 00:46:36,980 --> 00:46:38,860 call home or call somewhere so you 1217 00:46:38,860 --> 00:46:40,060 know data got out, 1218 00:46:42,040 --> 00:46:43,360 that's a good thing to know. 1219 00:46:43,420 --> 00:46:44,700 You can worry about how it got out 1220 00:46:44,700 --> 00:46:47,000 but if you don't detect it having 1221 00:46:47,140 --> 00:46:49,220 left the barn, you're not even 1222 00:46:49,220 --> 00:46:49,860 going to have a chance. 1223 00:46:50,560 --> 00:46:52,300 You're a good SOC analyst? Absolutely. 1224 00:46:52,800 --> 00:46:55,280 DNS query whitelisting. Use it. 1225 00:46:55,300 --> 00:46:56,960 Reduce my attack space. 1226 00:46:57,400 --> 00:46:59,060 And then awareness, which is why 1227 00:46:59,060 --> 00:46:59,380 we're here. 1228 00:47:00,820 --> 00:47:02,120 Now we got a couple minutes. 1229 00:47:03,120 --> 00:47:04,140 Packet whisper demonstration! 1230 00:47:11,380 --> 00:47:13,220 So this is not my production 1231 00:47:13,220 --> 00:47:14,840 box. And 1232 00:47:14,840 --> 00:47:17,040 this morning when I went to fire 1233 00:47:17,140 --> 00:47:18,840 it up and checked everything, 1234 00:47:19,200 --> 00:47:20,360 Wireshark was not working. 1235 00:47:20,980 --> 00:47:23,200 Connection failed. My shell commands 1236 00:47:23,200 --> 00:47:25,160 were not able to find directory 1237 00:47:25,160 --> 00:47:27,160 structures. This machine 1238 00:47:27,160 --> 00:47:29,080 is borked. I have backups 1239 00:47:29,080 --> 00:47:30,800 of the slides. So 1240 00:47:30,800 --> 00:47:32,860 the tool is going live next 1241 00:47:32,860 --> 00:47:34,900 week. It's been a long week 1242 00:47:34,900 --> 00:47:36,500 and I got a lot going on when I get home. 1243 00:47:36,660 --> 00:47:38,380 It is going to go into the repository. 1244 00:47:39,300 --> 00:47:40,980 But yes, near four hours 1245 00:47:40,980 --> 00:47:42,340 ago, I apologize. 1246 00:47:43,700 --> 00:47:45,140 I've been presenting a long time 1247 00:47:45,140 --> 00:47:47,000 and that has never happened to my system 1248 00:47:47,140 --> 00:47:48,620 ever. And I want to be clear, 1249 00:47:48,780 --> 00:47:51,040 I can make sure to connect to NSA 1250 00:47:51,040 --> 00:47:52,940 secure Wi-Fi at the hotel last 1251 00:47:52,940 --> 00:47:55,000 night and I should have been totally 1252 00:47:55,000 --> 00:47:56,340 safe. But no. 1253 00:47:56,660 --> 00:47:58,580 My machine is screwed. However, 1254 00:48:00,220 --> 00:48:00,700 because 1255 00:48:00,700 --> 00:48:03,160 I've never had to use backup slides before, I'm happy 1256 00:48:03,160 --> 00:48:05,060 I have backup slides that I can use now. 1257 00:48:05,840 --> 00:48:06,920 It's menu driven. 1258 00:48:07,660 --> 00:48:09,220 Broadcast a file. Extract 1259 00:48:09,220 --> 00:48:11,140 a file from a PCAP. Take a look 1260 00:48:11,140 --> 00:48:12,900 at the ciphers. When you go to 1261 00:48:12,900 --> 00:48:14,920 broadcast a file, it asks you 1262 00:48:14,920 --> 00:48:16,660 what file do you want to 1263 00:48:17,140 --> 00:48:19,120 load up? It will ask you 1264 00:48:19,120 --> 00:48:21,200 which cipher do you want to use? 1265 00:48:21,600 --> 00:48:23,000 And then it will ask you 1266 00:48:23,000 --> 00:48:24,880 confirm send. Out it goes. 1267 00:48:25,300 --> 00:48:26,740 When you've got that PCAP 1268 00:48:26,740 --> 00:48:28,980 loaded up in extract file 1269 00:48:28,980 --> 00:48:30,960 to PCAP, it just asks for a 1270 00:48:30,960 --> 00:48:32,620 file name. Bam! 1271 00:48:33,240 --> 00:48:34,840 Does the magic we talked about. 1272 00:48:35,040 --> 00:48:37,080 And if all goes well, you've 1273 00:48:37,080 --> 00:48:39,060 got that file sitting right there. 1274 00:48:39,400 --> 00:48:40,700 I try to make the flow 1275 00:48:40,700 --> 00:48:43,180 as realistic and repeatable 1276 00:48:43,180 --> 00:48:45,100 as possible. Under the hood, 1277 00:48:45,200 --> 00:48:46,420 you run packet whisper. 1278 00:48:47,140 --> 00:48:48,960 .py. Straight Python. Cross platform. 1279 00:48:49,200 --> 00:48:50,620 Yay! Sorry. 1280 00:48:50,840 --> 00:48:53,380 2.7. I'm going to work on 3.x 1281 00:48:53,380 --> 00:48:54,860 soon. But right now it's 2.7 1282 00:48:54,860 --> 00:48:56,860 because those are my operational needs 1283 00:48:56,860 --> 00:48:57,740 and I'm being selfish. 1284 00:48:59,240 --> 00:49:01,120 Packet whisper broadcast, packet whisper 1285 00:49:01,120 --> 00:49:03,120 capture are doing some of the 1286 00:49:03,120 --> 00:49:05,080 under the hood magic. You can use 1287 00:49:05,080 --> 00:49:07,100 those manually if you wanted to. I'll have a 1288 00:49:07,100 --> 00:49:08,900 full tutorial when we're 1289 00:49:08,900 --> 00:49:11,160 when I get it up on GitHub. I like tutorials. 1290 00:49:11,520 --> 00:49:12,820 I like self explaining stuff. 1291 00:49:13,180 --> 00:49:14,940 And there's a clone of 1292 00:49:14,940 --> 00:49:16,800 Cloakify and DeCloakify. That's it. 1293 00:49:17,140 --> 00:49:18,940 There's no other crazy 1294 00:49:18,940 --> 00:49:20,900 magic. Here's a workflow 1295 00:49:20,900 --> 00:49:21,880 of actually working. 1296 00:49:22,760 --> 00:49:25,120 And I use the two tools 1297 00:49:25,120 --> 00:49:26,860 by hand. The upper 1298 00:49:26,860 --> 00:49:27,640 right. 1299 00:49:28,940 --> 00:49:31,400 That upper corner is transmitting. 1300 00:49:32,200 --> 00:49:32,920 Wireshark 1301 00:49:32,920 --> 00:49:34,980 is capturing the queries as 1302 00:49:34,980 --> 00:49:37,180 they're being made. The bottom 1303 00:49:37,180 --> 00:49:38,980 corner is loading 1304 00:49:38,980 --> 00:49:40,960 the PCAP and decoding it. 1305 00:49:41,160 --> 00:49:42,920 In this case, I just ran MD5 1306 00:49:42,920 --> 00:49:45,360 hash to validate the payloads 1307 00:49:45,360 --> 00:49:46,600 .xls file 1308 00:49:47,140 --> 00:49:48,180 were the same through and through. 1309 00:49:49,740 --> 00:49:51,120 Resources. Again, you'll be able to 1310 00:49:51,120 --> 00:49:52,800 pull those off when it goes up on the GitHub 1311 00:49:52,800 --> 00:49:54,920 next week. That is 1312 00:49:54,920 --> 00:49:57,100 packet whisper exfiltration tool set. 1313 00:49:57,480 --> 00:49:59,140 I apologize for the computer 1314 00:49:59,140 --> 00:50:00,080 hating my life. 1315 00:50:00,900 --> 00:50:02,820 But check it out. Thanks for hanging in there. 1316 00:50:02,960 --> 00:50:04,500 I know it was a long stretch. 1317 00:50:05,760 --> 00:50:06,160 And...