Today we're going to do a talk on the project that three of us worked on. We are with the Tri-Valley Security Group. That is a nonprofit security organization formed out of the Bay Area, just East Bay. We have Spider, who acquired the hardware for us. We had Mystic here, who basically kept us organized. And my name's Otto. I did the software development. The concept is we need a way to break into NATed networks. And the best way to do that is to put something inside there so we can own them from the inside out. So we wanted to place a stealthed hostile packet sniffer on a victim network. We wanted to make it blend in, hide in plain sight. Make it as a UPS. This guy right here is our second model UPS. You take a look at it. From all exterior purposes, it looks completely stock. We maintain the same connectivity and everything. The power switch works. It's sort of tough. Careful. They don't have any video, so use your eyes and zoom in. There you go. Thank you. We'll have it around afterwards if you want to take a look at it. We'll shut it down. You can play with it or something. Okay. So everyone, especially in California, with all the rolling blackouts we had and all the brownouts and shit. Sorry, stuff. Everyone had one of these on their desk because you're just like, oh, you're going up. And we'd have to shut down and stuff. So this, they have the nice land jacks on the back because, you know, lightning strikes. And you've got the integrated NICs on your laptops. Those things are money to replace. So you want to plug it in and plug it into your corporate network. And we own you. So let's see here. So we'll talk more about that. So like I said, today is a prototype. This is the Mark II. The Mark I was kind of ugly. And really this isn't undetectable. I'm sorry if you came here to see the newest Uberly thing. This is mostly undetectable. Depending on what mode you put it in, it could be very, very, very quiet. But it would have no IP and you'd have to dead drop it in and then go back later. And dead drop it out. If you actually want to exfiltrate data, obviously you have to make network noise. Someone might be listening. You never know. We're working on getting more hardware, more software to reduce the risk and increase onage. So we've been introducing. And we're going to talk about integration. I'm going to pass over to Mystic for integration. Spider here will talk about the hardware he gave. I'm doing integration. Oh, you're doing integration? Oh, okay. See how organized we are? Yeah. So I'll talk about the software. We'll do a little demo. And then we'll do a little Q&A. So if you're going to do one of these things yourself, do a little case mods. Those of you who do case mods, you know about this. Amps kill. They will hurt you very badly. And then you will die. So if you're going to open up stuff, work with live power, keep this in mind. Okay. All right. Okay. One of our biggest goals on this UPS unit was to make it look as stock as possible. I actually work for an embedded computer company in the Bay Area. So I had access to a lot of really cool equipment. But a lot of things that people don't understand about embedded computers is that they are easy to use. Embedded computers are basically an entire system that's been miniaturized into one system. My apologies. Okay. An embedded system is an entire computer that's been modified to fit into a very small space. The board that we're using in here currently houses a Pentium 166 with 128 megabytes of RAM and a... Sorry. What? Sorry, I don't know. Okay. And a one gigabyte hard drive. I mean, you're going to take it. You're going to attach any laptop hard drive in there so your storage capacity is unlimited. So really, one of the most important things when we're building this unit is to keep it looking out from the outside as stock as possible, while on the inside getting the maximum functionality and getting everything to run as smooth as possible. All right. There was four things we needed for this design. We needed, obviously, the UPS, the box itself. We basically stripped out the entire insides, the battery, everything that was in there, and replaced it with our stuff. So this isn't a functioning UPS. It really is just deployed. It just is hard to see, and no one really thinks to look inside a UPS for anything hostile. It's a Leak case mod. The power supply is just used for taking our AC voltage and converting it into DC. All computers run on DC. Embedded systems, especially, there's only a couple voltages that computers really run at. They're either running at 5 volt, 3.3 volt, or 12 volt. So as far as power supplies go, they're running at 5 volt, 3.3 volt, or 12 volt. So, I mean, eBay is a great place to pick up really cheap power supplies. If you're doing any work with electronics, computer equipment, having power supplies just handy at small, compact power supplies is really useful. Okay, the other thing you can do, if you don't have a lot of money, embedded systems, you can start looking at them for around $200. But a lot of the times, I know people want to get it even cheaper than that. HP has made a model of machines called the eMachines. I'm sure a lot of people are familiar with them. The eMachines are basically like a really tiny computer that HP made, and the really nice thing about them is if you look inside, they've got an integrated motherboard that has everything included in it. So you can go on eBay and pick up one of these eMachines for $30 and go and rip the motherboard out, and you've got basically an embedded computer for $30. You want to go back one? Sorry. Back. Oh, there's some pictures of our first prototype. As you can see, it's a lot bigger and it was harder to mod, but really, the first prototype, we just wanted to make sure that this idea was going to work. Auto actually was responsible for the design of the second unit here. The board that we've picked to use comes from Contron. If you want to get into embedded computers, I'd recommend just visiting some of the sites. We've got some links on the CD. We picked this. It's a Pentium 166. It's got 128 meg of RAM in it. We've got two IDE channels, so we can hook up to four devices. We can have CD-ROMs. We can have extra hard drives. Really. When you're dealing with embedded systems, you are dealing with a PC. There's no reason to think outside of PC terms. It's really just the form factor and the way that it's being connected together. A really good example of this is embedded computer people will know a term called PC-104. PC-104 is basically an ISOBUS, but we've carried it out into an embedded form factor. As far as it's concerned, the timing, everything's identical to it. The chipsets, you're using chips and technology, 69,000s, you're using all-in-ones. Everything's the same. It's just that you're changing the form factor. You're changing the size of the unit to fit into an application. Our embedded system had only one ethernet. That was mainly because I got the system for free and we didn't want to spend any money on it. Just because we wanted to keep it simple, we just ripped a 10100 hub and placed it inside here, which just allowed traffic to go through it. I made this slide, so it's kind of important. All right. One of the problems with putting a hub in there instead of bridging through, well, it's good because even if the UPS, the embedded machine is still booting and it's not being told to bridge, your victim will still get through and you won't impede his traffic. But the bad thing is you can't do proxy ARP attacks. That'd be really cool, where instead of the client going out on his MAC address, if you can bridge it through your box and then everything goes on your MAC address, you can effectively take over his IP. That was a mode that was really cool. It was a mode that I wanted to work on for the con but didn't get it in time because we couldn't do a bridge through the embedded machine. So if we could have done that, it would have been almost impossible to tell the victim traffic from our traffic because it would have been exactly the same MAC address. So maybe next year. The ugly part is that you get link from a UPS, you're not supposed to do that. . It's a dumb hub. It's a dumb hub. I think the bridge run, the box this runs in primiscus mode, yes, the embedded machine itself has a variety of different processes running on it that all make the interface go in primiscus mode. I'll talk about those in just a quick sec. Okay, I'll transition to software now. I use Red Hat 7.2. I know people don't like Red Hat but sorry, I know it. It works. 7.2 was the first one that had the EXT file system, the EXT3 file system, the journaling. So I can yank out the power supply and it just dies. And it doesn't really hurt the hard drive too much, which is kind of cool. I used a lot of Perl scripts and shell scripts, and then added a lot of neat, fun tools. I used Netcat by Hobbit. That's like standard issue these days. The core of the unit as far as actually acquiring victim traffic is Dsniff by Doug Song. It's a really cool tool. I recommend you check it out. Of course, we use Nmap by Fyodor. And at the last minute, I threw in the hacker's choice, the tchru there for network discovery. It works great. Okay, so, many thanks to Hobbit. This is used basically for the plumbing. I wrote the scripts. I wrote them without any network code in them, just to make it easier, and I basically just Netcat everything. It's cool. By default, I use it over UDP53, which to a normal firewall would look exactly like a DNS request, so it would let it through. The problem with DNS requests is it's not really DNS. It's encrypted, but it doesn't look like a DNS request. So an IDS or an IDP system would notice this. This is not DNS traffic. It doesn't even look like it. If you sniff this traffic and then you use Israel to read it, it'll freak out. It'll go 10,000 requests, 5,000 replies, and it's one packet. Freaky. So tunneling alternatives. I could be more elite and then do, you know, port 80 TCP and actually mask the UPS requests and HTTP URLs and have the replies be webpages. At the last minute, I also found some really cool Perl scripts out there on the web that do exactly this, but I didn't have a chance to integrate them. Another alternative, I really do like DNS. Even though it's UDP and you can lose packets, that's a real issue. No one uses internal DNS. They always allow it out. It's pathetic. But it would be really cool if I could make it look more like a DNS request, a DNS replies. That's next year. So back on the DSNF now. This is an incredibly cool, and it's actually kind of old. It's been out for a couple years now, so if you haven't heard about it, go and find it. It might not, you might need to do a little tweaking to the Berkeley path because they're expecting an older version of the Berkeley, so we were set. Here's the tools that we use from DSNF, actually, on the box. Use MacOff. MacOff was actually, in the DSNF suite, the MacOff was actually the port of the Perl script, these MacOff. It starts spamming out a whole bunch of packets with forged Mac addresses. This allows you to break open a typical switch. Switches have cam tables that keep track of every Mac address on a physical interface, and they only have so much buffer space to hold those. And if they overflow that, they go, I can't keep track of all these stupid Mac addresses, so I'm just going to put everything down this port. And that basically gives you access to the traffic transfer into the entire switch, which is kind of cool. So, yeah. So, yeah. DSNF, clear text authentication extractor, it decodes approximately 20 to 25 clear text protocols, POP3, Telnet, HTTP auth, SNMB, SQL, it's brutal. FileSnarf does NFS interceptor. If someone copies an NFS file across their box, it saves a copy of the file locally. Email interceptor is MailSnarf, and we've actually had a little test of that. We're going to show it a little later. I had already ran this earlier and snarfed off some emails, so I'll just show you how that looks. URL interceptor is URLSnarf, and InstantMessenger is MSMSnarf, so. And, of course, the hacker's tool kit, Nmap, thanks for that. You rock. This is so cool. It came with RPM, so we didn't have to do anything. We use it to detect network connectivity with the box to make sure it can actually call out. If it can't call home, it won't try to. And then I made a whole bunch of Perl scripts. First Perl script is the master control script. It starts on boot up and handles all the other processes that the UPS does as far as turning on cipher processes, turning off cipher processes, calling home, that kind of a thing. So this is what it does. When it boots up, it loads the config. I don't use the Red Hat network configuration scripts. I've just used everything myself. That way, it has a unified interface for the different modes. That way, it has a unified interface for the different modes. I use it for IP addresses, which I'll talk about in a second. So it configs the network, makes sure everything's good, and then tries to call home. And from there, it does an endless loop, calls the home, works on what it gets, sets what it does, calls home every number of seconds. The IP, we have four different modes. Mode number one is what I talked about earlier when I said that it's almost undetectable. That's no IP, where it won't respond to anything. It just sits there and just sniffs. Now, this, you have to be able to sneak in, put the box in place, hope it comes up okay, and start sniffing. You have to turn on all the sniffing you want ahead of time and hope that your hard drive doesn't go full and just come back later and get it. That's really stealthy, but it's not really fun. You have to go in twice. Fixed IP mode is really good for testing. It's, you know, here's your IP, blah. DHCP mode, it's not very stealthy, though, because if you're on a network that either doesn't have a DHCP server, or they don't have a lot of nodes, maybe they have registered MAC addresses for all their DHCP nodes, and you start asking for an IP address, they're going to go, who's this? That's not very cool. Mode four was the most elite mode, but it's also extremely noisy at layer two. It actually will, well, here, let's do this. It watches the network for ARP requests. At first, it starts listening for ARP requests and it listens to the requester. Obviously, if I hear an ARP request from someone in my wire, that means that they're on my local layer two subnet. Takes that IP as a seed, turns around and uses the hackers choice, Are You There?, and basically for that you can generate ARP requests for anything you want. So I use it as a seed. I do a class B. That's typical. I mean, most networks should be less than a class B. And it doesn't take that much longer to do a class B than a class C in this way. You'll get Super Nets this way. The hackers choice. THC rut, it can do 3,000 ARPs in parallel, so this doesn't take that long, maybe 5-10 seconds for a whole class B. It's brutal. So it'll sit there and it'll scan the whole it'll do ARPs for every single IP in a class B segment that it detects from the top part and then it'll see if everything's there. It finds a IP that's not in use, it's in the range and just picks it. So that's kind of fun. Another thing I didn't write in here, the next thing it does is, then it turns around and it listens again for more ARPs, but now it listens for who they're asking for. It counts about 20 or 30 packets it's asking, it's listening for who is everyone trying to find. 9 times out of 10, the most popular ARP target on a network is the default gateway. So we do a little statistical analysis there and say the top one we'll pick him as our default gateway. If it doesn't work, the whole thing has a check here at the end where it'll try to go out, try to go out tries to contact the listing post even. If it fails it comes back here and starts again. So, another cool thing about mode 3, the DHCP mode if you do set it for mode 3 and there is no DHCP server, there is no spoon it'll keep the fact that it's in mode 3 but fail down to mode 4 to try to get out. So, it'll always try DHCP but if it can't get out, it'll try mode 4 as well which is kind of fun. And there's other neat stuff, little cleaning scripts that kind of stuff. The actual let me skip ahead just real quick and show you the concept here. So you have a UPS behind a firewall and you have an attacker out there anywhere on the internet. You also have a listing post which can be the same as the attacker or not, it doesn't really matter but you can allow it to point to different directions. The UPS will at intervals try to contact the listing post. The listing post is actually a command queue server. It will has a stack, it can actually support multiple nodes and when a UPS calls home it will then identify itself by its node. The listing post will say do I have any commands for this node? And if it goes yes then it feeds the commands one at a time and each time the listing post asks for the next command it comes back down. When it's done it says I'm done and disconnects and it then goes to sleep for a specific specified amount of time and then tries again. One of the commands is call this guy and the call this guy by default is TCP port 80 and since the connection is being initiated outbound through the firewall, generally that's permitted too. Not a whole lot of people have proxy proxy servers behind there so they'll allow clients to go out on HTTP. So I have a deal set up where basically it connects out to the attacker on HTTP again, thank you Netcat and provides the connect E with bash shell. So if something wasn't there in my command structure and you just want to get something done there you go. So we'll back up here a little bit. So now that you know what the client and server what I'm talking about here, this is the DNS-like beacon that goes out by default every 20 seconds but it's user settable. It's DES encrypted it has randomly generated keys for each session and there's also a pre-shared key system. Each side has a pre-shared string that they will do a MD5 hash of real quick and then use that along with another randomly generated string and put those both together as the actual crypto key. They only exchange the first part, the part that they randomly generate on the fly for that session. So each of them already knows about the pre-shared secret ahead of time so even if you see this in flight and you see keys going back and forth you still can't decrypt it because you don't know what the pre-shared is. That's kind of cool. So the client connects at intervals control to master control script to the server to check the command queue for change in configured behavior. Like I said, it goes out over UDP for configging and then a reverse shell on TCP aiding. Looking towards next year to add mail attachments to send out SMTP as well. That's a really good exploitation but I just didn't have enough time to finish it. So you saw this, it's pretty. So in the listing post, of course SSH so you can command to it. Just real quick. This is uh oh. It's not happy. Oh no. So there's what the encryption looks like by the way. Actually that's the key exchange. My listing post thinks it's trying to send data and it's the LP is trying to send its key instead. It should recover here in a little sec. But anyways, we're not ready for that yet. Oh yes we are. So okay. Why don't we switch over to the victim here. Okay. So what died? Okay. Expansion of technical difficulties. Please wait. Thank you. Okay so is something unplugged? What's the Just one moment please. Thank you. Sorry. . . . . . . . . . . . . . .