1 00:00:00,000 --> 00:00:04,060 So I'm Dennis Grime here today to talk about resilient botnet command and control with 2 00:00:04,060 --> 00:00:08,800 Tor. I came up with this title while working on the CFP at the very end of the deadline 3 00:00:08,800 --> 00:00:14,200 and yeah, it's probably a bit dry. So I decided I should probably rename this talk to something 4 00:00:14,200 --> 00:00:22,860 a little more fun. So here's the new title screen. I think it's the point across about 5 00:00:22,860 --> 00:00:35,100 Tor. I'll take that as a compliment for my wonderful Photoshop skills. So who am I? I'm 6 00:00:35,100 --> 00:00:39,680 Dennis Brown, like I said. I'm a security researcher for tenable network solutions, which if 7 00:00:39,680 --> 00:00:44,400 anybody asks me if they've been asking all week, I'll just say I write Nessus plug-ins. It 8 00:00:44,400 --> 00:00:50,180 doesn't really matter what I do. I spoke a few times at Torcon. I spoke yesterday here at 9 00:00:50,180 --> 00:00:52,840 DEF CON about something about as far from this as I can remember. And I'm going to talk a 10 00:00:52,860 --> 00:00:55,880 little bit about this topic as you can get. So this is a nice change if you can follow me 11 00:00:55,880 --> 00:01:01,860 around. Thanks for being a groupie. I'm also part of a Rhode Island DEF CON group, DC401. 12 00:01:02,300 --> 00:01:11,720 Anyone here from Rhode Island? Yes. That's all of us. So that's what I am. What I'm not in 13 00:01:11,720 --> 00:01:15,080 the disclaimer there is I'm not affiliated with the Tor project at all. I want to make that 14 00:01:15,080 --> 00:01:20,680 clear up front. I have nothing really to do with them at all. In fact, I really want to say 15 00:01:20,680 --> 00:01:22,840 that I love Tor a lot. I'm not a fan of Tor. I'm not a fan of Tor. I'm not a fan of Tor. I'm 16 00:01:22,840 --> 00:01:25,400 not a fan of Tor. People might be thinking, oh, we shouldn't be doing bad things with it. I 17 00:01:25,400 --> 00:01:29,300 agree. It's a really great tool. Most of the people that use it really aren't using it for bad 18 00:01:29,300 --> 00:01:34,100 purposes either. I don't know if any of you follow the stuff going on, like people trying to 19 00:01:34,100 --> 00:01:40,020 get websites from China, Chinese trying to block Tor access and stuff like that. I know last 20 00:01:40,020 --> 00:01:43,860 year when I was following the election going on in Iran, it was wonderful seeing people using 21 00:01:43,860 --> 00:01:48,100 Tor and other proxies to get the word out and get all kinds of information that's going on in 22 00:01:48,100 --> 00:01:52,820 the western world at least. So I really do love Tor. I don't want people to really think that I'm 23 00:01:52,820 --> 00:01:58,560 just trying to use it for my own evil purposes. Because I'm really not. I'm trying to make us 24 00:01:58,560 --> 00:02:04,540 aware that we're not doing it for evil. But just like any good tool, it can be abused. Just like 25 00:02:04,540 --> 00:02:09,520 anything else, anonymity is great for us. It's great for people who need it, for people who are 26 00:02:09,520 --> 00:02:17,820 oppressed. But it's also good for people who want to do bad things. So it's how it is. So here's a 27 00:02:17,820 --> 00:02:21,700 little overview of what we'll be talking about today, or I'll be talking about today. We're 28 00:02:21,700 --> 00:02:22,800 focusing on botnet. We're going to talk a little bit more about what we're going to talk about 29 00:02:22,820 --> 00:02:25,300 today. We're going to talk about command and control, specifically command and control, but a 30 00:02:25,300 --> 00:02:28,500 few other factors around it as well because there's a lot of interesting things we can do with 31 00:02:28,500 --> 00:02:34,100 this. I'll be doing a few case studies or a case study using Zeus or Zbot or whatever you may 32 00:02:34,100 --> 00:02:39,320 know it as. And talk about a few theoretical models inspired by some of the other big bots and 33 00:02:39,320 --> 00:02:43,840 worms and whatnot that we've seen over the last few years. I'm going to talk about a few 34 00:02:43,840 --> 00:02:47,540 techniques, too, to use Tor to anonymize your servers. Because that's really what this is all 35 00:02:47,540 --> 00:02:52,740 about. How many people here are actually familiar with hidden services with Tor? It's a 36 00:02:52,820 --> 00:02:56,220 lot of fun. That's what I expected, actually. It seems to be one of those features that just 37 00:02:56,720 --> 00:03:00,640 more people really need to know about. So you should learn about it. You'll learn all about it 38 00:03:00,640 --> 00:03:05,220 here. And the goal of this is actually to keep your servers up and keep your botnets alive. 39 00:03:05,340 --> 00:03:10,240 Because I'm sure we're all terrible people and have botnets and whatnot. So we're going to talk 40 00:03:10,240 --> 00:03:13,820 about the ways this is good, the ways this is bad, strengths, weaknesses, all stuff like that. 41 00:03:15,420 --> 00:03:18,880 So you may be asking yourself, well, why is this important to talk about? It sounds like it's 42 00:03:18,880 --> 00:03:22,800 just something terrible people shouldn't be doing or it's awesome and I'm going to go home and 43 00:03:22,820 --> 00:03:28,580 do it myself. There's been a lot of discussion over the years in various forms in the research 44 00:03:28,580 --> 00:03:33,160 community about people being a little worried that some malware might actually be using Tor. I 45 00:03:33,160 --> 00:03:36,460 know there's been several discussions I've been a part of that people are like, wow, if it 46 00:03:36,460 --> 00:03:40,600 really did that, this could be terrible. We would never be able to detect the traffic. I don't 47 00:03:40,600 --> 00:03:44,180 know if anything like this actually exists. If anyone does, I'd love to hear about it. I don't 48 00:03:44,180 --> 00:03:47,220 know how much research has been done either. I looked around and I didn't see much. So I'm 49 00:03:47,220 --> 00:03:50,680 hoping to shine a light on it here. There's a lot more work to be done in this space than I'm 50 00:03:50,680 --> 00:03:52,800 presenting today. And it's really just a lot of work to be done in this space. So I'm going to 51 00:03:52,820 --> 00:03:57,360 just rave for the picking in my opinion. And what's great or terrible about it is there's a big 52 00:03:57,360 --> 00:04:03,900 potential for this devastating impact on networks and computers as we see them today. The 53 00:04:03,900 --> 00:04:07,360 technology for this is Tor. It's free to download. Anybody can get it. Anybody can implement 54 00:04:07,360 --> 00:04:11,720 it however they want. It's very easy. I mean, I'm sure we've all used it at one point or another 55 00:04:11,720 --> 00:04:17,220 and know how easy it is to use Tor. And it's really minimal effort and you get great 56 00:04:17,220 --> 00:04:21,780 anonymity with it. As great as Tor is and I know there's a lot of people who use Tor for all 57 00:04:21,780 --> 00:04:22,800 sorts of purposes every day. But it's anything you can do, you can do anything. If you want to 58 00:04:22,800 --> 00:04:25,120 and I've never heard of anyone actually having a problem with 59 00:04:25,120 --> 00:04:28,460 it unless they did something wrong themselves. And we're 60 00:04:28,460 --> 00:04:30,880 going to talk a bit about some safeguards that can be taken to 61 00:04:30,880 --> 00:04:33,460 detect this activity. And these have varying levels of 62 00:04:33,460 --> 00:04:35,760 complexity depending on the techniques you use, the 63 00:04:35,760 --> 00:04:39,260 approach you take and how you actually implement it all from 64 00:04:39,260 --> 00:04:44,340 end to end. So let's get on with some fun stuff here. Thank you 65 00:04:44,340 --> 00:04:48,440 Spider-Man. So I don't know about anybody here actually 66 00:04:48,440 --> 00:04:53,640 have a botnet, anybody? Yes, thank you over there. If there's 67 00:04:53,640 --> 00:04:59,340 any feds, I'll go over it that way. So I'm sure we all have 68 00:04:59,340 --> 00:05:02,440 though, for real. But it sucks when your botnet gets taken down, 69 00:05:02,580 --> 00:05:04,600 right? Isn't that the worst thing that can happen, really? 70 00:05:05,420 --> 00:05:08,200 You spend so much, it really comes down to time and money 71 00:05:08,200 --> 00:05:10,660 that you put into it to get it together and actually make it 72 00:05:10,660 --> 00:05:13,980 real and be able to make some money off of it. As far as 73 00:05:13,980 --> 00:05:15,920 spending time on it, you have to spend a lot of time planning 74 00:05:15,920 --> 00:05:17,940 this. This isn't something you just spin up overnight and you 75 00:05:17,940 --> 00:05:18,340 want to have. 76 00:05:19,140 --> 00:05:21,460 I'm just going to drop my malware in a bunch of boxes and 77 00:05:21,460 --> 00:05:23,640 collect data. You have to spend a lot of time planning it, 78 00:05:23,680 --> 00:05:25,640 figuring out who you need to talk to for what services you 79 00:05:25,640 --> 00:05:27,920 need, how you're going to implement it all and how you're 80 00:05:27,920 --> 00:05:30,620 not going to get caught. Setting up the servers themselves 81 00:05:30,620 --> 00:05:33,820 can take quite a bit of time. If you're buying some hosting from 82 00:05:33,820 --> 00:05:37,180 a bulletproof provider somewhere in Eastern Europe, you'll have 83 00:05:37,180 --> 00:05:38,960 to talk with them. If you don't speak the language, that's 84 00:05:38,960 --> 00:05:41,360 another hurdle you have to get over and try to figure out how 85 00:05:41,360 --> 00:05:43,220 you're going to get the services from them and how you're 86 00:05:43,220 --> 00:05:45,860 going to get what you need on the servers they give you. If 87 00:05:45,860 --> 00:05:47,800 you're doing another method, say you're compromising boxes 88 00:05:47,800 --> 00:05:51,720 after scanning for SSH passwords, you're going to have to 89 00:05:51,720 --> 00:05:53,940 figure out how you set it up and not get caught that way, too, so 90 00:05:53,940 --> 00:05:57,920 that's another method you could take to actually have a server 91 00:05:57,920 --> 00:06:01,400 to put your botnet on. Building the bot itself can be a whole 92 00:06:01,400 --> 00:06:04,980 lot of time. If you're coding it from scratch, that could take 93 00:06:05,820 --> 00:06:09,280 weeks, months, years to do it just right. If you're buying it, 94 00:06:09,380 --> 00:06:11,260 well, you're still going to have to figure out how to use it and 95 00:06:11,260 --> 00:06:13,260 how to deploy it. That's not the easiest thing in the world. 96 00:06:13,380 --> 00:06:15,380 We'll see one that you can actually just buy in a little 97 00:06:15,380 --> 00:06:17,780 bit here. Then there's other things, like, quote, unquote, 98 00:06:17,800 --> 00:06:20,280 encrypting it so AVs don't pick it up, so you have a different 99 00:06:20,280 --> 00:06:22,900 binary every day so you can evade all kinds of detection, 100 00:06:23,260 --> 00:06:25,840 binding it, whatever else you want to do with it to make it 101 00:06:25,840 --> 00:06:28,000 undetectable or load other malware on it, like fake 102 00:06:28,000 --> 00:06:31,180 antivirus to make some good scratch that way. And then 103 00:06:31,180 --> 00:06:37,540 spreading. Spreading through BitTorrent is a great way to get 104 00:06:37,540 --> 00:06:39,900 your malware out there initially if you make some cool 105 00:06:39,900 --> 00:06:43,320 hack for whatever, for modern morpher or whatever, I don't 106 00:06:43,320 --> 00:06:46,980 know. Or then that's one approach you can take. That 107 00:06:46,980 --> 00:06:47,780 takes a while for it to see if you're going to be able to do 108 00:06:47,800 --> 00:06:50,920 it. So it's a big-time investment there. Or if you go, 109 00:06:50,980 --> 00:06:53,320 say, you want to do a drive-by-download attack, you go 110 00:06:53,320 --> 00:06:56,380 do some SQL injection against some server, see what sticks and 111 00:06:56,380 --> 00:06:58,780 doesn't, well, it takes time for that to happen, time for it to 112 00:06:58,780 --> 00:07:01,560 get queued up in a search engine, and ultimately that's a 113 00:07:01,560 --> 00:07:03,400 lot of time you're waiting for it to actually impact to the 114 00:07:03,400 --> 00:07:05,480 point where you have a botnet of any kind of size that's of 115 00:07:05,480 --> 00:07:08,860 interest. If you're doing spear phishing or any kind of spam 116 00:07:08,860 --> 00:07:10,740 campaign to spread it, too, that's more time you're 117 00:07:10,740 --> 00:07:12,660 spending. And if you're not spending time, you're spending 118 00:07:12,660 --> 00:07:14,900 money. All these things are services you can buy. Like 119 00:07:14,900 --> 00:07:17,780 buying spam services, buying drive-by-downloaders, buying 120 00:07:17,780 --> 00:07:20,640 drive-by-download services, just saying, hey, I have some 121 00:07:20,640 --> 00:07:22,860 malware here, I'd like to get it distributed to 10,000 hosts. 122 00:07:22,940 --> 00:07:25,440 Okay, well, pay me however much money that costs these days and 123 00:07:25,900 --> 00:07:28,080 I'll get it out there for you. Next thing you know, some guy, 124 00:07:28,240 --> 00:07:30,740 some sketchy guy has it done for you and you have a little 125 00:07:30,740 --> 00:07:34,360 botnet of your own. So each one of these things here, it's a lot 126 00:07:34,360 --> 00:07:36,300 of money. And you don't want to lose that monetary investment, 127 00:07:36,420 --> 00:07:38,440 even worse than losing the time investment in a lot of ways, 128 00:07:38,500 --> 00:07:41,840 because then that's just a waste of everybody's time. And when 129 00:07:41,840 --> 00:07:43,920 you don't have a botnet at all, if it's actually gotten taken 130 00:07:43,920 --> 00:07:47,760 down, well, then you've just lost all your income. It's 131 00:07:47,780 --> 00:07:50,260 not good. If you're using that to do spamming, sell spamming 132 00:07:50,260 --> 00:07:53,420 services, lease it out to other people who want to do these kind 133 00:07:53,420 --> 00:07:55,440 of activities, well, then if you're shut down, then you're 134 00:07:55,440 --> 00:07:58,300 not making money and that's no good at all. Although it 135 00:07:58,300 --> 00:08:00,220 actually is really good if you're on the defensive side, 136 00:08:00,340 --> 00:08:04,180 which is what I actually am. So how do they get taken down? 137 00:08:05,420 --> 00:08:09,200 There's a variety of ways. If you have a VGPD pairing, it seems 138 00:08:09,200 --> 00:08:11,600 to be the best way to get taken down. That's the ones that seem 139 00:08:11,600 --> 00:08:15,120 to be the most effective and more or less. Some of the big 140 00:08:15,120 --> 00:08:17,760 examples, McCullough in 2008 was taken down by a bunch of 141 00:08:17,780 --> 00:08:21,920 people. They were really big in spamming. Actually, there was a 142 00:08:22,460 --> 00:08:24,960 short period where there was a big decrease in spam after 143 00:08:24,960 --> 00:08:27,160 McCullough was taken down while everybody was rushing to find 144 00:08:27,160 --> 00:08:29,580 new places to host their spamming. And they were also 145 00:08:29,580 --> 00:08:34,520 the host for the main command and control server for the AS 146 00:08:34,520 --> 00:08:38,900 Prox botnet, which once that was taken down, that botnet never 147 00:08:38,900 --> 00:08:41,640 really recovered quite the same. They tried to come back a few 148 00:08:41,640 --> 00:08:45,900 times. But not like the good old days of 2008. And then 149 00:08:45,900 --> 00:08:47,760 TRIAC was a big one this year. TRIAC was a big one this year. 150 00:08:47,780 --> 00:08:50,420 These guys were interesting because they kept going down and 151 00:08:50,420 --> 00:08:53,560 coming back up and having this cat and mouse game between people 152 00:08:53,560 --> 00:08:56,540 trying to take them down and new hosting upstream providers that 153 00:08:56,540 --> 00:08:59,300 just said, yeah, come on, we'll host your stuff. We don't really 154 00:08:59,300 --> 00:09:02,200 know what you have. They were hosting a whole lot of Zeus 155 00:09:03,060 --> 00:09:05,820 command and control servers. I think it was something like, I 156 00:09:05,820 --> 00:09:08,220 forget the exact number. It was somewhere in the hundreds, I 157 00:09:08,220 --> 00:09:11,360 think, which is a pretty big distribution of Zeus command and 158 00:09:11,360 --> 00:09:14,760 control servers. So that was interesting to see how that went 159 00:09:14,760 --> 00:09:17,760 off. Another way, too, if you're just using some host, you 160 00:09:17,780 --> 00:09:20,480 know, a PHP prompt or something, or if you're using some free web 161 00:09:20,480 --> 00:09:24,720 hosting, I know like almost all the HTTP botnets just use a PHP 162 00:09:24,720 --> 00:09:27,900 MySQL interface, their command and control. There's a lot of 163 00:09:27,900 --> 00:09:32,060 free web hosting now, like 110MB.com comes to mind, where 164 00:09:32,060 --> 00:09:34,760 they actually provide you PHP and MySQL. And a lot of people 165 00:09:34,760 --> 00:09:37,440 recommend just, hey, hop on there, get it set up, get it 166 00:09:37,440 --> 00:09:39,260 started, and then if you have something good, make some money 167 00:09:39,260 --> 00:09:41,200 and buy some real hosting somewhere along the lines. You 168 00:09:41,200 --> 00:09:42,840 see a lot of people actually starting out with that stuff. 169 00:09:43,100 --> 00:09:46,000 And every so often, the people who are either running the 170 00:09:46,000 --> 00:09:47,760 servers that you may have gotten into or running the 171 00:09:47,780 --> 00:09:51,580 free hosting providers will clean up sometimes, hopefully. 172 00:09:52,320 --> 00:09:55,160 And you may just lose your botnet that way if that's your only 173 00:09:55,160 --> 00:09:57,740 place you're hosting it at. It's good to have redundant sites like 174 00:09:57,740 --> 00:10:00,780 you would with anything, and these guys know that, too. Having 175 00:10:00,780 --> 00:10:04,560 DNS revoked is another great way to take it down. I'm sure we've 176 00:10:04,560 --> 00:10:07,360 all read about Microsoft earlier this year pretty much neutering 177 00:10:07,360 --> 00:10:12,060 the Walladeck spam botnet where they had to get a court order to 178 00:10:12,060 --> 00:10:15,480 remove, I think it was 277 domains that was being used with 179 00:10:15,480 --> 00:10:17,760 it. And then since it got down, I don't know if it's 180 00:10:17,780 --> 00:10:20,240 come back or not, but that was a great win for them to really 181 00:10:20,240 --> 00:10:23,780 stop that one right in its tracks. So that can be kind of 182 00:10:23,780 --> 00:10:25,940 hard to do, though, depending on how the registrar wants to work 183 00:10:25,940 --> 00:10:28,800 with you. If they're not too friendly, if they're not good 184 00:10:28,800 --> 00:10:30,840 to work with, then that might be almost impossible to get them 185 00:10:30,840 --> 00:10:32,460 taken down, especially if they're the ones focusing on 186 00:10:32,460 --> 00:10:35,580 providing services to people doing this kind of stuff. And 187 00:10:35,580 --> 00:10:38,540 also, that also would include things like no IP and other 188 00:10:38,540 --> 00:10:41,700 dynamic DNS hosters. Those guys can be good to work with, too, 189 00:10:41,780 --> 00:10:44,400 because they can just go and remove the entries they have. So 190 00:10:44,400 --> 00:10:46,800 if you have that mess, if you come across a botnet using them, 191 00:10:46,820 --> 00:10:47,760 I encourage you to go and get that done. So that's kind of 192 00:10:47,780 --> 00:10:49,560 what I would do. Talk to the people providing the DNS there 193 00:10:49,560 --> 00:10:53,200 and get it removed. There's always a case some jerk goes and 194 00:10:53,200 --> 00:10:57,120 takes it over. That happens. It gets taken down that way. It's 195 00:10:57,120 --> 00:11:00,560 valid. And then there's other cases where the IP of your 196 00:11:00,560 --> 00:11:02,420 command and control server just gets banned or blocked or 197 00:11:02,420 --> 00:11:07,360 something like that. I see this also would include things like 198 00:11:07,360 --> 00:11:10,220 if your ISP shuts down your cable modem and you might think 199 00:11:10,220 --> 00:11:12,080 to yourself, well, that's awfully stupid. Why don't you 200 00:11:12,080 --> 00:11:15,620 host your botnet on your cable modem at home or your Fios 201 00:11:15,620 --> 00:11:17,760 router or something. And then, you know, if you have a lot of 202 00:11:17,760 --> 00:11:22,060 people that do that, anybody go to this site, hack forums on any 203 00:11:22,060 --> 00:11:25,860 frequent basis, anybody like this site, I hope not. That is a pile 204 00:11:25,860 --> 00:11:29,260 of shit, that place. Absolutely disgusting. They post up 205 00:11:29,260 --> 00:11:32,440 interesting things once in a while. Earlier this year there 206 00:11:32,440 --> 00:11:36,520 was someone who posted the Twitter botnet command and 207 00:11:36,520 --> 00:11:40,000 control thing on there that made a lot of press. Bloggers posted 208 00:11:40,000 --> 00:11:43,820 about it. And it was terrible. And that's really the best thing 209 00:11:43,820 --> 00:11:46,660 you get from here. And I love this one page right here. I have 210 00:11:46,660 --> 00:11:47,740 an excerpt of. I'm going to show you this. I'm going to show you 211 00:11:47,760 --> 00:11:49,320 this. Visit the URL at the bottom for a good laugh, 212 00:11:49,440 --> 00:11:53,060 actually. This is instructions on how to set up the Medias Delphi 213 00:11:53,060 --> 00:11:58,200 DDoS client, which is pretty much what it sounds like. It's a 214 00:11:58,200 --> 00:12:00,980 DDoS botnet tool that you can just go make your botnet with. 215 00:12:01,320 --> 00:12:04,580 And part of the tutorial here says this is going to be based 216 00:12:04,580 --> 00:12:08,840 off of a Linksys router. So if you don't have a Linksys, go to 217 00:12:08,840 --> 00:12:12,680 portforward.com and look for your router. So clearly these 218 00:12:12,680 --> 00:12:14,880 are people who are underskilled, but if they actually follow this 219 00:12:14,880 --> 00:12:17,320 and no one pays attention, then they can do some good damage. 220 00:12:17,760 --> 00:12:20,460 But hopefully they don't catch on to better ways to do that. So 221 00:12:20,460 --> 00:12:23,600 these guys are terrible. So this is what I think about people 222 00:12:23,600 --> 00:12:27,900 actually hosting off using that site and everything. Absolute 223 00:12:27,900 --> 00:12:35,400 failure. I said my pen isn't a goat. That's not too funny, 224 00:12:35,480 --> 00:12:40,780 right? So we have all these ways I can get taken down. That's no 225 00:12:40,780 --> 00:12:43,020 good. What can we do about this? Well, let's see what we can do 226 00:12:43,020 --> 00:12:47,200 with Tor. So I mentioned hidden services earlier. I'm going to 227 00:12:47,760 --> 00:12:50,580 talk a little bit more here. So what is a hidden service? Well, 228 00:12:50,580 --> 00:12:54,460 they've been in Tor since 2004. And what they do is allow a user 229 00:12:54,460 --> 00:12:59,320 to run a server anonymously. When you do this through Tor, you get a 230 00:13:00,020 --> 00:13:03,440 domain with a .onion TLD. And the domain itself is just a 231 00:13:03,440 --> 00:13:06,960 randomly generated hash. There's more to it than that. But it's 232 00:13:06,960 --> 00:13:09,620 essentially a hash.onion is what you would see. And that would be 233 00:13:09,620 --> 00:13:12,360 the URL for your server. And these are only routable through 234 00:13:12,360 --> 00:13:15,460 Tor. So if you try to go to it directly without Tor, obviously 235 00:13:15,460 --> 00:13:17,740 it won't resolve. If you go through Tor and it's not going to 236 00:13:17,760 --> 00:13:21,660 use an HTTP proxy or some other ways, then you'll actually have it 237 00:13:21,660 --> 00:13:24,100 resolve. You'll be able to connect to the server just fine. 238 00:13:24,540 --> 00:13:27,340 Now, what's sweet about this is it works pretty much anywhere you 239 00:13:27,340 --> 00:13:30,580 can run Tor. So if you have a box that's natted behind something 240 00:13:30,580 --> 00:13:33,260 behind a firewall, somewhere where it just can't be accessed 241 00:13:33,260 --> 00:13:36,620 from the Internet directly, you can spin this up and actually get 242 00:13:36,620 --> 00:13:39,440 right through it because it goes directly through Tor. This means 243 00:13:39,440 --> 00:13:41,360 there's no need to expose anything to the network. If you 244 00:13:41,360 --> 00:13:44,760 have a web server on a box, you don't need to open any ports or 245 00:13:44,760 --> 00:13:47,720 anything or have any, even locally on the network, you can block it 246 00:13:47,760 --> 00:13:49,920 off completely. It doesn't care. It's home running just on the same 247 00:13:49,920 --> 00:13:52,760 system. And this is great because we can use this to our advantage 248 00:13:52,760 --> 00:13:56,540 to stay hidden. But there are a few catches with this. A lot of 249 00:13:56,540 --> 00:13:59,820 the web command and control panels are kind of poorly 250 00:13:59,820 --> 00:14:02,520 written. A lot of them are just PHP applications. And we all know 251 00:14:02,520 --> 00:14:08,040 there's not many problems with PHP. So there's a bit of research 252 00:14:08,040 --> 00:14:10,800 done a couple months ago. I actually don't have notes on who 253 00:14:10,800 --> 00:14:13,780 did it. But it was about ‑‑ they actually found several 254 00:14:13,780 --> 00:14:17,280 vulnerabilities in many of the web control panels for ‑‑ I think 255 00:14:17,280 --> 00:14:17,740 there were ‑‑ I don't know. I don't know if there's any 256 00:14:17,760 --> 00:14:19,720 problems with the web exploitation toolkits. I don't 257 00:14:19,720 --> 00:14:23,480 know if Eleanor was one of them, but things of that nature. So if 258 00:14:23,480 --> 00:14:26,240 you're hosting something like that on a hidden service here, be 259 00:14:26,240 --> 00:14:29,360 careful because you may expose your IP inadvertently or if 260 00:14:29,360 --> 00:14:32,220 somebody can drop like a C99 shell on there and then you're 261 00:14:32,220 --> 00:14:35,420 really screwed. One thing I like to do when I'm doing things 262 00:14:35,420 --> 00:14:39,020 about my hidden services is make sure my host box itself is behind 263 00:14:39,020 --> 00:14:41,920 a Tor transparent proxy. So if somebody does do something where 264 00:14:41,920 --> 00:14:44,940 they try to expose my IP, hopefully they're just going to 265 00:14:44,940 --> 00:14:46,760 get some Tor exit notes somewhere. But that's a whole 266 00:14:46,760 --> 00:14:47,340 other discussion. 267 00:14:47,760 --> 00:14:49,720 I encourage you to check that out, too, if this is interesting 268 00:14:49,720 --> 00:14:54,160 to you. So hidden services, I'm not going to do them justice for 269 00:14:54,160 --> 00:14:56,820 how I could explain them. The Tor guys have this stuff, have 270 00:14:57,460 --> 00:14:59,420 excellent, excellent documentation on hidden 271 00:14:59,420 --> 00:15:02,060 services. So I really encourage you to go to the Tor project 272 00:15:02,060 --> 00:15:04,940 website. The URL is up there, but it's really easy to find if 273 00:15:04,940 --> 00:15:06,880 you search for it. And check it out. They have great 274 00:15:06,880 --> 00:15:09,080 documentation both on how it actually works in implementation 275 00:15:09,600 --> 00:15:13,240 and how to configure it. I'll give my two or three line 276 00:15:13,240 --> 00:15:16,300 explanation of it, which probably is incorrect, but I 277 00:15:16,300 --> 00:15:17,740 would encourage you to read that instead and don't let me get 278 00:15:17,740 --> 00:15:20,620 into it. But essentially when you start a hidden service that 279 00:15:20,620 --> 00:15:23,820 advertises to the Tor network and uses a public key in order to 280 00:15:23,820 --> 00:15:26,480 communicate with relays, the first relay it communicates with 281 00:15:26,480 --> 00:15:28,600 will be this induction point to the network. Essentially what 282 00:15:28,600 --> 00:15:31,480 that means is if somebody wants to get to your box, they have to 283 00:15:31,480 --> 00:15:38,240 get to him ultimately to get to your hidden service. And if 284 00:15:38,240 --> 00:15:40,260 anybody connects to the Tor network, they're going to go 285 00:15:40,260 --> 00:15:42,720 through and say, hey, I'm looking for this .onion domain 286 00:15:42,720 --> 00:15:46,100 here. Ultimately someone will say, oh, just talk to this host 287 00:15:46,100 --> 00:15:47,720 here. This is where you want to go. So that's a really good 288 00:15:47,740 --> 00:15:51,080 explanation. But hopefully that gives you an idea of how this 289 00:15:51,080 --> 00:15:55,180 all kind of works. Not really kind of. So just to show you how 290 00:15:55,180 --> 00:15:59,280 simple this is to set up, I have a couple lines from the Tor RC 291 00:15:59,280 --> 00:16:02,400 sample they provide that shows you all it takes to set up a 292 00:16:02,400 --> 00:16:06,020 hidden service. There's two parts. There's a hidden service 293 00:16:06,020 --> 00:16:08,460 directory, which is important because that's where it gives 294 00:16:08,460 --> 00:16:13,280 you the actual host name for your new hidden service server. 295 00:16:13,840 --> 00:16:17,140 And the private key so people know to communicate with it, be 296 00:16:17,140 --> 00:16:17,720 able to trust it. So that's a really good explanation for how 297 00:16:17,740 --> 00:16:21,120 to trust it and be able to use it ultimately. And then the other 298 00:16:21,120 --> 00:16:25,760 line is the hidden service port. This is very simple. It's just 299 00:16:25,760 --> 00:16:29,240 like creating a firewall rule for many different firewalls out 300 00:16:29,240 --> 00:16:31,880 there. You provide the port you want to run on. In this case 301 00:16:31,880 --> 00:16:35,120 they're using 80. So I can pretty much assume it's a web 302 00:16:35,120 --> 00:16:38,260 server. And the web server itself on the system is running 303 00:16:38,260 --> 00:16:43,080 on local host port 5222. Once you just put those in your Tor RC 304 00:16:43,080 --> 00:16:46,300 file, restart Tor, and then everything will work just fine. 305 00:16:47,740 --> 00:16:49,920 There's one paper I want to mention called locating hidden 306 00:16:49,920 --> 00:16:54,020 services by, I'm going to butcher their names, Overlier and 307 00:16:55,000 --> 00:16:58,740 Syverson. I'm sorry. I butchered them. I really recommend 308 00:16:58,740 --> 00:17:02,520 checking out this paper. It's a very good paper that they did a 309 00:17:02,520 --> 00:17:06,500 few years ago regarding introducing malicious Tor nodes 310 00:17:06,500 --> 00:17:09,980 into the network to try to actually expose the hidden 311 00:17:10,700 --> 00:17:14,560 services or the servers running hidden services directly. It's a 312 00:17:14,560 --> 00:17:16,860 pretty long paper. I would actually encourage you checking 313 00:17:16,860 --> 00:17:17,720 it out if you plan on doing it. It's a pretty long paper. I would 314 00:17:17,720 --> 00:17:17,740 encourage you checking it out. It's a pretty long paper. I would 315 00:17:17,740 --> 00:17:19,420 encourage you checking it out if you plan on doing it. It's a 316 00:17:21,340 --> 00:17:22,200 pretty long paper. I would encourage you checking it out. It's 317 00:17:22,200 --> 00:17:23,600 It's a pretty long paper. It's a few years old, so I'm not sure 318 00:17:23,600 --> 00:17:26,800 if it's 100% accurate. I think it's still worth a look because 319 00:17:26,800 --> 00:17:29,920 it's probably not far from where we are today. If anyone knows 320 00:17:29,920 --> 00:17:33,420 me and wants to correct me, please do, because I don't 321 00:17:33,420 --> 00:17:37,820 have looked at that too much at all. So I'm going to change 322 00:17:37,820 --> 00:17:40,600 gears here for a little bit. Okay. 323 00:17:46,700 --> 00:17:47,700 So I love this series. The last thing you need to do is make a 324 00:17:47,720 --> 00:17:50,820 image because it pretty much sums up how I feel about when you 325 00:17:50,820 --> 00:17:53,480 combine Tor and Zeus. If you can't see it too well, that's a 326 00:17:54,220 --> 00:17:57,620 skyscraper sized Chuck Norris fighting an equally huge Mr. T 327 00:17:58,340 --> 00:18:01,520 with the caption of God never intended for these two to meet. 328 00:18:05,640 --> 00:18:08,140 So just to give you a little background in case you're not 329 00:18:08,140 --> 00:18:12,980 familiar with Zeus or ZBOT or WNS poem or whatever your AV 330 00:18:12,980 --> 00:18:17,100 company decides to call it, it truly is the number one 331 00:18:17,100 --> 00:18:20,700 crimeware tool kit in use today. Actually I'll go to my 332 00:18:20,700 --> 00:18:26,120 next slide early. Danchev made this great tweet the other day 333 00:18:26,120 --> 00:18:30,500 or last month actually saying that there's a monoculture in 334 00:18:30,500 --> 00:18:33,200 the cybercrime ecosystem thanks to Zeus and he's very much 335 00:18:33,200 --> 00:18:36,760 right. Everything you see is Zeus and if it's not Zeus it's 336 00:18:36,760 --> 00:18:39,600 probably just goo face or one of the other big ones and then a 337 00:18:39,600 --> 00:18:41,860 whole bunch of random stuff. If you look at the volume of Zeus 338 00:18:41,860 --> 00:18:45,220 out there it's just absolutely ridiculous. And the important 339 00:18:45,220 --> 00:18:47,080 part about it is it isn't a single crimeware tool kit that 340 00:18:47,080 --> 00:18:50,640 has a single botnet in itself. It's a tool kit that's used by 341 00:18:50,640 --> 00:18:53,720 many people whether they purchase it directly from the 342 00:18:53,720 --> 00:18:57,420 Zeus authors, whether they found a leaked or stolen version that 343 00:18:57,420 --> 00:19:00,280 they're using which is very popular. But everybody's setting 344 00:19:00,280 --> 00:19:02,520 up their own servers themselves, their own command and control 345 00:19:02,520 --> 00:19:04,980 servers and making their own bots on their own and 346 00:19:04,980 --> 00:19:09,500 distributing these however they see fit. So often times when I 347 00:19:09,500 --> 00:19:12,640 read about a new Zeus campaign, it's probably a whole new group 348 00:19:12,640 --> 00:19:15,980 doing it. It's really hard to attribute who's doing what with 349 00:19:15,980 --> 00:19:17,060 the different Zeus campaigns going on. It's really hard to 350 00:19:17,080 --> 00:19:17,240 do their own botnet so that we can figure out what's going on 351 00:19:17,660 --> 00:19:21,980 out there because there's so many of them. But I would say that 352 00:19:21,980 --> 00:19:24,160 outside of the few big ones we've heard of, like the never 353 00:19:24,160 --> 00:19:28,160 botnet earlier this year which is just one organization's Zeus 354 00:19:28,160 --> 00:19:30,860 campaign and some of the other big ones whose names I don't 355 00:19:30,860 --> 00:19:33,420 really recall right now, there's probably a lot more people doing 356 00:19:33,420 --> 00:19:36,980 it than it sounds like. So I would really pay attention to 357 00:19:36,980 --> 00:19:38,700 that when you're reading the news and be aware that there's 358 00:19:38,700 --> 00:19:43,240 more than just one botnet out there called Zeus. But what it 359 00:19:43,240 --> 00:19:46,800 is is it's primarily focused on stealing banking info. It can 360 00:19:47,080 --> 00:19:52,020 steal anything you want. Whenever I demo it I have it stealing a sock puppet hotmail account 361 00:19:52,020 --> 00:19:56,660 which works just fine. You can configure it to steal from any website. But pretty much 362 00:19:56,660 --> 00:20:02,180 everybody who uses it is trying to steal banking information. And it's really easy to configure. 363 00:20:02,460 --> 00:20:07,580 Anybody who is familiar with HTML really can customize it to do whatever they want. They 364 00:20:07,580 --> 00:20:12,800 have these things called web injects. What it does is intercepts the HTML being rendered. You 365 00:20:12,800 --> 00:20:18,960 can say I see the bank of America username and password. Throw in a field for the debit card 366 00:20:18,960 --> 00:20:23,620 number and the CVV so I can get that too so they can log in. And it really just takes that data. 367 00:20:23,740 --> 00:20:29,020 It looks seamless on the page and reports back to the user. They do a lot of updates to make 368 00:20:29,020 --> 00:20:34,500 sure this stuff keeps working and works well. And it really does. A lot of data is stolen 369 00:20:34,500 --> 00:20:41,420 through Zeus every day. So to get back to more of how we're going to be using this, here's a 370 00:20:41,420 --> 00:20:42,780 sample configuration file. This is a sample configuration file. This is a sample configuration 371 00:20:42,800 --> 00:20:48,940 file from a version of Zeus 1242. It's a little older now but it's still pretty relevant. 372 00:20:49,360 --> 00:20:54,920 There's four lines here that are of interest to us. They're the URL, config, loader and server. 373 00:20:55,760 --> 00:20:59,240 This is how you would normally set it up for a normal Zeus configuration with the default 374 00:20:59,240 --> 00:21:03,680 parameters. I'm using the domain of bad guy Walmart.com because that's where everybody goes 375 00:21:03,680 --> 00:21:09,440 to buy their malware and tool kits and whatnot. And then we have a couple things in there. The 376 00:21:09,440 --> 00:21:12,780 config.bin is the configuration file where the device is using the user interface. You can see 377 00:21:12,780 --> 00:21:16,020 the bot will go update itself and get more information for what it's supposed to do. 378 00:21:16,360 --> 00:21:20,680 And gate.php is the actual command and control page where bots will check in 379 00:21:20,680 --> 00:21:24,960 and let the command and control server know I'm alive, here I am, here's my information, 380 00:21:25,140 --> 00:21:26,740 here's some data, stuff like that. 381 00:21:28,380 --> 00:21:29,740 So where does Tor come in? 382 00:21:29,780 --> 00:21:31,520 Let's get back to where we're supposed to be with this. 383 00:21:33,360 --> 00:21:35,660 Zoo is on its own and doesn't support proxies. 384 00:21:35,960 --> 00:21:40,240 We can't just say, oh, just go to the .onion domain and hit our hidden service. 385 00:21:40,360 --> 00:21:41,620 That doesn't work at all. 386 00:21:42,780 --> 00:21:44,840 And Zoo only allows for regular URLs. 387 00:21:45,000 --> 00:21:48,960 Pretty much anything you can hit normally with your web browser is what it's looking for. 388 00:21:49,160 --> 00:21:52,100 It doesn't have any kind of proxy support, not the Windows proxy or anything. 389 00:21:52,440 --> 00:21:54,780 So we need a little intermediary solution here. 390 00:21:54,980 --> 00:21:58,060 And there is one that is free and works pretty well. 391 00:21:58,700 --> 00:22:01,520 It's called tor2web at tor2web.com. 392 00:22:02,000 --> 00:22:05,440 What this is, it's not affiliated with the Tor project at all. 393 00:22:05,500 --> 00:22:09,880 It's a third-party tool put up by some individuals whose names I've neglected to include on the slide. 394 00:22:09,920 --> 00:22:11,780 They're at the bottom of the web page if you want to check it out. 395 00:22:11,780 --> 00:22:18,360 And what it is, is it's a web page that will redirect requests made to tor2web.com with the right .onion hash. 396 00:22:18,680 --> 00:22:25,100 And it'll send it along through Tor themselves and return you the results, just like any other proxy. 397 00:22:26,720 --> 00:22:29,560 And they also provide scripts so you can set one up on your own. 398 00:22:29,800 --> 00:22:35,440 So if you say, well, I like tor2web, but I don't trust them, I'm going to stand up my own and do all this myself. 399 00:22:35,860 --> 00:22:37,100 It's pretty easy to do. 400 00:22:37,160 --> 00:22:38,860 It's just a couple configuration options. 401 00:22:39,560 --> 00:22:41,760 Privoxy, Squid, Tor, obviously. 402 00:22:41,760 --> 00:22:44,400 And one script they provide. 403 00:22:44,560 --> 00:22:45,100 And that's about it. 404 00:22:45,960 --> 00:22:50,720 So what we're going to be using this is we're going to be doing the command and control over tor2web. 405 00:22:51,060 --> 00:22:58,800 So what we want to do in the Zeus configuration we just saw a couple slides ago is configure the bot to connect to that URL there. 406 00:22:59,000 --> 00:23:04,080 So what you'll see is the first part of it is the hash from the .onion domain, .tor2web.com. 407 00:23:04,300 --> 00:23:07,860 So that would be, if that's the right hash, that would be your command and control server. 408 00:23:08,280 --> 00:23:10,540 So what will happen is the bot will connect to tor2web. 409 00:23:10,540 --> 00:23:12,280 Because it just sees it as a regular URL. 410 00:23:12,560 --> 00:23:18,540 And then be directed through them to the hidden service at the .onion domain, which is our command and control server. 411 00:23:18,700 --> 00:23:20,100 Very simple and very effective. 412 00:23:20,660 --> 00:23:23,620 So as I mentioned, here's the main script they have. 413 00:23:23,760 --> 00:23:31,260 And all it really does is reform its request to Squid saying, hey, where it says tor2web.com, make that .onion and go through tor. 414 00:23:31,420 --> 00:23:33,820 And then when it gets the results, it returns it right back to you. 415 00:23:34,220 --> 00:23:34,940 Really simple. 416 00:23:35,000 --> 00:23:37,820 The configuration for it is really hardly more than this script alone. 417 00:23:38,040 --> 00:23:39,420 So very nice. 418 00:23:40,540 --> 00:23:42,700 So I'm going to attempt a live demo of how this works. 419 00:23:43,020 --> 00:23:46,860 I've been fighting with this all day today, so I'm not too confident that it will actually work. 420 00:23:47,140 --> 00:23:49,520 So we'll pretend it does if it fails. 421 00:23:49,820 --> 00:23:51,620 I just want to tell you about the setup I'll be using. 422 00:23:51,880 --> 00:23:53,360 I have Zeus1241. 423 00:23:54,020 --> 00:23:55,180 I think that's the right version. 424 00:23:55,440 --> 00:23:58,260 Which is from about mid-2009, give or take. 425 00:23:58,780 --> 00:24:00,840 It's an older version now, but it's one that's been leaked. 426 00:24:00,940 --> 00:24:03,040 And it's easy to find on the internet. 427 00:24:03,140 --> 00:24:05,860 So you can just go and find a copy of it and make your own botnet. 428 00:24:05,980 --> 00:24:06,840 That's nice and convenient. 429 00:24:07,580 --> 00:24:12,860 For the command and control server, I'm just using a regular Ubuntu server setup with the LAMP package installed. 430 00:24:13,920 --> 00:24:17,440 I'll be running a hidden service on port 80, nothing too special, just like any other web server. 431 00:24:17,780 --> 00:24:24,080 For the host I'll be building the Zeus binary on and executing I'll be using Windows XP SP2. 432 00:24:25,440 --> 00:24:27,600 I'll just go through the configuration files on there. 433 00:24:27,800 --> 00:24:33,800 And if this all happens, we'll log into the control panel and see a bot that has gone through tor, through tor2web to get there. 434 00:24:33,960 --> 00:24:36,360 So I expect this to fail. 435 00:24:36,360 --> 00:24:37,020 But we'll see. 436 00:24:40,440 --> 00:24:41,540 So here's that. 437 00:24:41,720 --> 00:24:42,960 Okay, I have to get on the network first. 438 00:24:44,800 --> 00:24:46,400 This is where I've been having problems all day. 439 00:24:46,540 --> 00:24:51,680 As I've been discussing from the network, I've been having big problems getting everything to work right. 440 00:24:54,120 --> 00:24:55,900 So bear with me for a moment here. 441 00:25:11,280 --> 00:25:12,280 This is really exciting. 442 00:25:13,920 --> 00:25:17,340 If I don't connect in a short time, we'll just pretend it all worked. 443 00:25:18,460 --> 00:25:20,400 In the meantime, I'll show you the configuration file. 444 00:25:23,820 --> 00:25:27,040 So this is the configuration file we hopefully will be using. 445 00:25:29,900 --> 00:25:30,620 Is that okay? 446 00:25:30,700 --> 00:25:31,640 That's probably a bit big. 447 00:25:36,360 --> 00:25:36,880 All right. 448 00:25:36,900 --> 00:25:41,900 So here we have here the same thing we saw before with the config and the server. 449 00:25:42,200 --> 00:25:45,660 But what we have here is simply just putting in the tor2web URL. 450 00:25:46,060 --> 00:25:47,040 Nothing too fancy. 451 00:25:47,120 --> 00:25:47,780 Nothing that exciting. 452 00:25:48,240 --> 00:25:49,200 But it's effective. 453 00:25:49,580 --> 00:25:51,000 And am I connecting at all? 454 00:25:54,860 --> 00:25:58,880 So what I've done earlier is I've actually built the right version. 455 00:25:59,020 --> 00:26:02,620 This is the Zeus builder for version 1242. 456 00:26:02,960 --> 00:26:03,740 It was off by one. 457 00:26:04,700 --> 00:26:06,280 The current versions look very similar. 458 00:26:06,360 --> 00:26:07,460 You can order this if you haven't seen it before. 459 00:26:07,780 --> 00:26:09,840 This is what they're paying four grand for. 460 00:26:09,960 --> 00:26:10,980 This and the web control panel. 461 00:26:12,240 --> 00:26:18,060 It has a nice thing, too, where if you actually have Zeus installed on the system, which they consider spyware, 462 00:26:18,240 --> 00:26:20,320 you can click a button and remove it right from the system. 463 00:26:20,440 --> 00:26:21,300 But I'm clean, fortunately. 464 00:26:23,100 --> 00:26:24,180 And this is the builder. 465 00:26:24,300 --> 00:26:24,940 Very easy. 466 00:26:25,020 --> 00:26:29,740 You just click build config, and that builds the config file that we saw in the configuration file. 467 00:26:30,020 --> 00:26:32,520 Just load that up onto the Zeus command and control server. 468 00:26:32,660 --> 00:26:33,620 I've done that ahead of time. 469 00:26:34,080 --> 00:26:36,340 But it needs that to know where it is. 470 00:26:36,360 --> 00:26:40,980 It doesn't even have to be on the same site that you're actually hosting the control panel on. 471 00:26:41,100 --> 00:26:43,280 It just has to be available somewhere for it to download. 472 00:26:43,500 --> 00:26:47,340 So you can set up, say, another hidden service on another box somewhere and put your config file there. 473 00:26:47,480 --> 00:26:49,720 As long as you have the right URLs, it will know where to go to pick it up. 474 00:26:50,040 --> 00:26:53,700 And then when you build the loader, this actually builds the executable itself. 475 00:26:54,460 --> 00:26:55,360 Oh, I'm on the network. 476 00:26:55,520 --> 00:26:56,260 Let's see if you can do this. 477 00:26:57,000 --> 00:27:00,240 So as you see here, we have the ‑‑ it's probably really hard to read. 478 00:27:00,400 --> 00:27:05,820 But we have the URL config and the URL comp IP where we have the Toyota web URLs we saw before. 479 00:27:06,360 --> 00:27:07,600 So it knows where it's going. 480 00:27:07,880 --> 00:27:09,760 And let me see if I can get the rest of this working. 481 00:27:19,360 --> 00:27:22,100 So we'll restart Tor and hopefully this will all just work. 482 00:27:24,920 --> 00:27:26,380 So I'm going to execute the bot now. 483 00:27:27,580 --> 00:27:31,940 If we can confirm where the builder says, oh, we have version 1242 installed. 484 00:27:32,120 --> 00:27:32,620 Fancy that. 485 00:27:35,260 --> 00:27:36,100 We'll go into Firefox. 486 00:27:36,360 --> 00:27:37,300 Let's see if we can get to the control panel. 487 00:27:37,580 --> 00:27:39,380 If we do, then there's probably a good chance this worked. 488 00:27:39,500 --> 00:27:40,860 If we don't, then it will. 489 00:27:50,580 --> 00:27:51,500 So we'll give this a moment. 490 00:27:51,640 --> 00:27:54,660 So it is ultimately going through Tor, so it isn't the fastest in the world. 491 00:27:55,060 --> 00:27:57,960 Tor has gotten a lot better recently if you haven't used it much. 492 00:27:58,740 --> 00:28:00,040 You're still getting a performance overhead. 493 00:28:00,400 --> 00:28:04,720 But really the way I look at it is that's a small price to pay for actual anonymity. 494 00:28:04,720 --> 00:28:06,280 And definitely worthwhile. 495 00:28:06,580 --> 00:28:09,020 This will probably work best if you're using a smaller botnet. 496 00:28:09,620 --> 00:28:11,340 Maybe a couple hundred hosts. 497 00:28:11,900 --> 00:28:17,360 But if you have a much larger one, this probably won't work out too great where you have a single host hosting all your bots. 498 00:28:17,620 --> 00:28:20,600 So we'll give that a moment and see if that works. 499 00:28:20,660 --> 00:28:21,260 Probably not. 500 00:28:23,220 --> 00:28:24,520 Actually, we'll just come back to that later. 501 00:28:24,640 --> 00:28:25,260 We'll move on. 502 00:28:28,840 --> 00:28:30,880 So I'm sure that will fail when we go back to it. 503 00:28:30,980 --> 00:28:32,900 But let's assume it did work for now. 504 00:28:34,060 --> 00:28:34,700 So there's that. 505 00:28:34,700 --> 00:28:35,920 There's strengths and weaknesses to this approach. 506 00:28:36,280 --> 00:28:39,060 The strengths are, like I said, it hides the command and control server. 507 00:28:39,380 --> 00:28:44,520 The only way you're going to find that out is if you can actually use some sort of attack like presented in the paper I referenced earlier. 508 00:28:44,860 --> 00:28:48,100 Or have some way to get into the server itself and make it expose its IP. 509 00:28:48,920 --> 00:28:50,940 Which that's going to be pretty hard to do, I think. 510 00:28:51,460 --> 00:28:53,220 It will be really hard to track down as a result. 511 00:28:53,340 --> 00:28:54,580 You won't know where you're looking for it. 512 00:28:56,000 --> 00:29:00,500 So with this being the case, hopefully the command and control server is virtually immune to being taken down. 513 00:29:00,840 --> 00:29:03,680 Now the weaknesses, I'm sure you've all thought about this ahead of time. 514 00:29:03,680 --> 00:29:05,440 It's really easy to filter this traffic. 515 00:29:05,600 --> 00:29:11,920 If you have any kind of HTTP filter or even block the IPs they're hosting it at, you're not going to be able to use this method. 516 00:29:12,000 --> 00:29:13,620 This is going to be really easy to get to take it out. 517 00:29:13,860 --> 00:29:15,860 And also, trust, like I mentioned. 518 00:29:15,980 --> 00:29:17,660 You don't know what they're logging at. 519 00:29:17,980 --> 00:29:19,100 You don't know if they're logging anything. 520 00:29:19,400 --> 00:29:21,460 I would hope they're not, by the way they're presenting their service. 521 00:29:21,680 --> 00:29:22,640 But you don't know that. 522 00:29:22,940 --> 00:29:27,760 So you probably don't want someone knowing where all of the bots in your botnet are coming from. 523 00:29:27,900 --> 00:29:30,200 Because that may lead to them being taken down pretty easily. 524 00:29:31,160 --> 00:29:33,660 And running your own Tor web proxy is definitely a problem. 525 00:29:34,100 --> 00:29:35,480 It's not really hard to do. 526 00:29:35,700 --> 00:29:37,100 But you need to have some place to run it. 527 00:29:37,320 --> 00:29:41,640 If I had some bullet proof hosting somewhere and I wanted to do this, that's probably where I'd consider running it. 528 00:29:41,740 --> 00:29:42,920 And probably not anywhere else. 529 00:29:42,960 --> 00:29:46,060 Because I'd still have to give it a domain or at least have an IP to point at. 530 00:29:46,260 --> 00:29:47,600 And it's still a single point of failure. 531 00:29:47,800 --> 00:29:48,600 It could be taken down. 532 00:29:48,840 --> 00:29:50,680 And then you're back to square one. 533 00:29:51,180 --> 00:29:53,000 So really quick, I'm just going to see if that worked. 534 00:29:55,060 --> 00:29:55,780 And no. 535 00:29:56,460 --> 00:29:56,980 Oh well. 536 00:29:57,300 --> 00:30:01,120 So what you would have seen if this worked was the Zeus control panel saying we have one bot. 537 00:30:01,820 --> 00:30:03,660 But we'll just pretend that's not the case. 538 00:30:05,320 --> 00:30:06,360 Just apologize for that. 539 00:30:06,420 --> 00:30:08,480 It works much better when I'm on a more stable network. 540 00:30:09,640 --> 00:30:13,400 But with this technique, I want to rate this as I'm happy with it. 541 00:30:13,480 --> 00:30:17,500 I think it's a good solution, especially if you're using a toolkit where you can't really control what's going on. 542 00:30:18,180 --> 00:30:19,720 But I'm not going to let you know I'm happy. 543 00:30:19,860 --> 00:30:20,420 It's okay. 544 00:30:20,600 --> 00:30:21,400 It's not a great solution. 545 00:30:21,680 --> 00:30:23,120 You can do much better than that if you try. 546 00:30:25,040 --> 00:30:31,140 So when I was first playing around with this, the next thing that popped into my head was, well, what if I use the Windows proxy settings? 547 00:30:31,300 --> 00:30:32,200 That'll be pretty easy. 548 00:30:33,680 --> 00:30:36,860 So I'm going to put Tor onto the system in Polipo or whatever you want to use, Provoxy. 549 00:30:37,180 --> 00:30:40,120 And pretty much drop it on like you would any other piece of malware. 550 00:30:40,380 --> 00:30:45,520 Like along with my fake antivirus, I'll just drop Tor on there and run it however I need it to be run. 551 00:30:45,840 --> 00:30:48,160 And then just set the Windows configuration to use a proxy. 552 00:30:48,320 --> 00:30:50,000 We have the registry keys right there. 553 00:30:50,160 --> 00:30:51,660 You just set a proxy enable to one. 554 00:30:51,860 --> 00:30:54,020 Set your proxy server and the rate port. 555 00:30:54,400 --> 00:30:55,480 And you're good to go. 556 00:30:55,700 --> 00:30:58,880 The problem with this is this is going to be very obvious to the user. 557 00:30:59,060 --> 00:31:03,140 The first time they go to Google, they're probably going to end up at the Czech Google or the German Google. 558 00:31:03,260 --> 00:31:03,660 And they're going to be like, oh, that's not working. 559 00:31:03,680 --> 00:31:04,940 They're going to be like, I don't understand this language. 560 00:31:05,100 --> 00:31:05,640 That's not good. 561 00:31:05,800 --> 00:31:06,840 Call up their ISP. 562 00:31:06,940 --> 00:31:07,460 Something's wrong. 563 00:31:08,180 --> 00:31:08,920 That would be terrible. 564 00:31:09,060 --> 00:31:09,880 You'll be found in no time. 565 00:31:10,340 --> 00:31:12,700 So this idea I just tabled really quick. 566 00:31:12,780 --> 00:31:13,840 Do not want at all. 567 00:31:17,820 --> 00:31:19,340 So what's the best solution here? 568 00:31:19,460 --> 00:31:23,020 Well, the best solution is to actually do some work and build proxy support right into your bot. 569 00:31:23,240 --> 00:31:27,920 I don't know any bots today or any malware in general that actually supports using proxies. 570 00:31:28,820 --> 00:31:30,280 If you know of any, I'd love to know it. 571 00:31:30,320 --> 00:31:31,420 Any toolkits especially. 572 00:31:34,220 --> 00:31:39,980 But you need to have some way to resolve the onion domains so they can connect directly to the hidden service. 573 00:31:41,460 --> 00:31:43,780 There's a few ways you can resolve the onion domains, actually. 574 00:31:44,300 --> 00:31:46,780 We would have to load Tor like we saw in the previous example. 575 00:31:47,080 --> 00:31:49,820 And, yeah, you could load for proxy or if you wanted to. 576 00:31:50,060 --> 00:31:56,360 But Tor provides a functionality called map address, which is a, I don't know if it's still considered an experimental option in Tor. 577 00:31:56,480 --> 00:31:58,540 But it wasn't on the documentation I saw. 578 00:31:58,760 --> 00:32:02,720 But you can put into your config file the option map address. 579 00:32:02,960 --> 00:32:03,660 Give it a local address. 580 00:32:03,680 --> 00:32:05,760 Local IP like 10.0.0.10. 581 00:32:06,740 --> 00:32:09,160 And the onion URL you want it to go to. 582 00:32:09,420 --> 00:32:11,580 And then you can just reference that local IP and go to it directly. 583 00:32:11,800 --> 00:32:16,080 So you don't need to have any kind of middle man to actually resolve the dot onion domains for you. 584 00:32:16,100 --> 00:32:16,880 So this is really great. 585 00:32:17,140 --> 00:32:18,780 So nice functionality to have. 586 00:32:18,960 --> 00:32:23,740 Especially since we're probably going to be accessing a limited amount of dot onion domains as it is anyways. 587 00:32:25,860 --> 00:32:31,180 So what we'll have to do in order to make our bots do this is add in at least SOX5 support. 588 00:32:31,180 --> 00:32:34,040 Or I guess you could use SOX4A if you really wanted to. 589 00:32:34,600 --> 00:32:36,380 And that will be a bit of work. 590 00:32:36,560 --> 00:32:40,040 It's not trivial, but it's not too hard to add in. 591 00:32:40,680 --> 00:32:45,560 So the bot authors will have to step up their game a bit and actually provide this kind of support into their bots. 592 00:32:46,700 --> 00:32:48,180 So here's what I like about this. 593 00:32:48,340 --> 00:32:51,700 The traffic is going directly from the host to the destination in Tor. 594 00:32:51,880 --> 00:32:53,760 There's no middle man like we saw with Tor the web. 595 00:32:53,880 --> 00:32:55,120 There's nothing you have to worry about there. 596 00:32:55,540 --> 00:32:58,320 It's going to go straight from your browser to the Tor proxy. 597 00:32:58,620 --> 00:33:00,840 To the rendezvous point. 598 00:33:01,180 --> 00:33:02,160 To the hidden service. 599 00:33:02,380 --> 00:33:03,860 And right to the web server itself. 600 00:33:04,200 --> 00:33:05,280 You're not using exit nodes. 601 00:33:05,440 --> 00:33:07,620 You're not involving anything else where your data could be sniffed. 602 00:33:07,660 --> 00:33:09,840 So it's going to be very hard for IDS to pick this up. 603 00:33:10,180 --> 00:33:11,780 And this works for more than just HTTP. 604 00:33:12,180 --> 00:33:15,120 Where Tor the web was really just for web-based bots. 605 00:33:15,380 --> 00:33:16,400 This will work for IRC. 606 00:33:16,500 --> 00:33:19,200 This will work for pretty much any protocol you can think of. 607 00:33:19,260 --> 00:33:22,900 If you want to roll your own custom command and control protocol, this will work just fine. 608 00:33:23,100 --> 00:33:25,060 And I think this would be very hard to stop. 609 00:33:25,280 --> 00:33:27,360 I was trying to come up with what the options for this would be. 610 00:33:27,780 --> 00:33:29,120 And I really only came up with two. 611 00:33:29,240 --> 00:33:30,920 Won't it be just to block Tor traffic? 612 00:33:31,180 --> 00:33:32,640 Like we see some countries trying to do. 613 00:33:32,940 --> 00:33:35,300 And I don't think that will actually work too well with this. 614 00:33:35,620 --> 00:33:37,240 I just don't see... 615 00:33:37,240 --> 00:33:39,240 There will be a lot of rules being in place. 616 00:33:39,300 --> 00:33:41,120 A lot of people trying to block Tor. 617 00:33:41,220 --> 00:33:42,520 And I just don't see people wanting to do that. 618 00:33:42,840 --> 00:33:45,600 And then the other would be considering Tor to be a virus. 619 00:33:45,860 --> 00:33:48,280 I actually ran the Tor binary through VirusTor. 620 00:33:48,340 --> 00:33:50,640 To see if anybody was doing this about a month ago. 621 00:33:50,760 --> 00:33:51,660 And no one was. 622 00:33:51,760 --> 00:33:52,500 So that's good. 623 00:33:52,580 --> 00:33:53,560 Because it isn't a virus. 624 00:33:53,780 --> 00:33:56,560 But I wouldn't be shocked at the result of that if some people are now. 625 00:33:56,660 --> 00:33:57,620 I haven't checked since then. 626 00:33:58,160 --> 00:34:00,260 But I just don't see either one of those happening. 627 00:34:01,180 --> 00:34:03,040 I don't see any kind of scale to have any kind of impact. 628 00:34:03,360 --> 00:34:05,500 Where a bot that would still be reachable. 629 00:34:05,840 --> 00:34:07,840 Boss would be able to check in with their command and control server. 630 00:34:08,400 --> 00:34:10,220 Now I do see some weaknesses with this too. 631 00:34:11,380 --> 00:34:13,160 It's going to require code to be added to bots. 632 00:34:13,340 --> 00:34:15,080 So say take Zeus for example. 633 00:34:15,140 --> 00:34:16,920 They're not just going to be able to plug it in right away. 634 00:34:17,180 --> 00:34:19,360 They're going to have to probably build it in as a new feature request. 635 00:34:19,460 --> 00:34:20,140 For a new version. 636 00:34:20,540 --> 00:34:21,540 And do it that way. 637 00:34:22,360 --> 00:34:25,020 And this isn't really accessible to people who are buying it today either. 638 00:34:25,160 --> 00:34:25,940 If you're just buying the kit. 639 00:34:26,060 --> 00:34:27,520 You have no idea how to code most likely. 640 00:34:27,660 --> 00:34:28,040 Or if you do. 641 00:34:28,100 --> 00:34:30,260 It's not in C or whatever language. 642 00:34:31,180 --> 00:34:31,420 It's not coded in. 643 00:34:33,740 --> 00:34:34,620 And like I said earlier. 644 00:34:34,640 --> 00:34:36,020 You're going to have to load Tor in the system and run it. 645 00:34:36,120 --> 00:34:37,060 Where that's not hard to do. 646 00:34:37,100 --> 00:34:39,840 It's still another step that will have to be taken in order for it to actually work. 647 00:34:40,060 --> 00:34:42,080 So it's another thing you have to worry about. 648 00:34:42,180 --> 00:34:43,520 If you're not loading the malware on yourself. 649 00:34:43,640 --> 00:34:44,500 You're paying someone to do it. 650 00:34:44,600 --> 00:34:46,060 Well you're going to have to bundle things up nicely. 651 00:34:46,240 --> 00:34:48,280 And see if they will do it for you properly. 652 00:34:48,740 --> 00:34:51,040 And then probably the biggest weakness with this. 653 00:34:51,080 --> 00:34:53,660 Would be if you're looking for any kind of anomalies in your network. 654 00:34:53,780 --> 00:34:54,680 Or looking for traffic changes. 655 00:34:55,640 --> 00:34:58,820 Because while you won't be able to see the actual command and control traffic itself. 656 00:34:59,260 --> 00:35:00,580 You're probably going to notice some. 657 00:35:01,180 --> 00:35:03,320 Bandwidth utilization increases on servers. 658 00:35:03,600 --> 00:35:04,520 That are actually doing it and what not. 659 00:35:04,720 --> 00:35:06,260 So that's probably a. 660 00:35:06,780 --> 00:35:08,400 That would probably be the best way to pick it up. 661 00:35:08,940 --> 00:35:10,820 I don't know how many people are actually doing this today. 662 00:35:10,960 --> 00:35:12,640 I know a lot of large corporations are. 663 00:35:12,740 --> 00:35:13,680 And a lot of them aren't. 664 00:35:13,800 --> 00:35:15,840 So it's probably a hit or miss way to check it out. 665 00:35:15,940 --> 00:35:17,360 And some of the changes if you're doing. 666 00:35:17,440 --> 00:35:20,080 Let's just say using a hidden service for a spear phishing campaign. 667 00:35:20,380 --> 00:35:22,120 And you're using a service inside some network. 668 00:35:22,320 --> 00:35:24,120 That you don't actually have access to. 669 00:35:24,420 --> 00:35:25,740 It might be such low volume. 670 00:35:25,820 --> 00:35:26,920 You would never really get picked up. 671 00:35:27,140 --> 00:35:28,620 So that could be a problem. 672 00:35:31,180 --> 00:35:32,800 This is my favorite image. 673 00:35:33,000 --> 00:35:34,840 Where it's just complete overjoyed Pokemon. 674 00:35:35,080 --> 00:35:35,920 Hugging and crying. 675 00:35:36,040 --> 00:35:36,580 They're so happy. 676 00:35:36,800 --> 00:35:38,920 So I would say if you try to take this approach. 677 00:35:39,060 --> 00:35:42,040 You'll have a very low risk of being taken down. 678 00:35:42,460 --> 00:35:44,120 Probably close to none. 679 00:35:44,220 --> 00:35:46,860 Unless people are just extremely attentive to their own networks. 680 00:35:47,320 --> 00:35:49,380 So that's how much I love it. 681 00:35:49,540 --> 00:35:50,980 That's us hugging in happiness. 682 00:35:52,440 --> 00:35:54,860 So one thing I didn't want to get into too much here. 683 00:35:54,960 --> 00:35:56,400 But it still is worth mentioning. 684 00:35:56,580 --> 00:35:57,860 Our private Tor networks. 685 00:35:58,900 --> 00:36:00,440 Setting up a private Tor network. 686 00:36:01,180 --> 00:36:02,920 It's a bit of an involved process right now. 687 00:36:02,980 --> 00:36:05,140 Having to set up your own directory authority. 688 00:36:05,500 --> 00:36:06,540 And a whole lot of other stuff. 689 00:36:06,840 --> 00:36:08,600 But it's great if you're really paranoid. 690 00:36:08,760 --> 00:36:10,100 And want to stay off the public Tor network. 691 00:36:10,420 --> 00:36:12,960 If you're afraid someone somewhere might figure out what you're doing. 692 00:36:13,580 --> 00:36:14,840 The nice thing about this too. 693 00:36:14,960 --> 00:36:18,520 Is it can actually be significantly faster than the public Tor network as well. 694 00:36:18,840 --> 00:36:21,220 You can track the host you're infecting. 695 00:36:21,600 --> 00:36:23,140 Looking for how their bandwidth is. 696 00:36:23,200 --> 00:36:24,520 You can just do simple checks. 697 00:36:24,680 --> 00:36:26,660 Maybe some of those speed tests even. 698 00:36:26,760 --> 00:36:28,500 You can find out how good a connection is. 699 00:36:28,680 --> 00:36:29,540 And then you can just say. 700 00:36:31,180 --> 00:36:32,360 Now if you're going to be one of my relays. 701 00:36:32,480 --> 00:36:34,340 And keep your network nice and performing really well. 702 00:36:34,460 --> 00:36:35,120 As a result of that. 703 00:36:36,600 --> 00:36:39,420 And also blocking a private network will be significantly harder. 704 00:36:39,680 --> 00:36:41,760 There's no list of exit nodes that will be published. 705 00:36:41,880 --> 00:36:43,880 There's nothing that people will know. 706 00:36:43,960 --> 00:36:45,780 Unless they actually go and investigate the network themselves. 707 00:36:46,340 --> 00:36:48,900 So it will be significantly harder to take down. 708 00:36:49,200 --> 00:36:51,300 I don't see how a smaller network like this. 709 00:36:51,340 --> 00:36:52,800 Unless somebody went after it directly. 710 00:36:53,000 --> 00:36:54,460 And really paid a lot of attention to what you're doing. 711 00:36:54,500 --> 00:36:55,600 Would actually be able to take it down. 712 00:36:56,680 --> 00:36:59,080 So I'm going to change gears a little bit here again. 713 00:37:00,680 --> 00:37:01,160 And talk a little bit about. 714 00:37:01,160 --> 00:37:03,280 Some other features that hidden services give us. 715 00:37:03,380 --> 00:37:04,720 That actually makes this a really. 716 00:37:05,420 --> 00:37:07,540 Nice way to manage your command and control server. 717 00:37:08,500 --> 00:37:09,640 So as we mentioned. 718 00:37:09,760 --> 00:37:10,300 Much earlier. 719 00:37:10,820 --> 00:37:13,320 Tor uses public keys to communicate. 720 00:37:13,740 --> 00:37:14,900 To let it know where. 721 00:37:15,060 --> 00:37:17,200 To let the Tor network know how to get to the server. 722 00:37:18,080 --> 00:37:18,860 When it does that. 723 00:37:18,900 --> 00:37:20,060 It creates a private key on the server. 724 00:37:20,280 --> 00:37:22,740 As well as the host name for the dot onion domain. 725 00:37:23,780 --> 00:37:25,180 And puts that on the system. 726 00:37:25,240 --> 00:37:26,300 That the hidden service is running on. 727 00:37:27,400 --> 00:37:28,940 So what's nice about this is. 728 00:37:29,060 --> 00:37:30,180 These are just files in the system. 729 00:37:31,160 --> 00:37:32,420 You can take these and move these wherever you want. 730 00:37:32,680 --> 00:37:33,460 And make it so. 731 00:37:33,620 --> 00:37:35,800 If this server actually goes down for some reason. 732 00:37:35,940 --> 00:37:37,540 You can redistribute it to another. 733 00:37:37,900 --> 00:37:38,920 And another nice thing too. 734 00:37:39,000 --> 00:37:40,720 Is you can generate a lot of these keys up front. 735 00:37:40,900 --> 00:37:41,980 If you run a script and just say. 736 00:37:42,080 --> 00:37:43,580 Hey keep clearing out that directory. 737 00:37:43,740 --> 00:37:44,580 And keep restarting Tor. 738 00:37:44,720 --> 00:37:46,300 It will just keep creating new keys for you. 739 00:37:46,880 --> 00:37:48,860 Until you have as many as you like. 740 00:37:49,180 --> 00:37:50,380 So would this be the case. 741 00:37:50,500 --> 00:37:51,880 What does this gain us. 742 00:37:51,940 --> 00:37:53,660 As far as keeping our servers up. 743 00:37:53,880 --> 00:37:55,620 Well it gives us a great amount of resilience. 744 00:38:01,160 --> 00:38:01,780 Because we have that one hash. 745 00:38:01,940 --> 00:38:04,800 That was the hidden service dot onion domain itself. 746 00:38:05,320 --> 00:38:06,680 So what we could do with this. 747 00:38:06,760 --> 00:38:08,620 Is easily move this from one server to another. 748 00:38:08,820 --> 00:38:09,920 We could just copy the files. 749 00:38:10,020 --> 00:38:12,700 Move it from the hidden service directory on one server to another. 750 00:38:13,260 --> 00:38:13,860 Restart Tor. 751 00:38:14,000 --> 00:38:15,840 And now we have the bots don't know any difference. 752 00:38:15,960 --> 00:38:17,360 But they're still communicating with a new server. 753 00:38:17,720 --> 00:38:18,600 So that's pretty nice. 754 00:38:19,280 --> 00:38:21,120 This allows us to keep our botnet up and running. 755 00:38:21,420 --> 00:38:22,840 Much much longer than we would otherwise. 756 00:38:23,320 --> 00:38:25,560 And while there's a chance that if we move it. 757 00:38:25,660 --> 00:38:26,780 And if we move it frequently. 758 00:38:26,780 --> 00:38:28,300 We might lose some data that was captured. 759 00:38:28,340 --> 00:38:29,480 That we never actually recovered. 760 00:38:29,620 --> 00:38:31,020 From one host that we moved from. 761 00:38:31,540 --> 00:38:32,840 And that's a really small price to pay. 762 00:38:32,940 --> 00:38:34,520 In order to keep the bots phoning home. 763 00:38:34,640 --> 00:38:36,200 And actually communicating with you. 764 00:38:36,680 --> 00:38:38,240 And another nice thing too. 765 00:38:38,300 --> 00:38:39,840 Would be to issue multiple onion domains. 766 00:38:39,980 --> 00:38:40,760 For your command and control. 767 00:38:41,020 --> 00:38:42,980 Or presumably set up multiple command and control servers. 768 00:38:43,260 --> 00:38:45,420 In order for Tor to connect back to it. 769 00:38:45,720 --> 00:38:47,740 And not have to worry if one gets taken down. 770 00:38:47,880 --> 00:38:49,220 And isn't able to reach it that day. 771 00:38:49,600 --> 00:38:51,440 This also could be a nice misdirection technique. 772 00:38:51,600 --> 00:38:52,440 Where you could give the appearance. 773 00:38:56,840 --> 00:38:59,800 We saw something like this with the ASprox botnet. 774 00:38:59,960 --> 00:39:00,560 Like I mentioned earlier. 775 00:39:00,760 --> 00:39:02,220 Where every few days or so. 776 00:39:02,320 --> 00:39:04,800 They would swap in a new domain for their command and control. 777 00:39:05,060 --> 00:39:06,440 And age older ones out. 778 00:39:06,760 --> 00:39:07,600 Because the older ones. 779 00:39:07,660 --> 00:39:10,480 If they weren't taken down by the registrars themselves. 780 00:39:11,500 --> 00:39:12,860 Sometimes they were taken over. 781 00:39:12,960 --> 00:39:14,600 Sometimes they just weren't functional anymore. 782 00:39:14,740 --> 00:39:16,400 I don't know if the people running the botnet. 783 00:39:16,520 --> 00:39:18,140 Actually took them down themselves or not. 784 00:39:18,380 --> 00:39:19,800 But they aged really quickly. 785 00:39:20,000 --> 00:39:22,240 And the older ones were pretty worthless after a couple weeks. 786 00:39:22,600 --> 00:39:23,900 So we can do a similar thing here. 787 00:39:24,060 --> 00:39:25,840 Where we can lead people along. 788 00:39:26,860 --> 00:39:27,820 And then every few days. 789 00:39:27,880 --> 00:39:29,100 Put in a new dead onion domain. 790 00:39:29,320 --> 00:39:30,320 And inform the bots. 791 00:39:30,400 --> 00:39:31,280 Here's where you're connecting now. 792 00:39:31,700 --> 00:39:33,220 And since we can generate as many as we want. 793 00:39:33,300 --> 00:39:34,060 We don't have any limitations. 794 00:39:34,340 --> 00:39:35,560 Like dealing with registrars or anything. 795 00:39:35,860 --> 00:39:37,660 We can just generate tons and tons of these. 796 00:39:37,740 --> 00:39:38,420 Roll them all out. 797 00:39:38,660 --> 00:39:39,720 Maybe only use a couple. 798 00:39:39,820 --> 00:39:40,980 But then people have to watch them all. 799 00:39:41,040 --> 00:39:42,100 And be aware of what's going on. 800 00:39:42,420 --> 00:39:44,100 Similar to how we saw configure work. 801 00:39:44,420 --> 00:39:47,220 Where it would have the randomly generated domains every day. 802 00:39:47,580 --> 00:39:49,260 And only a couple of them would be registered. 803 00:39:58,860 --> 00:40:01,680 So we talked about having your bots running Tor themselves. 804 00:40:01,920 --> 00:40:02,720 In the best case scenario. 805 00:40:03,300 --> 00:40:04,880 So if we have Tor on there. 806 00:40:04,940 --> 00:40:06,300 We could do a lot more interesting stuff. 807 00:40:06,600 --> 00:40:08,160 Like running hidden services locally. 808 00:40:09,340 --> 00:40:11,340 If you're familiar with Zeus's back connect model. 809 00:40:11,500 --> 00:40:14,120 This allows people to connect back to an effective Zeus host. 810 00:40:14,300 --> 00:40:14,900 Over RDP. 811 00:40:15,760 --> 00:40:16,260 Remote desktop. 812 00:40:16,740 --> 00:40:17,140 VNC. 813 00:40:17,940 --> 00:40:19,780 You can even run a web server if you wanted to. 814 00:40:19,920 --> 00:40:23,020 And have it behind a hidden service on the affected box. 815 00:40:23,340 --> 00:40:24,200 What's nice with this. 816 00:40:24,300 --> 00:40:26,400 Is you can have it do a whole lot of things. 817 00:40:26,780 --> 00:40:28,280 With the Zeus back connect model. 818 00:40:28,420 --> 00:40:30,400 They use that to connect to a host that's been affected. 819 00:40:30,640 --> 00:40:36,340 In order to make use of certificates in the browser for online banking. 820 00:40:36,680 --> 00:40:37,480 So what they do. 821 00:40:37,580 --> 00:40:41,120 Is they'll have people log into a remote desktop on a host. 822 00:40:41,220 --> 00:40:41,640 And say okay. 823 00:40:41,800 --> 00:40:43,160 Now I can log into your bank account. 824 00:40:43,340 --> 00:40:44,600 If I have your username and password. 825 00:40:44,720 --> 00:40:45,520 Then it really doesn't matter. 826 00:40:46,160 --> 00:40:47,760 Your bank is going to accept me as it is. 827 00:40:49,640 --> 00:40:51,220 And also another nice thing you can do. 828 00:40:51,300 --> 00:40:53,640 Is actually use this to distribute updates for your botnet. 829 00:40:53,640 --> 00:40:56,160 If every host you have infected is a web server. 830 00:40:56,320 --> 00:40:57,360 And hidden behind a hidden service. 831 00:40:57,700 --> 00:40:58,640 You can just say okay. 832 00:40:59,480 --> 00:41:01,620 Here's the names of the hidden services that have the updates. 833 00:41:01,780 --> 00:41:03,480 We're going to have you connect out to these guys. 834 00:41:03,540 --> 00:41:04,020 Get your update. 835 00:41:04,240 --> 00:41:06,380 And with that update we'll have more hosts that are doing it. 836 00:41:07,700 --> 00:41:09,560 Providing updates for tomorrow or the next update. 837 00:41:09,680 --> 00:41:10,320 Whenever that may be. 838 00:41:10,800 --> 00:41:13,740 So it's a nice way you can actually model your botnet. 839 00:41:13,820 --> 00:41:14,860 Around Tor itself. 840 00:41:15,240 --> 00:41:16,620 And use the hidden services to your advantage. 841 00:41:17,400 --> 00:41:18,940 And ultimately like I mentioned earlier. 842 00:41:19,140 --> 00:41:20,160 Nats have no concern here. 843 00:41:20,160 --> 00:41:22,420 If you have a host infected behind a router. 844 00:41:22,580 --> 00:41:23,540 Or a firewall or whatever. 845 00:41:24,200 --> 00:41:25,760 If it's talking on Tor it doesn't matter. 846 00:41:25,840 --> 00:41:26,480 It can do this. 847 00:41:29,520 --> 00:41:30,580 So a few other thoughts. 848 00:41:31,360 --> 00:41:32,320 Since we're all running Tor. 849 00:41:33,440 --> 00:41:34,480 How would it be to turn them. 850 00:41:34,500 --> 00:41:36,280 How would it be nicer to turn them all into relays. 851 00:41:36,620 --> 00:41:38,000 This is just something to pose out there. 852 00:41:38,060 --> 00:41:38,720 To see what people think. 853 00:41:39,600 --> 00:41:41,380 It doesn't increase bandwidth in Tor overall. 854 00:41:41,680 --> 00:41:43,400 Especially if you have a pretty sizeable botnet. 855 00:41:43,660 --> 00:41:45,420 I don't know if it would be worth it or not. 856 00:41:45,500 --> 00:41:46,680 But it could be pretty interesting to see. 857 00:41:47,380 --> 00:41:49,880 And this could have really positive effects for your botnet. 858 00:41:50,160 --> 00:41:51,840 If you can actually increase the speed of Tor. 859 00:41:51,960 --> 00:41:53,060 In any significant way. 860 00:41:53,240 --> 00:41:54,580 That would be an awfully large botnet. 861 00:41:54,660 --> 00:41:56,040 But that could be a neat project to do. 862 00:41:56,100 --> 00:41:57,660 If you actually have that kind of resource available. 863 00:41:58,380 --> 00:41:59,200 And on the other side. 864 00:41:59,440 --> 00:42:00,920 How about turning them all into exit nodes. 865 00:42:01,060 --> 00:42:02,320 I thought about this for quite a while. 866 00:42:02,480 --> 00:42:03,980 This actually makes sense. 867 00:42:04,840 --> 00:42:07,340 It could be cool if you have a majority of Tor exit nodes. 868 00:42:07,480 --> 00:42:09,360 And actually be able to control traffic going through it. 869 00:42:09,500 --> 00:42:10,960 Or sniff the traffic going through. 870 00:42:11,080 --> 00:42:12,140 Like we saw a few years ago. 871 00:42:12,220 --> 00:42:14,920 With the people finding embassy emails and other documents. 872 00:42:15,000 --> 00:42:16,100 By sniffing Tor exit nodes. 873 00:42:20,340 --> 00:42:22,000 But it's probably not a good idea. 874 00:42:22,200 --> 00:42:23,380 As enticing as that may be. 875 00:42:23,560 --> 00:42:24,340 For what you may learn. 876 00:42:24,600 --> 00:42:26,540 You'll be exposing the identities of your bots. 877 00:42:26,680 --> 00:42:28,240 So I would really recommend against that. 878 00:42:28,380 --> 00:42:30,300 You don't want them popping up on the Tor exit node list. 879 00:42:30,440 --> 00:42:34,000 And having a lot of attention being drawn to you as a result. 880 00:42:34,400 --> 00:42:35,740 Especially if they all start to go up. 881 00:42:35,780 --> 00:42:37,740 With say a drive by download campaign. 882 00:42:37,860 --> 00:42:38,960 That really takes off one day. 883 00:42:39,060 --> 00:42:41,160 Your botnet increases by a couple thousand hosts. 884 00:42:41,580 --> 00:42:43,840 And it just happens to be a couple thousand exit nodes. 885 00:42:43,920 --> 00:42:44,760 That stand up that day. 886 00:42:45,020 --> 00:42:46,000 It would be pretty obvious. 887 00:42:46,100 --> 00:42:47,220 I don't think that's a very good idea. 888 00:42:50,160 --> 00:42:50,480 As a conclusion here. 889 00:42:51,340 --> 00:42:53,460 As we almost saw with the live demo. 890 00:42:54,680 --> 00:42:57,120 It's pretty trivial to get existing HTTP bots. 891 00:42:57,280 --> 00:42:57,980 Working with Tor. 892 00:42:59,020 --> 00:43:00,180 Yeah there's a risk to it. 893 00:43:00,340 --> 00:43:01,500 But if you're really desperate. 894 00:43:01,680 --> 00:43:02,700 And you really want to keep the host. 895 00:43:02,820 --> 00:43:04,040 The command and control server hidden. 896 00:43:04,800 --> 00:43:05,940 This is a pretty good option. 897 00:43:06,100 --> 00:43:07,300 It's a pretty easy one to set up too. 898 00:43:07,400 --> 00:43:09,580 If you're able to get Tor up and running on your server. 899 00:43:10,060 --> 00:43:12,900 And it's possible to get a lot more protection easily. 900 00:43:13,620 --> 00:43:15,680 If you actually have the source to the bots. 901 00:43:15,800 --> 00:43:16,860 By adding in SOC support. 902 00:43:17,740 --> 00:43:19,540 Which is really a nice alternative to have. 903 00:43:20,160 --> 00:43:21,880 This of course isn't really something everybody's going to do. 904 00:43:22,000 --> 00:43:22,720 But if you can do it. 905 00:43:23,100 --> 00:43:24,480 It would be really nice to have. 906 00:43:24,560 --> 00:43:25,240 So you can protect yourselves. 907 00:43:26,320 --> 00:43:27,880 Keeping a command and control server up. 908 00:43:28,200 --> 00:43:29,740 Is easier if you do this hopefully. 909 00:43:30,400 --> 00:43:32,300 Having it anonymous would mean you're less of a target. 910 00:43:32,440 --> 00:43:33,340 Or if you are a target. 911 00:43:33,420 --> 00:43:35,180 They're going to have less of a chance of taking you down. 912 00:43:35,680 --> 00:43:37,680 And actually controlling bots with a hidden service. 913 00:43:37,800 --> 00:43:39,080 Like we talked about with the back connect stuff. 914 00:43:39,600 --> 00:43:40,540 Would be pretty beneficial. 915 00:43:40,800 --> 00:43:43,200 This would be something that I think a lot of bot authors out there. 916 00:43:43,260 --> 00:43:43,980 Would be interested in providing. 917 00:43:44,380 --> 00:43:45,680 For really no additional cost. 918 00:43:50,160 --> 00:43:50,460 But if you do exist. 919 00:43:50,780 --> 00:43:51,960 It might involve looking at your network. 920 00:43:52,080 --> 00:43:53,760 And looking at your data more than before. 921 00:43:53,880 --> 00:43:54,760 Or a little differently than before. 922 00:43:55,100 --> 00:43:57,240 And it's probably not going to be easy to find this stuff. 923 00:43:57,420 --> 00:43:59,000 Finding the Tor to web stuff will be easy. 924 00:43:59,120 --> 00:44:01,800 But finding by using a SOC proxy. 925 00:44:01,880 --> 00:44:02,680 Probably won't be. 926 00:44:04,040 --> 00:44:06,260 So I would actually advise you to check things out. 927 00:44:06,320 --> 00:44:07,400 Keep your eye open for this stuff. 928 00:44:07,540 --> 00:44:08,400 And if you actually find anything. 929 00:44:09,800 --> 00:44:10,580 Let's talk about it. 930 00:44:10,640 --> 00:44:11,400 Let's see what happens. 931 00:44:11,500 --> 00:44:13,260 And try to find out how people are actually doing this stuff. 932 00:44:14,740 --> 00:44:15,840 So that's all I have here. 933 00:44:15,980 --> 00:44:17,080 I'll be happy to do a Q&A. 934 00:44:17,860 --> 00:44:19,000 I don't know if we have much time left here. 935 00:44:19,040 --> 00:44:20,340 I'll be in the room across the hall definitely. 936 00:44:20,500 --> 00:44:21,920 And if you want to contact me otherwise. 937 00:44:22,540 --> 00:44:23,500 There's my contact info. 938 00:44:24,520 --> 00:44:25,420 And that's all I've got.