1 00:00:26,880 --> 00:00:29,860 Subtitles by the Amara.org community 2 00:00:30,000 --> 00:00:59,980 www.amara.org 3 00:01:26,880 --> 00:01:29,980 www.amara.org 4 00:01:55,820 --> 00:01:59,980 www.amara.org 5 00:02:26,880 --> 00:02:29,980 www.amara.org 6 00:02:30,000 --> 00:02:59,600 www.amara.org 7 00:03:25,920 --> 00:03:29,980 www.amara.org 8 00:03:30,000 --> 00:03:59,980 www.amara.org 9 00:04:00,000 --> 00:04:29,980 www.amara.org 10 00:04:30,000 --> 00:04:59,980 www.amara.org 11 00:05:26,880 --> 00:05:29,980 www.amara.org 12 00:05:30,000 --> 00:05:58,580 www.amara.org 13 00:06:29,300 --> 00:06:29,980 www.amara.org 14 00:06:30,000 --> 00:06:59,980 www.amara.org 15 00:07:00,000 --> 00:07:29,980 www.amara.org 16 00:07:30,000 --> 00:07:59,460 www.amara.org 17 00:08:00,000 --> 00:08:29,980 www.amara.org 18 00:08:30,000 --> 00:08:59,980 www.amara.org 19 00:09:00,000 --> 00:09:01,760 and I was like, in that two seconds, 20 00:09:01,800 --> 00:09:03,440 realized my wife was going to kill me. 21 00:09:05,160 --> 00:09:06,380 Back to the conference. 22 00:09:07,800 --> 00:09:09,640 So many server-to-server apps 23 00:09:09,640 --> 00:09:12,020 authenticate over 1433 24 00:09:12,920 --> 00:09:14,020 because it's safe, right? 25 00:09:14,700 --> 00:09:16,560 So if you've got your server on your intranet 26 00:09:16,560 --> 00:09:18,420 and you've got another server somewhere else, 27 00:09:18,440 --> 00:09:19,840 they're going to do server-to-server communication. 28 00:09:19,980 --> 00:09:21,520 They're going to do some opening queries. 29 00:09:21,920 --> 00:09:23,620 You're going to authenticate that traffic 30 00:09:23,620 --> 00:09:25,120 and open up 1433. 31 00:09:26,240 --> 00:09:26,920 That's crazy. 32 00:09:28,620 --> 00:09:29,720 So here's the deal. 33 00:09:30,980 --> 00:09:33,240 dbnetlib now directly supports 34 00:09:33,240 --> 00:09:36,700 integrated authentication over 1433. 35 00:09:40,760 --> 00:09:44,340 You can send out your NTLM credentials 36 00:09:44,340 --> 00:09:46,960 over 1433 now. 37 00:09:47,960 --> 00:09:49,560 I mean, you need to understand 38 00:09:49,560 --> 00:09:50,660 what we're saying here. 39 00:09:50,880 --> 00:09:52,720 We're just getting to the point 40 00:09:52,720 --> 00:09:55,220 that people realize to block out 139.445 41 00:09:55,220 --> 00:09:56,120 so as it's done. 42 00:09:56,220 --> 00:09:57,880 We're just getting there. 43 00:09:58,520 --> 00:09:59,540 Now, all of a sudden, 44 00:09:59,540 --> 00:10:00,900 we open up the possibility 45 00:10:00,900 --> 00:10:02,240 of a high port 46 00:10:03,100 --> 00:10:05,640 that has actual business use 47 00:10:05,640 --> 00:10:07,520 can now support this. 48 00:10:09,680 --> 00:10:11,420 So that in of itself 49 00:10:12,460 --> 00:10:14,200 isn't necessarily a big deal. 50 00:10:15,780 --> 00:10:17,720 The problem, as we already said, 51 00:10:18,200 --> 00:10:19,980 is 1433 outbound 52 00:10:19,980 --> 00:10:21,200 is typically free to pass. 53 00:10:21,380 --> 00:10:23,460 In fact, I've seen a lot of router configurations 54 00:10:23,460 --> 00:10:25,500 where established traffic, 55 00:10:26,080 --> 00:10:27,160 no matter what it is, 56 00:10:27,920 --> 00:10:28,900 is free to pass, 57 00:10:28,900 --> 00:10:29,920 but then they'll block it 58 00:10:29,920 --> 00:10:31,620 if it is 139.445, right? 59 00:10:31,640 --> 00:10:32,420 You have your denies, 60 00:10:33,540 --> 00:10:35,100 which is also kind of nuts. 61 00:10:35,300 --> 00:10:37,280 So let's just kind of look at what happens here. 62 00:10:40,170 --> 00:10:42,500 A client-side ODBC connection string, 63 00:10:44,170 --> 00:10:45,240 by its nature, 64 00:10:45,950 --> 00:10:49,020 gives the developer the opportunity 65 00:10:49,020 --> 00:10:52,140 to set the server, authentication type, 66 00:10:52,280 --> 00:10:53,000 and library, right? 67 00:10:53,080 --> 00:10:54,760 Connection string server equals this. 68 00:10:55,300 --> 00:10:56,800 Trusted security equals this. 69 00:10:57,040 --> 00:10:58,700 Network library equals this. 70 00:10:58,900 --> 00:11:00,880 So as a developer, 71 00:11:01,000 --> 00:11:02,080 I can set that stuff up. 72 00:11:02,440 --> 00:11:05,240 Well, a website can put a client-side script 73 00:11:05,240 --> 00:11:06,940 or HTML email 74 00:11:08,420 --> 00:11:10,540 that opens up record sets 75 00:11:10,540 --> 00:11:11,760 or ActiveX objects, 76 00:11:11,860 --> 00:11:12,700 things of that nature. 77 00:11:12,840 --> 00:11:13,780 The problem is, 78 00:11:13,880 --> 00:11:14,780 if it's my website, 79 00:11:15,080 --> 00:11:17,180 I'm the one who decides 80 00:11:17,180 --> 00:11:18,880 what goes in that connection string. 81 00:11:20,460 --> 00:11:21,980 So here's a lame example. 82 00:11:25,060 --> 00:11:26,260 In my script, 83 00:11:26,440 --> 00:11:28,620 I do a new ActiveX object. 84 00:11:28,900 --> 00:11:30,800 I mean, and people have ActiveX scripting 85 00:11:31,280 --> 00:11:32,560 sometimes turned off. 86 00:11:33,940 --> 00:11:36,200 Not everyone, but you should. 87 00:11:36,980 --> 00:11:38,000 That's why it's lame. 88 00:11:38,220 --> 00:11:40,880 So we say connection string provider, 89 00:11:41,180 --> 00:11:43,920 SQL, ODBE, integrate security, persist security, 90 00:11:44,080 --> 00:11:45,760 info false, initial catalog, blah, blah, blah. 91 00:11:45,880 --> 00:11:47,100 You give the data source, 92 00:11:47,200 --> 00:11:49,420 and right here, you specify dbnetlib. 93 00:11:51,060 --> 00:11:54,340 So when you go and execute this site 94 00:11:54,340 --> 00:11:58,420 or execute this page and this object is instantiated, 95 00:11:58,900 --> 00:12:01,920 I'm specifically designating dbnetlib 96 00:12:01,920 --> 00:12:03,200 and integrated security. 97 00:12:04,240 --> 00:12:08,060 So what's going to happen is your client 98 00:12:08,820 --> 00:12:10,940 is going to deliver its NTLM credentials 99 00:12:11,520 --> 00:12:14,820 right to my box over port 1433. 100 00:12:15,680 --> 00:12:16,440 It's crazy. 101 00:12:17,180 --> 00:12:19,220 All right, so let's see if I can make this happen 102 00:12:19,700 --> 00:12:20,840 in real life here. 103 00:12:23,700 --> 00:12:24,420 Okay. 104 00:12:27,860 --> 00:12:30,740 As I said, I had to redo my whole configuration, 105 00:12:31,120 --> 00:12:35,720 and I was all stressed that something was not 106 00:12:35,720 --> 00:12:39,100 going to work right, Litchfield and all. 107 00:12:42,680 --> 00:12:43,920 And it was in a big hurry. 108 00:12:44,000 --> 00:12:45,080 I actually had to fly home. 109 00:12:45,720 --> 00:12:49,320 Yes, last night, Vegas to Reno was my flight. 110 00:12:50,180 --> 00:12:52,900 Now, close your eyes and imagine the people on that plane. 111 00:12:55,380 --> 00:12:58,060 I would like a ticket from bad to worse, please. 112 00:13:03,100 --> 00:13:04,160 I'm here all week. 113 00:13:07,100 --> 00:13:09,740 Okay, so now I need to go into VMware. 114 00:13:12,840 --> 00:13:15,900 I normally have these guys powered up and ready to go. 115 00:13:16,940 --> 00:13:19,080 Oh, and I have some cool VMware stuff to give away, 116 00:13:19,160 --> 00:13:20,840 so I'll ask some stupid question 117 00:13:20,840 --> 00:13:23,700 or the best insult somebody can give me, 118 00:13:23,700 --> 00:13:25,480 and you'll get a hat and a shirt. 119 00:13:26,200 --> 00:13:27,320 Well, but not right now. 120 00:13:28,600 --> 00:13:30,200 So I'm going to power this guy on. 121 00:13:30,400 --> 00:13:31,680 VMware is actually kind of cool. 122 00:13:32,600 --> 00:13:36,380 It allows you to instantiate. 123 00:13:36,380 --> 00:13:37,880 Well, that's just my CD-ROM. 124 00:13:38,020 --> 00:13:39,080 That wasn't VMware's problem. 125 00:13:39,200 --> 00:13:39,760 That's my problem. 126 00:13:40,240 --> 00:13:42,820 It allows you to instantiate your own little boxes 127 00:13:42,820 --> 00:13:44,820 on your inside of your other active window, 128 00:13:45,460 --> 00:13:46,840 network connections, everything. 129 00:13:47,580 --> 00:13:50,500 So I'm actually starting a Windows 2000 session in here. 130 00:13:50,580 --> 00:13:52,040 He's going to be my client. 131 00:13:53,240 --> 00:13:53,680 All right. 132 00:13:53,700 --> 00:13:55,840 And my active session is my evil server. 133 00:13:56,240 --> 00:13:56,680 Sure. 134 00:13:57,500 --> 00:13:58,900 Was that a question or a stretch? 135 00:14:00,140 --> 00:14:00,580 Okay. 136 00:14:06,100 --> 00:14:09,480 And I'm restarting it because the last time that I did it, 137 00:14:10,520 --> 00:14:12,820 this guy only has 256 mega RAM. 138 00:14:12,920 --> 00:14:15,260 I tried to get somebody to let me borrow their box, 139 00:14:15,260 --> 00:14:18,580 but nobody trusts me for some strange reason. 140 00:14:20,080 --> 00:14:21,720 I mean, even Buddy's like, oh, fear. 141 00:14:21,840 --> 00:14:22,580 I'm like, let me hold your box. 142 00:14:22,720 --> 00:14:23,260 Hell no. 143 00:14:28,100 --> 00:14:28,520 Okay. 144 00:14:28,720 --> 00:14:30,000 Give me just a second. 145 00:14:33,360 --> 00:14:35,980 See, this is where pictures of my wife would come in handy, right? 146 00:14:39,920 --> 00:14:40,700 Hey, hey. 147 00:14:51,080 --> 00:14:51,500 Yeah. 148 00:14:52,440 --> 00:14:53,680 The guy with the V8. 149 00:14:53,680 --> 00:14:55,640 The VMware hat is the one who said that. 150 00:14:57,840 --> 00:14:58,360 Exactly. 151 00:15:01,520 --> 00:15:02,040 What? 152 00:15:03,660 --> 00:15:08,400 Oh, he said, he asked if I wanted some pictures of my wife. 153 00:15:11,820 --> 00:15:13,560 As if he had them. 154 00:15:14,560 --> 00:15:16,840 Just in case you weren't with me there. 155 00:15:17,600 --> 00:15:18,940 I do that every time. 156 00:15:21,380 --> 00:15:21,900 Okay. 157 00:15:22,100 --> 00:15:22,760 Don't look. 158 00:15:32,940 --> 00:15:34,600 I don't trust any of you people. 159 00:15:38,840 --> 00:15:39,200 Okay. 160 00:15:43,040 --> 00:15:44,560 Boy, it would be nice if this works. 161 00:15:45,860 --> 00:15:47,400 Otherwise, you'll just have to trust me. 162 00:15:47,700 --> 00:15:48,640 Who trusts me? 163 00:15:50,120 --> 00:15:50,480 Okay. 164 00:15:50,720 --> 00:15:52,180 Everybody else, I guess, can just go. 165 00:15:55,780 --> 00:15:56,220 Okay. 166 00:16:00,440 --> 00:16:03,420 I'm going to give this session a minute to get its act together. 167 00:16:07,600 --> 00:16:13,420 He lives in a real small window on this box, so, and it's kind of hard to see. 168 00:16:13,640 --> 00:16:17,100 But what it says where the little hand is is, buy crap. 169 00:16:18,240 --> 00:16:20,740 So, I'm just kind of walking somebody through. 170 00:16:20,860 --> 00:16:22,060 And this really isn't on my site. 171 00:16:22,060 --> 00:16:24,200 Just come to my site. 172 00:16:24,920 --> 00:16:26,280 I won't grab your credentials. 173 00:16:31,660 --> 00:16:32,060 Okay. 174 00:16:32,180 --> 00:16:34,940 So, I've got my little ADO DB example here. 175 00:16:36,200 --> 00:16:38,400 Let me get my PowerPoint slide up here. 176 00:16:40,160 --> 00:16:40,560 Hello. 177 00:16:40,700 --> 00:16:41,600 Come back to me. 178 00:16:48,840 --> 00:16:49,240 Okay. 179 00:16:49,340 --> 00:16:50,760 So, I already had the code on that guy. 180 00:16:50,900 --> 00:16:51,620 So, you saw that. 181 00:16:57,120 --> 00:16:57,560 Okay. 182 00:16:59,260 --> 00:17:01,700 So, I'm going to get my sniffer going here. 183 00:17:02,440 --> 00:17:04,040 And I did this in Black Hat. 184 00:17:04,060 --> 00:17:05,760 I actually showed people this the first time. 185 00:17:06,680 --> 00:17:08,980 I showed anybody this for the first time. 186 00:17:09,080 --> 00:17:10,420 I'm still getting my English down. 187 00:17:11,060 --> 00:17:12,120 At Black Hat. 188 00:17:12,460 --> 00:17:19,160 And a couple of people asked if I have like a full-blown exploit and kind of why I'm using Network Monitor to show you this. 189 00:17:19,680 --> 00:17:20,120 Well. 190 00:17:20,820 --> 00:17:21,780 That's not my... 191 00:17:21,780 --> 00:17:26,980 My gig's not to write a bunch of exploit code. 192 00:17:28,540 --> 00:17:31,060 I want to illustrate that stuff can be done. 193 00:17:31,220 --> 00:17:32,580 I'll give you proof of concept. 194 00:17:33,160 --> 00:17:38,300 My real reason for sharing all this is so you people can protect yourselves. 195 00:17:38,500 --> 00:17:40,760 Not so you can go out there and hack everybody up. 196 00:17:40,880 --> 00:17:41,020 Right? 197 00:17:41,540 --> 00:17:43,080 I have to say that. 198 00:17:43,120 --> 00:17:43,860 The Fed is here. 199 00:17:44,100 --> 00:17:44,260 Yeah. 200 00:17:45,300 --> 00:17:45,640 Okay. 201 00:17:45,740 --> 00:17:46,440 One second there. 202 00:17:47,120 --> 00:17:47,780 One second. 203 00:17:47,900 --> 00:17:48,200 Okay. 204 00:17:50,120 --> 00:17:52,060 All right, so I'm going to start a little network capture. 205 00:17:54,600 --> 00:17:56,400 Now, this is an ADODB example. 206 00:17:56,640 --> 00:17:58,840 So we all know that this is kind of lame. 207 00:17:59,900 --> 00:18:02,600 Because you don't have scripting turned on typically. 208 00:18:02,860 --> 00:18:04,420 But this is what bothers me. 209 00:18:06,420 --> 00:18:09,800 This page is accessing a data source from another domain. 210 00:18:10,440 --> 00:18:11,780 Do you want to allow this? 211 00:18:12,600 --> 00:18:14,260 That doesn't tell us anything. 212 00:18:15,100 --> 00:18:17,780 We want to access data in another domain. 213 00:18:18,020 --> 00:18:19,260 That's why we're doing this. 214 00:18:19,260 --> 00:18:26,260 So, it'd be very easy for anyone to assume that yes is right. 215 00:18:26,380 --> 00:18:27,280 It's also the default. 216 00:18:27,520 --> 00:18:31,600 So when you hit enter, it's going to, what's going to happen now is when I hit enter, it's 217 00:18:31,600 --> 00:18:33,720 going to instantiate that ADODB connection object. 218 00:18:35,300 --> 00:18:40,780 And if I wanted to engineer around it, I could say, you know, security settings may require 219 00:18:40,780 --> 00:18:42,400 you to validate blah, blah, blah. 220 00:18:44,800 --> 00:18:47,440 So I'm going to say yes. 221 00:18:47,660 --> 00:18:48,060 Okay. 222 00:18:50,140 --> 00:18:52,560 If it times out, we'll know we're hosed. 223 00:18:52,740 --> 00:18:54,540 But I can work around that. 224 00:18:54,660 --> 00:18:56,460 I think it's going to time out again. 225 00:19:04,320 --> 00:19:04,800 Yep. 226 00:19:04,840 --> 00:19:05,540 It timed out. 227 00:19:05,600 --> 00:19:06,400 But that's okay. 228 00:19:06,540 --> 00:19:08,480 I can still illustrate my point right here. 229 00:19:14,080 --> 00:19:17,060 I'm going to go down my network monitor a little bit here. 230 00:19:17,560 --> 00:19:18,040 Okay. 231 00:19:22,320 --> 00:19:23,160 Where was it? 232 00:19:23,180 --> 00:19:23,980 Maybe it was up here. 233 00:19:34,920 --> 00:19:39,300 So this is where, and I don't know how easy it is for you guys to see, but thankfully 234 00:19:39,300 --> 00:19:41,360 it's kind of highlighted in black. 235 00:19:43,140 --> 00:19:45,900 You'll see the destination port is 1433. 236 00:19:46,320 --> 00:19:46,740 Now. 237 00:19:46,740 --> 00:19:48,560 I'm the server in this case. 238 00:19:48,780 --> 00:19:55,020 So what's happening is my client chose a high port over 1026 destined for 1433. 239 00:19:56,680 --> 00:20:01,460 In many cases, this call would have gone right out of your firewall, right? 240 00:20:01,940 --> 00:20:06,780 I mean, who's blocking outbound 1433 at the egress? 241 00:20:07,180 --> 00:20:08,580 Not a lot of people are. 242 00:20:10,040 --> 00:20:14,980 So the thing to realize here, and I'll show you where it makes the call for the SQL server, 243 00:20:15,040 --> 00:20:16,660 if I don't fall over on those steps. 244 00:20:25,820 --> 00:20:27,140 And that's it. 245 00:20:27,160 --> 00:20:28,260 That's it coming back. 246 00:20:29,100 --> 00:20:33,080 The source is now 1433 from mine going back down to that guy. 247 00:20:33,360 --> 00:20:38,460 Now, if my SQL server service and my active client was really listening, they even went 248 00:20:38,460 --> 00:20:43,340 home and tested it again, but it's kind of hit and miss with my VMware. 249 00:20:45,980 --> 00:20:46,720 You would have missed it. 250 00:20:46,720 --> 00:20:58,380 actually see the NTLM SSP being referenced here. The domain and username are actually 251 00:20:58,380 --> 00:21:04,840 passed in clear text here. It's not even base 64. You'd see that going down there and then 252 00:21:04,840 --> 00:21:10,540 I get my hash right in this data stream here. Who's familiar with Dildog's exploit on the 253 00:21:10,540 --> 00:21:18,680 Telnet server deal with the NTLM hash being passed out? Right. If you want to get a good 254 00:21:18,680 --> 00:21:25,360 breakdown on what the actual packet construction is, then go to the AtStake website. I've got a 255 00:21:25,360 --> 00:21:30,140 copy of it in my bag as well if anybody wants the URL. And they give you the entire package 256 00:21:30,140 --> 00:21:40,160 structure so you can see. A little anticlimactic without being able to see the hash because my 257 00:21:40,160 --> 00:21:40,520 uh... 258 00:21:40,540 --> 00:21:50,480 My box messed up on me. But like I said, this page is accessing a data source. There's another 259 00:21:50,480 --> 00:21:57,260 one that's kind of bad. And I don't want to linger too much on the client side. Really what you need 260 00:21:57,260 --> 00:22:05,400 to know is that your credentials can now be blown out of 1433. That's what I really want to focus 261 00:22:05,400 --> 00:22:10,260 on here. But here's a couple of neat ones. Part of the installation 262 00:22:10,260 --> 00:22:15,520 of those client side tools is a couple of new ActiveX controls that are safe for scripting 263 00:22:15,520 --> 00:22:24,840 by default. And that's a bad thing. One of them is this SQL namespace ActiveX control. 264 00:22:25,340 --> 00:22:30,640 And this is all client side stuff. What that guy's designed to do is to interrogate a SQL 265 00:22:30,640 --> 00:22:35,700 server and get a list of all the objects. Kind of like if you wanted to build your own 266 00:22:36,460 --> 00:22:39,960 enterprise manager, your own code, you could 267 00:22:40,260 --> 00:22:45,180 this ActiveX control to do that. Well, the problem here is that it's completely silent. 268 00:22:47,150 --> 00:22:53,000 I could go to, let's talk about that for a second. How do we acquire a target for this 269 00:22:53,000 --> 00:23:02,940 kind of stuff? SQL 2000 news groups. You can go to one SQL 2000 news group and in a day 270 00:23:02,940 --> 00:23:09,900 probably get 250 email addresses of people posting questions that you know have the client 271 00:23:09,900 --> 00:23:19,740 loaded. Send them an email. Put this guy in here. Set your server. Snip their traffic and you get 272 00:23:19,740 --> 00:23:28,300 all their credentials. You could use that to, if you wanted to do like an SMB relay on the guys, 273 00:23:28,420 --> 00:23:34,420 you could do that. You could take it offline and crack it. It's in LM hash, right? So it's not like 274 00:23:34,420 --> 00:23:39,840 it's going to crack in two seconds, but you could crack it in three months. So if I 275 00:23:39,840 --> 00:23:44,380 got several of your administrators, and that's the other thing. Your database administrators 276 00:23:45,700 --> 00:23:52,180 are typically administrators on that box. If not domain administrators, right? There's 277 00:23:52,180 --> 00:23:59,980 some value to getting those credentials. If I crack them offline, not only do I have your 278 00:23:59,980 --> 00:24:05,500 own credentials, I know I have credentials to your SQL server. There's a lot of neat 279 00:24:05,500 --> 00:24:08,080 stuff that you can do. So let's take a look at this guy. 280 00:24:12,660 --> 00:24:23,500 What am I doing? My brain locked up for a moment. Okay. No, I don't want to debug. 281 00:24:27,200 --> 00:24:31,980 So I'm going to go back here. Underneath here, where I have clicked the spinning head 282 00:24:32,560 --> 00:24:38,340 of Hermod, I feel, well, it might not time out. It's hit and miss. So I'm just going 283 00:24:38,340 --> 00:24:39,360 to start my trace again. 284 00:24:39,360 --> 00:24:49,840 Just in case. Next time I'll bring a couple of laptops, just so I don't have to mess 285 00:24:49,840 --> 00:25:02,500 around with all of this. Okay. So I'm doing it. When I click on that guy, since that 286 00:25:02,500 --> 00:25:08,760 object is marked safe for scripting, and I will say, there is a service pack one for SQL 287 00:25:08,760 --> 00:25:09,180 2000. 288 00:25:09,360 --> 00:25:16,760 I brought this up to Microsoft a month or so ago and wanted to make sure that they had 289 00:25:16,760 --> 00:25:21,040 a service pack in the works before I said anything about it, right? I know, full disclosure, 290 00:25:21,240 --> 00:25:24,680 blah, blah, blah. It's my vulnerability. I'll do what I want with it. 291 00:25:26,920 --> 00:25:31,360 So they did come out with a service pack. The problem is that who takes the service 292 00:25:31,360 --> 00:25:39,000 pack for SQL Server and loads it on their clients? Nobody. So it doesn't do anything. 293 00:25:40,140 --> 00:25:44,000 All your clients still have. You notice all it did was it gave me the time out because 294 00:25:44,000 --> 00:25:50,400 the VMware session is not talking to the other guy. But in the same manner, we'll 295 00:25:50,400 --> 00:25:51,800 see how it tries to open up. 296 00:25:55,900 --> 00:26:05,860 No, that's not it. That was doing the web page. You see, ooh, maybe it did it. 297 00:26:08,180 --> 00:26:08,580 Okay. 298 00:26:08,940 --> 00:26:09,340 Okay. 299 00:26:17,700 --> 00:26:22,760 I think it timed out again. But you'll see it's the same thing. The destination port, 300 00:26:23,260 --> 00:26:28,760 139 doesn't even come into play here. The destination port is 1433. You wouldn't 301 00:26:28,760 --> 00:26:39,340 have even known that that happened. I really wish that I had two. Does anybody? No, I 302 00:26:43,840 --> 00:26:45,760 I really wouldn't do anything to your computer. 303 00:26:51,280 --> 00:26:59,400 Do you have the SQL client on that guy? No? If you want to actually, I mean, this is, 304 00:27:03,720 --> 00:27:06,820 okay. Well, I appreciate it. I'd have to load the SQL client on him. 305 00:27:11,980 --> 00:27:18,560 It's there. The only thing that we didn't see is the word NTLM. If anybody's really 306 00:27:18,560 --> 00:27:23,920 interested in seeing that, you're all going to go do this at home anyway, right? So you'll 307 00:27:23,920 --> 00:27:32,340 see, you'll see that the other, the other problems here are a couple of other ActiveX 308 00:27:32,340 --> 00:27:37,740 controls, SQL distribution, and the merge control. And they're all scriptable, right 309 00:27:37,740 --> 00:27:38,380 from IE. 310 00:27:38,380 --> 00:27:45,340 And they're all marked save for scripting. So that's where you can grab the creds 311 00:27:45,340 --> 00:27:51,220 for fun and profit. And then I already did my live demo. And I wonder if I have any, 312 00:27:51,340 --> 00:27:59,240 I was gonna, I wanted to talk about kind of how to stop this. From the ActiveX control 313 00:28:00,680 --> 00:28:05,760 standpoint, there's a couple of things that you can do. I'm a advocate of group policy. 314 00:28:05,760 --> 00:28:10,940 The Windows 2000 Group Policy Manager is really powerful. 315 00:28:11,960 --> 00:28:15,900 In a domain environment, you can set up a group policy 316 00:28:15,900 --> 00:28:20,220 that will automatically go out to all of your servers and workstations, 317 00:28:20,320 --> 00:28:24,580 and you can set options like this for IE and security options. 318 00:28:24,700 --> 00:28:28,640 So you can disable stuff that's marked safe for scripting, 319 00:28:28,640 --> 00:28:31,340 which you probably haven't now, but you might want to do that. 320 00:28:32,120 --> 00:28:40,340 You can set your systems not to ever access data sources in another domain. 321 00:28:40,640 --> 00:28:42,160 That's also a smart thing to do. 322 00:28:43,220 --> 00:28:47,840 However, be careful because, you know, I'm not the brightest crayon in the box, 323 00:28:48,020 --> 00:28:52,380 so there's going to be other people, you know, Georgie Gosinski 324 00:28:52,380 --> 00:28:54,060 and people who really know what they're doing, 325 00:28:54,640 --> 00:28:59,940 who are going to find ways of instantiating objects on your client 326 00:28:59,940 --> 00:29:01,320 that push your credentials out. 327 00:29:01,340 --> 00:29:02,100 And that's what we're going to do about 14.33. 328 00:29:05,180 --> 00:29:09,920 So have a talk with your firewall people, show them if you need to, 329 00:29:10,580 --> 00:29:12,180 and lock down that egress. 330 00:29:12,400 --> 00:29:15,240 Don't let 14.33 go out unless you have to. 331 00:29:16,480 --> 00:29:21,240 In large B2B environments, it might be something that has to be done, 332 00:29:21,460 --> 00:29:24,200 and they'll say, well, all the traffic's encrypted on that channel, 333 00:29:24,280 --> 00:29:27,220 so it doesn't matter, but it does matter because the port's open. 334 00:29:27,660 --> 00:29:30,460 So if they're going to do that, make sure that they lock it down, 335 00:29:30,460 --> 00:29:32,700 and they're going to be able to access it from host to host, right? 336 00:29:35,020 --> 00:29:39,640 If you can, keep people, you know, only let out what you have to let out, 337 00:29:39,720 --> 00:29:41,080 and that's the danger here. 338 00:29:43,000 --> 00:29:47,220 So other than applying the service packs to your workstations, 339 00:29:47,380 --> 00:29:51,660 use strong passwords, use group policy, 340 00:29:52,620 --> 00:29:55,220 there's really not a whole lot we can do about this right now. 341 00:29:55,360 --> 00:29:57,340 And I think once people start 342 00:29:59,660 --> 00:30:05,180 using this guy, it's probably going to spread like a fart in an airplane, you know? 343 00:30:05,860 --> 00:30:08,980 I mean, it's going to be, pardon me, ladies and gentlemen, 344 00:30:09,080 --> 00:30:11,720 if that offended you on that one. 345 00:30:12,020 --> 00:30:15,700 So are there any questions about how this can be used, if it matters, 346 00:30:15,800 --> 00:30:17,940 do you care, blah, blah, blah, anybody? 347 00:30:18,460 --> 00:30:19,000 Yes, sir? 348 00:30:22,580 --> 00:30:27,180 Yeah, I actually, I'll put some more slides, I'll put those HTMLs up, 349 00:30:27,180 --> 00:30:28,420 at Hammer of God right now. 350 00:30:28,540 --> 00:30:30,300 I've been here, so I haven't been able to do it. 351 00:30:30,720 --> 00:30:33,100 But it's the Hammer of God website. 352 00:30:33,560 --> 00:30:35,140 The top one's my real life. 353 00:30:35,320 --> 00:30:37,920 I design business accounting software. 354 00:30:38,920 --> 00:30:39,360 Whoo! 355 00:30:41,620 --> 00:30:45,400 It's actually cool stuff, but it's nowhere near as fun as Hammer of God. 356 00:30:46,900 --> 00:30:48,760 So go to the Hammer of God website. 357 00:30:49,100 --> 00:30:52,380 I've got some other tools up there for enumeration and stuff like that. 358 00:30:52,440 --> 00:30:53,420 Well, I talked about that yesterday. 359 00:30:56,160 --> 00:30:58,080 So these slides will be there. 360 00:30:59,240 --> 00:31:05,860 I've actually gotten some requests to write an exploit for this, 361 00:31:05,960 --> 00:31:07,760 and I don't think I'm going to do that. 362 00:31:08,160 --> 00:31:11,440 It's tempting, but, I mean, I think, you know, 363 00:31:11,480 --> 00:31:13,700 you illustrate it and you tell people to protect themselves, 364 00:31:13,980 --> 00:31:17,520 and then I'll leave it to, you know, RFP to write the exploit. 365 00:31:17,640 --> 00:31:17,940 Yes, sir? 366 00:31:19,300 --> 00:31:19,700 . 367 00:31:22,840 --> 00:31:23,400 Does it work? 368 00:31:23,420 --> 00:31:32,020 Does it work under Windows XP? The ActiveX object does. Now how XP is keeping 369 00:31:32,020 --> 00:31:36,440 it from being instantiated automatically, I don't know. That's what the question was. 370 00:31:36,560 --> 00:31:43,540 Does it work under XP? I'm going to have to say yes, because the DB is not OS specific. 371 00:31:43,820 --> 00:31:48,040 You can load your client side tools on that guy. He's going to open it up and send it 372 00:31:48,040 --> 00:31:49,900 out. Yes, sir? 373 00:31:57,960 --> 00:32:12,520 Can you get the DBNetLib to use Kerberos? Not to my knowledge. I do not know, so I'm 374 00:32:12,520 --> 00:32:16,960 just going to guess. But I'll first state, but I don't know. But my guess is that since 375 00:32:16,960 --> 00:32:17,580 it's NT... 376 00:32:18,820 --> 00:32:23,700 authentication that the only way it's really going to be able to do that is to pass the hash over 377 00:32:23,700 --> 00:32:29,660 because you're really authenticating on the other box so he might acquiesce to a kerberos server get 378 00:32:29,660 --> 00:32:34,980 a token bring it back check it i don't know how that would work i i doubt it but you know what 379 00:32:34,980 --> 00:32:40,000 i'm glad you said that the other thing that you can do is force ntlm version 2 if you can get away 380 00:32:40,000 --> 00:32:46,220 with that not all of your applications depending on how they authenticate cross platform that may 381 00:32:46,220 --> 00:32:52,780 not work who i'd like to know that who is successfully running ntlm v2 exclusively 382 00:32:56,040 --> 00:33:00,860 there you go oh these two guys are or do you have questions yes sir 383 00:33:01,700 --> 00:33:07,420 oh you are okay good job so he's in he's in good shape um yes sir 384 00:33:20,200 --> 00:33:26,360 oh yeah if you want to just engineer your way around it like that absolutely and you can also 385 00:33:26,360 --> 00:33:32,180 call this i mean it's a library you can write code and distribute it it could be a trojan it 386 00:33:32,180 --> 00:33:36,700 could be whatever i mean it's not like we're it's not malware we're not malforming packets we're not 387 00:33:36,700 --> 00:33:44,040 doing anything it's valid traffic it's ntlm traffic over the wire now i mean it's just it's 388 00:33:44,040 --> 00:33:45,860 up to your imagination how you're going to get that 389 00:33:46,220 --> 00:33:52,160 library on their on their box i'm just telling you like right out of the right out of the blue 390 00:33:52,160 --> 00:33:57,660 you've got a pretty juicy target already but absolutely you can you can do any of that stuff yes 391 00:33:57,660 --> 00:33:57,860 sir 392 00:34:05,360 --> 00:34:07,920 the buffer yes like the overflow or something 393 00:34:07,920 --> 00:34:09,380 the function of your quality 394 00:34:16,220 --> 00:34:20,240 uh... that the question is are there any parameters that will cause buffer overflows 395 00:34:20,240 --> 00:34:23,400 i have no idea i'm not a buffer overflow guy 396 00:34:23,830 --> 00:34:24,620 who did i see 397 00:34:25,740 --> 00:34:27,940 there's a girl i met there you are 398 00:34:27,940 --> 00:34:30,540 she's a buffer overflow person i don't know 399 00:34:31,180 --> 00:34:31,700 uh... 400 00:34:32,540 --> 00:34:34,920 litchfield alas david litchfield about that 401 00:34:35,280 --> 00:34:36,260 and i'll i'll post 402 00:34:36,980 --> 00:34:39,200 comments and questions and stuff like that 403 00:34:39,540 --> 00:34:41,180 on the site very possibly 404 00:34:41,900 --> 00:34:44,340 that that you might be able to do that i would think though 405 00:34:45,600 --> 00:34:47,820 you you mean in order to pat 406 00:34:47,820 --> 00:34:51,000 there is one parameter that chip andrew says we can do 407 00:34:51,360 --> 00:34:52,140 i tried it 408 00:34:52,140 --> 00:34:54,940 before i came today and it and it didn't work 409 00:34:55,420 --> 00:34:56,560 but what chip says 410 00:34:56,560 --> 00:34:59,020 is that in that connection string 411 00:34:59,020 --> 00:35:01,280 you can specify port 412 00:35:01,280 --> 00:35:03,400 i am unable to do it 413 00:35:03,400 --> 00:35:07,320 he's saying go to uh... library equals dvd that live comma 414 00:35:08,260 --> 00:35:10,420 now if you can do that 415 00:35:10,420 --> 00:35:12,400 we're all up shit creek 416 00:35:13,580 --> 00:35:14,600 because then 417 00:35:15,680 --> 00:35:18,420 i set my evil server i hate that term 418 00:35:18,420 --> 00:35:19,980 evil server 419 00:35:19,980 --> 00:35:24,540 i set my server up listening to sequel of port fifty three 420 00:35:25,760 --> 00:35:26,540 i set my server up 421 00:35:26,560 --> 00:35:27,120 send out 422 00:35:27,700 --> 00:35:28,640 these emails 423 00:35:28,640 --> 00:35:30,100 or just have a website 424 00:35:31,240 --> 00:35:35,600 that sends out the intel am hash over fifty three now how cool would that be 425 00:35:36,360 --> 00:35:39,080 if anybody can make that work please tell me 426 00:35:39,080 --> 00:35:42,480 now put your name up and all that crap i'm not interested in who did what you 427 00:35:42,480 --> 00:35:42,620 know 428 00:35:42,620 --> 00:35:44,640 i don't i won't say i did it 429 00:35:44,640 --> 00:35:46,020 but i mean that would be 430 00:35:46,680 --> 00:35:49,760 uh... and actually tried it that's the only other parameter i know of 431 00:35:49,760 --> 00:35:51,740 you very well could cause something 432 00:35:52,880 --> 00:35:55,560 to go into user context and 433 00:35:55,560 --> 00:35:57,080 exploit blah blah blah 434 00:35:58,360 --> 00:35:59,820 anyone bueller anyone 435 00:36:00,480 --> 00:36:01,100 yes sir 436 00:36:01,100 --> 00:36:04,280 have to be careful i have to look first you know 437 00:36:05,440 --> 00:36:06,080 uh... 438 00:36:09,420 --> 00:36:10,060 uh... 439 00:36:25,560 --> 00:36:30,460 okay yeah yeah yeah the question was are those parameters that i did in this odbc connection 440 00:36:30,460 --> 00:36:31,900 strain compatible with 441 00:36:31,900 --> 00:36:36,620 your standard odbc driver driver libraries it's collected for writing vb if you're writing 442 00:36:36,620 --> 00:36:37,520 anything and you just 443 00:36:37,520 --> 00:36:38,840 oh yeah that's all it is 444 00:36:39,620 --> 00:36:40,460 it's that string 445 00:36:41,340 --> 00:36:44,620 you can go into your view absolutely just change the network library 446 00:36:45,640 --> 00:36:46,460 and absolutely 447 00:36:48,440 --> 00:36:52,160 well i know everybody's really hot and i'm amazed at it one more question 448 00:36:53,100 --> 00:36:55,220 actually got a lot of time we can all go drink 449 00:36:58,280 --> 00:36:58,880 but 450 00:37:01,340 --> 00:37:01,940 you know 451 00:37:01,940 --> 00:37:02,320 and so i kinda 452 00:37:02,320 --> 00:37:10,400 other than the sequel server crap that the service pack does marks those 453 00:37:11,280 --> 00:37:12,320 activex objects 454 00:37:12,320 --> 00:37:14,200 that's not safe for scripting 455 00:37:14,200 --> 00:37:15,720 but they still exist 456 00:37:19,160 --> 00:37:24,360 it would probably say your securities savings don't allow you to run this or last if you 457 00:37:24,360 --> 00:37:25,540 wanna run an activex due înt Tea id conventa esv gallaudet asia veleие 458 00:37:25,560 --> 00:37:27,680 or you'd get some other type of dialogue. 459 00:37:28,300 --> 00:37:31,760 And so the question was, what does the service pack do? 460 00:37:32,140 --> 00:37:35,460 And it does some stuff for SQL, I don't know, 461 00:37:36,160 --> 00:37:40,900 but it does mark those ActiveX controls as not safe for scripting. 462 00:37:41,000 --> 00:37:45,560 But that's why I'm saying don't get hung up on these ActiveX controls 463 00:37:46,300 --> 00:37:49,760 because who knows what else we can do to instantiate these objects. 464 00:37:50,020 --> 00:37:52,940 If we can call dbnetlib, then the game's over. 465 00:37:53,540 --> 00:37:55,300 That's the point I want to make. 466 00:37:55,560 --> 00:37:55,800 Yes, sir? 467 00:38:00,340 --> 00:38:02,600 You certainly could do a push install. 468 00:38:03,040 --> 00:38:07,140 I'm just saying the reason I said it's just typically people don't do that. 469 00:38:07,580 --> 00:38:09,960 Like when your Exchange Server service pack comes out, 470 00:38:10,000 --> 00:38:11,920 you go over to the Exchange Server and you install it. 471 00:38:12,320 --> 00:38:15,340 But everyone who has client-side stuff, who cares? 472 00:38:15,440 --> 00:38:16,560 They can connect and do everything. 473 00:38:17,040 --> 00:38:18,300 But you absolutely could. 474 00:38:18,460 --> 00:38:19,400 You could use SMS. 475 00:38:19,620 --> 00:38:20,620 You could use group policy. 476 00:38:20,760 --> 00:38:22,320 You could roll out custom installs. 477 00:38:22,520 --> 00:38:25,120 So, yeah, do that for sure. 478 00:38:26,800 --> 00:38:27,320 Well, good. 479 00:38:27,340 --> 00:38:28,000 I like questions. 480 00:38:28,020 --> 00:38:28,420 Yes, ma'am. 481 00:38:33,780 --> 00:38:35,300 I'm not going to tell you what she said. 482 00:38:36,500 --> 00:38:37,200 No, I'm kidding. 483 00:38:37,260 --> 00:38:39,580 She said if she says thank you, can she add the T-shirt? 484 00:38:39,680 --> 00:38:40,400 And I said yes. 485 00:38:41,740 --> 00:38:44,360 I was going to be mysterious, but I didn't want to insult her. 486 00:38:47,800 --> 00:38:49,600 So, if there aren't any more questions, 487 00:38:49,840 --> 00:38:52,040 I'm going to let everybody run back into the air conditioning. 488 00:38:52,600 --> 00:38:53,480 Thanks very much. 489 00:38:54,260 --> 00:38:55,540 I hope this was of some help. 490 00:38:55,560 --> 00:38:56,320 Some value to you. 491 00:38:57,500 --> 00:38:58,120 Thank you. 492 00:38:58,480 --> 00:39:03,040 And have a good rest of the conference. 493 00:39:03,300 --> 00:39:03,720 Woo-hoo! 494 00:39:04,840 --> 00:39:05,320 Woo-hoo!