1 00:00:00,000 --> 00:00:03,340 Greetings, everyone. My name is Russ McCree. Thanks for coming, sticking around. 2 00:00:04,160 --> 00:00:05,560 Mike Bailey on my right. 3 00:00:08,540 --> 00:00:12,040 We are, unfortunately for some of you guys who are already here, 4 00:00:12,120 --> 00:00:16,440 talking about C-SERV very specifically and very targeted attacks against multiple platforms. 5 00:00:17,220 --> 00:00:21,400 There's certainly some crossover from the fine performance you saw just prior to us, 6 00:00:21,440 --> 00:00:25,760 so we apologize for that, but our mission with this discussion is more to 7 00:00:25,760 --> 00:00:32,360 point out how very specifically this attack can be used across so many interfaces, 8 00:00:32,600 --> 00:00:37,340 so many platforms, so many places, and how incredibly inherent it is to most web apps. 9 00:00:37,580 --> 00:00:43,180 So there is some repeat. I apologize for that, but I think you'll find it. 10 00:00:43,480 --> 00:00:44,980 We'll try to skim over those parts. 11 00:00:45,160 --> 00:00:48,480 Yeah, exactly. We won't tell you how to fix it, we promise. 12 00:00:50,920 --> 00:00:55,120 We won't tell you our employers, but in case you know, please don't attribute any of this to them. 13 00:00:58,100 --> 00:00:58,760 Carry on. 14 00:00:58,900 --> 00:00:59,160 All right. 15 00:01:00,260 --> 00:01:03,220 Basically, the gist of this talk is that C-SERV is bad stuff. 16 00:01:04,480 --> 00:01:10,740 It's a very underappreciated vulnerability, and it's all over the place. 17 00:01:11,160 --> 00:01:16,240 Because it usually gets rated as a pretty minimal issue, it almost never gets fixed, 18 00:01:16,820 --> 00:01:20,780 and that means that we have these kinds of holes all over it. 19 00:01:22,040 --> 00:01:22,480 Spacebar. 20 00:01:23,120 --> 00:01:23,560 Spacebar. 21 00:01:23,740 --> 00:01:24,180 Okay. 22 00:01:24,620 --> 00:01:25,600 I'm not very good at this. 23 00:01:25,760 --> 00:01:26,160 It's a computer thing. 24 00:01:26,360 --> 00:01:26,760 That's all right. 25 00:01:27,000 --> 00:01:27,540 All right. 26 00:01:28,000 --> 00:01:30,960 So in case you didn't know, in case you weren't at the last talk, 27 00:01:31,080 --> 00:01:37,540 basically a cross-site request forgery is making a user do something that he didn't intend to do, 28 00:01:37,620 --> 00:01:38,900 usually against another site. 29 00:01:40,140 --> 00:01:41,600 Okay, always against another site. 30 00:01:41,680 --> 00:01:42,560 Well, all right. 31 00:01:43,860 --> 00:01:48,820 If that user is an authenticated user on that other website that you're attacking, 32 00:01:49,320 --> 00:01:53,780 you can use it to escalate privileges and perform actions that he didn't intend to do. 33 00:01:54,640 --> 00:01:55,340 There are... 34 00:01:55,340 --> 00:01:58,300 There are other attacks you can use that don't really have anything to do with the session 35 00:01:58,300 --> 00:02:01,220 or the authenticated user, but we'll get into that later. 36 00:02:03,520 --> 00:02:06,400 Yeah, one of the key concerns, again, is that, you know, 37 00:02:06,460 --> 00:02:10,080 okay, surprise, surprise, 90-plus percent of websites have vulnerabilities. 38 00:02:10,560 --> 00:02:11,500 Yes, we know. 39 00:02:11,620 --> 00:02:14,120 The reality is, though, certain things that can be fixed, 40 00:02:14,280 --> 00:02:17,380 certain things that can be done to prevent are so rarely done, 41 00:02:17,540 --> 00:02:21,740 and when the impact, in particular, to C-SERV attacks is so high, 42 00:02:21,920 --> 00:02:24,380 we believe that it really actually borders on negligence, 43 00:02:24,380 --> 00:02:26,780 and while that may be somewhat counterintuitive, 44 00:02:26,880 --> 00:02:30,520 we think that there's a responsibility here in site coders and providers 45 00:02:30,520 --> 00:02:35,160 that really, for reasons of millions and millions of people at risk, 46 00:02:35,240 --> 00:02:36,380 we think should be fixed, 47 00:02:36,520 --> 00:02:39,940 and Mike, in particular, has got some very, 48 00:02:40,780 --> 00:02:42,940 shall we say, some exemplars to prove that point. 49 00:02:43,040 --> 00:02:48,980 So we have, I would argue, it's never-ending. 50 00:02:49,060 --> 00:02:51,220 We're going to try to limit what we talk about here today. 51 00:02:51,300 --> 00:02:54,260 There are some things that we can't talk about that will be coming out, 52 00:02:54,380 --> 00:02:58,220 say, next four months probably is about accurate. 53 00:02:58,440 --> 00:03:01,640 Some, well, I won't even describe what they are, 54 00:03:01,820 --> 00:03:06,420 but suffice it to say, the impacts are larger than imagined 55 00:03:06,420 --> 00:03:08,580 with regard to anything we're going to show you today, 56 00:03:08,740 --> 00:03:11,280 but nonetheless, I think this stuff proves the point, 57 00:03:11,320 --> 00:03:12,760 particularly when it comes to wormable stuff 58 00:03:12,760 --> 00:03:19,240 and or just flat-out, in essence, compromise of a system right up to admin. 59 00:03:20,320 --> 00:03:22,280 All right, let's move along. 60 00:03:24,720 --> 00:03:26,380 Okay, cross-site request forging. 61 00:03:26,440 --> 00:03:27,200 It still works. 62 00:03:28,200 --> 00:03:28,720 Woo-hoo. 63 00:03:28,820 --> 00:03:30,160 All right, we're going to show you how to prevent it. 64 00:03:30,240 --> 00:03:33,060 We will breeze through that because that's not interesting here, 65 00:03:33,200 --> 00:03:37,060 but first of all, we're going to show you what you can break with it. 66 00:03:39,200 --> 00:03:39,760 All right. 67 00:03:42,140 --> 00:03:44,300 We get this one all the time when we try to report stuff, 68 00:03:44,400 --> 00:03:45,800 and it's like, well, look, it doesn't matter 69 00:03:45,800 --> 00:03:47,240 because somebody has to do something stupid. 70 00:03:47,440 --> 00:03:49,500 Well, yes, but if somebody does something stupid 71 00:03:49,500 --> 00:03:52,060 in the context of your application, it's still your problem, 72 00:03:52,140 --> 00:03:54,020 and they obviously don't care, so. 73 00:03:54,700 --> 00:03:55,660 Everyone clicks links. 74 00:03:55,860 --> 00:03:56,480 Yes, we know. 75 00:03:57,020 --> 00:03:58,380 Mike can tell you, in particular, 76 00:03:58,780 --> 00:04:01,260 to the extent that somebody obviously clicked a link, 77 00:04:01,440 --> 00:04:03,860 i.e., the CEO of Strong Webmail, 78 00:04:04,000 --> 00:04:05,420 and it cost him $10,000, 79 00:04:06,220 --> 00:04:09,000 which Mike paid for this trip with, so. 80 00:04:10,840 --> 00:04:11,240 Explain. 81 00:04:11,480 --> 00:04:12,320 That's probably worthwhile. 82 00:04:12,520 --> 00:04:13,460 It's worth a beer, too. 83 00:04:13,760 --> 00:04:14,460 I have beer. 84 00:04:14,740 --> 00:04:15,920 Thank you, Trey, for it. 85 00:04:16,140 --> 00:04:18,200 So my mom's going to watch this video later, 86 00:04:18,260 --> 00:04:19,080 and she's going to be pissed. 87 00:04:22,020 --> 00:04:24,360 Mike's additional skill is that he actually brewed this. 88 00:04:24,360 --> 00:04:24,720 He actually brewed this beer. 89 00:04:30,740 --> 00:04:32,600 All right, so Strong Webmail. 90 00:04:33,040 --> 00:04:34,060 This is a fun story. 91 00:04:34,580 --> 00:04:37,980 I was just sitting on my computer one day, 92 00:04:38,060 --> 00:04:39,740 and up on Twitter pops, 93 00:04:40,680 --> 00:04:42,260 some people were passing this link around 94 00:04:42,260 --> 00:04:43,420 to strongwebmail.com. 95 00:04:44,040 --> 00:04:46,040 They were having this contest that if you can hack 96 00:04:46,040 --> 00:04:47,380 into our webmail, you get 10 grand. 97 00:04:48,520 --> 00:04:50,560 And a couple of us, you know, 98 00:04:50,580 --> 00:04:52,260 we're just passing the link around, joking about it, 99 00:04:52,300 --> 00:04:53,920 like, yeah, that's not going to go well. 100 00:04:53,920 --> 00:04:57,360 And then Lance James, if you're on Twitter, 101 00:04:57,440 --> 00:04:59,320 he's XSSExploits, he says, you know, 102 00:04:59,760 --> 00:05:00,780 let's go ahead and do this. 103 00:05:00,920 --> 00:05:03,440 Let's go sign up for an account and win this money. 104 00:05:03,580 --> 00:05:04,580 And I'm like, okay. 105 00:05:05,800 --> 00:05:07,420 So Lance bankrolls it. 106 00:05:07,480 --> 00:05:09,300 He pays the $5 to set up an account. 107 00:05:10,140 --> 00:05:10,560 That's right. 108 00:05:11,680 --> 00:05:12,420 Thank you, Lance. 109 00:05:12,720 --> 00:05:15,580 Yeah, and once we got, once we set up an account 110 00:05:15,580 --> 00:05:17,260 and logged in, within the first minute, 111 00:05:17,280 --> 00:05:18,460 we found a cross-site scripting holes. 112 00:05:19,660 --> 00:05:20,020 Um... 113 00:05:22,260 --> 00:05:22,620 We... 114 00:05:24,140 --> 00:05:24,980 Where were they going? 115 00:05:25,480 --> 00:05:26,040 All right. 116 00:05:26,960 --> 00:05:28,540 Once we had the cross-site scripting holes, 117 00:05:28,620 --> 00:05:29,960 it was just a matter of coding a payload 118 00:05:29,960 --> 00:05:32,160 and figuring out how to get it to execute. 119 00:05:32,620 --> 00:05:35,760 We weren't sure if the CEO of the company 120 00:05:35,760 --> 00:05:37,440 actually checked this e-mail account. 121 00:05:37,500 --> 00:05:39,300 We figured it was probably just a dummy account set up 122 00:05:39,300 --> 00:05:41,340 because we didn't really think they were planning on paying. 123 00:05:42,320 --> 00:05:44,760 And so we sent in... 124 00:05:44,760 --> 00:05:46,480 The cross-site scripting hole we found, 125 00:05:47,580 --> 00:05:52,680 it involved injecting HTML into the subject line of an e-mail. 126 00:05:53,500 --> 00:05:53,900 And so we sent in... 127 00:05:53,920 --> 00:05:57,040 And when he viewed it in the e-mail web mail client, 128 00:05:57,220 --> 00:05:59,680 it would execute and own his account. 129 00:06:01,580 --> 00:06:03,620 We had to figure out how to get him to look at this e-mail 130 00:06:03,620 --> 00:06:05,200 because we didn't think he actually logged in. 131 00:06:05,500 --> 00:06:08,480 So what we did, we set the subject of that e-mail to, 132 00:06:08,560 --> 00:06:09,700 hey, we think we've won. 133 00:06:15,400 --> 00:06:17,240 And who could resist clicking on that? 134 00:06:19,160 --> 00:06:21,580 So he, you know, we're watching the logs. 135 00:06:21,580 --> 00:06:24,360 As soon as he hits that, the payload executes. 136 00:06:24,660 --> 00:06:28,600 And we got all the information we needed to win our 10 grand. 137 00:06:36,660 --> 00:06:39,240 And so while that's not really a cross-site request forgery story, 138 00:06:39,380 --> 00:06:39,900 it's a fun story. 139 00:06:40,160 --> 00:06:42,400 And it demonstrates our next point here. 140 00:06:43,820 --> 00:06:44,460 Quick tools. 141 00:06:44,720 --> 00:06:46,220 I mean, the thing about tools is, yeah, 142 00:06:46,260 --> 00:06:47,840 you can do this either manually, whatever you want, 143 00:06:47,920 --> 00:06:50,020 any kind of practicing mechanism. 144 00:06:50,540 --> 00:06:51,560 I prefer tampered data. 145 00:06:51,580 --> 00:06:52,440 He likes Hackbar. 146 00:06:52,720 --> 00:06:54,340 You know, for IE heads, there's Fiddler. 147 00:06:54,540 --> 00:06:55,500 All the same thing. 148 00:06:55,560 --> 00:06:57,120 See the parameter, break the app. 149 00:06:58,980 --> 00:07:00,660 Like the McAfee Secure app. 150 00:07:00,960 --> 00:07:01,320 Okay. 151 00:07:01,520 --> 00:07:02,080 Sorry, James. 152 00:07:04,680 --> 00:07:05,400 McAfee Secure. 153 00:07:05,440 --> 00:07:06,800 This is one that hit. 154 00:07:06,960 --> 00:07:09,440 This was in the news, I think, in May. 155 00:07:10,340 --> 00:07:14,160 I published some cross-site request forgery holds in the McAfee. 156 00:07:14,200 --> 00:07:15,760 Actually, it's McAfee I found out last night. 157 00:07:16,180 --> 00:07:17,520 You pronounce it McAfee. 158 00:07:18,880 --> 00:07:21,400 But I found some cross-site requests. 159 00:07:21,400 --> 00:07:24,680 I found some cross-site request forgery holds in their McAfee Secure application, 160 00:07:25,080 --> 00:07:29,100 which you use to scan websites and find vulnerabilities in websites. 161 00:07:32,380 --> 00:07:34,820 So, I was using this application, actually, 162 00:07:34,860 --> 00:07:40,300 and I noticed that it wasn't, we'll get into the protections a little bit later. 163 00:07:40,380 --> 00:07:41,640 We'll brush, we'll go through that quickly. 164 00:07:41,920 --> 00:07:44,260 But I noticed it wasn't protecting against this stuff. 165 00:07:44,420 --> 00:07:48,180 So I coded in a payload, and I set up an, a exploit 166 00:07:48,180 --> 00:07:50,260 so that if you hit my evil website, 167 00:07:50,260 --> 00:07:52,240 and you're logged into their account, 168 00:07:52,420 --> 00:07:54,840 I add myself as an administrative user to your account, 169 00:07:54,920 --> 00:07:56,540 and then I can scan your website for vulnerabilities. 170 00:07:58,300 --> 00:08:03,820 And so, it's just kind of ironic having that in the McAfee Secure portal. 171 00:08:04,120 --> 00:08:06,980 I actually have screenshots from it. 172 00:08:07,780 --> 00:08:09,780 Basically, I just described what happens, though. 173 00:08:09,820 --> 00:08:11,180 You got three users set up on this account. 174 00:08:12,020 --> 00:08:13,100 You hit my website. 175 00:08:13,320 --> 00:08:14,120 It has an iframe. 176 00:08:14,260 --> 00:08:15,420 I've got the URL there. 177 00:08:15,560 --> 00:08:18,100 The basic idea is add user dot whatever. 178 00:08:18,820 --> 00:08:19,260 Yeah. 179 00:08:20,440 --> 00:08:23,040 It loads that up in an iframe, adds my user, 180 00:08:23,820 --> 00:08:26,100 and shoots me an email with my temporary password. 181 00:08:26,420 --> 00:08:30,500 So, this is completely blind and zero-knowledge attack. 182 00:08:30,700 --> 00:08:34,140 If you're logged in, I get an email with an account password. 183 00:08:37,380 --> 00:08:38,040 All right. 184 00:08:38,360 --> 00:08:40,760 Obviously, the McAfee implications are many. 185 00:08:40,780 --> 00:08:43,840 It's the ability to then scan whomever, whenever, however, 186 00:08:44,000 --> 00:08:47,720 gives you a whole other subset of vulnerabilities to play with, so. 187 00:08:49,300 --> 00:08:49,740 Linksys. 188 00:08:49,740 --> 00:08:51,700 This one was something that I stumbled on, 189 00:08:51,740 --> 00:08:53,260 because I actually have this device at the house. 190 00:08:53,360 --> 00:08:54,720 No, it's not available to the Internet. 191 00:08:56,100 --> 00:09:03,960 And ultimately, when reporting it in a brand-new WRT160N internal device, 192 00:09:04,240 --> 00:09:05,620 Linksys said, and I quote. 193 00:09:05,900 --> 00:09:07,800 I apologize if you guys are here or anywhere. 194 00:09:08,140 --> 00:09:12,000 We can't reasonably prevent C-SERVs without logging down our code. 195 00:09:12,120 --> 00:09:15,100 The compromise that we made here is to have a timeout on the web interface 196 00:09:15,100 --> 00:09:18,180 so users are logged out after 10 minutes of inactivity. 197 00:09:18,180 --> 00:09:22,660 We also advise users not to click on suspicious links while logged into the web interface 198 00:09:22,660 --> 00:09:25,240 or close the web interface as soon as they are finished configuring the router. 199 00:09:25,400 --> 00:09:26,680 They claim this language is on the site. 200 00:09:26,780 --> 00:09:27,460 I've not seen it. 201 00:09:27,520 --> 00:09:28,500 I did go looking for it. 202 00:09:28,660 --> 00:09:32,040 And obviously, none of these mitigations are particularly useful 203 00:09:32,040 --> 00:09:36,600 when it comes to breaking things, which I will show you. 204 00:09:42,160 --> 00:09:44,340 So, here's logging in with my known good account. 205 00:09:45,060 --> 00:09:47,000 I hope you guys can see this within reason. 206 00:09:47,000 --> 00:09:50,720 You can see that my current password is I'm a doofus. 207 00:09:52,700 --> 00:09:54,220 And it, of course, will let me in. 208 00:09:57,920 --> 00:09:58,880 And there we are. 209 00:09:59,440 --> 00:10:04,460 So, in classic ATT&CK form, well, first the form itself, 210 00:10:04,920 --> 00:10:08,740 it will ultimately force the account to change its passwords to really doofus. 211 00:10:10,560 --> 00:10:13,760 And we'll do that through the classic social engineering attempt. 212 00:10:14,240 --> 00:10:16,980 From your friends at Linksys, please log into your router. 213 00:10:17,000 --> 00:10:17,760 And upgrade now. 214 00:10:18,840 --> 00:10:21,040 Which, inevitably, somebody will always click. 215 00:10:24,740 --> 00:10:30,380 And you'll find that, in fact, now if I log back in as if I were the attacker, 216 00:10:30,620 --> 00:10:33,620 I'll be doing so with the account that the CSERF script forced. 217 00:10:35,280 --> 00:10:37,960 Which is, again, really doofus. 218 00:10:42,620 --> 00:10:46,040 Now, this is an ATT&CK on one network device, one router. 219 00:10:46,040 --> 00:10:48,380 When we started looking at this kind of thing, 220 00:10:48,900 --> 00:10:54,600 we found out that almost every web application we look at has these kinds of holes, 221 00:10:55,000 --> 00:10:57,080 especially the ones that are sitting on your internal network. 222 00:10:57,300 --> 00:10:59,640 And everybody thinks, you know, my internal network is safe. 223 00:10:59,720 --> 00:11:02,080 Nobody else can get to that, except for your browser can get to it. 224 00:11:03,340 --> 00:11:07,940 So, I think we have a few more examples of other devices that sit on your internal network 225 00:11:07,940 --> 00:11:09,260 that are vulnerable to this kind of attack. 226 00:11:11,640 --> 00:11:14,700 Netgear, on my, I know Sean hates blogs, I understand. 227 00:11:14,920 --> 00:11:16,020 On my blog, just part of it. 228 00:11:16,020 --> 00:11:17,220 I did a Netgear attack. 229 00:11:17,460 --> 00:11:19,060 I won't bother you with it here. 230 00:11:19,200 --> 00:11:24,740 But it's very much the same thing where we were able to force the remote management interface on 231 00:11:24,740 --> 00:11:28,820 where typically it's off by default and immediately change the access port as well 232 00:11:28,820 --> 00:11:33,420 in a fashion that it made it somewhat visible, not only to me, but to any bots going by. 233 00:11:33,620 --> 00:11:35,860 So, somewhat interesting. 234 00:11:36,820 --> 00:11:38,400 Other infrastructure devices, though. 235 00:11:38,460 --> 00:11:39,460 I mean, think about it off the grid. 236 00:11:39,540 --> 00:11:41,620 It's not just stuff that's available to the internet, right? 237 00:11:41,780 --> 00:11:45,780 Think about it from an intranet perspective and the, shall we say, you know, 238 00:11:45,780 --> 00:11:46,920 evil attacker on the inside. 239 00:11:47,740 --> 00:11:49,040 Who uses Ubuntu? 240 00:11:51,320 --> 00:11:54,240 How many of you use transmission for your BitTorrent client? 241 00:11:55,020 --> 00:11:56,440 How many of you would tell me if you did? 242 00:11:59,460 --> 00:12:02,040 This has actually been fixed in the current version. 243 00:12:02,160 --> 00:12:07,920 I don't know if it's been fixed in the current version in the Ubuntu archives or in their, yeah. 244 00:12:08,440 --> 00:12:11,220 But I was talking about this a little while back on my blog. 245 00:12:12,260 --> 00:12:15,600 For some reason, transmission has a web interface. 246 00:12:15,600 --> 00:12:17,580 The latest version of it does. 247 00:12:17,680 --> 00:12:18,780 It just came out recently. 248 00:12:19,920 --> 00:12:24,140 And this web interface is enabled by default, but only accessible to the local user. 249 00:12:24,260 --> 00:12:26,580 So I honestly don't know why this is even needed. 250 00:12:27,520 --> 00:12:31,540 Because the local user obviously has access to the regular application. 251 00:12:33,180 --> 00:12:39,540 But at any rate, the local user can access this web interface. 252 00:12:39,960 --> 00:12:42,380 This interface is vulnerable to cross-site request forgery. 253 00:12:43,480 --> 00:12:51,420 So if you hit my website, I can force you to create requests to your own application on 127.0.0.1. 254 00:12:52,420 --> 00:12:56,540 And I can change the directory you're downloading all your files to. 255 00:12:56,800 --> 00:12:59,120 And then I can force you to download a file of my choice. 256 00:13:00,340 --> 00:13:07,060 So I actually, while I was testing this, I accidentally changed the directory to my main root directory. 257 00:13:07,220 --> 00:13:09,920 And I downloaded a file that overwrote the whole thing. 258 00:13:12,380 --> 00:13:13,540 So it works. 259 00:13:13,620 --> 00:13:14,840 It works really well. 260 00:13:15,340 --> 00:13:16,920 And I'm glad I have backups. 261 00:13:18,420 --> 00:13:19,200 Self-serve. 262 00:13:20,000 --> 00:13:20,760 All right. 263 00:13:20,860 --> 00:13:21,980 This is a fun one. 264 00:13:22,900 --> 00:13:23,840 ESPN.com. 265 00:13:23,900 --> 00:13:27,700 I think that it's a very highly ranked traffic site. 266 00:13:27,880 --> 00:13:29,280 I think it's like number 14. 267 00:13:29,380 --> 00:13:30,840 I don't know if that's in the U.S. or overall. 268 00:13:31,440 --> 00:13:32,300 Is that overall? 269 00:13:32,500 --> 00:13:32,760 Okay. 270 00:13:34,360 --> 00:13:39,620 Until recently, they were vulnerable to both HTML injection and cross-site request forgery. 271 00:13:40,240 --> 00:13:42,360 This makes this little perfect story. 272 00:13:42,380 --> 00:13:44,300 It's not a storm for a bug, you know, for an exploit. 273 00:13:44,560 --> 00:13:47,780 But you can have a site performing cross-site request forgeries against itself. 274 00:13:48,000 --> 00:13:50,100 So it's not really cross-site, but same principle. 275 00:13:51,080 --> 00:13:57,100 And what you can do here is you can actually worm this thing without any client-side scripting at all. 276 00:13:57,300 --> 00:14:01,380 So if you think no script's going to save you from this kind of attack, you're dead wrong. 277 00:14:02,920 --> 00:14:11,860 Basically, by creating these requests back to this site itself, we can add this HTML code to any profile of any user 278 00:14:12,380 --> 00:14:16,720 that uses my profile, and we can propagate this payload across the entire site. 279 00:14:20,440 --> 00:14:22,560 So this one's somewhat interesting. 280 00:14:22,740 --> 00:14:26,700 It's not that broadly used in application, but where it's used is kind of what's fascinating, 281 00:14:26,960 --> 00:14:29,060 because it includes things like MCI. 282 00:14:29,140 --> 00:14:30,620 It's very European in nature. 283 00:14:31,280 --> 00:14:32,780 Securitas, Red Cross France. 284 00:14:33,000 --> 00:14:37,120 And in case you wanted to know anything about the missile defenses of the Belgian Defense Agency, 285 00:14:37,380 --> 00:14:39,260 this is one way you could actually lift the data. 286 00:14:39,520 --> 00:14:40,720 They have missiles, apparently. 287 00:14:40,720 --> 00:14:42,800 They do have two missiles in Belgium. 288 00:14:44,360 --> 00:14:45,440 One took the shot. 289 00:14:45,640 --> 00:14:47,140 That's right. Case one broke. 290 00:14:58,900 --> 00:15:03,180 So just a calendar. 291 00:15:03,780 --> 00:15:08,360 They use it as a learning portal for folks to go get training inherent to the organization. 292 00:15:08,920 --> 00:15:12,660 But what's rather amazing is that not only is it vulnerable to CSERF, 293 00:15:12,720 --> 00:15:14,900 but it's also vulnerable to script injection as well, 294 00:15:15,040 --> 00:15:19,600 so you can then drop all kinds of evilware in there if you wish. 295 00:15:20,820 --> 00:15:22,620 Kudos to our friends at XSS.org. 296 00:15:22,720 --> 00:15:23,760 I promised them I'd say hi. 297 00:15:26,180 --> 00:15:28,020 And at the end of the day, it's very simple. 298 00:15:28,080 --> 00:15:31,740 There's nothing to it other than pushing a frame, pushing whatever content you want into the calendar, 299 00:15:31,820 --> 00:15:36,000 and then anybody coming along in the general context of a session, they do not need to be authenticated, 300 00:15:36,000 --> 00:15:38,460 can be instantly owned as needed. 301 00:15:39,320 --> 00:15:42,340 So, obviously, not much good. 302 00:15:48,120 --> 00:15:49,200 And then OS Commerce. 303 00:15:49,540 --> 00:15:51,660 This one, you know, okay, so surprise, surprise. 304 00:15:51,800 --> 00:15:58,000 Web apps that are feeding customers and websites, particularly for shopping carts, etc., are broken. 305 00:15:58,160 --> 00:16:02,000 This is obviously a well-known, perhaps quite obvious statement. 306 00:16:02,300 --> 00:16:04,680 The issue we took with it is the fact that 307 00:16:04,680 --> 00:16:08,600 OS Commerce alone, and this is not an exaggeration, 308 00:16:08,680 --> 00:16:12,160 we figured current installs is about 9 million and change. 309 00:16:13,220 --> 00:16:16,260 Unfortunately, again, discovered while picking on McAfee Secure 310 00:16:16,260 --> 00:16:22,780 because literally two-thirds of these sites are branded McAfee Secure, 311 00:16:23,960 --> 00:16:26,240 indicating, in fact, that they might not be. 312 00:16:34,680 --> 00:16:35,780 I'm checking Twitter right now. 313 00:16:35,940 --> 00:16:37,340 Yeah. Sorry, guys. 314 00:16:37,540 --> 00:16:41,700 So, this one's interesting, and particularly because of credit card. 315 00:16:41,760 --> 00:16:42,860 We're going to work on the admin account. 316 00:16:43,640 --> 00:16:48,380 I'm logged in as admin currently, and I will fall victim to an attack. 317 00:16:48,880 --> 00:16:51,220 One of the things I want you to see, first and foremost, 318 00:16:51,340 --> 00:16:56,400 is the fact that Fred Flintstone's account does, in fact, include his credit card. 319 00:16:59,420 --> 00:16:59,860 Nice. 320 00:17:01,580 --> 00:17:04,400 In case you're having a difficult time funding this little adventure, 321 00:17:05,080 --> 00:17:05,980 that's a real number. 322 00:17:08,220 --> 00:17:08,660 Kidding. 323 00:17:12,120 --> 00:17:18,200 So, we trick Fred into stepping on board and adding an admin user. 324 00:17:20,140 --> 00:17:23,380 Frank is now an admin user, thanks to the script we've thrown at him. 325 00:17:24,180 --> 00:17:28,300 I log in as Frank with my handy-dandy account. 326 00:17:29,700 --> 00:17:32,580 I go back to Fred Flintstone's account, which is now visible to me, 327 00:17:32,660 --> 00:17:33,420 and I as the attacker. 328 00:17:34,400 --> 00:17:35,360 Now I own his credit card. 329 00:17:35,660 --> 00:17:39,460 So, again, all through very fundamentally simple C-SERV attacks. 330 00:17:39,700 --> 00:17:42,940 The thing that's frustrating here is, and I believe Sean in the last talk, 331 00:17:43,040 --> 00:17:46,200 as we walked in was saying this, is that everyone assumes C-SERV's about GET, right? 332 00:17:46,420 --> 00:17:47,900 These are all post-attacks. 333 00:17:48,020 --> 00:17:49,960 I haven't used a single GET attack in these circumstances. 334 00:17:53,180 --> 00:17:56,360 So, when we talked about that, and Mike and I were chatting, 335 00:17:57,600 --> 00:18:01,020 we discovered that, oh, no, that means there's another problem. 336 00:18:02,000 --> 00:18:04,380 Zen Cart was forked off of OS Commerce a while ago. 337 00:18:04,380 --> 00:18:06,340 It's basically the same code. 338 00:18:06,440 --> 00:18:08,440 Well, it's been changed a lot since then, 339 00:18:08,560 --> 00:18:11,340 but it's built off the same code base. 340 00:18:11,980 --> 00:18:14,340 So, we found out that it's vulnerable to the same thing. 341 00:18:15,260 --> 00:18:20,080 And that gives us another 7,330,000 sites that are vulnerable, 342 00:18:20,840 --> 00:18:24,880 which gives us a grand total of 16 million-some-odd websites 343 00:18:24,880 --> 00:18:28,420 that are taking credit cards and storing data 344 00:18:28,420 --> 00:18:31,300 and vulnerable to cross-set request forgery. 345 00:18:31,680 --> 00:18:33,780 And this isn't a minor vulnerability. 346 00:18:33,780 --> 00:18:37,240 I mean, you can add admin users to any of these sites. 347 00:18:38,020 --> 00:18:38,940 That's a big deal. 348 00:18:40,520 --> 00:18:44,260 An even bigger deal, in my opinion, is cPanel. 349 00:18:45,340 --> 00:18:50,740 cPanel, if you don't know it, it's an administrative web interface 350 00:18:50,740 --> 00:18:52,580 for mass-hosted servers. 351 00:18:52,900 --> 00:18:53,620 Let's ask the question. 352 00:18:54,080 --> 00:18:55,820 How many people here have a website? 353 00:18:57,120 --> 00:18:57,780 Come on. 354 00:18:59,700 --> 00:19:03,260 How many people here probably use a website with cPanel 355 00:19:03,260 --> 00:19:04,020 and a hosted provider? 356 00:19:05,180 --> 00:19:06,520 You're all lying. Look at you. 357 00:19:06,620 --> 00:19:08,300 There's so many more of you out here. 358 00:19:08,940 --> 00:19:09,760 What's the problem? 359 00:19:10,440 --> 00:19:11,080 All right. 360 00:19:11,920 --> 00:19:14,220 The WHM interface, the web hosting manager, 361 00:19:14,720 --> 00:19:16,620 it's vulnerable to cross-set request forgeries. 362 00:19:17,040 --> 00:19:18,620 If you're logged in as an administrator 363 00:19:18,620 --> 00:19:20,280 or as root on this server, 364 00:19:20,440 --> 00:19:23,960 which people do because apparently you need to manage your web server 365 00:19:23,960 --> 00:19:25,440 through a web interface, 366 00:19:26,620 --> 00:19:28,860 if you're logged in as root and you hit my website 367 00:19:28,860 --> 00:19:30,600 or you hit any website I control, 368 00:19:31,400 --> 00:19:32,820 I can do anything I want. 369 00:19:33,260 --> 00:19:34,120 I can reset your root password. 370 00:19:34,320 --> 00:19:35,220 I can upgrade software. 371 00:19:35,440 --> 00:19:38,800 I can modify any setting I want. 372 00:19:38,880 --> 00:19:40,500 I can suspend, unsuspend accounts, 373 00:19:40,880 --> 00:19:43,920 change FTP settings, anything I want 374 00:19:43,920 --> 00:19:45,980 through the WHM interface. 375 00:19:47,140 --> 00:19:48,660 That's scary and that's bad. 376 00:19:49,120 --> 00:19:50,740 What's even more scary was the response 377 00:19:50,740 --> 00:19:52,260 that I got from cPanel. 378 00:19:53,000 --> 00:19:54,040 Do we have that here? 379 00:19:54,240 --> 00:19:55,140 I don't know about the response, 380 00:19:55,260 --> 00:19:56,000 but we certainly have the video. 381 00:19:56,180 --> 00:19:56,860 Oh, we have a video. 382 00:19:57,820 --> 00:19:58,660 We like video. 383 00:19:59,000 --> 00:19:59,360 All right. 384 00:19:59,380 --> 00:20:01,540 The response that I got from cPanel was, 385 00:20:01,540 --> 00:20:03,360 we can't fix this because it's a feature. 386 00:20:07,480 --> 00:20:09,800 Apparently they're worried it's going to break third party, 387 00:20:09,900 --> 00:20:11,800 or integration with third party billing software, 388 00:20:12,140 --> 00:20:13,100 so they can't remove, 389 00:20:13,380 --> 00:20:14,720 they can't fix this vulnerability. 390 00:20:16,100 --> 00:20:19,560 And so we have literally millions and millions 391 00:20:19,560 --> 00:20:21,760 of web servers that are, 392 00:20:22,740 --> 00:20:24,600 they're sitting there ready to be rooted 393 00:20:24,600 --> 00:20:26,180 and cPanel won't fix it. 394 00:20:26,380 --> 00:20:29,120 They do have a cross-site request forger protection feature. 395 00:20:29,700 --> 00:20:31,060 It doesn't do much. 396 00:20:31,960 --> 00:20:33,240 It checks the refers, 397 00:20:33,540 --> 00:20:34,580 this is actually, 398 00:20:34,720 --> 00:20:35,400 can I pause it? 399 00:20:35,440 --> 00:20:35,800 Sure. 400 00:20:36,100 --> 00:20:36,540 Yeah. 401 00:20:37,260 --> 00:20:38,720 What it does is it checks the refers 402 00:20:38,720 --> 00:20:41,080 of the request that's made to the server, 403 00:20:41,700 --> 00:20:44,900 and it makes sure that it either comes from its own server, 404 00:20:45,040 --> 00:20:47,280 so you can't do it across sites, 405 00:20:48,440 --> 00:20:50,440 or unfortunately a lot of people don't send refers. 406 00:20:51,120 --> 00:20:53,020 In fact, there's an RFC that states 407 00:20:53,020 --> 00:20:54,280 that if you're on an SSL server, 408 00:20:54,440 --> 00:20:55,480 you don't send refers. 409 00:20:57,220 --> 00:21:00,120 So they have to obviously accept requests 410 00:21:00,120 --> 00:21:01,520 that don't have any refers. 411 00:21:01,540 --> 00:21:02,860 They don't have a server at all in the browser, 412 00:21:02,960 --> 00:21:03,960 in the request header. 413 00:21:05,020 --> 00:21:07,400 If you're using cPanel without SSL, 414 00:21:07,500 --> 00:21:08,820 you're a fucking moron. 415 00:21:11,420 --> 00:21:12,280 You want your video? 416 00:21:12,540 --> 00:21:13,000 Yes. 417 00:21:15,040 --> 00:21:17,100 Now there's plenty of other ways to strip refers 418 00:21:17,100 --> 00:21:18,660 if you are worried about this, 419 00:21:18,780 --> 00:21:20,360 but the easiest way is just to bounce somebody 420 00:21:20,360 --> 00:21:22,000 through an SSL encrypted site. 421 00:21:23,720 --> 00:21:25,060 And that's easy enough 422 00:21:25,060 --> 00:21:27,680 because there's plenty of SSL encrypted sites 423 00:21:27,680 --> 00:21:29,500 that have open redirects on them. 424 00:21:29,660 --> 00:21:31,140 There's plenty of them that have other issues. 425 00:21:31,540 --> 00:21:32,960 So cross-site scripting, 426 00:21:32,960 --> 00:21:33,660 anything I want, 427 00:21:34,200 --> 00:21:36,140 I can make this request to your web server 428 00:21:36,140 --> 00:21:38,080 and root your cPanel server. 429 00:21:40,060 --> 00:21:41,980 And in this case I'm actually throwing 430 00:21:41,980 --> 00:21:43,840 a cross-site scripting thing, 431 00:21:44,040 --> 00:21:45,420 but that's actually a different demo. 432 00:21:45,740 --> 00:21:46,700 That's a different talk. 433 00:21:49,500 --> 00:21:51,760 But that was just me getting root access 434 00:21:51,760 --> 00:21:52,300 on that server. 435 00:21:57,240 --> 00:21:58,540 Before we get into the misconceptions, 436 00:21:58,540 --> 00:22:00,680 why don't you cover some of the smaller, 437 00:22:00,820 --> 00:22:03,640 more annoying things that were on your mind earlier. 438 00:22:04,080 --> 00:22:04,620 Which ones? 439 00:22:05,180 --> 00:22:06,940 There's a lot of annoying things on my mind. 440 00:22:07,140 --> 00:22:08,120 Amazon, eBay. 441 00:22:08,660 --> 00:22:09,040 Oh boy. 442 00:22:10,240 --> 00:22:12,240 Alright, so there's some other uses 443 00:22:12,240 --> 00:22:13,340 for cross-site request forgery 444 00:22:13,340 --> 00:22:14,400 that a lot of people aren't thinking about. 445 00:22:14,600 --> 00:22:17,700 The classic example of the cross-site request forgery 446 00:22:17,700 --> 00:22:20,040 is either owning somebody's bank account, 447 00:22:20,140 --> 00:22:21,240 transferring money to your account, 448 00:22:21,440 --> 00:22:23,220 or doing the privilege escalation 449 00:22:23,220 --> 00:22:26,140 through an administrator who's got access to something. 450 00:22:26,980 --> 00:22:28,120 But there's a lot of sites, 451 00:22:28,540 --> 00:22:29,260 that just, 452 00:22:30,160 --> 00:22:33,020 they just take any request you send them, 453 00:22:33,100 --> 00:22:34,360 and they do things with it. 454 00:22:36,320 --> 00:22:38,460 And it turns out you can actually do 455 00:22:38,460 --> 00:22:40,880 a lot of things that they don't want you to do. 456 00:22:42,720 --> 00:22:44,100 An example of this, 457 00:22:44,280 --> 00:22:45,600 Amazon.com. 458 00:22:46,960 --> 00:22:48,240 Whenever you're browsing 459 00:22:48,240 --> 00:22:49,980 through products on Amazon, 460 00:22:50,520 --> 00:22:52,000 and you come back to the site later, 461 00:22:52,140 --> 00:22:54,460 you'll see all the products you've recently viewed, 462 00:22:54,560 --> 00:22:55,280 or a few of them, 463 00:22:55,400 --> 00:22:58,280 and they're there 464 00:22:58,540 --> 00:23:00,220 to try and sell you more products, 465 00:23:00,320 --> 00:23:02,620 or try and sell you something you already bought. 466 00:23:03,480 --> 00:23:03,880 But, 467 00:23:05,620 --> 00:23:06,800 if I can make you 468 00:23:06,800 --> 00:23:07,620 use that site, 469 00:23:07,760 --> 00:23:09,660 or not view it, 470 00:23:09,740 --> 00:23:11,960 but request the site with the cross-site request forgery, 471 00:23:12,120 --> 00:23:13,460 next time you come back to 472 00:23:14,260 --> 00:23:15,060 Amazon.com, 473 00:23:15,240 --> 00:23:16,960 you're going to see any product that I want 474 00:23:16,960 --> 00:23:19,020 sitting in that recently viewed items box. 475 00:23:19,540 --> 00:23:21,360 And that may not make a whole lot of sense, 476 00:23:22,160 --> 00:23:23,660 but with the money that people spend 477 00:23:23,660 --> 00:23:24,920 for advertising, 478 00:23:25,500 --> 00:23:27,360 putting something on the front page of Amazon, 479 00:23:28,540 --> 00:23:29,680 it seems like that would be a big deal. 480 00:23:30,680 --> 00:23:32,120 It also works with eBay. 481 00:23:32,340 --> 00:23:33,920 There's a recently viewed items box there. 482 00:23:34,660 --> 00:23:35,820 If you're using... 483 00:23:36,320 --> 00:23:37,560 I'm trying to remember what it was. 484 00:23:44,360 --> 00:23:46,740 I'm trying to remember which site it was. 485 00:23:46,940 --> 00:23:47,980 There's actually a handful of them. 486 00:23:48,280 --> 00:23:49,860 But there's a handful of major 487 00:23:50,580 --> 00:23:52,260 e-commerce portals where I can actually 488 00:23:52,260 --> 00:23:54,780 stuff items into your shopping cart 489 00:23:54,780 --> 00:23:56,420 using cross-site request forgery. 490 00:23:56,860 --> 00:23:58,440 So, if you're looking through your 491 00:23:58,540 --> 00:23:59,960 shopping cart and you wonder why you've got 492 00:24:03,040 --> 00:24:04,360 these products sitting in there, 493 00:24:04,900 --> 00:24:06,640 you may click on them, you may look at them, 494 00:24:06,680 --> 00:24:07,700 and you may buy them later. 495 00:24:07,920 --> 00:24:09,580 Either way, it's good advertising. 496 00:24:09,700 --> 00:24:11,220 It's getting the product right in front of your eyes. 497 00:24:12,140 --> 00:24:14,300 But there's also the issue then of forcing somebody's 498 00:24:14,300 --> 00:24:15,080 history to change. 499 00:24:15,260 --> 00:24:18,180 If I can manipulate your 500 00:24:18,640 --> 00:24:20,320 search history, think of all the 501 00:24:20,320 --> 00:24:21,300 fun things I can do with that. 502 00:24:22,860 --> 00:24:24,540 Again, I can use it for spamming, 503 00:24:24,540 --> 00:24:26,400 or I can stuff your 504 00:24:26,400 --> 00:24:27,320 search history full of 505 00:24:29,280 --> 00:24:30,400 links to whatever 506 00:24:30,400 --> 00:24:31,700 product it is I'm trying to sell. 507 00:24:33,420 --> 00:24:34,460 What if it's worse than 508 00:24:34,460 --> 00:24:34,740 product? 509 00:24:36,160 --> 00:24:38,060 There's legal implications here, too. 510 00:24:38,160 --> 00:24:39,280 That's kind of what we're trying to drive at. 511 00:24:39,380 --> 00:24:41,360 If you think about the ability to force somebody's history 512 00:24:41,360 --> 00:24:42,920 to basically contain... 513 00:24:42,920 --> 00:24:45,620 People have been prosecuted based on their 514 00:24:45,620 --> 00:24:46,460 search history before. 515 00:24:46,780 --> 00:24:48,520 That's exactly right. So, if you want to really 516 00:24:48,520 --> 00:24:50,820 hose somebody and something is, in particular, 517 00:24:51,320 --> 00:24:53,240 certain search engines are vulnerable to 518 00:24:53,240 --> 00:24:54,520 the ability to force that history... 519 00:24:54,520 --> 00:24:56,180 Just as a side note, and this is actually... 520 00:24:58,540 --> 00:24:59,940 He works for an evil corporation. 521 00:25:02,560 --> 00:25:03,800 And that corporation 522 00:25:04,560 --> 00:25:06,160 happens to have your search history 523 00:25:07,080 --> 00:25:07,880 displayed on 524 00:25:08,740 --> 00:25:10,160 whenever you go to their 525 00:25:10,160 --> 00:25:11,780 major search portal 526 00:25:12,520 --> 00:25:14,320 that just apparently came out a little 527 00:25:14,320 --> 00:25:14,800 while ago. 528 00:25:17,240 --> 00:25:18,580 It has a search history, 529 00:25:18,680 --> 00:25:20,260 and I can stuff it full of links to whatever 530 00:25:20,260 --> 00:25:22,400 product I want to sell, or whatever malware 531 00:25:22,400 --> 00:25:22,980 I want to sell. 532 00:25:23,300 --> 00:25:25,860 If you want to buy malware, or just download it. 533 00:25:25,860 --> 00:25:27,180 I don't know what you're talking about. 534 00:25:30,300 --> 00:25:30,900 Misconceptions. 535 00:25:30,940 --> 00:25:34,060 Mr. Sullivan over at Black Hat 536 00:25:34,060 --> 00:25:35,080 I think talked about 537 00:25:35,860 --> 00:25:37,260 URL rewriting as an 538 00:25:37,740 --> 00:25:38,860 option to fix this. 539 00:25:39,540 --> 00:25:41,320 I would by no means 540 00:25:41,860 --> 00:25:43,140 disrespectfully disagree, but 541 00:25:43,860 --> 00:25:45,840 to some extent, we take issue with that. 542 00:25:46,120 --> 00:25:47,260 Obviously, the 543 00:25:47,620 --> 00:25:49,540 majority of the things that people think should 544 00:25:50,380 --> 00:25:51,760 fix this issue 545 00:25:51,760 --> 00:25:52,280 don't. 546 00:25:53,760 --> 00:25:55,120 Thoughts there, real fast? 547 00:25:56,200 --> 00:25:57,640 We've gone amazingly 548 00:25:57,640 --> 00:25:59,300 fast, which is unfortunate. 549 00:25:59,660 --> 00:26:01,520 Okay. Well, we can just talk later. 550 00:26:04,100 --> 00:26:05,340 Where are we going with this? 551 00:26:05,520 --> 00:26:06,720 Just basically on the right. 552 00:26:07,840 --> 00:26:09,640 Some things that actually do work 553 00:26:09,640 --> 00:26:11,200 to protect against cross-site request forgery, 554 00:26:11,860 --> 00:26:13,880 and I said 555 00:26:13,880 --> 00:26:15,080 I'd get into this later, but 556 00:26:16,180 --> 00:26:17,200 a captcha 557 00:26:17,200 --> 00:26:18,380 is basically 558 00:26:18,380 --> 00:26:21,620 forcing the user to manually do 559 00:26:21,620 --> 00:26:23,460 something and do it 560 00:26:23,460 --> 00:26:25,840 on purpose in order to 561 00:26:25,860 --> 00:26:26,720 make a request. 562 00:26:28,420 --> 00:26:28,820 Another... 563 00:26:30,760 --> 00:26:31,700 You know what? You go ahead 564 00:26:31,700 --> 00:26:33,240 and take this one. I'm not thinking straight. 565 00:26:34,100 --> 00:26:34,820 You okay? 566 00:26:35,020 --> 00:26:35,680 Yeah, I'm alright. 567 00:26:36,280 --> 00:26:38,360 I'm a little bit wired. I had a lot of coffee this morning. 568 00:26:41,320 --> 00:26:43,300 The issues around captchas, of course, 569 00:26:43,320 --> 00:26:45,180 is that they're most often broken, number one, 570 00:26:45,220 --> 00:26:46,300 and often they're too... 571 00:26:46,300 --> 00:26:48,720 A captcha itself might be based on a token, 572 00:26:48,860 --> 00:26:50,660 and if that token's repeatable, obviously 573 00:26:50,660 --> 00:26:52,800 you pass it once, you pass it again, 574 00:26:53,000 --> 00:26:54,660 and you're through. It's a very simple 575 00:26:55,860 --> 00:26:57,440 way to say bypass and doesn't really work. 576 00:26:59,220 --> 00:26:59,660 Arguably, 577 00:26:59,700 --> 00:27:01,800 the most important fix of all is a unique 578 00:27:01,800 --> 00:27:03,860 token, but again, how strong a unique 579 00:27:03,860 --> 00:27:05,680 token are you using, number one, 580 00:27:05,860 --> 00:27:07,680 and are there now all of a sudden magically 581 00:27:07,680 --> 00:27:09,720 in the last four weeks attacks that will 582 00:27:09,720 --> 00:27:11,760 even compromise you there through CSS history? 583 00:27:12,140 --> 00:27:13,340 Do you want to clarify that one? 584 00:27:13,360 --> 00:27:14,140 I can clarify that one. 585 00:27:17,820 --> 00:27:19,460 so this is an attack that came out 586 00:27:20,260 --> 00:27:21,640 just, I think, about 587 00:27:21,640 --> 00:27:22,280 two weeks ago. 588 00:27:24,020 --> 00:27:25,840 Well, the CSS history 589 00:27:25,860 --> 00:27:27,880 hack is a well-known hack in the web app 590 00:27:28,900 --> 00:27:29,700 security industry. 591 00:27:31,860 --> 00:27:33,700 Basically what it does is it uses 592 00:27:33,700 --> 00:27:35,820 CSS to find out what links you've visited before. 593 00:27:36,020 --> 00:27:37,700 So it colors a link blue, and then it 594 00:27:38,140 --> 00:27:40,060 checks the link to see what color it is. 595 00:27:40,500 --> 00:27:41,860 And if you visited it, 596 00:27:42,540 --> 00:27:43,780 it'll be a different color than if you haven't 597 00:27:43,780 --> 00:27:44,340 visited it before. 598 00:27:45,820 --> 00:27:46,620 And theoretically, 599 00:27:47,540 --> 00:27:49,100 it's not all theory. 600 00:27:49,280 --> 00:27:51,620 You can use this to compromise a 601 00:27:51,620 --> 00:27:53,240 cross-site request forgery protection 602 00:27:53,700 --> 00:27:55,760 token by just brute force 603 00:27:55,860 --> 00:27:56,300 in that token. 604 00:27:56,400 --> 00:27:59,080 You just generate a whole bunch of different 605 00:27:59,080 --> 00:28:00,580 options, and you see which one works. 606 00:28:01,240 --> 00:28:03,300 It doesn't work so well if the token is 607 00:28:03,300 --> 00:28:05,000 hard to predict, if it's long, 608 00:28:05,180 --> 00:28:05,880 and if it's 609 00:28:08,180 --> 00:28:08,980 randomly generated, 610 00:28:09,180 --> 00:28:10,600 it doesn't work very well. 611 00:28:12,280 --> 00:28:13,720 The point I'm trying to make 612 00:28:13,720 --> 00:28:14,840 is to make sure that your 613 00:28:15,900 --> 00:28:17,700 CSRF validation tokens are 614 00:28:19,500 --> 00:28:19,900 cryptographically 615 00:28:19,900 --> 00:28:20,220 secure. 616 00:28:22,620 --> 00:28:23,740 The final thought 617 00:28:23,740 --> 00:28:24,640 on it, too, is that, 618 00:28:25,860 --> 00:28:27,480 even there, particularly 619 00:28:28,580 --> 00:28:29,020 DDWRT, 620 00:28:29,260 --> 00:28:31,560 that router, no protection 621 00:28:31,560 --> 00:28:33,120 in the world was even implemented 622 00:28:33,120 --> 00:28:35,120 on it, but ultimately at the end of the day, 623 00:28:35,200 --> 00:28:36,960 you didn't even have to be logged into the device 624 00:28:36,960 --> 00:28:38,720 because the checks were so insecure. 625 00:28:39,120 --> 00:28:41,140 So ultimately, you could, via a CSRF attack, 626 00:28:41,440 --> 00:28:43,440 own the device without any 627 00:28:43,440 --> 00:28:44,620 mitigation in place at all. 628 00:28:44,720 --> 00:28:47,160 So a lot of it comes back to secure development 629 00:28:47,160 --> 00:28:49,140 practices, which we're not going to get into here. 630 00:28:50,640 --> 00:28:51,480 And unfortunately, 631 00:28:51,720 --> 00:28:53,180 we flew through this thing, 632 00:28:53,280 --> 00:28:55,520 so that's kind of it. We can open up to Q&A 633 00:28:55,860 --> 00:28:56,220 if you want here. 634 00:28:57,440 --> 00:28:59,100 I can have Mike go on forever. 635 00:29:01,140 --> 00:29:01,720 Glad, really, 636 00:29:01,760 --> 00:29:02,540 it's up to you guys. Sir? 637 00:29:27,780 --> 00:29:28,380 . 638 00:29:33,200 --> 00:29:35,720 The reality is, unless better 639 00:29:35,720 --> 00:29:37,540 development practices are put in place. 640 00:29:37,700 --> 00:29:39,500 Say again? I'm sorry, you're right. Absolutely. 641 00:29:39,660 --> 00:29:41,680 So the gentleman said that, in particular with 642 00:29:41,680 --> 00:29:43,460 regard to things like do not call lists 643 00:29:43,460 --> 00:29:45,700 for marketing, that 644 00:29:45,700 --> 00:29:47,540 the more prevalent web 645 00:29:47,540 --> 00:29:49,740 applications become as services 646 00:29:49,740 --> 00:29:51,860 for marketing, services for tracking, 647 00:29:52,000 --> 00:29:53,820 services for analytics, etc., 648 00:29:53,820 --> 00:29:55,320 if they're in fact not 649 00:29:55,980 --> 00:29:57,940 coded properly, mitigated properly, 650 00:29:58,160 --> 00:29:59,540 that then attacks against privacy, 651 00:29:59,740 --> 00:30:01,560 you're going to be even more and more 652 00:30:01,560 --> 00:30:03,740 stringent. I think, really, the thing to look at 653 00:30:03,740 --> 00:30:05,380 for us is, too, what does it mean 654 00:30:05,820 --> 00:30:07,720 in the now cloud or 655 00:30:07,720 --> 00:30:09,760 SaaS? I mean, there's so many buzzwords 656 00:30:09,760 --> 00:30:11,020 now where they're putting everything out 657 00:30:11,020 --> 00:30:13,620 in the internet or in the world. 658 00:30:13,820 --> 00:30:15,740 And again, I find so 659 00:30:15,740 --> 00:30:17,660 often that they're not protected, so it 660 00:30:17,660 --> 00:30:19,660 really is an issue. There's a mic over here. 661 00:30:24,800 --> 00:30:25,760 Can you pop 662 00:30:25,860 --> 00:30:26,580 that mic on, boys? 663 00:30:27,560 --> 00:30:29,240 There you go. Good. 664 00:30:34,180 --> 00:30:35,440 ...inserting browser 665 00:30:35,440 --> 00:30:37,460 histories, forcing 666 00:30:37,460 --> 00:30:39,760 browser histories into unsuspecting 667 00:30:39,760 --> 00:30:41,740 users. We have people 668 00:30:41,740 --> 00:30:43,840 in this country being prosecuted 669 00:30:43,840 --> 00:30:45,900 criminally for the contents 670 00:30:45,900 --> 00:30:47,740 of their browser history, in 671 00:30:47,740 --> 00:30:49,760 part. Mike, would you 672 00:30:49,760 --> 00:30:51,800 care to comment about what type of 673 00:30:51,800 --> 00:30:53,080 forensic trails 674 00:30:53,710 --> 00:30:55,140 you're leaving when, 675 00:30:55,860 --> 00:30:57,660 uh, you're injecting, uh, someone 676 00:30:57,660 --> 00:30:59,620 else's browser, well, false 677 00:30:59,620 --> 00:31:01,320 browser history into 678 00:31:01,320 --> 00:31:03,340 an unsuspecting, uh, end user? 679 00:31:03,940 --> 00:31:05,760 The really tricky thing about this attack 680 00:31:05,760 --> 00:31:07,500 is that it really can be 681 00:31:07,500 --> 00:31:09,680 completely anonymized. Um, 682 00:31:09,720 --> 00:31:11,420 if I can, I can inject 683 00:31:11,420 --> 00:31:13,080 these cross-site request forgeries, 684 00:31:13,240 --> 00:31:15,360 any website that I can put, 685 00:31:15,380 --> 00:31:17,720 uh, put any HTML or a 686 00:31:17,720 --> 00:31:19,760 deep-linked image in, MySpace, I mean, 687 00:31:19,760 --> 00:31:21,660 I can put a link in MySpace to an image 688 00:31:22,200 --> 00:31:23,280 that's on another domain. 689 00:31:24,360 --> 00:31:25,840 I, there's no way you're 690 00:31:25,860 --> 00:31:27,560 gonna track that back to my, to me 691 00:31:27,560 --> 00:31:29,760 personally. You may possibly be 692 00:31:29,760 --> 00:31:31,820 able to, um, track it back to MySpace, 693 00:31:32,020 --> 00:31:33,200 but, uh, 694 00:31:33,900 --> 00:31:35,460 that's not, I mean, who doesn't 695 00:31:35,460 --> 00:31:37,560 browse MySpace? Okay. 696 00:31:37,680 --> 00:31:39,460 Well, nobody does anymore. 697 00:31:39,640 --> 00:31:41,720 But, from a forensic perspective, it's very 698 00:31:41,720 --> 00:31:43,780 difficult. So in the context he's talking about, 699 00:31:43,900 --> 00:31:45,420 it's one of those things where, okay, you know 700 00:31:45,420 --> 00:31:47,820 a user executed something, and it's attributable 701 00:31:47,820 --> 00:31:49,780 then to that user. Which is 702 00:31:49,780 --> 00:31:51,960 fine, but if that's not the actual user 703 00:31:51,960 --> 00:31:53,500 who did it, because he was forced, 704 00:31:53,640 --> 00:31:55,720 the only forensic trail you might have 705 00:31:55,860 --> 00:31:57,820 is if the backend of 706 00:31:57,820 --> 00:31:59,880 the, shall we say, the system he's using, 707 00:31:59,940 --> 00:32:02,040 the social engineering site, picket, 708 00:32:02,060 --> 00:32:03,940 if they're tracking IP access, 709 00:32:04,140 --> 00:32:05,840 but even that's not gonna get him 710 00:32:05,840 --> 00:32:07,440 anything, because it's coming through. 711 00:32:07,620 --> 00:32:09,880 So you really have, you know, almost 712 00:32:09,880 --> 00:32:11,880 no mitigation whatsoever. It's... 713 00:32:12,380 --> 00:32:13,900 Another really interesting attack 714 00:32:13,900 --> 00:32:15,840 that we have, that I actually 715 00:32:15,840 --> 00:32:17,580 was going to talk about, but I didn't, 716 00:32:17,580 --> 00:32:19,800 is using cross-site request 717 00:32:19,800 --> 00:32:21,820 forgeries to make other people perform attacks 718 00:32:21,820 --> 00:32:23,820 for you. If you want to DDoS a 719 00:32:23,820 --> 00:32:25,840 site, you just put a whole bunch of cross-site requests 720 00:32:25,860 --> 00:32:27,600 for your tokens into a high, or 721 00:32:27,600 --> 00:32:29,680 not tokens, put a whole bunch of deep-linked images 722 00:32:29,680 --> 00:32:31,600 that point to a really high 723 00:32:32,800 --> 00:32:33,240 resource 724 00:32:36,100 --> 00:32:37,640 whatever I'm saying. Multiple requests. 725 00:32:37,920 --> 00:32:39,760 Yeah. You make it so that it 726 00:32:39,760 --> 00:32:41,800 you know, lock up the server by just pulling 727 00:32:41,800 --> 00:32:43,680 a huge database 728 00:32:43,680 --> 00:32:44,800 query or something like that. 729 00:32:45,400 --> 00:32:46,920 Another attack, if you have 730 00:32:48,100 --> 00:32:49,780 oh, if you have file injection 731 00:32:49,780 --> 00:32:51,740 holes, which are really still 732 00:32:51,740 --> 00:32:53,200 pretty common in web applications, 733 00:32:53,520 --> 00:32:55,700 but you don't want them to see that, you know, 734 00:32:55,860 --> 00:32:57,600 I don't want somebody to see that it's me 735 00:32:57,600 --> 00:32:59,620 making these requests. That's fine. I can just 736 00:32:59,620 --> 00:33:01,700 put links to it in MySpace. Somebody else will own 737 00:33:01,700 --> 00:33:03,700 the site for me. You know, I can inject 738 00:33:03,700 --> 00:33:05,580 scripts. I can perform all these attacks. 739 00:33:05,860 --> 00:33:07,080 I can do SQL injection. 740 00:33:07,260 --> 00:33:09,600 I can do it all through cross-site request forgery. Have 741 00:33:09,600 --> 00:33:11,720 somebody else take care of the dirty work for me. 742 00:33:11,800 --> 00:33:13,500 Again, none of which attributable to anybody 743 00:33:13,500 --> 00:33:15,560 but the poor victim, so. From the 744 00:33:15,560 --> 00:33:17,620 standpoint of forensics, you modify 745 00:33:17,620 --> 00:33:19,720 the search history. You're not placing 746 00:33:19,720 --> 00:33:21,820 the data from those locations. 747 00:33:22,160 --> 00:33:23,480 So I would have a hole 748 00:33:24,100 --> 00:33:25,580 from something that I actually 749 00:33:25,860 --> 00:33:27,640 went to, search history to 750 00:33:27,640 --> 00:33:29,580 data that's not on the drive. So it might be 751 00:33:29,580 --> 00:33:31,740 the essence of data being missing, 752 00:33:32,380 --> 00:33:33,940 cache data being missing 753 00:33:33,940 --> 00:33:35,660 that I might look at. Is that true? 754 00:33:35,800 --> 00:33:37,800 Or is modifying the 755 00:33:37,800 --> 00:33:39,780 search history placing those, the 756 00:33:39,780 --> 00:33:41,680 actual access of 757 00:33:41,680 --> 00:33:43,680 those websites? You are making 758 00:33:43,680 --> 00:33:45,680 the request with cross-site request forgery. Your browser, 759 00:33:45,820 --> 00:33:47,740 I mean. It actually visits the site? 760 00:33:47,780 --> 00:33:49,580 It visits the site. If I load this page up in an 761 00:33:49,580 --> 00:33:51,760 iframe, you make the request and you'll load 762 00:33:51,760 --> 00:33:53,280 any images inside the site. So 763 00:33:53,280 --> 00:33:55,340 it looks like completely legitimate browsing. 764 00:33:55,860 --> 00:33:57,380 As far as the user side goes. 765 00:33:57,700 --> 00:33:59,560 Although in the case of the browser history 766 00:33:59,560 --> 00:34:01,660 attack, if you force something into somebody's 767 00:34:01,660 --> 00:34:03,800 browser history, that they may not have 768 00:34:03,800 --> 00:34:05,060 visited. Is that a fair analogy? 769 00:34:05,500 --> 00:34:07,960 And in that case, if they haven't visited it. That's what I was 770 00:34:07,960 --> 00:34:09,900 talking about. Right. I'm getting the forensics 771 00:34:09,900 --> 00:34:11,640 nuance there is that the trail may 772 00:34:11,640 --> 00:34:13,820 stop at the history file that says it. 773 00:34:13,860 --> 00:34:16,000 But if you truly are a good forensic investigator 774 00:34:16,000 --> 00:34:17,780 and you haven't dug in. My index 775 00:34:17,780 --> 00:34:19,860 dot dat would tell me I went there. May not show it. 776 00:34:19,860 --> 00:34:21,780 My cache would tell me there's this hole. That's 777 00:34:21,780 --> 00:34:23,680 right. And so there are theoretically some gaps 778 00:34:23,680 --> 00:34:25,840 but again, it's the quality of the investigator doing it. 779 00:34:25,860 --> 00:34:28,660 And certainly would be enough to cause you 780 00:34:28,660 --> 00:34:30,260 significant problems. But yes. 781 00:34:30,420 --> 00:34:31,940 Russ is the one with the forensic background. 782 00:34:37,860 --> 00:34:39,720 Oh, absolutely. Yeah. If you do it through 783 00:34:39,720 --> 00:34:41,520 any of the known anonymizers, then 784 00:34:41,520 --> 00:34:42,940 it's all that much worse. 785 00:34:43,260 --> 00:34:45,200 You know, theoretically 786 00:34:45,660 --> 00:34:47,760 you've compromised somebody's box and you 787 00:34:47,760 --> 00:34:49,900 make requests through their box via CSERV. 788 00:34:50,860 --> 00:34:51,860 It's on and on. 789 00:34:52,920 --> 00:34:53,280 Sir. 790 00:34:53,920 --> 00:34:55,840 Hi. I was a little bit late. I don't know if I can 791 00:34:55,860 --> 00:34:58,820 miss this. But did you mention any client-side 792 00:34:58,820 --> 00:35:01,680 protections that people in this audience might use to 793 00:35:01,680 --> 00:35:02,880 generally protect themselves? 794 00:35:03,240 --> 00:35:04,640 That's a good question, actually. 795 00:35:05,760 --> 00:35:08,020 As far as client-side protection goes, there's 796 00:35:08,020 --> 00:35:10,420 not a whole lot right now. There's some really cool 797 00:35:10,420 --> 00:35:14,140 stuff coming, though. NoScript just added some 798 00:35:14,140 --> 00:35:16,300 everybody here uses NoScript, right? 799 00:35:17,440 --> 00:35:18,000 Yeah. 800 00:35:21,020 --> 00:35:23,700 NoScript just added what I believe is called 801 00:35:23,700 --> 00:35:25,840 the ABE, the Application Boundary 802 00:35:25,840 --> 00:35:27,860 Enforcer. It's a feature 803 00:35:27,860 --> 00:35:29,820 that forces 804 00:35:29,820 --> 00:35:31,580 it basically protects 805 00:35:31,580 --> 00:35:33,240 different zones on your web 806 00:35:33,620 --> 00:35:33,880 browser. 807 00:35:35,400 --> 00:35:37,740 So I can't, my application 808 00:35:37,740 --> 00:35:39,540 can't make requests to your local internet 809 00:35:39,540 --> 00:35:40,920 zone or to your local machine. 810 00:35:41,720 --> 00:35:43,780 It's very good. It's not quite 811 00:35:43,780 --> 00:35:45,780 100% yet, but it's coming and I 812 00:35:45,780 --> 00:35:47,820 really like it. Another thing that's coming up, 813 00:35:47,940 --> 00:35:49,680 Mozilla just announced 814 00:35:49,680 --> 00:35:50,840 that they're putting together 815 00:35:52,580 --> 00:35:53,300 I'm forgetting 816 00:35:53,840 --> 00:35:55,780 all the abbreviations for things, but 817 00:35:55,840 --> 00:35:57,840 content framework policy 818 00:35:58,640 --> 00:35:59,540 something or other. 819 00:36:01,400 --> 00:36:02,620 Basically, it's a feature 820 00:36:02,620 --> 00:36:04,520 that it does the same thing 821 00:36:04,520 --> 00:36:05,320 only way better. 822 00:36:05,560 --> 00:36:06,840 It makes it so that any 823 00:36:07,440 --> 00:36:07,940 if 824 00:36:09,420 --> 00:36:11,260 this is all opt-in, so 825 00:36:11,790 --> 00:36:13,900 my website, if I send a header 826 00:36:13,900 --> 00:36:15,840 back saying protect my website, don't let 827 00:36:15,840 --> 00:36:17,560 any cross-site request forgeries happen, 828 00:36:18,780 --> 00:36:20,540 your browser won't make any 829 00:36:20,540 --> 00:36:22,220 requests to any outside domains at all. 830 00:36:22,360 --> 00:36:23,460 And that is what 831 00:36:23,460 --> 00:36:25,820 it's exactly what we need. The problem is, 832 00:36:25,840 --> 00:36:27,820 that it's opt-in, and if it wasn't opt-in, 833 00:36:27,880 --> 00:36:28,820 it would break the entire internet. 834 00:36:29,680 --> 00:36:31,520 But it's the single protection. I mean, that's 835 00:36:31,520 --> 00:36:33,780 really it from a perspective of 836 00:36:33,780 --> 00:36:35,560 how comprehensive can you get, but again, 837 00:36:35,760 --> 00:36:37,820 if you leave it such that it's opt-in, 838 00:36:37,880 --> 00:36:39,700 it's something you don't have to use 839 00:36:39,700 --> 00:36:41,460 in Dustball Victim. Right, thanks. 840 00:36:41,520 --> 00:36:43,280 I appreciate the mention of 841 00:36:43,280 --> 00:36:45,460 NoScript's ABE, but I have to, because 842 00:36:45,460 --> 00:36:47,500 you didn't plug this for me, I figured I should mention 843 00:36:47,500 --> 00:36:49,560 I'm actually the author of a Firefox 844 00:36:49,560 --> 00:36:51,440 extension called Request Policy. 845 00:36:51,760 --> 00:36:53,580 Cool. I don't know if you've heard of that one, but 846 00:36:53,580 --> 00:36:54,320 I owe you a beer. 847 00:36:55,840 --> 00:36:57,460 That one would actually protect against 848 00:36:57,460 --> 00:36:59,340 just about everything you mentioned, except 849 00:36:59,340 --> 00:37:01,580 the attack that involved the request to the same 850 00:37:01,580 --> 00:37:03,200 site. Since that's not cross-site, 851 00:37:03,680 --> 00:37:05,640 you know, that's a different issue in that sense. 852 00:37:05,800 --> 00:37:07,620 But other than that, of course, 853 00:37:07,640 --> 00:37:09,760 this means someone has to install the extension 854 00:37:09,760 --> 00:37:11,680 and be running Firefox. This is not something 855 00:37:11,680 --> 00:37:13,540 that you can, you know, propagate 856 00:37:13,540 --> 00:37:15,780 and have developers use on their website to protect 857 00:37:15,780 --> 00:37:17,800 users everywhere, but for those in the 858 00:37:17,800 --> 00:37:19,860 audience, that's something. Definitely look it up, 859 00:37:19,860 --> 00:37:21,700 because it's good stuff. That's 860 00:37:21,700 --> 00:37:22,760 Request Policy. 861 00:37:23,800 --> 00:37:24,280 Uh... 862 00:37:25,840 --> 00:37:27,100 I was asked to repeat it, yes. 863 00:37:28,280 --> 00:37:29,480 So, dude, come see it. 864 00:37:29,520 --> 00:37:31,740 You know, I apologize for not knowing of it, 865 00:37:31,800 --> 00:37:33,500 but I'd love to talk about it. No, no, it's pretty new, actually. 866 00:37:33,560 --> 00:37:35,520 I just wanted to see if you knew that. No, good. Come up later. 867 00:37:37,080 --> 00:37:37,800 Another question? 868 00:37:40,340 --> 00:37:41,340 Have you done any 869 00:37:41,340 --> 00:37:43,540 cross-site request forgery jumping out of a 870 00:37:43,540 --> 00:37:45,640 sandbox, like using multiple browsers, 871 00:37:45,740 --> 00:37:47,540 or if I have IE 872 00:37:47,540 --> 00:37:49,740 and Mozilla open and I'm doing my open 873 00:37:50,900 --> 00:37:52,100 surfing on IE, 874 00:37:52,180 --> 00:37:52,960 but I'm doing my 875 00:37:53,340 --> 00:37:55,420 quote-unquote secure surfing in Mozilla? 876 00:37:55,840 --> 00:37:57,380 Cross-site request forgery, I mean, 877 00:37:57,400 --> 00:37:59,340 by nature, the attack 878 00:37:59,340 --> 00:38:01,700 focuses on the browser and exploiting the 879 00:38:01,700 --> 00:38:03,280 browser. I have some ideas. 880 00:38:04,100 --> 00:38:05,760 There may be stuff coming. We'll 881 00:38:05,760 --> 00:38:07,660 see what works. So, I do have 882 00:38:07,660 --> 00:38:09,200 some stuff I've been meaning to work on there. 883 00:38:12,820 --> 00:38:13,780 Oh, he's walking 884 00:38:13,780 --> 00:38:15,740 by. Anyone else? 885 00:38:18,280 --> 00:38:19,680 Alright, we'll give you some time back. 886 00:38:19,760 --> 00:38:21,600 We appreciate you guys coming out. Everybody, 887 00:38:21,780 --> 00:38:21,960 thanks.