1 00:00:00,000 --> 00:00:07,060 Good morning. I hope you all had a good day's sleep. I hope your headache isn't killing you too much. 2 00:00:08,240 --> 00:00:13,000 And if you don't have a headache, you're doing Defcon wrong. Sorry. 3 00:00:18,320 --> 00:00:21,380 So, thank you for coming, and let's get started. 4 00:00:21,520 --> 00:00:28,500 The name of the talk, as you can all read, is basically Web Server, Botnets, and Hosting Farms as Attack Platforms. 5 00:00:30,000 --> 00:00:37,800 If you expected a botnet talk, which I never give, this is semi-botnets. It's not really. 6 00:00:37,900 --> 00:00:43,800 The real name of this talk should probably be Completely Cross-Platform Web Malware. 7 00:00:45,220 --> 00:00:48,180 It's not. So, let's just get started. 8 00:00:49,080 --> 00:00:52,220 Who I am. My name is Gadi. Hi. Nice to meet you. 9 00:00:52,840 --> 00:00:53,340 Hey. 10 00:00:56,680 --> 00:00:59,840 I do a lot of stuff that's related to a botnet. 11 00:01:00,000 --> 00:01:02,020 Fuzzing all around, really. 12 00:01:02,620 --> 00:01:05,840 And I work for an Israeli company called Beyond Security. 13 00:01:06,280 --> 00:01:07,720 A lot of vulnerability assessments. 14 00:01:08,760 --> 00:01:10,500 So, let's get started. Regular malware. 15 00:01:11,140 --> 00:01:15,120 And, guys, I'm really using simple definitions here. 16 00:01:15,260 --> 00:01:18,160 So, if you're in the antivirus world, do not kill me, please. 17 00:01:18,520 --> 00:01:21,800 Just trying to get some basics going around. 18 00:01:22,120 --> 00:01:27,460 So, regular malware, and this is a disclaimer, so nobody can say I'm wrong often. 19 00:01:29,220 --> 00:01:29,780 Okay. 20 00:01:30,000 --> 00:01:33,580 can say I'm wrong but you get a point so platform specific meaning it's written 21 00:01:33,580 --> 00:01:38,560 first for the operating system right it would run on Windows it would run on 22 00:01:38,560 --> 00:01:44,620 Linux or whatever other operate platform you would like so that's the code the 23 00:01:44,620 --> 00:01:49,540 binary code is compiled for that whatever else you want today then it 24 00:01:49,540 --> 00:01:54,700 propagates I believe most definitions would say most malware product 25 00:01:54,700 --> 00:01:58,180 propagates of course not always Trojan horses don't need to propagate but you 26 00:01:58,180 --> 00:02:05,460 get a point they can use sorry I would actually like to hear that comment if 27 00:02:05,460 --> 00:02:08,920 you can please share it with the rest of us oh damn I always wanted to say that 28 00:02:11,380 --> 00:02:16,560 okay this is DEF CON so I'm gonna take my regular talk insert a little fuck 29 00:02:16,560 --> 00:02:25,980 shit asshole fuck shit asshole so if anybody no seriously anybody shut up so 30 00:02:25,980 --> 00:02:26,460 if anybody 31 00:02:28,180 --> 00:02:33,780 is offended in any way I would honestly like to ask to apologize to you and ask 32 00:02:33,780 --> 00:02:37,720 you to leave the room this is DEF CON and this is the way I'm gonna speak and I 33 00:02:37,720 --> 00:02:41,780 apologize if you don't like me but hey if the world doesn't so vulnerable so 34 00:02:41,780 --> 00:02:46,300 let's go through this let's get started so platform specific yeah propagates use 35 00:02:46,300 --> 00:02:52,880 vulnerabilities you know web server or mail client remote accessible service 36 00:02:54,480 --> 00:02:57,880 and you can also use social engineering or user 37 00:02:58,680 --> 00:03:04,000 gullibility or stupidity for DEF CON and you know send you some emails say 38 00:03:04,000 --> 00:03:08,320 hey this is a really cool picture you gotta click on that and they would 39 00:03:09,100 --> 00:03:14,820 everybody knows that and here are some things if you're not always true it 40 00:03:14,820 --> 00:03:20,560 propagates randomly meaning I can choose some addresses by some other 41 00:03:20,560 --> 00:03:25,720 means but usually I'll just try and get as many samples out there as I can by 42 00:03:25,720 --> 00:03:27,080 blindly trying to infect everybody 43 00:03:28,180 --> 00:03:33,760 and then some and then usually although there is no technological reason for 44 00:03:33,760 --> 00:03:39,000 this to be different to not work it would affect desktop systems I can 45 00:03:39,000 --> 00:03:42,720 infect the server but mostly the systems will get infected by these 46 00:03:42,720 --> 00:03:47,140 viruses malware whatever you want to call them or desktops so web server 47 00:03:47,140 --> 00:03:52,820 malware completely cross-platform as long as there is actually a web server 48 00:03:52,820 --> 00:03:58,160 over there that supports scripting it propagates by the use of Google I'm 49 00:03:58,160 --> 00:04:04,760 like Google any search engine but this is DEF CON and but usually these people 50 00:04:04,760 --> 00:04:11,000 use Google and you can try searching any search engine saying powered by PHP BB 51 00:04:11,000 --> 00:04:16,240 actually now Google has this thing that autocomplete so just do powered by and 52 00:04:16,240 --> 00:04:20,740 see the list of stuff that pops up really interesting so you search Google 53 00:04:20,740 --> 00:04:24,600 find some web application that you know has vulnerabilities and blindly try to 54 00:04:24,600 --> 00:04:27,740 infect them and these are 55 00:04:28,160 --> 00:04:35,020 other differences it propagates from a pre-selected genetic pool again not 56 00:04:35,020 --> 00:04:38,980 always there are other ways of doing this you can just blindly go and try to 57 00:04:38,980 --> 00:04:45,000 attack a different service are you actually filming me no okay so that 58 00:04:45,000 --> 00:04:55,420 light is nothing to do with anybody's been here at DEF CON in 2005 anybody 59 00:04:55,420 --> 00:04:56,760 gone to the match doc 60 00:04:58,160 --> 00:05:06,540 yeah no it's much there was no abstract but let's go back to issue and it 61 00:05:06,540 --> 00:05:11,000 affects servers which means it can infect desktops it's not very likely 62 00:05:11,000 --> 00:05:17,720 because most desktops should not run web servers but it usually affects servers 63 00:05:17,720 --> 00:05:24,200 rather than desktops so here is an example of some simple script that you 64 00:05:24,200 --> 00:05:27,920 just enter your string you're looking for in Google or some other search engine 65 00:05:28,160 --> 00:05:35,640 MSN yahoo etc yahoo etc and you find a ton of victims really pretty neat could 66 00:05:35,640 --> 00:05:41,920 be done manually but this is cool in URL by the way very powerful search tool so 67 00:05:41,920 --> 00:05:49,440 let's just look at what this means malware bots etc so web malware is 68 00:05:49,440 --> 00:05:57,580 cross-platform and so far this is the interesting part infected a ton and by 69 00:05:57,580 --> 00:06:02,360 time I mean thousands and thousands of web servers all out there already with 70 00:06:02,360 --> 00:06:07,800 to be controlled no DSL machines not dial-up machines I'm not saying these 71 00:06:07,800 --> 00:06:16,340 botnets are gone but web servers and what the attack platform means and again 72 00:06:16,340 --> 00:06:22,720 if you don't remember this is actually the name of the talk lots of web 73 00:06:22,720 --> 00:06:26,860 servers just consider all these collocation facilities the server farms 74 00:06:26,860 --> 00:06:27,240 Austin 75 00:06:27,580 --> 00:06:33,220 providers, unbelievable amount of servers with a lot of users on the same machine, and 76 00:06:33,220 --> 00:06:39,160 if even one of them runs some insecure web application, which we all know happens, right, 77 00:06:39,260 --> 00:06:43,240 and this is still kind of obvious, then the entire server is compromised. 78 00:06:44,260 --> 00:06:48,200 Just to be clear about this presentation, I'm going to talk about a lot of stuff we 79 00:06:48,200 --> 00:06:51,480 already know, and let's just go over the stuff we already know. 80 00:06:51,840 --> 00:06:54,440 So there's been a lot of work about PHP shells. 81 00:06:54,440 --> 00:06:59,920 It doesn't have to be necessarily PHP, it could be ASP, it can be written in Perl as 82 00:06:59,920 --> 00:07:05,000 far as I'm concerned, and generally, very well explored, we all heard about them or 83 00:07:05,000 --> 00:07:05,320 should have. 84 00:07:06,820 --> 00:07:13,400 Inclusion attacks, or RFI, thoroughly explored, and we have seen a lot of shells, actual shells 85 00:07:13,400 --> 00:07:22,520 out there, such as the R57 shell, or as Joe Stewart called it, Spawn-Through, which was 86 00:07:22,520 --> 00:07:23,140 very interesting. 87 00:07:23,200 --> 00:07:23,760 He showed, actually. 88 00:07:23,760 --> 00:07:30,640 An entire botnet that sends a lot of spam, about 57, I think, thousand servers, sending 89 00:07:30,640 --> 00:07:37,380 a ton of spam out there, and most of it was shares, running shares, or stocks, or whatever 90 00:07:37,380 --> 00:07:41,960 you want to call them, and this was done purely by these web servers using R57 shells, and 91 00:07:41,960 --> 00:07:44,300 guys, if you want to talk, go all the way to the back, because I can hear you. 92 00:07:45,120 --> 00:07:46,780 Yeah, yeah, you two, up in the front. 93 00:07:49,260 --> 00:07:50,320 Okay, let me try this. 94 00:07:50,620 --> 00:07:50,980 Hello! 95 00:07:51,940 --> 00:07:52,580 Yeah, you two. 96 00:07:53,160 --> 00:07:53,700 Thank you. 97 00:07:53,700 --> 00:07:54,120 Hi. 98 00:07:54,440 --> 00:07:55,060 Sorry about that. 99 00:07:55,140 --> 00:07:55,760 No, no problem. 100 00:07:55,900 --> 00:07:56,280 Can you share? 101 00:07:56,580 --> 00:07:57,140 Yeah, yeah. 102 00:07:57,220 --> 00:07:59,460 He lost his bag, so I'm going to put up a reward. 103 00:07:59,640 --> 00:08:00,820 What does the bag look like? 104 00:08:00,840 --> 00:08:01,200 Oh, hey! 105 00:08:01,480 --> 00:08:02,400 I put up a reward, yeah. 106 00:08:02,540 --> 00:08:04,800 Oh, there is a reward for a bag. 107 00:08:05,260 --> 00:08:06,740 Anybody has a bag? 108 00:08:10,840 --> 00:08:12,400 Or is anybody a douche? 109 00:08:14,960 --> 00:08:15,820 I don't care. 110 00:08:16,220 --> 00:08:16,940 Well, then you should have asked. 111 00:08:17,260 --> 00:08:18,040 I should have asked. 112 00:08:22,120 --> 00:08:22,840 So other... 113 00:08:22,840 --> 00:08:23,680 I mean, PHP should... 114 00:08:23,700 --> 00:08:24,760 Okay, let's get started. 115 00:08:24,980 --> 00:08:25,860 PHP shells... 116 00:08:25,860 --> 00:08:27,700 I don't know if you've been to any of my talks before. 117 00:08:27,880 --> 00:08:29,500 Five minutes, I just speak shit out of my ass. 118 00:08:30,260 --> 00:08:30,660 So... 119 00:08:34,200 --> 00:08:35,400 So you're leaving now. 120 00:08:35,620 --> 00:08:36,960 You only cared about your bag. 121 00:08:38,080 --> 00:08:38,880 His bag. 122 00:08:38,980 --> 00:08:40,180 His bag. 123 00:08:44,340 --> 00:08:44,740 Okay. 124 00:08:46,300 --> 00:08:48,140 So PHP shells, we know of. 125 00:08:48,400 --> 00:08:49,640 RFI attacks, we know of. 126 00:08:49,720 --> 00:08:51,440 R57 shell, which was analyzed. 127 00:08:51,600 --> 00:08:53,280 We have seen these shells and actually looked at them. 128 00:08:53,280 --> 00:08:53,880 We know of them. 129 00:08:54,140 --> 00:08:55,900 So why am I talking about this again? 130 00:08:56,160 --> 00:08:58,460 And what is all this shit, and how does it come together? 131 00:09:00,200 --> 00:09:06,220 So there is no other significant work, or no work whatsoever, done in this field up 132 00:09:06,220 --> 00:09:07,620 to a few months ago, which was February. 133 00:09:09,720 --> 00:09:14,120 And when the paper this presentation is based on was written, there have been some works 134 00:09:14,120 --> 00:09:21,120 by a guy named Jamie Ryden, I hope I pronounced his name, about web AniNets and web Anipots, 135 00:09:21,200 --> 00:09:23,260 but nothing really significant beyond that. 136 00:09:24,280 --> 00:09:25,600 So, new work. 137 00:09:26,440 --> 00:09:31,840 There is my work in cooperation with Kfeer Damari and Noam Rathaus, which is web server 138 00:09:31,840 --> 00:09:34,040 botnets and server farms and attack platforms. 139 00:09:34,380 --> 00:09:36,460 That was in Virus Bulletin in February. 140 00:09:37,040 --> 00:09:42,000 And of course, the great guys at the AniNet project with Know Your Enemy web application 141 00:09:42,000 --> 00:09:42,400 threats. 142 00:09:43,340 --> 00:09:48,380 These web server threats with shells was a very small portion of the work, but still 143 00:09:48,380 --> 00:09:49,020 very interesting. 144 00:09:49,440 --> 00:09:50,240 Good guys. 145 00:09:51,320 --> 00:09:53,240 And now let's talk about why this is important. 146 00:09:53,260 --> 00:09:53,880 Why this is even interesting. 147 00:09:54,020 --> 00:09:54,860 Why this is new. 148 00:09:56,400 --> 00:09:57,580 So, the injection. 149 00:09:58,260 --> 00:09:59,560 Okay, I'm not talking about this is new. 150 00:10:00,640 --> 00:10:01,360 The injection. 151 00:10:01,560 --> 00:10:03,060 So, let's actually read this. 152 00:10:03,180 --> 00:10:04,600 File inclusions are vulnerabilities. 153 00:10:04,760 --> 00:10:05,720 Okay, let's not read this. 154 00:10:06,460 --> 00:10:10,420 File inclusions are vulnerabilities in web applications which can allow an attacker to 155 00:10:10,420 --> 00:10:12,860 execute a script by including a file in an existing script. 156 00:10:12,960 --> 00:10:13,560 Okay, blah, blah, blah. 157 00:10:13,800 --> 00:10:21,120 There is an include command, extinct XSS, right, cross-scripting, only get entire scripts 158 00:10:21,120 --> 00:10:23,040 inside of just one instruction. 159 00:10:23,040 --> 00:10:23,680 Or something like that. 160 00:10:26,300 --> 00:10:31,460 And there are other types of vulnerabilities in post, in the URL, any type of vulnerability 161 00:10:31,460 --> 00:10:34,960 you want to think about that can also help you include code. 162 00:10:35,340 --> 00:10:37,580 And we can even upload, file upload vulnerabilities. 163 00:10:37,980 --> 00:10:42,400 Anybody has file upload enabled in their web application, blog? 164 00:10:43,140 --> 00:10:44,300 Not a very good idea. 165 00:10:44,980 --> 00:10:51,480 I had mine, after a lot of discussions and arguments, we decided to enable file upload 166 00:10:51,480 --> 00:10:52,100 in a blog. 167 00:10:52,100 --> 00:10:53,100 It was a blog I helped contribute to. 168 00:10:53,420 --> 00:10:59,820 And the very next day we got compromised because apparently somebody that actually 169 00:10:59,820 --> 00:11:05,660 secured the file upload issue made sure that people who reached the script can use it 170 00:11:05,660 --> 00:11:08,000 because the authentication test was commented out. 171 00:11:08,820 --> 00:11:09,780 You never know. 172 00:11:09,900 --> 00:11:11,360 Never trust upload from the web. 173 00:11:11,600 --> 00:11:12,460 So injection. 174 00:11:12,580 --> 00:11:15,620 You inject entire scripts into the current code. 175 00:11:15,900 --> 00:11:16,820 We know of that. 176 00:11:17,860 --> 00:11:19,940 And what injections look like? 177 00:11:20,040 --> 00:11:20,480 Okay. 178 00:11:22,140 --> 00:11:26,060 As you can see here, for example, you have whatever URL you've got, right? 179 00:11:26,260 --> 00:11:31,200 And this is a URL because it has two URIs in it. 180 00:11:31,800 --> 00:11:35,480 And you basically use the script. 181 00:11:35,620 --> 00:11:41,680 You include some other, something that's going on from badguy.tld, malware.cmd, question 182 00:11:41,680 --> 00:11:42,140 mark, et cetera. 183 00:11:42,320 --> 00:11:47,300 And badguy.tld is basically where the bad script will be hosted. 184 00:11:47,600 --> 00:11:48,880 And you injected it. 185 00:11:49,300 --> 00:11:51,660 I mean, no matter what exact vulnerability. 186 00:11:51,660 --> 00:11:53,720 We're actually talking of right now. 187 00:11:54,300 --> 00:11:55,600 It could be in WordPress. 188 00:11:55,920 --> 00:11:56,940 It could be in PHPVV. 189 00:11:57,460 --> 00:11:59,440 This is how most of them look. 190 00:11:59,760 --> 00:12:05,460 And the result in PHP code, actually this should be the other way around, is the result 191 00:12:05,460 --> 00:12:06,220 in PHP code is above. 192 00:12:06,400 --> 00:12:07,380 But this is what it would look like. 193 00:12:07,860 --> 00:12:08,920 Get in the page. 194 00:12:09,160 --> 00:12:09,640 Right? 195 00:12:09,720 --> 00:12:11,360 Inside the include line inside your script. 196 00:12:12,340 --> 00:12:17,040 And the interesting thing is whatever this may look like, it actually causes your web 197 00:12:17,040 --> 00:12:19,040 server to act like a client. 198 00:12:19,420 --> 00:12:20,800 You go out. 199 00:12:21,660 --> 00:12:24,700 And you download a script to your web server. 200 00:12:25,100 --> 00:12:28,260 Your web server serves the net. 201 00:12:29,620 --> 00:12:35,740 Now, unrelated to this particular threat of file inclusions, why should you allow your 202 00:12:35,740 --> 00:12:37,340 web server to serve the net? 203 00:12:39,200 --> 00:12:40,020 Basic rules. 204 00:12:40,240 --> 00:12:42,540 If we all follow the basic rules, we would have no problems. 205 00:12:42,780 --> 00:12:44,060 But this is where it all starts. 206 00:12:44,700 --> 00:12:48,140 So main types of web server malware. 207 00:12:49,080 --> 00:12:50,720 We've got a lot of scripts out there. 208 00:12:50,800 --> 00:12:51,340 Just consider. 209 00:12:51,660 --> 00:12:56,140 In the past, when you wanted to have control of the server, you would maybe have a shell. 210 00:12:56,660 --> 00:12:59,600 Maybe you have the computer connected to you as a connect back shell. 211 00:13:01,900 --> 00:13:06,480 But all these nice guys just came out and said, well, you know, there's this whole 212 00:13:06,480 --> 00:13:10,220 web thing going on now with web applications and maybe web 2.0. 213 00:13:10,720 --> 00:13:12,080 And why should we have to type? 214 00:13:14,120 --> 00:13:18,400 Especially when there is a port that's always open because it needs to serve the public. 215 00:13:18,560 --> 00:13:18,840 Right? 216 00:13:18,900 --> 00:13:19,620 That's port 80. 217 00:13:19,620 --> 00:13:26,240 We can connect to the web server, type in a URL to a file we injected into the web server, 218 00:13:26,380 --> 00:13:31,740 and have a GUI, have a web GUI, a user interface for our shell. 219 00:13:32,500 --> 00:13:33,380 That's much cooler. 220 00:13:33,460 --> 00:13:33,800 Isn't it? 221 00:13:33,900 --> 00:13:34,780 Again, nothing new there. 222 00:13:35,220 --> 00:13:37,760 So we have other types, not just shells. 223 00:13:37,920 --> 00:13:43,800 We have what I call foothold grabbers, which are beachhead, basically. 224 00:13:44,000 --> 00:13:45,560 Hey, you've got control. 225 00:13:45,780 --> 00:13:47,740 Now start uploading stuff and do whatever you want. 226 00:13:47,740 --> 00:13:51,760 We have the remote shell, which is basically an elaborate compromise tool. 227 00:13:51,880 --> 00:13:55,940 Run this command, download that, upload that, do this, whatever you want to do. 228 00:13:56,300 --> 00:14:00,400 And then we are starting to get to what this lecture is actually about, which is the bot. 229 00:14:01,680 --> 00:14:06,000 If we can upload scripts to do whatever we want, and this would of course run with the 230 00:14:06,500 --> 00:14:09,920 privileges of the web server, why shouldn't we upload bots? 231 00:14:10,060 --> 00:14:13,100 These are servers, strong lines, strong machines. 232 00:14:13,440 --> 00:14:14,380 We can use them. 233 00:14:15,440 --> 00:14:16,900 And we can use them for different things. 234 00:14:16,900 --> 00:14:19,220 It could be anonymous messaging, right? 235 00:14:19,440 --> 00:14:20,900 Somebody's on the phone right here. 236 00:14:21,020 --> 00:14:22,540 Guys, if you want to talk, go to the back. 237 00:14:22,740 --> 00:14:24,120 The cool people sit at the back. 238 00:14:26,080 --> 00:14:27,260 I never sit at the front. 239 00:14:28,300 --> 00:14:31,060 So anonymous, did I just say I'm cool? 240 00:14:34,220 --> 00:14:37,220 That's deduction in the Newton way. 241 00:14:37,460 --> 00:14:37,800 Okay. 242 00:14:38,140 --> 00:14:40,280 So you would have loved me. 243 00:14:40,360 --> 00:14:42,220 So anonymous messaging, you can spam. 244 00:14:42,340 --> 00:14:43,160 You can do defacements. 245 00:14:43,300 --> 00:14:44,740 I mean, consider where this all started. 246 00:14:45,080 --> 00:14:46,520 Anybody ever visit Zone H? 247 00:14:47,300 --> 00:14:48,380 Shut up, Warningwood. 248 00:14:50,860 --> 00:14:54,820 So all these defacements out there, people figured, hey, why shouldn't we just deface 249 00:14:54,820 --> 00:14:55,220 the page? 250 00:14:55,400 --> 00:14:56,900 Are you videotaping me? 251 00:14:59,360 --> 00:15:01,640 Can you turn off the blinking thing at least? 252 00:15:02,780 --> 00:15:03,260 No? 253 00:15:04,280 --> 00:15:04,940 Thank you. 254 00:15:07,940 --> 00:15:10,400 So why shouldn't we just deface these websites? 255 00:15:10,660 --> 00:15:16,380 If it's the website for a Chinese government organization, or if it's a website for some 256 00:15:16,900 --> 00:15:20,780 club, biking club in San Diego, we should be able to do more with this. 257 00:15:20,840 --> 00:15:21,480 This is a resource. 258 00:15:21,800 --> 00:15:22,460 Let's use it. 259 00:15:22,760 --> 00:15:23,140 Yes. 260 00:15:23,900 --> 00:15:24,920 Web 3.0. 261 00:15:24,960 --> 00:15:25,780 Web 3.0. 262 00:15:25,860 --> 00:15:26,460 I don't think so. 263 00:15:26,580 --> 00:15:26,700 No. 264 00:15:28,200 --> 00:15:32,800 At RSA, actually, somebody came and said, so what I've learned in this conference is 265 00:15:32,800 --> 00:15:33,900 Identity 2.0. 266 00:15:33,940 --> 00:15:37,260 And I was, oh, my God, Identity 2.0. 267 00:15:37,380 --> 00:15:42,620 So anonymous messaging, spam, defacements, and then let's make use of all this. 268 00:15:42,720 --> 00:15:46,340 Let's use these web servers that are so easy to hack into. 269 00:15:46,340 --> 00:15:48,340 And get a bot in there. 270 00:15:49,620 --> 00:15:50,340 Or not. 271 00:15:51,020 --> 00:15:53,240 We can do things that are much easier. 272 00:15:54,020 --> 00:15:58,560 Just upload some sort of shell that let's us spam. 273 00:15:59,240 --> 00:16:01,980 And it let's us spam many different emails. 274 00:16:02,240 --> 00:16:04,760 And we can copy paste these emails in. 275 00:16:06,180 --> 00:16:06,860 Or not. 276 00:16:07,960 --> 00:16:09,100 Let's do something else. 277 00:16:09,560 --> 00:16:10,000 Let's... 278 00:16:10,000 --> 00:16:11,120 Yes something. 279 00:16:12,980 --> 00:16:13,500 Okay. 280 00:16:13,540 --> 00:16:15,500 It's not exactly the same thing, but it's in a different language. 281 00:16:15,800 --> 00:16:16,320 Go. 282 00:16:17,660 --> 00:16:18,360 This is interesting. 283 00:16:19,120 --> 00:16:21,500 Your email, reply to, et cetera, blah, blah, blah, blah, blah. 284 00:16:21,580 --> 00:16:29,800 And then, all the way over here, or I'm not going to run to the other side of the room now. 285 00:16:32,440 --> 00:16:32,900 I'm fat. 286 00:16:35,720 --> 00:16:38,240 So all the way on the other side of the room, you'll have to figure it out for yourselves. 287 00:16:38,240 --> 00:16:47,100 Over there on the right, there is load addresses from MySQL. 288 00:16:48,400 --> 00:16:50,140 Or for those not in the States, MySQL. 289 00:16:50,560 --> 00:16:52,780 So isn't that cool? 290 00:16:53,840 --> 00:16:57,460 Now, this was actually the server I took this from. 291 00:16:58,200 --> 00:17:06,580 This shell connected to a server in France, which had a lot of remote databases on it of addresses. 292 00:17:08,240 --> 00:17:09,760 We're starting to see more advanced use now. 293 00:17:10,400 --> 00:17:13,140 So let's look at this web shell. 294 00:17:13,420 --> 00:17:17,020 It's called C99 Shell, and it has a ton of versions out there. 295 00:17:17,140 --> 00:17:18,460 I can't even begin to count them. 296 00:17:18,500 --> 00:17:18,980 Actually, I did. 297 00:17:19,060 --> 00:17:19,320 33. 298 00:17:22,260 --> 00:17:26,960 I didn't count last month, and there's a lot of stuff that the original authors didn't write and stuff like that. 299 00:17:27,600 --> 00:17:35,060 But as you can see here, we basically have a Linux machine running Apache, PHP 4.4.2. 300 00:17:36,840 --> 00:17:38,220 And this scrolls down. 301 00:17:38,240 --> 00:17:39,160 There are many other pages. 302 00:17:39,340 --> 00:17:40,940 And you can do pretty much whatever you want with that machine. 303 00:17:41,060 --> 00:17:41,500 It's yours. 304 00:17:41,620 --> 00:17:42,240 You own it. 305 00:17:42,760 --> 00:17:43,880 But let's stop now. 306 00:17:44,960 --> 00:17:51,280 Up to now, I actually did kind of speak out my ass and discuss file injections and PHP shells. 307 00:17:51,740 --> 00:17:52,620 Where are the botnets? 308 00:17:52,700 --> 00:17:54,360 So let me ask you a very serious question. 309 00:17:54,460 --> 00:17:57,700 Can somebody tell me what a botnet is before I continue? 310 00:17:58,180 --> 00:18:03,060 Yes, a botnet is when you, in most cases, violate other people's systems. 311 00:18:03,100 --> 00:18:05,740 In most cases, violate other people's systems. 312 00:18:06,080 --> 00:18:07,720 And add an actual application. 313 00:18:08,240 --> 00:18:09,320 Add an actual application. 314 00:18:10,720 --> 00:18:11,900 They're out in the server. 315 00:18:12,180 --> 00:18:13,540 For some purpose, you're sending... 316 00:18:13,540 --> 00:18:14,620 For some purpose, you're... 317 00:18:14,620 --> 00:18:16,240 Did you say gay something? 318 00:18:16,360 --> 00:18:16,680 No, what? 319 00:18:17,760 --> 00:18:18,820 A web page. 320 00:18:19,000 --> 00:18:19,760 Oh, a web page. 321 00:18:20,880 --> 00:18:21,980 I erode my ass. 322 00:18:22,240 --> 00:18:24,680 Or taking over some other servers. 323 00:18:25,660 --> 00:18:26,900 Or collect the processes. 324 00:18:27,440 --> 00:18:28,740 Run commands. 325 00:18:29,480 --> 00:18:31,060 Okay, let me define what a botnet is. 326 00:18:33,340 --> 00:18:35,520 Not that you're wrong, but you're wrong. 327 00:18:36,900 --> 00:18:38,020 And the reason is... 328 00:18:38,020 --> 00:18:40,380 The definitions in the security industry are so much fun. 329 00:18:40,500 --> 00:18:43,640 We can define everything 20 different times for 20 different things, 330 00:18:43,720 --> 00:18:45,180 and we would always argue about it. 331 00:18:45,780 --> 00:18:48,340 The cheapest type of... 332 00:18:48,340 --> 00:18:48,980 Well, anyway. 333 00:18:50,080 --> 00:18:50,740 What's a bot? 334 00:18:50,880 --> 00:18:52,000 Can anybody tell me what's a bot? 335 00:18:53,140 --> 00:18:53,900 A robot. 336 00:18:54,160 --> 00:18:54,620 What? 337 00:18:55,060 --> 00:18:56,160 A zombie machine. 338 00:18:56,160 --> 00:18:56,800 A zombie machine. 339 00:18:56,960 --> 00:18:57,060 What? 340 00:18:57,600 --> 00:18:58,080 Software. 341 00:18:58,360 --> 00:18:59,060 Software robot. 342 00:18:59,340 --> 00:19:02,760 Okay, defining what a bot is is something I'm still not able to do 343 00:19:02,760 --> 00:19:04,660 after over 10 years of working on it, 344 00:19:04,680 --> 00:19:06,940 because consider, it could be just one machine. 345 00:19:06,940 --> 00:19:10,460 A machine that's connecting to a command and control server being controlled. 346 00:19:10,820 --> 00:19:15,040 But it could be 10 machines, I mean, if they're all from the same NAT. 347 00:19:15,600 --> 00:19:17,380 Or let's consider, if it's one machine, 348 00:19:17,460 --> 00:19:23,980 and it has 2, 3, 20, 200 different samples of bots installed, 349 00:19:24,700 --> 00:19:26,860 it could be 20 different botnets. 350 00:19:28,160 --> 00:19:31,380 Not all these botnets are always active, so how do we define a bot? 351 00:19:31,640 --> 00:19:34,300 For now, let's define a bot as a Trojan horse. 352 00:19:35,300 --> 00:19:35,740 Why? 353 00:19:36,280 --> 00:19:36,720 Why? 354 00:19:36,940 --> 00:19:40,560 Because it's a basic Trojan horse, and I'm not going to really argue about the definitions. 355 00:19:40,900 --> 00:19:48,420 It is some sort of software, and this is taken from the something, something FAQ on Newsnet, 356 00:19:48,840 --> 00:19:49,840 if I remember it correctly. 357 00:19:49,940 --> 00:19:51,460 I'm completely ruining it right now. 358 00:19:51,780 --> 00:19:53,420 I read it 10 years ago. 359 00:19:54,080 --> 00:19:58,540 It is some sort of software that if you knew about it existing, 360 00:19:58,740 --> 00:20:02,000 or some of the things that it does, you would not approve of it as a user. 361 00:20:02,640 --> 00:20:03,780 That's a basic Trojan horse. 362 00:20:04,760 --> 00:20:06,640 And let's add to that and say that, 363 00:20:06,940 --> 00:20:07,900 most of these are remotely controlled, 364 00:20:08,080 --> 00:20:11,580 which means, if you have a Trojan horse on some machine, you own it. 365 00:20:12,260 --> 00:20:13,340 It's completely compromised. 366 00:20:13,480 --> 00:20:13,920 It's yours. 367 00:20:14,460 --> 00:20:17,580 Yes, you can't kick it when it doesn't work, but it's yours. 368 00:20:17,700 --> 00:20:18,700 You can pop the CD open. 369 00:20:19,500 --> 00:20:20,960 You can spam. 370 00:20:21,140 --> 00:20:23,760 You can anonymize everything through it, and that's fine. 371 00:20:25,600 --> 00:20:28,360 And then you say, hmm, I have 10 of these. 372 00:20:28,960 --> 00:20:30,240 I have 20 of these. 373 00:20:30,700 --> 00:20:31,940 I have 100 of these. 374 00:20:32,100 --> 00:20:33,000 I have a million of these. 375 00:20:33,500 --> 00:20:35,440 How do I control all of these together? 376 00:20:35,980 --> 00:20:36,920 It becomes a little bit complicated. 377 00:20:36,920 --> 00:20:38,240 It becomes a little bit of a logistical problem. 378 00:20:39,020 --> 00:20:44,720 So, let's have all these different Trojan-owned machines connect to me. 379 00:20:46,060 --> 00:20:50,080 That's not a very secure decision to make, because I can know who you are. 380 00:20:50,900 --> 00:20:52,180 Let's say you do it right now. 381 00:20:52,240 --> 00:20:55,640 You choose some server with a simple protocol, for example, IRC, 382 00:20:55,760 --> 00:20:59,320 which is a chat protocol most of us are intimately aware with. 383 00:21:00,280 --> 00:21:02,920 And all these bots will connect there and say, 384 00:21:03,020 --> 00:21:05,600 hey, I'm owned. Own me. Further. 385 00:21:08,060 --> 00:21:11,400 And that master server will be called a command and control server, 386 00:21:11,560 --> 00:21:13,420 a CNC, or a C2 if you're from the military. 387 00:21:14,040 --> 00:21:17,840 And that's what a botnet is to me, although it gets more complicated from that point on. 388 00:21:19,540 --> 00:21:26,000 And the definition is important right now, because this is an example from about six months ago. 389 00:21:27,740 --> 00:21:34,520 This is a list of, not a very large list, about 540 Ks of a text file. 390 00:21:35,560 --> 00:21:36,900 And I can't read it. 391 00:21:36,900 --> 00:21:42,560 But they basically list their shells as the attack URL. 392 00:21:43,100 --> 00:21:46,420 As you can see, for example, the first one was a university in Taiwan. 393 00:21:47,000 --> 00:21:49,520 And they had some sort of web application running. 394 00:21:49,760 --> 00:21:51,380 Over there you can see index.php, etc. 395 00:21:51,640 --> 00:21:56,560 And then you add the next one with the command.txt, which is the second URI. 396 00:21:56,680 --> 00:22:01,820 And that's the shell, sorry, that's the script they're injecting into that server. 397 00:22:02,340 --> 00:22:03,200 Makes any sense? 398 00:22:03,560 --> 00:22:06,880 Now, they are actually not listing the IPs. 399 00:22:06,900 --> 00:22:07,140 They're not listing the IP addresses. 400 00:22:07,300 --> 00:22:08,200 They're not listing the URLs. 401 00:22:08,640 --> 00:22:11,340 They are listing just the attack instructions. 402 00:22:12,000 --> 00:22:15,200 And this, for them, is a shell, which is very interesting. 403 00:22:17,800 --> 00:22:18,760 New malware discovered. 404 00:22:19,000 --> 00:22:19,900 Okay, not so new anymore. 405 00:22:21,040 --> 00:22:24,380 This is the second time I've given this presentation in public. 406 00:22:24,680 --> 00:22:28,580 And it's not really supposed to be extremely technical, so I apologize if anybody's concerned. 407 00:22:28,740 --> 00:22:29,460 It's more about the scale. 408 00:22:30,240 --> 00:22:32,920 And there was a new version of C99 shell out there. 409 00:22:33,640 --> 00:22:35,860 So you go on Google, C99 shell. 410 00:22:36,900 --> 00:22:43,260 It's a new shell tool modified by SYCO with a zero, and you'll find quite a bit of those. 411 00:22:43,940 --> 00:22:50,280 And we had, up to two months ago, about 243 unique samples. 412 00:22:50,840 --> 00:22:58,060 When I say unique, I don't mean somebody adding, this was created by SYCO at the footer, 413 00:22:58,060 --> 00:23:03,100 or something like that, small changes that somebody just took it and used it for their own ends. 414 00:23:04,600 --> 00:23:06,500 But completely different malware. 415 00:23:06,500 --> 00:23:07,780 Or variants of. 416 00:23:09,440 --> 00:23:10,560 So 243. 417 00:23:10,820 --> 00:23:13,320 I ran it against a few antiviruses. 418 00:23:13,540 --> 00:23:18,980 And at the time, only about 20 to 40% were on average detected. 419 00:23:19,500 --> 00:23:22,020 Half of that were detected wrongly. 420 00:23:22,440 --> 00:23:28,080 Now, I don't want to think about antivirus on the web server, for the web server. 421 00:23:28,860 --> 00:23:29,980 But, okay. 422 00:23:30,280 --> 00:23:31,320 So example three. 423 00:23:31,600 --> 00:23:34,240 And I'm quoting the guy because he was very, very excited. 424 00:23:35,100 --> 00:23:36,220 This on his own. 425 00:23:36,500 --> 00:23:41,320 He isn't new, but rather the way the program is delivered, by using PHP's evil function, 426 00:23:41,500 --> 00:23:50,280 and evil function, the new variant hides itself in base 64 and encoded block of data, 427 00:23:50,460 --> 00:23:52,140 which is also encrypted. 428 00:23:52,860 --> 00:23:56,960 The characters are rotated, so they don't appear to be in plain text. 429 00:23:57,200 --> 00:24:01,220 Now, I don't know how many of you have ever seen this happening, especially on bank websites. 430 00:24:01,680 --> 00:24:04,980 But encryption, which happens on the client side, is not encryption. 431 00:24:04,980 --> 00:24:08,720 Any protection on the client side can be kicked, or mutilated. 432 00:24:09,780 --> 00:24:11,840 But still, it's given us a lot of work. 433 00:24:11,940 --> 00:24:15,560 Instead of two minutes of reading the shell, we need to spend some two or three hours on it at times, 434 00:24:15,580 --> 00:24:16,620 to just understand what's going on. 435 00:24:17,240 --> 00:24:21,540 But these guys finally noticed, hey, somebody is looking at us. 436 00:24:21,660 --> 00:24:27,240 Somebody realized we're taking all these different web servers and using them as bots, or attack tools. 437 00:24:27,620 --> 00:24:29,040 And why is that interesting? 438 00:24:31,680 --> 00:24:34,720 So, number two, which was this one. 439 00:24:36,460 --> 00:24:38,900 Actually, as a CNC channel, for example. 440 00:24:40,260 --> 00:24:46,040 This is not as big as it used to be a few months ago, but you can Google search C100.php, 441 00:24:46,120 --> 00:24:50,620 and you'll find a lot of the different CNCs on the web itself through Google. 442 00:24:50,980 --> 00:24:55,340 And that's how it finds its command and control server, on web search, I'm sorry. 443 00:24:58,260 --> 00:25:03,020 Which is something that we have not seen before that point, at least me personally, not on this scale. 444 00:25:04,240 --> 00:25:04,960 And, you know, it's a lot of work. 445 00:25:04,960 --> 00:25:05,840 It was passworded. 446 00:25:06,020 --> 00:25:08,460 Again, there's no need to notice that we care. 447 00:25:08,800 --> 00:25:12,980 Up until this point, if you searched for web shows, you could find two blog entries, 448 00:25:13,260 --> 00:25:16,520 a discussion on the incident's mental list from 2005, 449 00:25:17,400 --> 00:25:21,180 a discussion on bug truck from the early 2006, 450 00:25:21,900 --> 00:25:25,500 and some blog posts on Johnny Long's web server. 451 00:25:26,040 --> 00:25:26,860 Nobody cared. 452 00:25:28,140 --> 00:25:30,120 So, why is this important? Let's look. 453 00:25:30,640 --> 00:25:33,980 Low-cost hosting. You have two to three, sometimes five or six. 454 00:25:35,360 --> 00:25:37,240 Thousand websites per box. 455 00:25:37,840 --> 00:25:40,880 Any user can run any web application. 456 00:25:42,060 --> 00:25:44,760 Web applications, mostly in PHP. 457 00:25:46,620 --> 00:25:50,420 Well, you know, open source, eye availability, PHP stuff, very cool. 458 00:25:51,020 --> 00:25:54,100 PHP has a ton of vulnerabilities, and I mean, really? 459 00:25:54,340 --> 00:25:54,860 No. 460 00:25:55,200 --> 00:25:56,700 PHP is secure, no kidding. 461 00:25:56,940 --> 00:25:58,160 I mean, insecure, no kidding. 462 00:25:58,960 --> 00:26:00,240 So, open source availability. 463 00:26:01,300 --> 00:26:03,960 PHP is bad security and ugly code. 464 00:26:05,600 --> 00:26:08,600 So, combining the fact that, yes? 465 00:26:09,700 --> 00:26:11,100 Same thing for .NET. 466 00:26:11,860 --> 00:26:12,260 The what? 467 00:26:12,460 --> 00:26:15,140 Same, exactly the same stuff for ASP.NET. 468 00:26:15,260 --> 00:26:16,140 ASP.NET, okay. 469 00:26:17,340 --> 00:26:19,060 I never used ASP.NET. 470 00:26:19,300 --> 00:26:21,040 I never used PHP. 471 00:26:21,960 --> 00:26:25,440 But, the thing is, just consider, if you want low-cost hosting, 472 00:26:25,500 --> 00:26:30,300 you go and pay $5, $7, $15, $20, more than that and you're screwed. 473 00:26:30,500 --> 00:26:31,780 I mean, why are you paying for that? 474 00:26:32,660 --> 00:26:34,800 And you have some virtual hosting. 475 00:26:34,960 --> 00:26:36,880 You have a machine, oh, no, no, not even that, that will cost more. 476 00:26:37,140 --> 00:26:38,180 What am I talking about? 477 00:26:38,620 --> 00:26:41,720 You have a shared environment with thousands of other users. 478 00:26:42,420 --> 00:26:48,680 Zero security or close to zero security because it won't pay for the provider to actually care about the security. 479 00:26:48,980 --> 00:26:52,720 It's really difficult for providers to care about security when they don't get paid for it. 480 00:26:53,100 --> 00:26:54,200 This is a problem, really. 481 00:26:54,440 --> 00:26:55,960 For once, I'm not being sarcastic. 482 00:26:57,580 --> 00:27:03,740 And then you share that server with so many different users or webmasters that love PHP. 483 00:27:04,960 --> 00:27:10,480 How many PHP application vulnerabilities do we see on Backtrack per week until they started apparently filtering them? 484 00:27:12,200 --> 00:27:21,320 I don't feel very secure suddenly because if any of these websites is compromised, I'm compromised, the machine is compromised, and it's not good. 485 00:27:22,060 --> 00:27:28,800 So, 3,000 users, any web application or script, will run with the permission of the web server. 486 00:27:30,140 --> 00:27:32,020 How do you run your web server? 487 00:27:32,420 --> 00:27:34,880 Anybody here who runs a web server runs it? 488 00:27:34,960 --> 00:27:35,460 Not as root? 489 00:27:36,780 --> 00:27:37,180 Really? 490 00:27:38,120 --> 00:27:39,540 Good going for DEF CON. 491 00:27:40,880 --> 00:27:45,800 Now, tell me, how many, once you're in the machine, how many local exploits are out there? 492 00:27:46,480 --> 00:27:48,380 Just people at the installation for the Linux kernel. 493 00:27:49,280 --> 00:27:50,080 A ton of them. 494 00:27:50,140 --> 00:27:54,820 Once you have access, even if you don't have root, you'll get it. 495 00:27:55,520 --> 00:27:58,620 And if you don't, I mean, you'll usually be able to do whatever you want anyway. 496 00:27:58,820 --> 00:28:01,260 You don't need that much of a high access level. 497 00:28:01,620 --> 00:28:02,680 This is not about quality. 498 00:28:02,940 --> 00:28:04,640 This is not about owning. 499 00:28:04,640 --> 00:28:09,120 Owning that server like in the good old days and discovering what's on it and doing stuff through it. 500 00:28:09,180 --> 00:28:10,180 This is about quantity. 501 00:28:12,400 --> 00:28:17,120 And then, when you have so many different servers, you have DDoS tools. 502 00:28:18,860 --> 00:28:20,020 Just imagine the idea. 503 00:28:20,420 --> 00:28:23,020 So, what do we actually do about these attack platforms? 504 00:28:23,180 --> 00:28:25,100 Because this is really, really big. 505 00:28:26,600 --> 00:28:27,740 We can try to detect it. 506 00:28:27,880 --> 00:28:29,580 We can do VA scanning. 507 00:28:29,680 --> 00:28:33,980 You know, run, I hate saying that because it sucks, but you can try running Nessus. 508 00:28:35,300 --> 00:28:41,840 So, or something else that actually detects all these web thingies and try and see if, 509 00:28:41,900 --> 00:28:43,960 hey, do I have any of these things on my box? 510 00:28:44,560 --> 00:28:46,300 It doesn't help you much, but hey, it's a start. 511 00:28:46,840 --> 00:28:49,120 You can look for known bads on a system. 512 00:28:50,500 --> 00:28:53,640 Guys, girls, I'm talking about antivirus for web servers. 513 00:28:53,820 --> 00:28:58,260 I am sure that by this time next year, we'll see one of the antivirus companies coming 514 00:28:58,260 --> 00:28:58,920 out with that. 515 00:29:00,180 --> 00:29:00,620 Patching. 516 00:29:01,900 --> 00:29:02,780 User responsibility. 517 00:29:04,640 --> 00:29:10,160 Do you want your user who is paying five bucks per month to be in charge of patching 518 00:29:10,160 --> 00:29:12,560 their own web applications? 519 00:29:13,180 --> 00:29:16,940 When, honestly, sometimes these web applications don't even have any patches out there. 520 00:29:17,840 --> 00:29:20,560 As you well know, a patch may not exist. 521 00:29:21,380 --> 00:29:23,000 Now, how much do you invest? 522 00:29:23,180 --> 00:29:25,540 Do you contact the user and then just one of them? 523 00:29:27,300 --> 00:29:29,700 Do you patch the site? 524 00:29:31,440 --> 00:29:31,940 Meaning? 525 00:29:35,040 --> 00:29:40,320 Do you go and actually look for every web application on the server and patch it and 526 00:29:40,320 --> 00:29:41,240 try to keep up with it? 527 00:29:42,300 --> 00:29:43,840 Not very possible. 528 00:29:45,460 --> 00:29:47,240 What about the server itself? 529 00:29:47,440 --> 00:29:53,860 Do many of these service providers even patch their own servers for OS vulnerabilities? 530 00:29:55,480 --> 00:29:57,000 You can do these things. 531 00:29:57,200 --> 00:29:58,820 They will help, but they're not perfect. 532 00:29:59,160 --> 00:30:02,620 They do not fit low-cost hosting. 533 00:30:02,700 --> 00:30:04,340 You cannot spend all that time. 534 00:30:04,340 --> 00:30:08,380 You can try and be reactive and treat some of these botnets, but honestly, some of what 535 00:30:08,380 --> 00:30:11,160 these have done, they have quietly patched their systems. 536 00:30:11,620 --> 00:30:15,680 They will choose just, for example, phpbb or some other well-known web applications 537 00:30:15,680 --> 00:30:20,360 that are problematic and just patch it out off quietly without ever telling anybody. 538 00:30:21,040 --> 00:30:22,200 Not a very good solution. 539 00:30:22,420 --> 00:30:24,420 It worked for them to a limited degree. 540 00:30:26,360 --> 00:30:29,500 So there are some small things we can do to try and make this better. 541 00:30:30,180 --> 00:30:33,880 We can disable allow URL file open. 542 00:30:33,880 --> 00:30:35,840 Again, or URL include in php. 543 00:30:36,220 --> 00:30:42,680 There are some equivalents for other scriptable languages, but this is for php. 544 00:30:43,020 --> 00:30:47,800 We can try and run in virtual environment or through to users, but what's the cost yet 545 00:30:47,800 --> 00:30:47,980 again? 546 00:30:48,140 --> 00:30:48,620 Pretty high. 547 00:30:49,600 --> 00:30:51,040 Doesn't really work. 548 00:30:51,560 --> 00:30:53,900 Don't allow surfing from a web server. 549 00:30:55,260 --> 00:31:02,000 My god, how many of us actually surf out of the firewalls to patch the checkpoint firewall 550 00:31:02,440 --> 00:31:03,600 or whatever firewall it is? 551 00:31:03,600 --> 00:31:04,640 Because we download it from the web. 552 00:31:05,840 --> 00:31:07,640 Any of us look at our policies lately? 553 00:31:07,960 --> 00:31:13,200 If we are not the people who do this, most firewalls surf the web, even if only to checkpoint 554 00:31:13,200 --> 00:31:15,740 or Juniper or whatever else you want to choose out there, Cisco. 555 00:31:16,600 --> 00:31:17,440 Not a good idea. 556 00:31:19,100 --> 00:31:24,240 There is more security and other such devices of application firewalls, IDSs, et cetera. 557 00:31:24,980 --> 00:31:28,360 They help, but pretty much useless in this situation, in my opinion. 558 00:31:28,520 --> 00:31:30,040 Some of us may disagree. 559 00:31:30,240 --> 00:31:33,060 I believe application firewalls are pretty much useless anyway, but never mind. 560 00:31:33,840 --> 00:31:35,920 And best practices, what are your own? 561 00:31:36,020 --> 00:31:37,440 Do you allow your people to surf out? 562 00:31:37,680 --> 00:31:39,240 What other things do you do? 563 00:31:41,720 --> 00:31:45,860 So quietly patch web applications, or at least the most known ones. 564 00:31:46,040 --> 00:31:48,760 I'm not sure that's a really good solution many people will like. 565 00:31:49,640 --> 00:31:52,160 It's the only thing that's worked so far, but it's not very good. 566 00:31:53,040 --> 00:31:54,380 Now let's boil it down. 567 00:31:55,620 --> 00:32:00,700 A battlefield with no escalation by the good guys is bad, and over time when we did this 568 00:32:00,700 --> 00:32:01,180 research. 569 00:32:02,140 --> 00:32:07,540 Aggregated attacker IP addresses, 85% of the time, were the same IP addresses. 570 00:32:07,900 --> 00:32:11,880 They did not use bots, they did not use proxies, they did not try to hide themselves. 571 00:32:12,360 --> 00:32:18,880 The same people from the same IP addresses would again and again and again, over a course 572 00:32:18,880 --> 00:32:21,860 of a long time, would be the same attackers worldwide. 573 00:32:22,700 --> 00:32:27,420 Which means there is an entire field out there that up to a few months ago, and still, just 574 00:32:27,420 --> 00:32:29,280 a few people are aware of this, which is unbelievable. 575 00:32:31,180 --> 00:32:32,160 They are unopposed. 576 00:32:34,020 --> 00:32:39,180 Escalation, reactionary attacks, knee jerk reactions are never good. 577 00:32:39,440 --> 00:32:41,140 But sometimes it's the best thing we can do. 578 00:32:41,200 --> 00:32:44,480 We can't wait for the civil bullet, or whatever you guys want to call it. 579 00:32:45,800 --> 00:32:48,060 So do we want to start an escalation battle? 580 00:32:48,160 --> 00:32:48,320 No. 581 00:32:49,160 --> 00:32:54,740 Do we want this battlefield of web server botnets to be completely ruled by the bad 582 00:32:54,740 --> 00:32:54,980 guys? 583 00:32:55,640 --> 00:33:00,060 Do we want our web servers all around the world to be infected? 584 00:33:00,260 --> 00:33:00,660 No. 585 00:33:02,100 --> 00:33:03,280 You guys are in security. 586 00:33:04,400 --> 00:33:07,140 Have you ever seen the attacker coming from the same IP address? 587 00:33:07,320 --> 00:33:07,540 Maybe. 588 00:33:08,080 --> 00:33:14,840 Have you ever seen them do it worldwide, from the same IP addresses, 85% of the time? 589 00:33:17,380 --> 00:33:22,300 When you look at your web server logs, you look for many different things. 590 00:33:22,740 --> 00:33:23,600 Not for this. 591 00:33:24,560 --> 00:33:29,680 Many of your web servers, and I'm not talking about PayPal, I'm not talking about Amazon.com. 592 00:33:29,680 --> 00:33:32,580 These are very low end and fruit vulnerabilities. 593 00:33:33,200 --> 00:33:38,560 And these vulnerabilities equal plain and simple remote code execution for web servers. 594 00:33:39,340 --> 00:33:44,120 And many of us are running these applications, or basing our own applications on this. 595 00:33:46,420 --> 00:33:47,780 85% of the time. 596 00:33:48,060 --> 00:33:50,980 We didn't even start the silly escalation war yet. 597 00:33:51,740 --> 00:33:52,300 Fuck! 598 00:33:55,340 --> 00:33:57,820 So we can compare this to SMTP. 599 00:33:57,900 --> 00:33:59,400 You know, in the open relay days? 600 00:33:59,520 --> 00:33:59,660 Yeah. 601 00:34:00,200 --> 00:34:00,960 The spam. 602 00:34:01,900 --> 00:34:05,220 Everybody was running around saying, close your open relays, this is not good. 603 00:34:05,860 --> 00:34:07,400 Guys, do something about this. 604 00:34:08,440 --> 00:34:09,180 Spam ruled. 605 00:34:10,080 --> 00:34:12,680 Until spammers were few and far apart. 606 00:34:13,360 --> 00:34:14,860 This is pretty much where we are today. 607 00:34:15,100 --> 00:34:17,360 And the big guys don't have the money to cover it. 608 00:34:17,740 --> 00:34:20,960 And we can concentrate the problem to these providers. 609 00:34:22,040 --> 00:34:28,300 And in the news, there have been at least two very large providers of thousands of web 610 00:34:28,300 --> 00:34:28,660 servers. 611 00:34:28,660 --> 00:34:30,880 Of each of them with that many websites. 612 00:34:31,420 --> 00:34:37,200 Just this past year, we have completely been owned entirely in the news. 613 00:34:38,580 --> 00:34:40,960 How often do these things get to the news? 614 00:34:42,680 --> 00:34:45,560 So we started the web AniNet task force. 615 00:34:45,740 --> 00:34:49,720 Originally we called it the web AniNet project, but we didn't want to get in trouble with 616 00:34:49,720 --> 00:34:51,300 the AniNet guys, which are really nice guys. 617 00:34:52,520 --> 00:34:55,640 So we haven't really done much in the past few months because we finished our research 618 00:34:55,640 --> 00:34:58,160 projects and didn't really initiate any new ones. 619 00:34:58,160 --> 00:35:03,660 But we have 14 members, some of them are the biggest co-location facilities around. 620 00:35:05,820 --> 00:35:10,740 And what we figure is if we gather this information, we can gather the malware. 621 00:35:11,080 --> 00:35:12,180 We can know about it. 622 00:35:12,280 --> 00:35:16,860 We can not just see what infects us, but around the world and prepare better for it. 623 00:35:17,260 --> 00:35:18,920 We can discover the command and control channels. 624 00:35:19,640 --> 00:35:21,960 All these botnets just move on to web servers. 625 00:35:22,080 --> 00:35:24,620 Hey, there you are using the same old IRC technology. 626 00:35:24,980 --> 00:35:25,060 Huh. 627 00:35:25,880 --> 00:35:28,140 We can go to silly solutions that actually work. 628 00:35:28,160 --> 00:35:31,180 They really work to a limited degree, like IP blacklists. 629 00:35:31,460 --> 00:35:36,280 Without blacklists, as evil as some of us may think they are, the Internet would not 630 00:35:36,280 --> 00:35:36,720 be here. 631 00:35:36,920 --> 00:35:38,720 No, the Internet is not going to die tomorrow. 632 00:35:38,880 --> 00:35:39,900 The sun will shine tomorrow. 633 00:35:40,260 --> 00:35:42,020 This is not a cry wolf thing. 634 00:35:42,800 --> 00:35:46,580 IP blacklists really kept the mail servers alive because they can't handle the load. 635 00:35:48,540 --> 00:35:49,380 URL blacklists. 636 00:35:49,560 --> 00:35:53,020 I mean, that's the simplest thing we can figure if this is an attack by URLs. 637 00:35:54,080 --> 00:35:55,860 We can just blacklist these URLs. 638 00:35:56,940 --> 00:35:57,980 Same with IP addresses. 639 00:35:58,020 --> 00:35:58,140 Don't worry. 640 00:35:58,140 --> 00:36:00,140 The same URLs are still being used. 641 00:36:00,260 --> 00:36:02,220 It's not as bad as it was a few months ago, but still. 642 00:36:04,220 --> 00:36:05,400 Web server antivirus? 643 00:36:06,140 --> 00:36:06,980 Oh, come on. 644 00:36:07,020 --> 00:36:08,660 They'll rebrand the antivirus for this. 645 00:36:09,140 --> 00:36:10,360 It's like they rebranded. 646 00:36:10,780 --> 00:36:14,340 McAfee keeps rebranding its IPS, so now they're rebranding it for botnets. 647 00:36:15,160 --> 00:36:15,960 It may work. 648 00:36:16,020 --> 00:36:19,140 I didn't like the idea, so I'm not saying anything bad about them. 649 00:36:19,900 --> 00:36:23,860 So you can join if you like and do some research, but let's talk about the impact. 650 00:36:24,020 --> 00:36:25,660 Just consider IIS botnets. 651 00:36:25,660 --> 00:36:29,080 Yeah, Linux botnets. 652 00:36:30,020 --> 00:36:31,020 It's a new ball game. 653 00:36:31,300 --> 00:36:32,100 It's not just. 654 00:36:32,200 --> 00:36:34,400 Again, these are there and they're the main thing. 655 00:36:34,560 --> 00:36:38,720 All these DSL and broadband, cable bots all around. 656 00:36:38,940 --> 00:36:41,240 They're the main problem, but this is a new ball game. 657 00:36:43,020 --> 00:36:45,760 And this is from obvious to not so much. 658 00:36:46,060 --> 00:36:46,920 IIS botnets. 659 00:36:47,000 --> 00:36:47,920 Yeah, that's what I want to do. 660 00:36:48,740 --> 00:36:51,160 So defacements, spam bots, stolen databases. 661 00:36:51,560 --> 00:36:53,000 Stolen databases are pretty important. 662 00:36:53,120 --> 00:36:53,520 Just consider. 663 00:36:53,520 --> 00:36:56,420 If you have access to the web server, why deface it? 664 00:36:56,460 --> 00:36:57,160 You can take the database. 665 00:36:57,440 --> 00:36:58,080 That's useful. 666 00:36:58,580 --> 00:37:01,660 And to be honest, defacements, I don't know if you noticed 667 00:37:01,660 --> 00:37:03,740 in Zone H, but some of these go away. 668 00:37:04,600 --> 00:37:09,340 And the reason I noticed is that about six months ago, we 669 00:37:09,340 --> 00:37:11,680 started seeing forums, websites, legitimate websites 670 00:37:12,100 --> 00:37:12,860 that you would enter. 671 00:37:13,180 --> 00:37:16,120 And as an unsuspecting user, you wouldn't even notice. 672 00:37:16,320 --> 00:37:20,420 But suddenly I see, hey, what is AnimatedCursor0.de doing on 673 00:37:20,420 --> 00:37:21,360 my favorite forum? 674 00:37:21,360 --> 00:37:23,800 And why are they trying to infect everybody on the 675 00:37:23,800 --> 00:37:24,000 forum? 676 00:37:24,640 --> 00:37:25,820 That's the defacements of today. 677 00:37:26,120 --> 00:37:28,940 Unless you want to do something like, hey, you 678 00:37:28,940 --> 00:37:32,920 Israelis suck, or hey, you Palestinians suck, regular 679 00:37:32,920 --> 00:37:36,140 defacement type of stuff that's going on, attack the web 680 00:37:36,140 --> 00:37:39,700 server, put in the malicious code, let users go on as 681 00:37:39,700 --> 00:37:42,680 usual, just yet another way to infect people. 682 00:37:42,960 --> 00:37:45,120 This is all low-level noise. 683 00:37:45,300 --> 00:37:47,700 We can't respond to all these millions of incidents out 684 00:37:47,700 --> 00:37:48,100 there anymore. 685 00:37:48,140 --> 00:37:50,400 Just when something really big comes along, do we respond to 686 00:37:50,400 --> 00:37:50,720 it really? 687 00:37:50,720 --> 00:37:50,840 Really. 688 00:37:53,720 --> 00:37:57,440 So what it is about, why this is new, it's the scale. 689 00:37:57,900 --> 00:37:58,840 It's the cost. 690 00:38:00,020 --> 00:38:02,280 And the fact that the bad guys just do whatever the 691 00:38:02,280 --> 00:38:03,060 fuck they want. 692 00:38:05,180 --> 00:38:09,720 And again, knowing about PHP scripts is fine, but there is 693 00:38:09,720 --> 00:38:12,860 close to no industry or community awareness of this. 694 00:38:14,720 --> 00:38:15,640 Again, it's DEF CON. 695 00:38:15,680 --> 00:38:16,140 I have to say it. 696 00:38:16,160 --> 00:38:16,280 Fuck. 697 00:38:16,520 --> 00:38:16,760 Hey. 698 00:38:21,540 --> 00:38:22,400 Hey, questions? 699 00:38:24,560 --> 00:38:25,040 Yeah. 700 00:38:26,040 --> 00:38:32,060 My question is, why haven't we had the IIS buttons on? 701 00:38:34,080 --> 00:38:34,760 We did. 702 00:38:34,900 --> 00:38:36,740 We do have IIS buttons out there. 703 00:38:37,160 --> 00:38:39,780 Well, but those IIS, I mean, PHP environment. 704 00:38:40,780 --> 00:38:43,940 He asked, why do people not see IIS buttons? 705 00:38:44,060 --> 00:38:45,380 And I'm saying, this is not a Linux problem. 706 00:38:45,560 --> 00:38:47,180 People do see IIS buttons. 707 00:38:47,280 --> 00:38:48,120 They are out there. 708 00:38:48,160 --> 00:38:48,980 You just need to look for them. 709 00:38:49,160 --> 00:38:49,940 You're not aware. 710 00:38:49,940 --> 00:38:50,060 You're not aware. 711 00:38:52,000 --> 00:38:52,660 Prove me wrong. 712 00:38:54,900 --> 00:38:55,620 Other questions? 713 00:38:56,540 --> 00:38:56,940 Yes? 714 00:38:57,840 --> 00:38:59,520 Speaking of bindings in general, not 715 00:38:59,520 --> 00:39:03,980 specifically WebSense, but how frequently do you see SSL 716 00:39:03,980 --> 00:39:05,760 being used in command and control protocol? 717 00:39:06,100 --> 00:39:07,140 SSL for command and control? 718 00:39:07,600 --> 00:39:08,800 How frequently do you see it? 719 00:39:08,800 --> 00:39:09,300 How frequently? 720 00:39:09,560 --> 00:39:10,420 I have no idea. 721 00:39:10,480 --> 00:39:12,460 I can pull a number out of my ass, but I honestly haven't 722 00:39:12,460 --> 00:39:13,620 really followed this for a while. 723 00:39:14,820 --> 00:39:15,220 . 724 00:39:17,580 --> 00:39:19,320 We can continue the conversation a little bit 725 00:39:19,320 --> 00:39:19,500 later. 726 00:39:19,940 --> 00:39:20,300 Other questions? 727 00:39:20,560 --> 00:39:20,780 Anybody? 728 00:39:21,060 --> 00:39:21,560 Yes? 729 00:39:22,120 --> 00:39:26,160 Do you think that we can start using these services for legitimate 730 00:39:26,160 --> 00:39:28,120 reasons and start working in that? 731 00:39:28,220 --> 00:39:29,780 Could that be able to expertise in the community? 732 00:39:30,000 --> 00:39:31,700 Use botnets for legitimate purposes. 733 00:39:32,860 --> 00:39:33,380 Try. 734 00:39:34,640 --> 00:39:35,580 Distributed.net. 735 00:39:37,100 --> 00:39:37,940 I don't know. 736 00:39:38,100 --> 00:39:38,500 Yes? 737 00:39:38,980 --> 00:39:40,000 Publish your bindings. 738 00:39:40,220 --> 00:39:40,560 What? 739 00:39:40,900 --> 00:39:45,300 Publish your bindings, like, net ID lists, net URL lists. 740 00:39:45,480 --> 00:39:46,220 Do you publish those? 741 00:39:46,760 --> 00:39:49,280 These are not published, but I have no reason to hide them. 742 00:39:49,400 --> 00:39:49,780 So. 743 00:39:51,060 --> 00:39:54,380 I mean, I have the paper available online. 744 00:39:54,500 --> 00:39:56,320 The one I wrote for virus bulletin. 745 00:39:56,480 --> 00:39:57,320 Same title. 746 00:39:58,360 --> 00:39:58,880 . 747 00:39:59,820 --> 00:40:01,660 I did not update it in a while. 748 00:40:01,840 --> 00:40:02,160 No. 749 00:40:02,600 --> 00:40:03,120 Sorry. 750 00:40:04,440 --> 00:40:05,380 Other questions? 751 00:40:06,140 --> 00:40:06,660 Yeah. 752 00:40:06,820 --> 00:40:07,260 Anybody? 753 00:40:08,140 --> 00:40:08,660 Yes? 754 00:40:09,520 --> 00:40:10,040 . 755 00:40:13,120 --> 00:40:17,180 I did not really distribute the primary sources of attack 756 00:40:17,180 --> 00:40:17,740 by countries. 757 00:40:17,940 --> 00:40:19,640 But does that matter? 758 00:40:19,780 --> 00:40:19,940 We're online. 759 00:40:20,320 --> 00:40:21,040 Since when? 760 00:40:21,780 --> 00:40:23,660 I mean, yes, that's cool data. 761 00:40:23,840 --> 00:40:26,540 But I personally have not found it to be useful to see 762 00:40:26,540 --> 00:40:27,360 where the bots are located. 763 00:40:28,580 --> 00:40:29,060 . 764 00:40:30,620 --> 00:40:31,100 What? 765 00:40:31,800 --> 00:40:32,280 . 766 00:40:34,360 --> 00:40:34,840 Yes. 767 00:40:35,440 --> 00:40:36,400 Same IP addresses. 768 00:40:36,800 --> 00:40:39,520 Sorry, I do not have that data available right here. 769 00:40:40,680 --> 00:40:41,160 Yes. 770 00:40:41,620 --> 00:40:42,480 Any questions? 771 00:40:44,200 --> 00:40:45,720 Thank you very much for listening. 772 00:40:45,980 --> 00:40:47,700 And I'm sorry I didn't say fuck enough. 773 00:40:49,780 --> 00:40:50,300 Thank you.