1 00:00:11,080 --> 00:00:14,380 Today we're going to do a talk on the project that three of us worked on. 2 00:00:14,640 --> 00:00:16,560 We are with the Tri-Valley Security Group. 3 00:00:16,600 --> 00:00:21,540 That is a nonprofit security organization formed out of the Bay Area, just East Bay. 4 00:00:23,580 --> 00:00:26,040 We have Spider, who acquired the hardware for us. 5 00:00:26,600 --> 00:00:29,660 We had Mystic here, who basically kept us organized. 6 00:00:30,400 --> 00:00:32,980 And my name's Otto. I did the software development. 7 00:00:34,780 --> 00:00:41,100 The concept is we need a way to break into NATed networks. 8 00:00:41,580 --> 00:00:46,440 And the best way to do that is to put something inside there so we can own them from the inside out. 9 00:00:47,780 --> 00:00:52,040 So we wanted to place a stealthed hostile packet sniffer on a victim network. 10 00:00:52,940 --> 00:00:55,420 We wanted to make it blend in, hide in plain sight. 11 00:00:56,040 --> 00:00:56,680 Make it as a UPS. 12 00:00:57,180 --> 00:00:59,540 This guy right here is our second model UPS. 13 00:01:00,020 --> 00:01:01,160 You take a look at it. 14 00:01:01,200 --> 00:01:03,380 From all exterior purposes, it looks completely stock. 15 00:01:04,300 --> 00:01:06,180 We maintain the same connectivity and everything. 16 00:01:06,460 --> 00:01:07,600 The power switch works. 17 00:01:09,920 --> 00:01:10,880 It's sort of tough. 18 00:01:11,360 --> 00:01:11,720 Careful. 19 00:01:15,300 --> 00:01:19,280 They don't have any video, so use your eyes and zoom in. 20 00:01:20,320 --> 00:01:21,240 There you go. Thank you. 21 00:01:22,200 --> 00:01:24,540 We'll have it around afterwards if you want to take a look at it. 22 00:01:24,600 --> 00:01:25,120 We'll shut it down. 23 00:01:25,180 --> 00:01:25,980 You can play with it or something. 24 00:01:26,720 --> 00:01:27,080 Okay. 25 00:01:27,240 --> 00:01:34,180 So everyone, especially in California, with all the rolling blackouts we had and all the brownouts and shit. 26 00:01:34,720 --> 00:01:35,240 Sorry, stuff. 27 00:01:38,000 --> 00:01:41,320 Everyone had one of these on their desk because you're just like, oh, you're going up. 28 00:01:41,460 --> 00:01:42,760 And we'd have to shut down and stuff. 29 00:01:42,920 --> 00:01:47,720 So this, they have the nice land jacks on the back because, you know, lightning strikes. 30 00:01:48,000 --> 00:01:49,960 And you've got the integrated NICs on your laptops. 31 00:01:50,280 --> 00:01:51,700 Those things are money to replace. 32 00:01:51,820 --> 00:01:54,600 So you want to plug it in and plug it into your corporate network. 33 00:01:54,600 --> 00:01:56,120 And we own you. 34 00:01:58,200 --> 00:01:59,120 So let's see here. 35 00:01:59,980 --> 00:02:02,380 So we'll talk more about that. 36 00:02:02,500 --> 00:02:04,020 So like I said, today is a prototype. 37 00:02:04,360 --> 00:02:05,100 This is the Mark II. 38 00:02:05,300 --> 00:02:06,380 The Mark I was kind of ugly. 39 00:02:08,760 --> 00:02:10,500 And really this isn't undetectable. 40 00:02:10,660 --> 00:02:13,580 I'm sorry if you came here to see the newest Uberly thing. 41 00:02:13,860 --> 00:02:15,980 This is mostly undetectable. 42 00:02:17,060 --> 00:02:20,640 Depending on what mode you put it in, it could be very, very, very quiet. 43 00:02:20,880 --> 00:02:24,400 But it would have no IP and you'd have to dead drop it in and then go back later. 44 00:02:24,400 --> 00:02:25,200 And dead drop it out. 45 00:02:25,760 --> 00:02:29,020 If you actually want to exfiltrate data, obviously you have to make network noise. 46 00:02:29,760 --> 00:02:30,780 Someone might be listening. 47 00:02:30,920 --> 00:02:31,180 You never know. 48 00:02:31,840 --> 00:02:37,880 We're working on getting more hardware, more software to reduce the risk and increase onage. 49 00:02:39,100 --> 00:02:40,240 So we've been introducing. 50 00:02:40,480 --> 00:02:41,540 And we're going to talk about integration. 51 00:02:41,780 --> 00:02:42,960 I'm going to pass over to Mystic for integration. 52 00:02:44,480 --> 00:02:46,140 Spider here will talk about the hardware he gave. 53 00:02:46,380 --> 00:02:46,960 I'm doing integration. 54 00:02:47,200 --> 00:02:47,660 Oh, you're doing integration? 55 00:02:47,920 --> 00:02:48,320 Oh, okay. 56 00:02:48,440 --> 00:02:49,460 See how organized we are? 57 00:02:49,580 --> 00:02:49,860 Yeah. 58 00:02:51,120 --> 00:02:52,620 So I'll talk about the software. 59 00:02:52,900 --> 00:02:53,800 We'll do a little demo. 60 00:02:53,800 --> 00:02:55,680 And then we'll do a little Q&A. 61 00:02:55,920 --> 00:02:59,740 So if you're going to do one of these things yourself, do a little case mods. 62 00:02:59,900 --> 00:03:01,540 Those of you who do case mods, you know about this. 63 00:03:01,820 --> 00:03:02,320 Amps kill. 64 00:03:02,500 --> 00:03:03,640 They will hurt you very badly. 65 00:03:03,700 --> 00:03:04,200 And then you will die. 66 00:03:04,680 --> 00:03:08,080 So if you're going to open up stuff, work with live power, keep this in mind. 67 00:03:09,840 --> 00:03:10,160 Okay. 68 00:03:10,500 --> 00:03:10,900 All right. 69 00:03:11,660 --> 00:03:11,980 Okay. 70 00:03:12,080 --> 00:03:16,840 One of our biggest goals on this UPS unit was to make it look as stock as possible. 71 00:03:17,280 --> 00:03:19,840 I actually work for an embedded computer company in the Bay Area. 72 00:03:20,000 --> 00:03:22,340 So I had access to a lot of really cool equipment. 73 00:03:22,340 --> 00:03:26,320 But a lot of things that people don't understand about embedded computers is that they are 74 00:03:26,320 --> 00:03:27,040 easy to use. 75 00:03:27,600 --> 00:03:31,880 Embedded computers are basically an entire system that's been miniaturized into one system. 76 00:03:32,860 --> 00:03:33,260 My apologies. 77 00:03:34,000 --> 00:03:34,320 Okay. 78 00:03:34,520 --> 00:03:39,500 An embedded system is an entire computer that's been modified to fit into a very small space. 79 00:03:39,860 --> 00:03:45,160 The board that we're using in here currently houses a Pentium 166 with 128 megabytes of 80 00:03:45,160 --> 00:03:46,340 RAM and a... 81 00:03:47,500 --> 00:03:47,900 Sorry. 82 00:03:48,060 --> 00:03:48,300 What? 83 00:03:49,160 --> 00:03:49,920 Sorry, I don't know. 84 00:03:49,940 --> 00:03:50,380 Okay. 85 00:03:50,460 --> 00:03:51,680 And a one gigabyte hard drive. 86 00:03:51,740 --> 00:03:52,320 I mean, you're going to take it. 87 00:03:52,340 --> 00:03:55,820 You're going to attach any laptop hard drive in there so your storage capacity is unlimited. 88 00:03:56,360 --> 00:03:59,640 So really, one of the most important things when we're building this unit is to keep it 89 00:03:59,640 --> 00:04:03,780 looking out from the outside as stock as possible, while on the inside getting the 90 00:04:03,780 --> 00:04:07,740 maximum functionality and getting everything to run as smooth as possible. 91 00:04:10,140 --> 00:04:10,720 All right. 92 00:04:10,940 --> 00:04:13,780 There was four things we needed for this design. 93 00:04:14,160 --> 00:04:16,760 We needed, obviously, the UPS, the box itself. 94 00:04:17,080 --> 00:04:21,820 We basically stripped out the entire insides, the battery, everything that was in there, 95 00:04:21,820 --> 00:04:22,980 and replaced it with our stuff. 96 00:04:23,160 --> 00:04:24,900 So this isn't a functioning UPS. 97 00:04:25,180 --> 00:04:26,440 It really is just deployed. 98 00:04:26,700 --> 00:04:32,240 It just is hard to see, and no one really thinks to look inside a UPS for anything hostile. 99 00:04:32,600 --> 00:04:33,620 It's a Leak case mod. 100 00:04:35,120 --> 00:04:40,840 The power supply is just used for taking our AC voltage and converting it into DC. 101 00:04:40,960 --> 00:04:42,160 All computers run on DC. 102 00:04:43,160 --> 00:04:47,020 Embedded systems, especially, there's only a couple voltages that computers really run 103 00:04:47,020 --> 00:04:47,180 at. 104 00:04:47,280 --> 00:04:49,980 They're either running at 5 volt, 3.3 volt, or 12 volt. 105 00:04:50,100 --> 00:04:51,800 So as far as power supplies go, they're running at 5 volt, 3.3 volt, or 12 volt. 106 00:04:51,800 --> 00:04:54,760 So, I mean, eBay is a great place to pick up really cheap power supplies. 107 00:04:55,300 --> 00:05:01,040 If you're doing any work with electronics, computer equipment, having power supplies 108 00:05:01,040 --> 00:05:03,980 just handy at small, compact power supplies is really useful. 109 00:05:08,140 --> 00:05:11,220 Okay, the other thing you can do, if you don't have a lot of money, embedded systems, 110 00:05:11,300 --> 00:05:13,060 you can start looking at them for around $200. 111 00:05:13,640 --> 00:05:16,420 But a lot of the times, I know people want to get it even cheaper than that. 112 00:05:16,920 --> 00:05:19,600 HP has made a model of machines called the eMachines. 113 00:05:19,740 --> 00:05:21,280 I'm sure a lot of people are familiar with them. 114 00:05:21,800 --> 00:05:25,300 The eMachines are basically like a really tiny computer that HP made, and the really 115 00:05:25,300 --> 00:05:28,760 nice thing about them is if you look inside, they've got an integrated motherboard that 116 00:05:28,760 --> 00:05:30,100 has everything included in it. 117 00:05:30,360 --> 00:05:34,260 So you can go on eBay and pick up one of these eMachines for $30 and go and rip the 118 00:05:34,260 --> 00:05:37,700 motherboard out, and you've got basically an embedded computer for $30. 119 00:05:39,700 --> 00:05:40,540 You want to go back one? 120 00:05:40,640 --> 00:05:40,800 Sorry. 121 00:05:40,940 --> 00:05:41,300 Back. 122 00:05:43,820 --> 00:05:45,780 Oh, there's some pictures of our first prototype. 123 00:05:45,960 --> 00:05:49,660 As you can see, it's a lot bigger and it was harder to mod, but really, the first prototype, 124 00:05:49,840 --> 00:05:51,780 we just wanted to make sure that this idea was going to work. 125 00:05:54,120 --> 00:05:57,120 Auto actually was responsible for the design of the second unit here. 126 00:05:58,300 --> 00:06:00,860 The board that we've picked to use comes from Contron. 127 00:06:01,260 --> 00:06:05,420 If you want to get into embedded computers, I'd recommend just visiting some of the sites. 128 00:06:05,700 --> 00:06:07,060 We've got some links on the CD. 129 00:06:08,620 --> 00:06:09,520 We picked this. 130 00:06:09,820 --> 00:06:11,300 It's a Pentium 166. 131 00:06:11,600 --> 00:06:13,680 It's got 128 meg of RAM in it. 132 00:06:13,780 --> 00:06:16,620 We've got two IDE channels, so we can hook up to four devices. 133 00:06:16,780 --> 00:06:17,820 We can have CD-ROMs. 134 00:06:17,880 --> 00:06:20,520 We can have extra hard drives. 135 00:06:20,840 --> 00:06:21,280 Really. 136 00:06:21,780 --> 00:06:23,820 When you're dealing with embedded systems, you are dealing with a PC. 137 00:06:23,980 --> 00:06:26,520 There's no reason to think outside of PC terms. 138 00:06:26,800 --> 00:06:30,260 It's really just the form factor and the way that it's being connected together. 139 00:06:30,620 --> 00:06:35,500 A really good example of this is embedded computer people will know a term called PC-104. 140 00:06:35,700 --> 00:06:40,140 PC-104 is basically an ISOBUS, but we've carried it out into an embedded form factor. 141 00:06:40,600 --> 00:06:43,640 As far as it's concerned, the timing, everything's identical to it. 142 00:06:43,680 --> 00:06:47,660 The chipsets, you're using chips and technology, 69,000s, you're using all-in-ones. 143 00:06:48,100 --> 00:06:48,900 Everything's the same. 144 00:06:49,080 --> 00:06:51,180 It's just that you're changing the form factor. 145 00:06:51,180 --> 00:06:53,580 You're changing the size of the unit to fit into an application. 146 00:06:55,140 --> 00:06:57,440 Our embedded system had only one ethernet. 147 00:06:57,860 --> 00:07:01,540 That was mainly because I got the system for free and we didn't want to spend any money 148 00:07:01,540 --> 00:07:01,860 on it. 149 00:07:03,820 --> 00:07:10,300 Just because we wanted to keep it simple, we just ripped a 10100 hub and placed it 150 00:07:10,300 --> 00:07:14,240 inside here, which just allowed traffic to go through it. 151 00:07:17,800 --> 00:07:20,140 I made this slide, so it's kind of important. 152 00:07:20,320 --> 00:07:20,880 All right. 153 00:07:21,180 --> 00:07:25,480 One of the problems with putting a hub in there instead of bridging through, well, it's 154 00:07:25,480 --> 00:07:31,200 good because even if the UPS, the embedded machine is still booting and it's not being 155 00:07:31,200 --> 00:07:36,340 told to bridge, your victim will still get through and you won't impede his traffic. 156 00:07:36,840 --> 00:07:39,140 But the bad thing is you can't do proxy ARP attacks. 157 00:07:39,380 --> 00:07:44,720 That'd be really cool, where instead of the client going out on his MAC address, if you 158 00:07:44,720 --> 00:07:48,560 can bridge it through your box and then everything goes on your MAC address, you can effectively 159 00:07:48,560 --> 00:07:49,380 take over his IP. 160 00:07:49,820 --> 00:07:51,160 That was a mode that was really cool. 161 00:07:51,160 --> 00:07:53,500 It was a mode that I wanted to work on for the con but didn't get it in time because 162 00:07:53,500 --> 00:07:56,600 we couldn't do a bridge through the embedded machine. 163 00:07:57,200 --> 00:08:01,420 So if we could have done that, it would have been almost impossible to tell the victim 164 00:08:01,860 --> 00:08:05,000 traffic from our traffic because it would have been exactly the same MAC address. 165 00:08:05,780 --> 00:08:06,880 So maybe next year. 166 00:08:07,820 --> 00:08:13,920 The ugly part is that you get link from a UPS, you're not supposed to do that. 167 00:08:15,140 --> 00:08:15,620 . 168 00:08:18,160 --> 00:08:19,820 It's a dumb hub. 169 00:08:20,660 --> 00:08:21,140 It's a dumb hub. 170 00:08:21,140 --> 00:08:25,860 I think the bridge run, the box this runs in primiscus mode, yes, the embedded machine 171 00:08:25,860 --> 00:08:30,380 itself has a variety of different processes running on it that all make the interface 172 00:08:30,380 --> 00:08:31,200 go in primiscus mode. 173 00:08:31,340 --> 00:08:32,480 I'll talk about those in just a quick sec. 174 00:08:33,340 --> 00:08:35,120 Okay, I'll transition to software now. 175 00:08:36,080 --> 00:08:37,480 I use Red Hat 7.2. 176 00:08:38,100 --> 00:08:41,040 I know people don't like Red Hat but sorry, I know it. 177 00:08:41,060 --> 00:08:41,320 It works. 178 00:08:42,180 --> 00:08:47,620 7.2 was the first one that had the EXT file system, the EXT3 file system, the journaling. 179 00:08:47,760 --> 00:08:51,040 So I can yank out the power supply and it just dies. 180 00:08:51,040 --> 00:08:53,220 And it doesn't really hurt the hard drive too much, which is kind of cool. 181 00:08:53,880 --> 00:08:59,520 I used a lot of Perl scripts and shell scripts, and then added a lot of neat, fun tools. 182 00:09:00,000 --> 00:09:03,600 I used Netcat by Hobbit. That's like standard issue these days. 183 00:09:04,400 --> 00:09:09,640 The core of the unit as far as actually acquiring victim traffic is Dsniff by Doug Song. 184 00:09:09,820 --> 00:09:11,660 It's a really cool tool. I recommend you check it out. 185 00:09:12,280 --> 00:09:18,040 Of course, we use Nmap by Fyodor. And at the last minute, I threw in the hacker's 186 00:09:18,040 --> 00:09:22,400 choice, the tchru there for network discovery. It works great. 187 00:09:23,420 --> 00:09:28,120 Okay, so, many thanks to Hobbit. This is used basically for the plumbing. 188 00:09:28,920 --> 00:09:32,280 I wrote the scripts. I wrote them without any network code in them, 189 00:09:32,340 --> 00:09:34,960 just to make it easier, and I basically just Netcat everything. 190 00:09:35,240 --> 00:09:40,480 It's cool. By default, I use it over UDP53, which to 191 00:09:40,480 --> 00:09:44,540 a normal firewall would look exactly like a DNS request, so it would let it through. 192 00:09:48,040 --> 00:09:50,960 The problem with DNS requests is it's not really DNS. 193 00:09:51,160 --> 00:09:54,460 It's encrypted, but it doesn't look like a DNS request. 194 00:09:54,720 --> 00:10:00,940 So an IDS or an IDP system would notice this. This is not DNS traffic. 195 00:10:01,160 --> 00:10:04,380 It doesn't even look like it. If you sniff this traffic and then you use 196 00:10:04,380 --> 00:10:10,920 Israel to read it, it'll freak out. It'll go 10,000 requests, 5,000 replies, 197 00:10:11,160 --> 00:10:13,260 and it's one packet. Freaky. 198 00:10:13,740 --> 00:10:18,020 So tunneling alternatives. I could be more elite and then do, you know, 199 00:10:18,040 --> 00:10:24,440 port 80 TCP and actually mask the UPS requests and HTTP URLs and have the replies be webpages. 200 00:10:24,700 --> 00:10:28,340 At the last minute, I also found some really cool Perl scripts out there on the web that 201 00:10:28,340 --> 00:10:30,400 do exactly this, but I didn't have a chance to integrate them. 202 00:10:31,700 --> 00:10:35,880 Another alternative, I really do like DNS. Even though it's UDP and you can lose packets, 203 00:10:36,060 --> 00:10:39,920 that's a real issue. No one uses internal DNS. 204 00:10:40,260 --> 00:10:42,200 They always allow it out. It's pathetic. 205 00:10:43,320 --> 00:10:47,240 But it would be really cool if I could make it look more like a DNS request, a DNS replies. 206 00:10:48,180 --> 00:10:51,860 That's next year. So back on the DSNF now. 207 00:10:52,480 --> 00:10:55,560 This is an incredibly cool, and it's actually kind of old. 208 00:10:55,700 --> 00:10:58,840 It's been out for a couple years now, so if you haven't heard about it, go and find it. 209 00:10:59,080 --> 00:11:02,140 It might not, you might need to do a little tweaking to the Berkeley path 210 00:11:03,060 --> 00:11:06,780 because they're expecting an older version of the Berkeley, so we were set. 211 00:11:07,920 --> 00:11:10,440 Here's the tools that we use from DSNF, actually, on the box. 212 00:11:11,080 --> 00:11:14,400 Use MacOff. MacOff was actually, in the DSNF suite, 213 00:11:14,540 --> 00:11:17,860 the MacOff was actually the port of the Perl script, these MacOff. 214 00:11:18,040 --> 00:11:22,540 It starts spamming out a whole bunch of packets with forged Mac addresses. 215 00:11:23,160 --> 00:11:28,900 This allows you to break open a typical switch. Switches have cam tables that keep track of 216 00:11:28,900 --> 00:11:34,180 every Mac address on a physical interface, and they only have so much buffer space to 217 00:11:34,180 --> 00:11:37,980 hold those. And if they overflow that, they go, I can't 218 00:11:37,980 --> 00:11:41,880 keep track of all these stupid Mac addresses, so I'm just going to put everything down this 219 00:11:41,880 --> 00:11:44,140 port. And that basically gives you access to the 220 00:11:44,140 --> 00:11:47,180 traffic transfer into the entire switch, which is kind of cool. 221 00:11:47,540 --> 00:11:48,020 So, yeah. So, yeah. 222 00:11:48,020 --> 00:11:54,220 DSNF, clear text authentication extractor, it decodes approximately 20 to 25 clear text 223 00:11:54,220 --> 00:12:05,480 protocols, POP3, Telnet, HTTP auth, SNMB, SQL, it's brutal. 224 00:12:06,340 --> 00:12:11,860 FileSnarf does NFS interceptor. If someone copies an NFS file across their 225 00:12:11,860 --> 00:12:18,000 box, it saves a copy of the file locally. Email interceptor is MailSnarf, and we've 226 00:12:18,000 --> 00:12:20,000 actually had a little test of that. We're going to show it a little later. 227 00:12:21,380 --> 00:12:25,520 I had already ran this earlier and snarfed off some emails, so I'll just show you how 228 00:12:25,520 --> 00:12:29,960 that looks. URL interceptor is URLSnarf, and InstantMessenger 229 00:12:29,960 --> 00:12:36,900 is MSMSnarf, so. And, of course, the hacker's tool kit, Nmap, 230 00:12:37,040 --> 00:12:38,840 thanks for that. You rock. This is so cool. 231 00:12:39,160 --> 00:12:41,060 It came with RPM, so we didn't have to do anything. 232 00:12:41,500 --> 00:12:45,320 We use it to detect network connectivity with the box to make sure it can actually call 233 00:12:45,320 --> 00:12:47,520 out. If it can't call home, it won't try to. 234 00:12:48,760 --> 00:12:55,560 And then I made a whole bunch of Perl scripts. First Perl script is the master control script. 235 00:12:55,760 --> 00:13:02,300 It starts on boot up and handles all the other processes that the UPS does as far as turning 236 00:13:02,300 --> 00:13:05,720 on cipher processes, turning off cipher processes, calling home, that kind of a thing. 237 00:13:06,700 --> 00:13:08,820 So this is what it does. When it boots up, it loads the config. 238 00:13:09,340 --> 00:13:12,080 I don't use the Red Hat network configuration scripts. 239 00:13:12,340 --> 00:13:16,880 I've just used everything myself. That way, it has a unified interface for 240 00:13:16,880 --> 00:13:17,980 the different modes. That way, it has a unified interface for the different modes. 241 00:13:18,000 --> 00:13:20,660 I use it for IP addresses, which I'll talk about in a second. 242 00:13:21,300 --> 00:13:26,300 So it configs the network, makes sure everything's good, and then tries to call home. 243 00:13:26,760 --> 00:13:32,540 And from there, it does an endless loop, calls the home, works on what it gets, sets what 244 00:13:32,540 --> 00:13:38,140 it does, calls home every number of seconds. The IP, we have four different modes. 245 00:13:38,900 --> 00:13:43,660 Mode number one is what I talked about earlier when I said that it's almost undetectable. 246 00:13:43,940 --> 00:13:46,880 That's no IP, where it won't respond to anything. 247 00:13:46,880 --> 00:13:50,580 It just sits there and just sniffs. Now, this, you have to be able to sneak in, 248 00:13:50,660 --> 00:13:55,060 put the box in place, hope it comes up okay, and start sniffing. 249 00:13:55,060 --> 00:13:59,000 You have to turn on all the sniffing you want ahead of time and hope that your hard 250 00:13:59,000 --> 00:14:01,760 drive doesn't go full and just come back later and get it. 251 00:14:02,220 --> 00:14:05,080 That's really stealthy, but it's not really fun. 252 00:14:05,320 --> 00:14:08,580 You have to go in twice. Fixed IP mode is really good for testing. 253 00:14:08,780 --> 00:14:12,620 It's, you know, here's your IP, blah. DHCP mode, it's not very stealthy, though, 254 00:14:12,680 --> 00:14:16,780 because if you're on a network that either doesn't have a DHCP server, or they don't 255 00:14:16,780 --> 00:14:21,020 have a lot of nodes, maybe they have registered MAC addresses for all their DHCP nodes, and 256 00:14:21,020 --> 00:14:23,880 you start asking for an IP address, they're going to go, who's this? 257 00:14:24,240 --> 00:14:29,420 That's not very cool. Mode four was the most elite mode, but it's 258 00:14:29,420 --> 00:14:34,280 also extremely noisy at layer two. It actually will, well, here, let's do this. 259 00:14:36,760 --> 00:14:40,840 It watches the network for ARP requests. At first, it starts listening for ARP requests 260 00:14:40,840 --> 00:14:45,860 and it listens to the requester. Obviously, if I hear an ARP request from someone 261 00:14:46,780 --> 00:14:50,500 in my wire, that means that they're on my local layer two subnet. 262 00:14:51,060 --> 00:14:57,160 Takes that IP as a seed, turns around and uses the hackers choice, Are You There?, and basically 263 00:14:57,160 --> 00:15:01,260 for that you can generate ARP requests for anything you want. 264 00:15:01,440 --> 00:15:05,480 So I use it as a seed. I do a class B. That's typical. 265 00:15:05,720 --> 00:15:10,160 I mean, most networks should be less than a class B. And it doesn't take that much longer 266 00:15:10,160 --> 00:15:14,000 to do a class B than a class C in this way. You'll get Super Nets this way. 267 00:15:14,800 --> 00:15:15,820 The hackers choice. 268 00:15:17,260 --> 00:15:18,840 THC rut, it can do 269 00:15:19,440 --> 00:15:20,640 3,000 ARPs 270 00:15:20,640 --> 00:15:22,960 in parallel, so this doesn't take 271 00:15:22,960 --> 00:15:24,960 that long, maybe 5-10 seconds for a whole class 272 00:15:24,960 --> 00:15:26,260 B. It's brutal. 273 00:15:26,940 --> 00:15:29,060 So it'll sit there and it'll scan the whole 274 00:15:29,060 --> 00:15:31,000 it'll do ARPs for every single IP in a 275 00:15:31,000 --> 00:15:33,080 class B segment that it detects 276 00:15:33,080 --> 00:15:34,360 from the top part 277 00:15:34,360 --> 00:15:35,880 and then it'll 278 00:15:35,880 --> 00:15:38,860 see if everything's there. It finds a 279 00:15:38,860 --> 00:15:40,680 IP that's not in use, it's in the range 280 00:15:40,680 --> 00:15:41,720 and just picks it. 281 00:15:42,560 --> 00:15:43,540 So that's kind of fun. 282 00:15:46,500 --> 00:15:48,840 Another thing I didn't write in here, the next thing it does 283 00:15:48,840 --> 00:15:49,900 is, then it turns around 284 00:15:50,860 --> 00:15:52,940 and it listens again for more 285 00:15:52,940 --> 00:15:54,420 ARPs, but now it listens for 286 00:15:54,420 --> 00:15:56,180 who they're asking for. 287 00:15:56,920 --> 00:15:59,060 It counts about 20 or 30 packets 288 00:15:59,060 --> 00:16:00,700 it's asking, it's listening for 289 00:16:00,700 --> 00:16:02,420 who is everyone trying to find. 290 00:16:02,800 --> 00:16:04,900 9 times out of 10, the most popular 291 00:16:04,900 --> 00:16:06,560 ARP target 292 00:16:06,560 --> 00:16:08,600 on a network is the default gateway. 293 00:16:09,220 --> 00:16:10,780 So we do a little statistical 294 00:16:10,780 --> 00:16:12,440 analysis there and say the top one 295 00:16:12,440 --> 00:16:14,080 we'll pick him as our default gateway. 296 00:16:14,300 --> 00:16:16,620 If it doesn't work, the whole thing 297 00:16:16,620 --> 00:16:18,500 has a check here at the end where 298 00:16:18,500 --> 00:16:20,440 it'll try to go out, try to go out 299 00:16:20,440 --> 00:16:22,660 tries to contact the listing post 300 00:16:22,660 --> 00:16:24,060 even. If it fails 301 00:16:24,060 --> 00:16:26,560 it comes back here and starts again. 302 00:16:27,120 --> 00:16:28,580 So, another cool thing 303 00:16:28,580 --> 00:16:30,680 about mode 3, the DHCP mode 304 00:16:30,680 --> 00:16:32,580 if you do set it for mode 3 and there is no 305 00:16:32,580 --> 00:16:34,500 DHCP server, there is no spoon 306 00:16:35,640 --> 00:16:36,080 it'll 307 00:16:36,640 --> 00:16:38,600 keep the fact that it's in mode 3 308 00:16:38,600 --> 00:16:40,720 but fail down to mode 4 309 00:16:40,720 --> 00:16:41,960 to try to get out. 310 00:16:42,440 --> 00:16:44,140 So, it'll always try DHCP 311 00:16:44,140 --> 00:16:46,300 but if it can't get out, it'll try mode 4 as well 312 00:16:46,300 --> 00:16:46,960 which is kind of fun. 313 00:16:48,260 --> 00:16:49,860 And there's other neat stuff, little 314 00:16:49,860 --> 00:16:50,960 cleaning scripts 315 00:16:51,920 --> 00:16:53,060 that kind of stuff. 316 00:16:54,160 --> 00:16:54,820 The actual 317 00:16:54,820 --> 00:16:58,180 let me skip ahead just real quick 318 00:16:58,180 --> 00:17:00,080 and show you the concept here. 319 00:17:00,340 --> 00:17:02,280 So you have a UPS behind a firewall 320 00:17:02,840 --> 00:17:04,320 and you have an attacker out there 321 00:17:04,320 --> 00:17:06,200 anywhere on the internet. You also have a listing 322 00:17:06,200 --> 00:17:08,400 post which can be the same as the 323 00:17:08,400 --> 00:17:10,060 attacker or not, it doesn't really matter but 324 00:17:10,060 --> 00:17:12,020 you can allow it to point to different directions. 325 00:17:12,480 --> 00:17:14,180 The UPS will at intervals 326 00:17:14,720 --> 00:17:16,320 try to contact the listing post. 327 00:17:16,600 --> 00:17:18,460 The listing post is actually a command queue 328 00:17:18,460 --> 00:17:19,860 server. It will 329 00:17:20,340 --> 00:17:22,380 has a stack, it can actually support multiple nodes 330 00:17:22,380 --> 00:17:23,980 and when a 331 00:17:23,980 --> 00:17:25,540 UPS calls home 332 00:17:26,220 --> 00:17:28,320 it will then identify itself by 333 00:17:28,320 --> 00:17:30,240 its node. The listing post will say 334 00:17:30,240 --> 00:17:32,280 do I have any commands for this node? And if it goes yes 335 00:17:32,280 --> 00:17:34,320 then it feeds the commands one at a time 336 00:17:34,320 --> 00:17:36,060 and each time the listing post asks for the next command 337 00:17:36,060 --> 00:17:38,460 it comes back down. When it's done 338 00:17:38,460 --> 00:17:40,160 it says I'm done and disconnects 339 00:17:40,160 --> 00:17:42,360 and it then goes to sleep for a specific 340 00:17:42,440 --> 00:17:44,240 specified amount of time and then tries again. 341 00:17:45,980 --> 00:17:47,360 One of the commands is 342 00:17:48,060 --> 00:17:50,280 call this guy and the call 343 00:17:50,280 --> 00:17:52,120 this guy by default is TCP port 80 344 00:17:52,120 --> 00:17:54,260 and since the connection is being initiated outbound 345 00:17:54,260 --> 00:17:56,160 through the firewall, generally that's permitted too. 346 00:17:56,280 --> 00:17:58,120 Not a whole lot of people have proxy 347 00:17:58,780 --> 00:18:00,300 proxy servers behind there so they'll 348 00:18:00,300 --> 00:18:02,180 allow clients to go out on HTTP. 349 00:18:03,520 --> 00:18:03,960 So 350 00:18:03,960 --> 00:18:06,360 I have a deal set up where basically it connects 351 00:18:06,360 --> 00:18:07,920 out to the attacker on HTTP 352 00:18:08,380 --> 00:18:09,360 again, thank you Netcat 353 00:18:09,360 --> 00:18:11,980 and provides the 354 00:18:12,440 --> 00:18:13,820 connect E with 355 00:18:14,220 --> 00:18:15,680 bash shell. So if 356 00:18:15,680 --> 00:18:17,880 something wasn't there in my 357 00:18:17,880 --> 00:18:19,460 command structure and you just want to get something done 358 00:18:20,160 --> 00:18:21,060 there you go. 359 00:18:21,820 --> 00:18:23,440 So we'll back up here a little bit. 360 00:18:23,660 --> 00:18:26,000 So now that you know what the client and server 361 00:18:26,000 --> 00:18:27,840 what I'm talking about here, this is the 362 00:18:28,600 --> 00:18:30,360 DNS-like beacon 363 00:18:30,360 --> 00:18:32,540 that goes out by default every 20 seconds 364 00:18:32,540 --> 00:18:33,860 but it's user settable. 365 00:18:35,300 --> 00:18:36,340 It's DES encrypted 366 00:18:36,820 --> 00:18:38,320 it has randomly generated 367 00:18:38,320 --> 00:18:40,200 keys for each session and there's also 368 00:18:40,200 --> 00:18:42,100 a pre-shared key system. Each side 369 00:18:42,440 --> 00:18:43,820 has a pre-shared string 370 00:18:44,280 --> 00:18:46,360 that they will do a MD5 hash of 371 00:18:46,360 --> 00:18:47,440 real quick and then use that 372 00:18:48,020 --> 00:18:50,280 along with another randomly 373 00:18:50,280 --> 00:18:52,380 generated string and put those 374 00:18:52,380 --> 00:18:54,260 both together as the actual crypto 375 00:18:54,260 --> 00:18:55,740 key. They only exchange 376 00:18:56,400 --> 00:18:58,340 the first part, the part that they randomly 377 00:18:58,340 --> 00:19:00,080 generate on the fly for that session. 378 00:19:00,380 --> 00:19:02,300 So each of them already knows about the 379 00:19:02,300 --> 00:19:03,680 pre-shared secret ahead of time so 380 00:19:04,320 --> 00:19:06,480 even if you see this in flight and you see 381 00:19:06,480 --> 00:19:07,820 keys going back and forth 382 00:19:07,820 --> 00:19:10,280 you still can't decrypt it because you don't know what the pre-shared is. 383 00:19:10,720 --> 00:19:11,460 That's kind of cool. 384 00:19:13,620 --> 00:19:14,680 So the client 385 00:19:14,680 --> 00:19:16,440 connects at intervals control to master control 386 00:19:16,440 --> 00:19:18,460 script to the server to check the command queue 387 00:19:18,460 --> 00:19:19,360 for change in configured behavior. 388 00:19:21,120 --> 00:19:22,400 Like I said, it goes out over UDP 389 00:19:22,400 --> 00:19:24,580 for configging and then 390 00:19:24,580 --> 00:19:26,000 a reverse shell on TCP aiding. 391 00:19:26,880 --> 00:19:28,580 Looking towards next year to add 392 00:19:29,280 --> 00:19:30,080 mail attachments 393 00:19:30,080 --> 00:19:32,020 to send out SMTP as well. 394 00:19:32,420 --> 00:19:34,400 That's a really good exploitation but I just didn't have 395 00:19:34,400 --> 00:19:35,200 enough time to finish it. 396 00:19:35,400 --> 00:19:37,540 So you saw this, it's pretty. 397 00:19:37,920 --> 00:19:40,380 So in the listing post, of course SSH 398 00:19:40,380 --> 00:19:42,000 so you can command to it. Just 399 00:19:42,440 --> 00:19:42,860 real quick. 400 00:19:44,340 --> 00:19:45,180 This is 401 00:19:45,180 --> 00:19:47,960 uh oh. It's not happy. 402 00:19:49,680 --> 00:19:50,600 Oh no. 403 00:19:52,440 --> 00:19:54,360 So there's what the encryption looks like 404 00:19:54,360 --> 00:19:54,800 by the way. 405 00:19:56,020 --> 00:19:57,160 Actually that's the key exchange. 406 00:19:58,580 --> 00:20:00,240 My listing post thinks it's 407 00:20:00,240 --> 00:20:01,660 trying to send data and it's 408 00:20:01,660 --> 00:20:04,340 the LP is trying to send its 409 00:20:04,340 --> 00:20:04,800 key instead. 410 00:20:05,180 --> 00:20:07,200 It should recover here in a little sec. 411 00:20:07,340 --> 00:20:08,520 But anyways, we're not ready for that yet. 412 00:20:09,360 --> 00:20:10,240 Oh yes we are. 413 00:20:12,720 --> 00:20:13,660 So okay. 414 00:20:14,080 --> 00:20:16,400 Why don't we switch over to 415 00:20:16,400 --> 00:20:17,480 the victim here. 416 00:20:19,260 --> 00:20:19,900 Okay. 417 00:20:19,980 --> 00:20:21,660 So what 418 00:20:22,440 --> 00:20:22,760 died? 419 00:20:24,140 --> 00:20:24,780 Okay. 420 00:20:27,000 --> 00:20:28,520 Expansion of technical difficulties. 421 00:20:28,560 --> 00:20:29,020 Please wait. 422 00:20:30,440 --> 00:20:31,220 Thank you. 423 00:20:32,280 --> 00:20:33,260 Okay so 424 00:20:34,220 --> 00:20:35,580 is something unplugged? 425 00:20:49,340 --> 00:20:49,620 What's the 426 00:20:51,100 --> 00:20:51,900 Just one moment please. 427 00:20:52,000 --> 00:20:52,260 Thank you. 428 00:20:52,280 --> 00:20:52,420 Sorry. 429 00:20:57,600 --> 00:20:57,880 . 430 00:20:57,880 --> 00:20:58,240 . 431 00:21:04,100 --> 00:21:04,380 . 432 00:21:04,380 --> 00:21:04,460 . 433 00:21:04,460 --> 00:21:04,560 . 434 00:21:04,560 --> 00:21:05,020 . 435 00:21:06,060 --> 00:21:06,100 . 436 00:21:19,280 --> 00:21:19,320 . 437 00:21:19,320 --> 00:21:19,340 . 438 00:21:19,340 --> 00:21:19,360 . 439 00:21:19,360 --> 00:21:19,380 . 440 00:21:19,380 --> 00:21:19,400 . 441 00:21:19,400 --> 00:21:19,420 . 442 00:21:19,940 --> 00:21:19,980 .