1 00:00:27,300 --> 00:00:29,980 I hope you enjoyed the video, if you did, please leave a like and subscribe to the channel, and I'll see you in the next video. 2 00:00:57,180 --> 00:00:59,980 Thanks for watching! 3 00:01:19,200 --> 00:01:28,540 Thanks for watching! 4 00:01:57,680 --> 00:01:59,700 Thanks for watching! 5 00:02:00,000 --> 00:02:29,880 Thanks for watching! 6 00:02:31,360 --> 00:02:45,660 Back in the day of NT4O, if you had a box that was part of a domain structure, when that guy boots up, he's going to initiate a secure channel on the network, talk to a domain controller and say, hey, am I part of this domain or not? 7 00:02:46,800 --> 00:02:55,320 That connection is established over null credentials, initially. No username, no password. Bang. Talks to the domain controller, says, hey, am I part of this domain, yes or no? 8 00:02:55,960 --> 00:02:59,320 If you keep an NT box... 9 00:03:00,000 --> 00:03:06,340 From using that connection, he will not authenticate. He won't even join the domain. It'll say no domain controller was found. 10 00:03:07,180 --> 00:03:12,560 It's also used in... I wish I had more stuff. I like to be an evangelist and come out and... 11 00:03:13,200 --> 00:03:25,860 It's used when... Remember multi-domain structures? You have some trust domains over here, and like, I'll trust these guys, but they won't trust me, or normally it's they trust me, but I don't trust them, right? 12 00:03:30,100 --> 00:03:34,120 Well, they need to be able to grab a list of usernames to grant access to. 13 00:03:35,220 --> 00:03:44,200 Since I don't trust them, the way that they make a connection to enumerate what users they can set on their resources, that's also done with null credentials. 14 00:03:44,580 --> 00:03:48,200 Ooh, air conditioning. Could you stay right there? Thanks. 15 00:03:49,880 --> 00:03:51,500 Got a cool wind blowing in here. 16 00:03:54,740 --> 00:03:59,620 And SMS. Some of the third-party Microsoft apps also use that. 17 00:04:00,000 --> 00:04:10,020 For discovery. Whenever SMS service goes out and wants to see what's on the box and who he is and what he's running, that initial connection to enumerate shares and all that stuff is done as a null user as well. 18 00:04:10,280 --> 00:04:14,060 So, I mean, this guy really has some uses. 19 00:04:15,120 --> 00:04:16,160 All right, so who cares? 20 00:04:17,060 --> 00:04:21,840 I mean, everybody's heard of restrict anonymous and the null user and blah, blah, blah. 21 00:04:24,360 --> 00:04:29,140 It can actually be a substantial hole that... 22 00:04:30,200 --> 00:04:34,260 Evil hackers can use to enumerate information on your network. 23 00:04:36,240 --> 00:04:36,920 Say who? 24 00:04:39,280 --> 00:04:41,200 Yes, no passwords, though. 25 00:04:42,080 --> 00:04:43,840 What was the other one? Comment fields? 26 00:04:45,300 --> 00:04:47,360 Oh, yeah, passwords and comment fields. 27 00:04:47,500 --> 00:04:51,460 Oh, I mean, I would just shoot people and light them on fire if they did that. 28 00:04:52,580 --> 00:04:55,620 Because if you light them on fire and then shoot them, then it's over too quick. 29 00:04:58,140 --> 00:04:59,660 The way that you can do this... 30 00:05:00,000 --> 00:05:01,840 I mean, this has been in Hacking Exposed and all that stuff. 31 00:05:02,080 --> 00:05:09,860 You can use the net command line, an NT, net use, server name slash IPC, interprocess communications resource. 32 00:05:10,000 --> 00:05:10,840 It's always there. 33 00:05:11,600 --> 00:05:17,800 IPC dollar sign, quote, quote, space, whack, user, colon, quote, quote. 34 00:05:18,500 --> 00:05:21,100 And what that does is implicitly set up a null session. 35 00:05:21,320 --> 00:05:26,760 You're using that resource, the IPC resource, with no username and no password. 36 00:05:27,240 --> 00:05:28,740 Well, there's programs out there. 37 00:05:28,840 --> 00:05:29,480 Dump ACL. 38 00:05:30,420 --> 00:05:32,620 It's called, what, Dump Sec now? 39 00:05:33,260 --> 00:05:35,760 Back in the old days, it was Dump ACL, and it's kind of stuck with me. 40 00:05:35,800 --> 00:05:36,440 I should change it. 41 00:05:38,200 --> 00:05:42,720 That guy uses the null user to enumerate all kinds of information. 42 00:05:43,020 --> 00:05:47,640 The modals, your policy information, what the guy can do, what the guy can't do, the shares that are on the machine, 43 00:05:47,860 --> 00:05:51,400 all the usernames, the groups, all of that stuff can be done. 44 00:05:53,080 --> 00:05:53,820 Hey, look at there. 45 00:05:53,940 --> 00:05:58,380 Groups, services, the services you have running can be enumerated in that manner as well. 46 00:05:58,840 --> 00:05:59,840 All kinds of information. 47 00:05:59,840 --> 00:06:05,700 All kinds of information that I can use to footprint your network as an anonymous user. 48 00:06:07,100 --> 00:06:07,580 Okay? 49 00:06:10,300 --> 00:06:13,880 So, let me do a quick little demo here. 50 00:06:14,260 --> 00:06:24,060 Part of the problem with being in the middle of doing Jägermeister shots and someone asks you to do a presentation 51 00:06:24,800 --> 00:06:29,820 is that some stuff is not always set up. 52 00:06:29,840 --> 00:06:37,020 Now, I'm going to see, let me get a little VMWare session, VMWare is cool. 53 00:06:40,500 --> 00:06:47,640 So, for those of you that don't know, what I'm doing is I'm actually instantiating a completely separate machine on the same machine. 54 00:06:47,960 --> 00:06:55,320 So, inside of my active window here, I've got a Windows 2000 machine that's running, that's got RA set to one. 55 00:06:56,220 --> 00:06:57,540 Restrict anonymous set to one. 56 00:06:57,620 --> 00:06:58,620 I'll talk about that in just a sec. 57 00:06:59,080 --> 00:06:59,820 And he's going to do a little demo. 58 00:06:59,820 --> 00:07:06,540 So, he's running here and what I can do is from here, can you all see that? 59 00:07:06,620 --> 00:07:10,220 I made it big and yellow, so I actually thought about that. 60 00:07:11,220 --> 00:07:19,280 Just to show you I have connectivity, what is he, 190? 61 00:07:23,800 --> 00:07:25,760 Just to show you I have connectivity. 62 00:07:26,520 --> 00:07:26,960 Okay. 63 00:07:31,620 --> 00:07:33,520 Did I tell you about my wife yet? 64 00:07:37,920 --> 00:07:41,180 So, as you can see, my VMWare session is working beautifully. 65 00:07:42,180 --> 00:07:43,780 I actually need to wait a second. 66 00:07:43,860 --> 00:07:44,560 It's a Win2K. 67 00:07:46,440 --> 00:07:47,400 Oh, oh. 68 00:07:52,780 --> 00:07:54,000 Hm, hm, hm. 69 00:07:55,220 --> 00:07:56,840 It's still loading. 70 00:07:56,920 --> 00:07:56,940 It's still loading. 71 00:07:56,960 --> 00:08:02,600 up the, as you can imagine, a virtual disk loading up an install of Win2K is a little 72 00:08:02,600 --> 00:08:08,160 big. So I'm going to try this one more time and not look like an idiot, hopefully. Well, 73 00:08:08,200 --> 00:08:23,180 other than the GIA, the whatever. I can't think that quick. And there was much rejoicing. 74 00:08:25,560 --> 00:08:37,180 Thank you. Thank you. Goodbye. Always leave on a high note. All right. So what I'm going 75 00:08:37,180 --> 00:08:44,800 to do is I'm going to run this dump set program. Who's familiar with it? Oh, come on. Who's 76 00:08:44,800 --> 00:08:52,080 familiar with that? Raise your hand anyway. Okay. So what dump set does, and I'm just 77 00:08:52,080 --> 00:08:53,160 going to run it against my own body. 78 00:08:53,160 --> 00:09:01,540 box because my NT4O box doesn't seem to be working very well. I made this kind of big 79 00:09:01,540 --> 00:09:07,540 too. So what I'm going to do is, now in real life this isn't how we would do it. We would 80 00:09:07,540 --> 00:09:11,860 do a net use against the target box. Once we have that net use and that null session 81 00:09:12,620 --> 00:09:16,740 established, then we come back here and tell it to select the computer. I'm just going 82 00:09:16,740 --> 00:09:33,200 to use my own. Why didn't I do 10.1.1.1? Okay. Now, the only reason that that worked 83 00:09:33,200 --> 00:09:38,020 is because I'm authenticated on my own machine. If I wasn't authenticated, it would come up 84 00:09:38,020 --> 00:09:44,080 and say, who are you? Go away. If I had done a net use, then it would also of established 85 00:09:44,080 --> 00:09:44,880 a connection here. 86 00:09:45,040 --> 00:09:46,460 So what I'm going to do is, I'm going to 87 00:09:46,460 --> 00:09:54,920 to dump users as a column. Do I want to do that on my own machine in front of all of 88 00:09:54,920 --> 00:10:05,160 you people? Okay. If none of you figured out that my username was Thor, then you don't 89 00:10:05,160 --> 00:10:12,500 deserve to be here anyway. So you can see I've got my iWAM user account and all these 90 00:10:12,500 --> 00:10:18,060 other, just a couple of users on this box. Alright, so this is what dumpsec does. 91 00:10:19,580 --> 00:10:30,400 So what I'm going to do now is I've established that connection. We saw that I have connectivity 92 00:10:31,260 --> 00:10:42,060 with this box. Let me go over the registry settings. Oh, come on. 93 00:10:42,500 --> 00:10:49,720 Okay. So this was a problem at one point. Okay? Let's kind of jump back to where we 94 00:10:49,720 --> 00:10:54,880 were. No users were out there. I can enumerate all this information. So everybody gets pissed 95 00:10:54,880 --> 00:10:59,720 off at Microsoft, right? So, and still are. 96 00:11:02,100 --> 00:11:11,880 The dev crew decided to introduce this new key, the new value actually, inside the hkey 97 00:11:11,880 --> 00:11:13,580 Key, local machine, system, current control set. 98 00:11:13,640 --> 00:11:17,040 Control, LSA, key. 99 00:11:17,200 --> 00:11:21,320 You create a value called restrict anonymous, D word, and you set it to one. 100 00:11:22,280 --> 00:11:33,360 So what that does is supposedly make some API checks whenever these API calls are being made. 101 00:11:33,440 --> 00:11:39,780 It checks the context that the user is in, and if they're anonymous, it keeps them from doing that. 102 00:11:39,780 --> 00:11:45,640 Meant to stop null session enumeration, and back in the days of C2 specification, 103 00:11:46,040 --> 00:11:54,680 which was the highest level of security a business could attain, right, was the C2 audit. 104 00:11:54,800 --> 00:11:55,960 It could pass a C2 audit. 105 00:11:56,440 --> 00:11:58,220 It was required for that. 106 00:11:58,680 --> 00:12:07,880 So this key being required for C2 made it seem pretty important. 107 00:12:08,040 --> 00:12:09,300 I mean, it gave it a lot of... 108 00:12:09,800 --> 00:12:10,280 Credential. 109 00:12:10,320 --> 00:12:12,200 It gave it some validity. 110 00:12:13,020 --> 00:12:18,240 But there's some problems here, and I'm going to show you that, hopefully. 111 00:12:19,760 --> 00:12:28,560 So I'm going to first establish a null session to my NT2000 box. 112 00:12:28,800 --> 00:12:32,240 Note that it has, this box has restrict anonymous set to one. 113 00:12:32,340 --> 00:12:37,340 I can show you if you want, but, you know, let's start the trust model off right here. 114 00:12:39,340 --> 00:12:40,300 Yeah, that's right. 115 00:12:40,560 --> 00:12:41,540 It is Vegas. 116 00:12:42,120 --> 00:12:43,140 You want to see it. 117 00:12:44,520 --> 00:12:45,680 Well, I'm not going to show you. 118 00:12:47,060 --> 00:12:48,180 Okay, good grief. 119 00:12:49,380 --> 00:12:51,300 Do you really want to see that it's set to one? 120 00:12:51,580 --> 00:12:52,160 Thank you. 121 00:12:52,480 --> 00:12:53,000 Thank you. 122 00:12:53,040 --> 00:12:54,260 See, we only got 15 minutes. 123 00:12:55,180 --> 00:12:55,540 Yay. 124 00:12:58,200 --> 00:13:00,420 So I'm going to do a net use, whack, whack. 125 00:13:08,080 --> 00:13:11,060 Bada-bing, bada-bang, IPC, dollar sign. 126 00:13:12,440 --> 00:13:16,640 It's wrapping, so no password. 127 00:13:17,080 --> 00:13:20,360 The password comes first in this context. 128 00:13:20,380 --> 00:13:20,960 I don't know why. 129 00:13:23,940 --> 00:13:26,780 User, whack, whack, or bang, bang, whatever you want to call it. 130 00:13:27,200 --> 00:13:29,020 The command completed successfully. 131 00:13:29,240 --> 00:13:29,900 Ooh, wait. 132 00:13:39,720 --> 00:13:41,620 The command completed successfully. 133 00:13:44,180 --> 00:13:44,580 Okay. 134 00:13:45,000 --> 00:13:45,860 Oh, and I'm sorry. 135 00:13:49,180 --> 00:13:50,420 Hey, man, that thing is cool. 136 00:13:50,480 --> 00:13:51,220 My kids love it. 137 00:13:53,400 --> 00:13:53,800 Huh? 138 00:13:54,440 --> 00:13:55,180 Oh, yeah, yeah. 139 00:13:55,840 --> 00:14:00,360 If you don't, if you have a cat and don't have a laser pointer, you have no life. 140 00:14:00,460 --> 00:14:06,080 I mean, little Jaeger, the laser pointer, the cat, woo. 141 00:14:11,360 --> 00:14:11,720 Okay. 142 00:14:12,800 --> 00:14:17,400 So you'll notice that it completed successfully, even though we've told it not to let us use null session. 143 00:14:18,040 --> 00:14:19,420 Well, it's not really what we told it. 144 00:14:19,460 --> 00:14:22,220 We told it to restrict what an anonymous user can do. 145 00:14:22,320 --> 00:14:23,740 So I can still link up to that guy. 146 00:14:23,820 --> 00:14:26,720 However, let's go to my desktop. 147 00:14:28,020 --> 00:14:29,420 Go back to DumpSec. 148 00:14:34,020 --> 00:14:34,380 Select. 149 00:14:35,700 --> 00:14:36,840 Ah, hee-ba-ha-ba. 150 00:14:43,280 --> 00:14:44,340 Select that computer. 151 00:14:45,520 --> 00:14:46,000 Bang. 152 00:14:46,960 --> 00:14:53,380 So it blows up, saying error in processing, net server get info status five. 153 00:14:53,560 --> 00:14:54,360 It dies. 154 00:14:55,700 --> 00:14:57,900 Now, I got sucked into this back in the day. 155 00:14:58,440 --> 00:15:02,200 Back when restrict anonymous came in, you know, I don't trust anything, right? 156 00:15:02,440 --> 00:15:06,200 Besides, we all have our development things that we test everything on first. 157 00:15:06,580 --> 00:15:07,320 Then we test it. 158 00:15:07,320 --> 00:15:08,260 Then we put it all into production. 159 00:15:10,320 --> 00:15:15,560 So I set RA to one, ran DumpSec or DumpACL in this case. 160 00:15:15,680 --> 00:15:16,440 It died. 161 00:15:16,940 --> 00:15:17,760 I was happy. 162 00:15:17,900 --> 00:15:19,040 I said, great, that works. 163 00:15:20,040 --> 00:15:20,740 All right. 164 00:15:23,400 --> 00:15:25,920 So let's go over why that there are some problems. 165 00:15:27,780 --> 00:15:33,960 I got to talking to somebody on the security-focused news group. 166 00:15:34,000 --> 00:15:36,340 We were going back and forth about some different things that you could do. 167 00:15:37,500 --> 00:15:44,060 And the point made was that, down here, if you look, user to SID and SID to user. 168 00:15:44,200 --> 00:15:45,380 Who's familiar with that program? 169 00:15:45,520 --> 00:15:46,080 Real old. 170 00:15:49,180 --> 00:15:51,120 I'm used to bars doing that, right? 171 00:15:51,240 --> 00:15:52,880 It's 2 o'clock and they shut the lights off. 172 00:15:56,320 --> 00:15:59,920 That program still works with restrict anonymous set to one. 173 00:16:00,020 --> 00:16:01,140 And that got us talking about why. 174 00:16:01,300 --> 00:16:06,920 So I started doing a bunch of research, started testing different API calls that one could make. 175 00:16:07,320 --> 00:16:10,560 Under the context of a null user. 176 00:16:11,160 --> 00:16:14,360 And came to find out that we had a bunch of them that we could do. 177 00:16:16,380 --> 00:16:22,160 When you set RA to one, it goes out there and says, okay, net server get info. 178 00:16:22,440 --> 00:16:25,200 Remember, that's the first thing that DumpACL died on. 179 00:16:26,340 --> 00:16:27,840 We set an ACL on that. 180 00:16:27,940 --> 00:16:29,640 If you're the null user, it dies. 181 00:16:29,800 --> 00:16:30,440 You can't run it. 182 00:16:30,760 --> 00:16:33,760 You can't do it on net user enum, which enumerates users. 183 00:16:33,960 --> 00:16:35,320 You can't get the users in a group. 184 00:16:35,580 --> 00:16:36,660 You can't get the shares. 185 00:16:36,840 --> 00:16:37,300 You can't get the data. 186 00:16:37,320 --> 00:16:37,780 You can't get the modals. 187 00:16:39,800 --> 00:16:48,080 User to SID and SID to user work because they use these two API calls called look up account name and look up account SID. 188 00:16:49,220 --> 00:16:53,780 It's kind of a cheesy little program, but it works. 189 00:16:54,120 --> 00:17:00,060 You basically say look up the account name for a given SID and it tells you the name of that account. 190 00:17:00,760 --> 00:17:04,040 Or tell it to look up the SID of a user name and it gives you its SID. 191 00:17:04,260 --> 00:17:06,300 So if you can connect up to a box, you can say, 192 00:17:06,300 --> 00:17:08,780 look up account SID guest. 193 00:17:09,240 --> 00:17:11,240 Well, we know guest lives on that box, right? 194 00:17:11,340 --> 00:17:12,360 We know it's called guest. 195 00:17:12,440 --> 00:17:13,200 They can't rename it. 196 00:17:13,240 --> 00:17:13,900 They can't delete it. 197 00:17:13,940 --> 00:17:20,440 We know that the name guests is a valid, that's actually a group, valid group on that box. 198 00:17:20,640 --> 00:17:26,320 So if we do a look up account SID guest, bang, we get the fully qualified SID for that domain. 199 00:17:27,060 --> 00:17:34,900 Well, we know that all they've done is taken the RID, which is the last portion of your SID, the last sub authority. 200 00:17:35,760 --> 00:17:38,800 And all we have to do is put a 500 on that. 201 00:17:39,300 --> 00:17:44,880 Take off the guest, put a 500, resubmit that entire SID, and it tells us the name of the administrator account. 202 00:17:45,920 --> 00:17:46,320 Right? 203 00:17:46,360 --> 00:17:48,460 Because 500 is always the administrator. 204 00:17:49,660 --> 00:17:52,500 So we can always tell, who renames your administrator account? 205 00:17:53,380 --> 00:17:53,780 Right. 206 00:17:53,860 --> 00:17:55,060 It doesn't really matter. 207 00:17:55,940 --> 00:18:01,520 Because all we have to do is say, well, look up account SID, bang, 500, I know what the name of your administrator is. 208 00:18:01,560 --> 00:18:02,060 Just like that. 209 00:18:02,180 --> 00:18:03,700 You can't stop us from doing that. 210 00:18:05,220 --> 00:18:05,700 Okay? 211 00:18:06,480 --> 00:18:07,380 And that's old. 212 00:18:11,040 --> 00:18:21,740 However, in addition, in addition, there is this, there are some that don't have proper ACLs put on them. 213 00:18:21,880 --> 00:18:24,240 One of them is net server transport enum. 214 00:18:24,520 --> 00:18:27,780 That enumerates the transports and use on a box. 215 00:18:28,000 --> 00:18:29,320 Which can be kind of cool. 216 00:18:29,420 --> 00:18:34,880 Back in NT4, whenever you had a RAS device, it had a really nice name of that. 217 00:18:34,880 --> 00:18:36,420 Of the transport called RAS. 218 00:18:36,920 --> 00:18:44,340 So you could, you could enumerate a subnet, as an anonymous user, find out all the transports. 219 00:18:44,360 --> 00:18:47,960 If they're running IP, IPX, net buoy, RAS devices, all of this stuff. 220 00:18:48,080 --> 00:18:50,140 And then you know that people have RAS devices on their network. 221 00:18:50,600 --> 00:18:51,640 Which is not real good. 222 00:18:51,780 --> 00:18:51,920 Right? 223 00:18:52,180 --> 00:18:54,420 Rogue RAS devices lurking in the dark. 224 00:18:55,920 --> 00:18:58,520 Net user get info also doesn't have any. 225 00:18:58,600 --> 00:18:59,340 And that's my favorite. 226 00:19:01,380 --> 00:19:04,380 Net user get info has a couple of different levels. 227 00:19:04,380 --> 00:19:05,200 Levels that can be called. 228 00:19:05,560 --> 00:19:07,740 Level zero gives you the user name. 229 00:19:08,140 --> 00:19:11,680 Level one gives you the age of the account, the home directory. 230 00:19:11,980 --> 00:19:13,980 Level two gives you even more stuff. 231 00:19:14,400 --> 00:19:19,940 And level three, I call it pay dirt, gives you everything. 232 00:19:22,100 --> 00:19:27,680 The password age, the RID, the privileges, the role privileges of that account. 233 00:19:28,300 --> 00:19:29,260 User flags. 234 00:19:30,120 --> 00:19:33,560 All of this extended information. 235 00:19:33,560 --> 00:19:34,600 You have to parse out. 236 00:19:34,640 --> 00:19:36,380 The flag comes back as a D word though. 237 00:19:36,520 --> 00:19:38,040 So you have to parse that out. 238 00:19:38,140 --> 00:19:39,500 And it's a little arduous to do so. 239 00:19:39,700 --> 00:19:41,680 But I went ahead and did it. 240 00:19:41,740 --> 00:19:43,620 It was like four or five white Russians and I was done. 241 00:19:46,420 --> 00:19:48,320 And it works on Windows 2000. 242 00:19:48,660 --> 00:19:49,580 So let me show you that. 243 00:19:50,460 --> 00:19:55,900 So we've got, we've got my null session established. 244 00:19:57,620 --> 00:20:01,640 We saw how dump ACL failed. 245 00:20:03,560 --> 00:20:05,000 Hopefully whoever wrote that's not in the. 246 00:20:06,420 --> 00:20:07,840 I'm going to get you, you bastard. 247 00:20:13,620 --> 00:20:13,980 Okay. 248 00:20:14,300 --> 00:20:15,220 We've got six minutes. 249 00:20:16,580 --> 00:20:18,140 I'll talk quickly. 250 00:20:19,240 --> 00:20:20,300 So user info. 251 00:20:21,500 --> 00:20:24,240 The way user info works is you have to submit a name. 252 00:20:24,760 --> 00:20:30,400 To get the name you need the SID, the full SID in order to be able to provide it with the, you need to provide it with the SID. 253 00:20:30,860 --> 00:20:33,100 So I'm going to say user info. 254 00:20:34,580 --> 00:20:41,980 Whack whack 192.168.5.190. 255 00:20:42,400 --> 00:20:45,960 And let's give it administrator. 256 00:20:49,300 --> 00:20:50,460 Did I spell it right? 257 00:20:50,900 --> 00:20:52,560 I'm used to doing it with two hands. 258 00:20:54,600 --> 00:20:55,220 Bang. 259 00:20:58,140 --> 00:20:59,400 So here's what. 260 00:21:01,360 --> 00:21:03,460 Here's what user info is going to give us. 261 00:21:03,620 --> 00:21:06,040 Now what's the cheesy part about user info? 262 00:21:06,820 --> 00:21:08,480 You've got to know the name of an account. 263 00:21:09,360 --> 00:21:10,440 That kind of stinks. 264 00:21:10,720 --> 00:21:14,160 I mean you're not going to guess B. Jones to see if it's a valid account. 265 00:21:14,700 --> 00:21:20,660 But this is a way to see if it's really the administrator. 266 00:21:20,980 --> 00:21:21,780 See the user ID? 267 00:21:22,560 --> 00:21:24,240 We know that that's really the administrator. 268 00:21:24,920 --> 00:21:26,260 Because his RID is 500. 269 00:21:26,260 --> 00:21:31,000 We know that somebody hasn't created this account called administrator. 270 00:21:31,180 --> 00:21:32,640 They renamed the real administrator. 271 00:21:32,660 --> 00:21:34,180 They have an account called administrator. 272 00:21:34,480 --> 00:21:35,900 And they're trying to screw with us. 273 00:21:36,080 --> 00:21:39,280 So if we try to log in is that they know that we're trying to get in. 274 00:21:40,340 --> 00:21:41,680 We see the password age. 275 00:21:41,880 --> 00:21:43,560 We don't have any of these system flags. 276 00:21:44,400 --> 00:21:49,120 But what the system flags are going to tell us are if this person is an administrator. 277 00:21:50,820 --> 00:21:52,740 Actually I'm sorry this is going to be under the operator proofs. 278 00:21:52,760 --> 00:21:53,360 Are you kicking me out? 279 00:21:54,080 --> 00:21:55,280 I've got six minutes right? 280 00:21:56,120 --> 00:21:58,800 It's only a lot of ten minutes until what you had. 281 00:21:59,220 --> 00:21:59,820 Okay right. 282 00:21:59,920 --> 00:22:02,000 So here we've got the miscellaneous info and all this other crap. 283 00:22:06,760 --> 00:22:08,340 And I even have this neat little graph. 284 00:22:08,540 --> 00:22:10,740 You know this was the hardest part about writing the entire program. 285 00:22:10,880 --> 00:22:14,840 Was getting these stupid little ones and zeros for the hours that they could log on. 286 00:22:14,920 --> 00:22:15,840 And for you on this side. 287 00:22:16,660 --> 00:22:17,020 Okay. 288 00:22:18,240 --> 00:22:22,040 So the problem here is that user info has to be presented with a name. 289 00:22:22,120 --> 00:22:23,160 You have to know the name of the account. 290 00:22:23,440 --> 00:22:24,440 So we got to thinking. 291 00:22:24,440 --> 00:22:29,820 Well we know look up account Sid and look up account name work. 292 00:22:30,040 --> 00:22:32,000 We know user info works. 293 00:22:33,200 --> 00:22:38,880 So what we're going to do is write another program called user dump. 294 00:22:39,360 --> 00:22:45,680 And we're going to combine look up account name, look up account Sid and get user info into one program. 295 00:22:45,880 --> 00:22:47,220 Kind of create a Sid Walker. 296 00:22:48,060 --> 00:22:50,000 We'll provide it with an account that we know exists. 297 00:22:50,160 --> 00:22:51,500 And my example I'm going to do. 298 00:22:51,580 --> 00:22:51,980 I'm running. 299 00:22:52,600 --> 00:22:53,040 Guest. 300 00:22:54,060 --> 00:22:55,900 And what it's going to do is look up the account Sid. 301 00:22:56,100 --> 00:22:57,240 And it's going to start at 500. 302 00:22:57,700 --> 00:23:00,600 This thing is going to increment its way up from there. 303 00:23:01,000 --> 00:23:03,360 And then dump the Sid back out to it to get the name. 304 00:23:03,460 --> 00:23:04,940 And then dump that name in to get user info. 305 00:23:10,900 --> 00:23:12,020 So what we can do. 306 00:23:28,600 --> 00:23:31,460 I'm going to give it 1000. 307 00:23:31,980 --> 00:23:36,860 There's some similar programs that after 20 dead entries die. 308 00:23:37,220 --> 00:23:38,560 And I don't think that that's right. 309 00:23:38,700 --> 00:23:42,360 Because we can delete massive amounts of users and then add them again. 310 00:23:42,600 --> 00:23:43,960 And of course the RIDs increment. 311 00:23:44,720 --> 00:23:46,600 So in a single command line. 312 00:23:47,720 --> 00:23:49,120 I'm going to execute this guy. 313 00:23:49,120 --> 00:23:51,720 And so what we see going by. 314 00:23:52,340 --> 00:23:54,220 On my Windows 2000 machine. 315 00:23:54,860 --> 00:23:56,200 Is every user. 316 00:23:57,400 --> 00:23:58,260 Their privileges. 317 00:23:58,600 --> 00:24:00,000 If they're account operators. 318 00:24:00,380 --> 00:24:01,440 If they're server operators. 319 00:24:01,740 --> 00:24:03,020 If they're administrators or not. 320 00:24:03,220 --> 00:24:05,080 If their passwords never expire. 321 00:24:05,480 --> 00:24:07,940 If they have to have a smart card to log on. 322 00:24:08,100 --> 00:24:09,740 What their log on hours are. 323 00:24:10,200 --> 00:24:11,440 Everything that we need to know. 324 00:24:11,500 --> 00:24:13,000 The last time they changed their password. 325 00:24:13,120 --> 00:24:14,280 And I guess these guys don't exist. 326 00:24:14,480 --> 00:24:16,000 And it's going to go up to 1900. 327 00:24:17,380 --> 00:24:17,820 So. 328 00:24:17,820 --> 00:24:21,200 We can dump all that information out to a text file. 329 00:24:21,440 --> 00:24:23,740 And we already have a beautiful map. 330 00:24:24,380 --> 00:24:26,700 Of all of the users on that domain. 331 00:24:27,120 --> 00:24:30,100 And it's all been done using a null user account. 332 00:24:30,360 --> 00:24:32,480 Even when we've specifically said. 333 00:24:32,680 --> 00:24:34,540 To restrict access to that information. 334 00:24:35,520 --> 00:24:36,240 Ta-da! 335 00:24:44,940 --> 00:24:46,660 Can I have 60 seconds? 336 00:24:48,800 --> 00:24:49,120 Yeah. 337 00:24:51,400 --> 00:24:51,720 No. 338 00:24:53,740 --> 00:24:54,060 Now. 339 00:24:54,180 --> 00:24:55,360 There's one additional program. 340 00:24:55,520 --> 00:24:56,140 I don't have here. 341 00:24:56,260 --> 00:24:57,320 And we don't have time to show it to you. 342 00:24:57,460 --> 00:24:58,760 It's called TSEnum. 343 00:24:58,820 --> 00:24:59,940 It's on the Hammer of God website. 344 00:25:00,280 --> 00:25:01,940 If you're interested in enumerating machines. 345 00:25:03,140 --> 00:25:04,460 It's a new method that we've been. 346 00:25:05,420 --> 00:25:06,060 Eric Bergholtz. 347 00:25:06,080 --> 00:25:06,580 Clinton Mudge. 348 00:25:06,640 --> 00:25:07,460 The guys at Foundstone. 349 00:25:07,520 --> 00:25:08,700 Like to hide their terminal servers. 350 00:25:09,580 --> 00:25:10,720 That way you don't know they're there. 351 00:25:10,820 --> 00:25:11,440 And that's a bad thing. 352 00:25:11,520 --> 00:25:13,080 Because terminal servers can be really dangerous. 353 00:25:13,180 --> 00:25:15,640 If one of your users hides a terminal server on your network. 354 00:25:15,860 --> 00:25:17,380 It can open up some bad things. 355 00:25:17,380 --> 00:25:17,620 So. 356 00:25:18,460 --> 00:25:19,780 What this program does. 357 00:25:19,880 --> 00:25:20,820 If you're interested in it. 358 00:25:20,880 --> 00:25:21,620 It's called TSEnum. 359 00:25:21,760 --> 00:25:22,320 You can go to the website. 360 00:25:22,400 --> 00:25:23,040 And download it. 361 00:25:23,380 --> 00:25:24,120 It will. 362 00:25:24,440 --> 00:25:25,840 You specify a target. 363 00:25:26,100 --> 00:25:27,360 You say TSEnum. 364 00:25:27,460 --> 00:25:28,180 That guy. 365 00:25:29,100 --> 00:25:30,400 What that guy will do. 366 00:25:30,440 --> 00:25:32,020 Is ask it's master browser. 367 00:25:32,460 --> 00:25:34,140 What machines can you see on this network? 368 00:25:34,880 --> 00:25:36,880 It will then tunnel that information back to me. 369 00:25:38,080 --> 00:25:39,720 You can use that as an anonymous user. 370 00:25:40,560 --> 00:25:41,000 So. 371 00:25:42,640 --> 00:25:45,020 A buddy of mine tested on one of his resource domains. 372 00:25:45,220 --> 00:25:45,900 And in two seconds. 373 00:25:45,920 --> 00:25:47,340 Got 598 machines. 374 00:25:47,360 --> 00:25:49,600 It tells you the type of machine. 375 00:25:49,720 --> 00:25:50,500 If it's a domain controller. 376 00:25:50,720 --> 00:25:51,740 If it's a sequel server. 377 00:25:51,940 --> 00:25:52,780 If it's a terminal server. 378 00:25:53,000 --> 00:25:55,240 All of that information is registered with the master browser. 379 00:25:55,280 --> 00:25:56,200 When the machine boots up. 380 00:25:56,480 --> 00:25:56,840 Right. 381 00:25:57,040 --> 00:25:59,780 He boots up to the master browser. 382 00:25:59,860 --> 00:25:59,960 Says. 383 00:26:00,080 --> 00:26:00,160 Hey. 384 00:26:00,220 --> 00:26:00,700 I'm on the network. 385 00:26:00,840 --> 00:26:01,980 And I happen to be a sequel server. 386 00:26:02,100 --> 00:26:02,600 And a terminal server. 387 00:26:02,820 --> 00:26:03,540 And a domain controller. 388 00:26:04,000 --> 00:26:04,780 Thank you very much. 389 00:26:05,100 --> 00:26:05,460 So. 390 00:26:05,520 --> 00:26:07,160 Then you can download all that information as well. 391 00:26:07,660 --> 00:26:08,020 So. 392 00:26:08,120 --> 00:26:08,920 They're kicking me out of here. 393 00:26:09,140 --> 00:26:10,000 Thanks very much. 394 00:26:10,120 --> 00:26:11,180 Thanks for putting up with me.