1 00:00:00,000 --> 00:00:13,680 Wow. How's it going, DEF CON? They're still talking. They haven't been partying 2 00:00:13,680 --> 00:00:19,940 hard enough, I guess. Well, hey, thanks for coming, guys. I appreciate it. This talk is 3 00:00:19,940 --> 00:00:24,380 owning one to rule them all. And we'll get started in a second with that. But first I 4 00:00:24,380 --> 00:00:28,240 want to introduce Dave Desimon who's been a good friend of mine for a very, very long 5 00:00:28,240 --> 00:00:33,600 time. He used to work at a Fortune 50, something like that. I don't know. And did the 6 00:00:33,600 --> 00:00:36,900 security penetration testing and all that good stuff there. I've known Dave for a number of 7 00:00:36,900 --> 00:00:42,260 years and hired him where I was at before I left to start my own company. And so his areas of 8 00:00:42,260 --> 00:00:46,740 expertise are really in the penetration testing side and network security side. And he's been 9 00:00:46,740 --> 00:00:49,900 working and busting his ass in this presentation. I've been kind of just watching him. So 10 00:00:51,680 --> 00:00:56,660 unfortunately he had the pleasure of working with me. About myself, I'm a founder and principal 11 00:00:56,660 --> 00:00:58,220 security consultant at Trusty. I'm the founder and principal security consultant at Trusty. 12 00:00:58,240 --> 00:01:01,400 Which I started like three weeks ago. So, hey, that's always good. 13 00:01:05,940 --> 00:01:15,360 I created the social engineer tool kit. One of the authors of the penetration testers guide. 14 00:01:15,580 --> 00:01:22,020 And on the backtrack development team. So thanks again for coming. So the basic concept 15 00:01:22,020 --> 00:01:28,220 behind this talk, the basic concept behind this talk is really around as penetration testers, 16 00:01:28,220 --> 00:01:32,080 when we go into organizations, we like to find new and unique ways to own everything. 17 00:01:32,320 --> 00:01:35,600 Because we get hard ons when we compromise domain controllers. We get hard ons when we compromise 18 00:01:35,600 --> 00:01:39,940 the entire infrastructure. And so this one is kind of like the best of everything. So what we'll 19 00:01:39,940 --> 00:01:43,940 show you is kind of a unique way to basically compromise the entire infrastructure and get 20 00:01:43,940 --> 00:01:49,060 shells back from every single computer on the entire network. So it will be fun. And this is 21 00:01:49,060 --> 00:01:52,980 repeatable in most companies. I've actually used the first part of this technique, which when I tell 22 00:01:52,980 --> 00:01:56,380 you the first part, it's so stupidly simple, you all need to smack yourselves in the back of the 23 00:01:56,380 --> 00:01:58,200 head for not thinking of this before me. Because it's a lot of work. But I'm going to show you a 24 00:01:58,220 --> 00:02:01,240 little bit of it. It's definitely not that smart. And then after that, we'll go into the actual cool 25 00:02:01,240 --> 00:02:07,740 part about it. But before we get into that, every time that I speak at DEF CON, I like to pull 26 00:02:07,740 --> 00:02:15,780 pranks on my friends. And so if you came to DEF CON last year, where's Adam at? Right there? He's 27 00:02:15,780 --> 00:02:18,620 got a phobia of toothpaste where when you brush your teeth in front of him, he starts like dry 28 00:02:18,620 --> 00:02:22,800 heaving and vomiting everywhere, okay? And so we brushed our teeth on stage and all that good 29 00:02:22,800 --> 00:02:27,320 stuff and made him dry heave and basically run out of the room screaming. And so every year it's 30 00:02:27,320 --> 00:02:28,200 been kind of one after the other. And so I'm going to show you a little bit of what we do. So 31 00:02:28,220 --> 00:02:34,180 this year we decided to do something interesting to one of our co-workers at the office. And I 32 00:02:34,180 --> 00:02:38,680 have to give Dave the amount of credit because I didn't realize, but on your iPhone, when you take 33 00:02:38,680 --> 00:02:42,440 your iPhone on, this isn't an iPhone, it's a Samsung, but when you take your iPhone out, you 34 00:02:42,440 --> 00:02:47,820 can go like this and the little arrow buttons take pictures. And so we've been basically taking 35 00:02:47,820 --> 00:02:52,240 hidden pictures of one of the co-workers at the office with some specific habit that he uses. So 36 00:02:52,240 --> 00:02:56,740 we wanted to do a little demonstration before we started. It's only going to take two minutes. I 37 00:02:56,740 --> 00:02:58,200 don't want to take too much of your time here. So we wanted to do a little demonstration before 38 00:03:03,380 --> 00:03:10,400 we started. Steve, Steve, come on out. Come on out. Right in the middle. He hasn't seen this yet. 39 00:03:28,220 --> 00:03:29,100 . 40 00:03:39,500 --> 00:03:40,900 . 41 00:03:42,580 --> 00:03:43,980 . 42 00:03:43,980 --> 00:03:44,100 . 43 00:03:44,100 --> 00:03:44,400 . 44 00:03:58,220 --> 00:03:59,560 . 45 00:03:59,560 --> 00:04:00,200 . 46 00:04:12,280 --> 00:04:13,680 . 47 00:04:13,680 --> 00:04:13,900 . 48 00:04:16,700 --> 00:04:18,100 . 49 00:04:21,280 --> 00:04:22,560 . 50 00:04:22,560 --> 00:04:23,320 . 51 00:04:37,440 --> 00:04:38,720 . 52 00:04:38,720 --> 00:04:39,760 . 53 00:04:39,760 --> 00:04:40,380 . 54 00:04:40,380 --> 00:04:40,520 . 55 00:04:40,520 --> 00:04:41,160 . 56 00:04:41,160 --> 00:04:41,240 . 57 00:04:41,240 --> 00:04:41,260 . 58 00:04:41,260 --> 00:04:41,300 . 59 00:04:42,780 --> 00:04:44,060 . 60 00:04:44,060 --> 00:04:49,420 I'm gonna be the next lady, no hollaback girl, lady, no hollaback girl. 61 00:04:50,620 --> 00:04:53,120 Smash it, smash it. 62 00:04:54,960 --> 00:04:57,500 Smash it, smash it. 63 00:04:59,820 --> 00:05:01,380 Smash it, smash it. 64 00:05:01,380 --> 00:05:06,220 Smash it, smash it. 65 00:05:07,200 --> 00:05:08,320 Thank you. 66 00:05:13,520 --> 00:05:14,280 Thank you, Steve. 67 00:05:14,580 --> 00:05:15,040 Sorry, buddy. 68 00:05:15,100 --> 00:05:15,520 Thank you very much. 69 00:05:15,640 --> 00:05:15,800 Sorry. 70 00:05:21,400 --> 00:05:22,340 Sorry, that's all we got. 71 00:05:22,480 --> 00:05:23,180 So see you guys later. 72 00:05:25,740 --> 00:05:29,880 So first, as we're going through this, we're gonna talk about a lot of concepts that you're probably familiar with. 73 00:05:30,300 --> 00:05:31,440 Some of them that you aren't. 74 00:05:32,340 --> 00:05:35,580 But what we'll do is we'll cover this step by step and show you what we do. 75 00:05:35,720 --> 00:05:37,460 And literally, you know, it's interesting. 76 00:05:37,660 --> 00:05:38,300 We go into a lot of stuff. 77 00:05:38,320 --> 00:05:38,940 We go into a lot of large organizations. 78 00:05:39,900 --> 00:05:41,420 And this works every single time. 79 00:05:41,700 --> 00:05:44,280 So you'll see the first part. 80 00:05:44,380 --> 00:05:45,780 You're like, gosh, I can't believe anything about that. 81 00:05:45,880 --> 00:05:46,940 And then the second part is really badass. 82 00:05:49,680 --> 00:05:50,620 So Pixie Boot. 83 00:05:51,360 --> 00:05:52,480 Has everybody heard of Pixie Boot? 84 00:05:52,560 --> 00:05:53,340 Pronounce Pixie Boot. 85 00:05:54,100 --> 00:05:56,060 Has anybody used Pixie Boot in their corporations? 86 00:05:56,620 --> 00:05:57,640 Pretty much everybody, right? 87 00:05:58,700 --> 00:06:02,380 And so it allows you the ability to boot to different images on the infrastructure network. 88 00:06:02,580 --> 00:06:04,920 There's a bunch of different types of technologies with Pixie Boot that we'll cover. 89 00:06:05,340 --> 00:06:07,320 But basically, you know, you plug into the network. 90 00:06:07,320 --> 00:06:10,100 And, you know, through a virtual machine or whatever, you're on the internal network. 91 00:06:10,360 --> 00:06:13,540 It goes and it loads a base image onto your computer for that corporate standard. 92 00:06:13,740 --> 00:06:13,900 Okay? 93 00:06:15,700 --> 00:06:23,320 And the reason being is Pixie Boot is very specific on being able to transfer an entire base image over to your computer over the network. 94 00:06:23,460 --> 00:06:29,240 And it's awesome for security administrators, system administrators, so that they can actually transfer files to their actual computer themselves. 95 00:06:29,860 --> 00:06:32,820 So it's really important for them so that, hey, you know, they got a trouble ticket. 96 00:06:32,960 --> 00:06:34,440 They can't figure the person's thing out. 97 00:06:34,540 --> 00:06:35,820 They call the person on the phone. 98 00:06:35,820 --> 00:06:39,680 They actually reimage the computer for them without having to actually get up or go to the location. 99 00:06:43,920 --> 00:06:45,600 So seriously, all these pictures are random. 100 00:06:45,660 --> 00:06:46,320 We just found them on the Internet. 101 00:06:46,440 --> 00:06:48,480 So they have nothing to do with anything we're talking about. 102 00:06:52,120 --> 00:06:54,160 The dog was pissed when I was lighting his hands on fire. 103 00:06:58,540 --> 00:07:01,580 But every vendor has a solution for Pixie Boot. 104 00:07:01,720 --> 00:07:02,660 I mean, Semantic has them. 105 00:07:03,220 --> 00:07:04,000 Microsoft has them. 106 00:07:04,000 --> 00:07:06,320 We'll be covering most specifically with Microsoft. 107 00:07:06,940 --> 00:07:14,720 The most two prevalent ones that we run into are mostly zero touch and light touch, which are the two main predominant Pixie Boot technologies behind the side of the house. 108 00:07:14,840 --> 00:07:21,020 And so with Pixie Boot, it allows you to authenticate and use one of these type of technologies to actually go and use it. 109 00:07:21,100 --> 00:07:22,920 So, again, there's a whole bunch of other ones out there. 110 00:07:24,660 --> 00:07:27,020 Light touch, it actually requires user interaction. 111 00:07:27,400 --> 00:07:32,020 So when you boot from a network interface and you download the base image, 112 00:07:32,020 --> 00:07:34,360 it actually prompts you for user credentials to use, okay? 113 00:07:34,480 --> 00:07:36,320 So some actually require a password. 114 00:07:36,500 --> 00:07:39,920 Some actually require authentication to actually go to it. 115 00:07:40,120 --> 00:07:46,020 In most cases, the file shares are actually stored in an image, and they either have every one open to them, 116 00:07:46,060 --> 00:07:50,300 which is a very useful thing for us as penetration testers to replace the base image of a corporation. 117 00:07:50,940 --> 00:07:55,160 Or the second way is they usually put domain user credentials up there for permissions and allow it to that. 118 00:07:55,820 --> 00:08:02,000 So here's just a simple light touch interface and what you would actually see if you boot from the network from Microsoft. 119 00:08:02,020 --> 00:08:02,640 Light touch infrastructure. 120 00:08:04,340 --> 00:08:05,960 Here's what it actually requires you for authentication. 121 00:08:08,340 --> 00:08:13,260 And here's where it actually allows you to gain access into joining the actual domain and all that good stuff. 122 00:08:14,020 --> 00:08:20,140 Now, what we mostly use in most corporations is zero touch because we don't want interaction with the user. 123 00:08:20,260 --> 00:08:21,600 We don't want to have to tell them how to put this in. 124 00:08:21,720 --> 00:08:25,400 It requires a lot of knowledge on the end user side to actually go and use. 125 00:08:25,940 --> 00:08:30,800 So what this does is it allows the entire corporate image onto the actual computer itself 126 00:08:30,800 --> 00:08:32,000 without any authentication. 127 00:08:32,020 --> 00:08:33,500 And it's what's predominantly used everywhere. 128 00:08:33,580 --> 00:08:34,400 Does anybody here use zero touch? 129 00:08:35,000 --> 00:08:36,240 No one wants to raise their hand? 130 00:08:37,820 --> 00:08:39,420 So this is what zero touch looks like. 131 00:08:39,900 --> 00:08:41,160 This is for a Windows XP one. 132 00:08:41,740 --> 00:08:43,380 This is basically a zero touch. 133 00:08:43,480 --> 00:08:48,200 This is when we plugged into the network and we started booting from Pixy boot and started loading the base image of the corporation on us. 134 00:08:49,640 --> 00:08:54,000 That's the actual deployment tool that's actually going through and running deployment. 135 00:08:55,340 --> 00:08:57,760 And then it goes and it starts up our Windows environment. 136 00:08:59,220 --> 00:09:00,100 So starting Windows. 137 00:09:00,800 --> 00:09:03,420 It goes and it finishes all the configurations. 138 00:09:03,900 --> 00:09:08,980 And now we have a pristine copy of Windows 7 that's actually on the network infrastructure. 139 00:09:09,280 --> 00:09:11,840 So like I said, this is the easy part about it. 140 00:09:12,040 --> 00:09:13,720 It gets very much more complex in a second. 141 00:09:14,560 --> 00:09:20,560 The first phase of the attack is when we boot into a Pixy environment on the corporate network and we load a base image. 142 00:09:21,200 --> 00:09:21,560 Okay? 143 00:09:22,040 --> 00:09:27,600 From there, you dump the local admin passwords on the actual machine itself and then now it allows us to leapfrog to other systems on the network. 144 00:09:28,220 --> 00:09:29,720 So again, smack yourselves in the back of the head. 145 00:09:29,720 --> 00:09:30,440 That very easy concept. 146 00:09:31,400 --> 00:09:32,680 It's automatically joined to the domain. 147 00:09:32,860 --> 00:09:36,980 So a lot of times with semantic, for example, you have to log into the actual base image when you're creating it. 148 00:09:37,400 --> 00:09:41,040 And so it has domain cache credentials a lot of times for different things. 149 00:09:41,120 --> 00:09:42,400 But there's a lot of information that you can find in there. 150 00:09:42,460 --> 00:09:44,180 But we don't really care about this part. 151 00:09:44,300 --> 00:09:50,460 This is just one method to get the information that we need in order to do the rest of what we're about to do. 152 00:09:52,800 --> 00:09:55,440 So you can use any concept of compromising any system. 153 00:09:55,580 --> 00:09:55,680 Okay? 154 00:09:56,040 --> 00:09:58,160 But we're going to talk about that one that's most important. 155 00:09:58,860 --> 00:10:01,960 So when we did this, we decided to ‑‑ that's not creepy. 156 00:10:02,600 --> 00:10:03,500 Again, random image. 157 00:10:03,580 --> 00:10:04,580 Has nothing to do with ‑‑ anyways. 158 00:10:06,340 --> 00:10:16,560 What we decided to do the first time is when we got access to a base image on the Pixy boot type environment, we basically went through and looked at what was actually on the server itself. 159 00:10:16,700 --> 00:10:18,000 What services and things like that. 160 00:10:18,400 --> 00:10:21,200 And what we noticed was this awesome thing called SCCM. 161 00:10:21,320 --> 00:10:22,340 This SCCM agent. 162 00:10:23,120 --> 00:10:24,600 People are probably like, oh, shit, that's cool. 163 00:10:25,760 --> 00:10:28,140 So through this, we started looking at what we could do with SCCM. 164 00:10:28,140 --> 00:10:32,900 And how we could leverage it to actually go after an organization and target it through an actual patch management server. 165 00:10:33,460 --> 00:10:34,100 So ‑‑ 166 00:10:35,780 --> 00:10:36,260 Hello. 167 00:10:36,400 --> 00:10:36,580 Hey. 168 00:10:37,200 --> 00:10:37,680 Okay. 169 00:10:37,740 --> 00:10:39,660 Who all here uses SCCM? 170 00:10:40,640 --> 00:10:41,680 Pretty standard, correct? 171 00:10:41,840 --> 00:10:42,060 Okay. 172 00:10:42,140 --> 00:10:43,640 So system, central configuration manager. 173 00:10:43,840 --> 00:10:48,860 So basically in an environment, AD central environment, it's used as many uses. 174 00:10:48,920 --> 00:10:53,520 But one of the uses that we looked at was the patch deployment and also the software deployment. 175 00:10:54,600 --> 00:10:55,560 Replaced WSUS. 176 00:10:56,260 --> 00:10:57,220 Also SMS. 177 00:10:58,520 --> 00:11:00,400 The main purpose, it's pretty easy. 178 00:11:00,520 --> 00:11:02,480 It's a something to patch system. 179 00:11:02,620 --> 00:11:03,620 Something to software deployment. 180 00:11:04,140 --> 00:11:04,880 Build systems. 181 00:11:04,980 --> 00:11:06,000 You can do a lot of things with it. 182 00:11:06,060 --> 00:11:07,820 We decided to look at the software distribution method. 183 00:11:09,860 --> 00:11:12,860 So here's the SCCM architecture based from Microsoft site. 184 00:11:12,960 --> 00:11:14,340 So you have many different sites. 185 00:11:14,640 --> 00:11:16,400 Clients can be on all of these sites. 186 00:11:17,220 --> 00:11:20,140 What our focus was on is the central site. 187 00:11:20,260 --> 00:11:25,000 You have management points, distribution points, software update points, secondary, primary, so on and so forth. 188 00:11:25,280 --> 00:11:27,760 So on the central site, we're looking at that. 189 00:11:28,140 --> 00:11:31,040 And then also the source servers. 190 00:11:31,160 --> 00:11:32,440 So basically where all the packages are. 191 00:11:32,580 --> 00:11:34,060 So that's what we're trying to attack. 192 00:11:34,600 --> 00:11:37,320 That's the basic architecture of what most companies will look like. 193 00:11:41,720 --> 00:11:43,220 So phase two of our attack. 194 00:11:44,020 --> 00:11:44,680 Or three. 195 00:11:45,780 --> 00:11:47,000 They're together, so it's two. 196 00:11:47,060 --> 00:11:47,440 Yeah. 197 00:11:47,500 --> 00:11:48,080 So it's two. 198 00:11:48,100 --> 00:11:56,800 So on the compromised machine, so when a zero touches machine is built, it's obviously going to have to have the SCCM agent on it. 199 00:11:56,900 --> 00:11:56,940 Right? 200 00:11:56,940 --> 00:12:00,360 So when you want someone to build it, it's going to have all the packages on it. 201 00:12:00,380 --> 00:12:01,480 Everything's going to already be there. 202 00:12:01,540 --> 00:12:02,120 All your patches. 203 00:12:02,600 --> 00:12:05,020 So you're not spinning up a vulnerable machine, obviously. 204 00:12:06,100 --> 00:12:14,700 But what we found out, as Dave said earlier, is that as a standard user, you can pull a lot of information from the SCCM agent that can help you in an attack. 205 00:12:14,980 --> 00:12:16,400 You can pull your site code. 206 00:12:16,480 --> 00:12:17,460 You can pull your package ID. 207 00:12:17,680 --> 00:12:19,560 You can pull how often it runs. 208 00:12:20,100 --> 00:12:25,760 These are all things that we utilize within the attack to ensure once it gets on the system that it's running every single day. 209 00:12:25,820 --> 00:12:26,920 So anything that is running every single day. 210 00:12:26,920 --> 00:12:28,740 If it's pushed out to, it's going to be spawning back to us. 211 00:12:29,700 --> 00:12:37,760 Also, it's possible to review SCCM logs to also get the primary server name and also the source server information. 212 00:12:39,820 --> 00:12:42,000 Here's a screenshot of the SCCM agent. 213 00:12:42,940 --> 00:12:48,300 So I don't know if anyone can see it or not, but basically the management point is what's darkened right there. 214 00:12:48,620 --> 00:12:51,280 So that is what we're going to be attacking. 215 00:12:51,400 --> 00:12:53,840 That is the main server that we're going to be going after. 216 00:12:54,120 --> 00:12:55,800 Everything else is information about you. 217 00:12:55,800 --> 00:12:58,980 Your IP address, your fully qualified domain name, logged on user. 218 00:12:59,100 --> 00:13:00,060 You should already know that. 219 00:13:00,220 --> 00:13:02,360 But the management point is what we really want to focus on. 220 00:13:03,340 --> 00:13:07,220 And I use this not only in a direct attack when we're doing internal pen tests, for example. 221 00:13:07,380 --> 00:13:09,280 I use this a lot of times with the social engineer tool kit. 222 00:13:09,580 --> 00:13:16,400 Very easy to gain access to a domain user account to where we can actually start to exfiltrate a lot of this data where we want to go after the other servers itself. 223 00:13:16,700 --> 00:13:18,320 So just another concept, too. 224 00:13:19,780 --> 00:13:23,240 Here are the screenshots of SCCM logs that are available to users. 225 00:13:24,380 --> 00:13:25,780 Obviously, within here, you're going to see the data. 226 00:13:25,780 --> 00:13:34,920 You're going to see that we have our command line, what's being run, the package name, the program name, the site code, what the user context was running as, NT30 system. 227 00:13:35,720 --> 00:13:39,280 And all of this information we're recording and then going to be using later on. 228 00:13:40,400 --> 00:13:42,340 And then here's a screenshot of the SCCM logs. 229 00:13:43,040 --> 00:13:43,840 Another log. 230 00:13:44,820 --> 00:13:46,640 That will tell you the date and time that's running. 231 00:13:46,660 --> 00:13:50,360 You can actually then parse through them to see which one is once again running every single day. 232 00:13:51,140 --> 00:13:54,940 This one will tell you the advertisement ID and then the package ID and then the program name. 233 00:13:58,260 --> 00:13:59,380 Which we'll get to. 234 00:14:04,980 --> 00:14:16,280 So what we have so far is we have local admin credentials in some way, shape, or form or domain user credentials in some way, shape, or form on local systems that we can then possibly use to log into another server. 235 00:14:16,420 --> 00:14:23,220 Or at least get access to the source directory, which either has domain user credentials or it has administrative level credentials, local. 236 00:14:23,500 --> 00:14:23,720 Local. 237 00:14:23,720 --> 00:14:29,940 And so the SCCM management server, we have the SCCM management host name, which we're able to be provided by the logs. 238 00:14:30,220 --> 00:14:33,060 And then we have the SCCM package ID, which we'll be using during an attack. 239 00:14:33,200 --> 00:14:36,900 And as Dave mentioned, when he's going through those logs, he's looking for something that's repetitive, right? 240 00:14:36,960 --> 00:14:43,660 A lot of times there will be polls like VBScripts looking for certain permission types or resetting people's profiles. 241 00:14:44,120 --> 00:14:51,940 There's scripts that are run basically every single day and continuously every single day that you can use as far as injecting into that and actually patching the source directory. 242 00:14:52,620 --> 00:14:53,340 And so. 243 00:14:53,720 --> 00:14:57,200 You know, we have all of these things available to us and this is what we need for our specific attack. 244 00:15:01,980 --> 00:15:08,580 So the goal of all of this is to log into the SCCM server with either local administrator level accounts or based on how it's set up, domain user credentials. 245 00:15:08,940 --> 00:15:13,500 Gain access to the source repository, which is typically on the central management server itself, which we already have. 246 00:15:13,800 --> 00:15:22,980 And then we're going to either pack or backdoor the actual SCCM server that allows it to deploy malicious payloads to the actual entire organization. 247 00:15:23,300 --> 00:15:23,700 Now, what we're going to do is we're going to deploy malicious payloads to the actual entire organization. 248 00:15:23,700 --> 00:15:25,560 So what's interesting with this is you can do it a few different ways. 249 00:15:26,840 --> 00:15:30,860 A lot of times the scripts that are running don't always have an executable with them. 250 00:15:30,980 --> 00:15:39,720 And so you can modify those scripts to then deploy and actually send the packages to the entire company and just put your own packed binary or executable in there or backdoor. 251 00:15:40,060 --> 00:15:48,980 But also what you can leverage is a lot of times is, you know, actually backdooring an entire executable or PE file itself on the actual legitimate package. 252 00:15:50,580 --> 00:15:50,980 So. 253 00:15:54,460 --> 00:15:54,860 Dave? 254 00:15:54,940 --> 00:15:55,260 Yep. 255 00:15:55,420 --> 00:15:55,820 So. 256 00:15:57,900 --> 00:15:58,300 So. 257 00:15:58,820 --> 00:15:59,220 Sorry. 258 00:16:00,280 --> 00:16:00,680 So. 259 00:16:00,820 --> 00:16:01,120 Okay. 260 00:16:01,280 --> 00:16:05,040 Step one of the attack, obviously log on to the SCCM server as the local administrator. 261 00:16:06,420 --> 00:16:10,120 So when we do that, we need to find the source repository on that system. 262 00:16:10,220 --> 00:16:12,760 The source repository is going to be where all the packages are stored. 263 00:16:13,380 --> 00:16:15,440 To do that, there's one of two ways. 264 00:16:15,540 --> 00:16:18,240 The one is more difficult and you're going to fail at it. 265 00:16:18,780 --> 00:16:21,300 If it's set up incorrectly, it's going to work fine. 266 00:16:21,540 --> 00:16:23,580 The other one is stupid. 267 00:16:23,580 --> 00:16:23,860 It's simple. 268 00:16:24,100 --> 00:16:25,260 So you just use that one anyways. 269 00:16:25,680 --> 00:16:29,840 So the first one, obviously, you could query WMI to figure out where the source repository is. 270 00:16:30,160 --> 00:16:31,640 I see permission issues with that. 271 00:16:31,780 --> 00:16:32,640 You're going to have permission issues. 272 00:16:32,860 --> 00:16:36,080 That's just something if they're setting up the server correctly, that's going to happen. 273 00:16:37,240 --> 00:16:39,040 So when we hit that, it was kind of a roadblock. 274 00:16:39,160 --> 00:16:43,860 We really didn't know how to go further, how to get this information because this is the key information that we need. 275 00:16:43,920 --> 00:16:49,300 We need to backdoor these files to be able to then get them to be deployed to get shells back to us. 276 00:16:51,220 --> 00:16:52,620 So really complex way. 277 00:16:52,620 --> 00:16:58,600 We searched the application logs with an event viewer for the word source and it kind of just lays it out there exactly where it's at. 278 00:16:59,200 --> 00:17:03,140 So it was pretty simple for us to figure out where it's located. 279 00:17:03,960 --> 00:17:08,100 Typically also on the machine, if it's on the same machine, you could do simple search for it. 280 00:17:08,900 --> 00:17:12,220 It's usually marked with a source dollar sign or SCCM source dollar sign. 281 00:17:12,880 --> 00:17:14,680 Once again, this information is out there. 282 00:17:14,940 --> 00:17:16,580 People are using this currently right now. 283 00:17:16,680 --> 00:17:17,920 So it's easy to find. 284 00:17:22,920 --> 00:17:25,240 Like I said, it has nothing to do with any of the slides whatsoever. 285 00:17:26,800 --> 00:17:32,200 So next we need to create a backdoor that won't be picked up by any type of antivirus or things like that before we actually launch the attack itself. 286 00:17:32,920 --> 00:17:35,480 What I'm going to show you is a very easy technique that I use all the time. 287 00:17:35,520 --> 00:17:36,080 There's actually two. 288 00:17:36,500 --> 00:17:37,280 I'll just cover one. 289 00:17:37,480 --> 00:17:40,140 But basically what we're going to do is a simple reverse shell. 290 00:17:40,300 --> 00:17:47,040 And then I'm going to actually show you a live demo of a fairly large network of over about 2,000 machines that we're going to go ahead and knock around. 291 00:17:48,260 --> 00:17:52,320 So what we need to do is we're going to create a simple reverse back shell. 292 00:17:53,880 --> 00:17:54,340 Reverse shell. 293 00:17:54,900 --> 00:17:56,360 And we're going to have it connect back to us, okay? 294 00:17:56,520 --> 00:17:58,320 And it's going to evade everything out there. 295 00:17:58,500 --> 00:17:59,340 And I'll show you why in a second. 296 00:17:59,740 --> 00:18:00,620 So this is some Python. 297 00:18:01,180 --> 00:18:04,240 And I actually used this in my class at Black Hat earlier. 298 00:18:04,820 --> 00:18:07,080 But what this is is a Python backdoor, okay? 299 00:18:07,160 --> 00:18:10,040 But you might be thinking to yourself, well, not everybody is going to have Python installed. 300 00:18:10,100 --> 00:18:11,220 So how am I even going to use it? 301 00:18:12,680 --> 00:18:13,460 So real quick. 302 00:18:14,540 --> 00:18:15,620 We import a socket. 303 00:18:15,740 --> 00:18:19,080 We import some process which then allows us to execute underlying operating system commands. 304 00:18:19,260 --> 00:18:22,400 We tell it what our reverse IP address is and what our reverse port is. 305 00:18:22,620 --> 00:18:24,940 We connect to our socket on that host and port. 306 00:18:25,220 --> 00:18:26,860 We then iterate through a loop. 307 00:18:27,160 --> 00:18:30,860 And then we basically receive some data which is going to be our command shell type thing, right? 308 00:18:31,160 --> 00:18:37,700 And then we're going to execute the actual process itself and actually execute the underlying system commands with that. 309 00:18:37,940 --> 00:18:45,440 And then we're going to take that value from proc, which is the command line that we received data from from the attacker machine. 310 00:18:45,860 --> 00:18:48,720 And then we're going to read it into standard out value. 311 00:18:49,120 --> 00:18:51,800 And then we're going to send that back to the actual attacker itself. 312 00:18:51,860 --> 00:18:52,580 And just going to keep going. 313 00:18:52,620 --> 00:18:53,560 Going in a continuous loop, right? 314 00:18:53,580 --> 00:18:55,900 So it's just a simple, very easy reverse shell. 315 00:18:56,560 --> 00:18:57,000 Okay? 316 00:18:59,140 --> 00:19:05,740 Now, taking that Python and compiling it into a binary is somewhat funny because it's relatively easy and not a lot of people know about it. 317 00:19:06,100 --> 00:19:09,940 What you can use is a tool called PyInstaller which compiles the actual binary itself. 318 00:19:10,380 --> 00:19:19,040 It wraps the Python interpreter in the actual Python code itself and allows you to execute executables on the actual system stuff without Python being installed. 319 00:19:19,400 --> 00:19:21,580 And so this works on Linux, OSX, and Windows. 320 00:19:21,580 --> 00:19:25,940 And it's actually how the social engineer toolkit interactive shell works, which we'll see a demo of. 321 00:19:27,160 --> 00:19:32,620 What happens with this is, you know, we basically take a very large shell that does AES encryption and a bunch of other stuff, 322 00:19:32,760 --> 00:19:39,480 byte compile it for the specific operating systems, whether it be Linux, Windows, or OSX, and then we deploy that package using PyInstaller. 323 00:19:40,620 --> 00:19:44,860 And on the website is just a simple script that I wrote that will create a binary for you. 324 00:19:44,900 --> 00:19:50,740 Just point it at the Python file and it will actually go and compile it for you so that you have your standalone executable there for you. 325 00:19:50,760 --> 00:19:50,960 Okay? 326 00:19:52,640 --> 00:19:54,620 Here's just a very fast demo of building a shell. 327 00:20:02,180 --> 00:20:10,620 So over here, we have our shell, right? 328 00:20:10,720 --> 00:20:11,920 This is exactly what you just saw before. 329 00:20:13,520 --> 00:20:14,880 What we're going to do is we're going to run PyBuild. 330 00:20:17,080 --> 00:20:17,720 Type in the shell. 331 00:20:18,280 --> 00:20:18,760 Shell.py. 332 00:20:20,120 --> 00:20:21,520 It's going to go ahead and byte compile it for us. 333 00:20:27,520 --> 00:20:28,200 Just takes a second. 334 00:20:28,680 --> 00:20:34,860 And then when we're done, we're going to go to our shell directory and we now have a shell. 335 00:20:35,160 --> 00:20:35,220 Okay? 336 00:20:35,840 --> 00:20:36,120 Simple. 337 00:20:42,340 --> 00:20:43,500 Now what we're going to do is we're going to run it. 338 00:20:43,860 --> 00:20:45,620 Actually, I didn't even check my IP address. 339 00:20:46,580 --> 00:20:48,120 So we need to byte compile it again. 340 00:20:48,480 --> 00:20:48,840 136. 341 00:20:52,600 --> 00:20:52,960 136. 342 00:20:53,100 --> 00:20:53,440 We're good. 343 00:20:54,140 --> 00:20:55,900 So let's do a simple Netcat listener. 344 00:20:57,020 --> 00:20:57,380 443. 345 00:20:58,280 --> 00:20:59,000 We're going to run it. 346 00:21:01,180 --> 00:21:02,360 And we have our command shell. 347 00:21:02,520 --> 00:21:02,660 Okay? 348 00:21:03,000 --> 00:21:03,360 Great. 349 00:21:03,440 --> 00:21:03,740 Easy. 350 00:21:03,920 --> 00:21:04,440 So far. 351 00:21:09,560 --> 00:21:10,580 If you upload this guy. 352 00:21:19,060 --> 00:21:19,600 We'll see. 353 00:21:22,160 --> 00:21:22,960 Something like this. 354 00:21:23,980 --> 00:21:24,980 Or not like that. 355 00:21:25,140 --> 00:21:25,460 Like that. 356 00:21:25,860 --> 00:21:26,520 Not like that. 357 00:21:26,620 --> 00:21:26,700 Wait. 358 00:21:26,780 --> 00:21:26,880 No. 359 00:21:28,700 --> 00:21:29,140 Hold on. 360 00:21:29,480 --> 00:21:29,980 Like that. 361 00:21:30,020 --> 00:21:30,180 Like that. 362 00:21:30,420 --> 00:21:33,360 So you see you get past every single antivirus vendor out there. 363 00:21:33,400 --> 00:21:35,720 Now there's another cool technique that I use all the time. 364 00:21:36,700 --> 00:21:37,680 And it's in. 365 00:21:37,860 --> 00:21:38,820 I usually don't talk about it. 366 00:21:38,900 --> 00:21:39,440 But screw it. 367 00:21:39,480 --> 00:21:39,700 Fuck it. 368 00:21:40,620 --> 00:21:41,160 It's called. 369 00:21:41,340 --> 00:21:44,600 The guys at null security released this cool thing called Hyperion. 370 00:21:45,160 --> 00:21:50,420 And what Hyperion does is it actually takes your PE file and it makes it assembly code. 371 00:21:50,700 --> 00:21:54,860 And then it wraps itself around a 128 bit AES encrypted bubble. 372 00:21:55,460 --> 00:21:55,780 Okay? 373 00:21:55,820 --> 00:21:57,580 With a randomized key every single time. 374 00:21:57,640 --> 00:21:58,760 It actually does five passes. 375 00:21:58,800 --> 00:21:59,740 So five keys basically. 376 00:22:00,060 --> 00:22:00,820 Every single time. 377 00:22:01,420 --> 00:22:05,220 And so when you double click it, you're like, well, how the hell am I going to put the key 378 00:22:05,220 --> 00:22:05,460 in there? 379 00:22:05,560 --> 00:22:05,700 Right? 380 00:22:05,980 --> 00:22:07,340 Well, brute force is its own key. 381 00:22:08,420 --> 00:22:11,160 And then it allows you to decrypt that file on the fly and then send you the shell back. 382 00:22:11,280 --> 00:22:12,860 So that also evades antivirus very well. 383 00:22:12,920 --> 00:22:13,600 So a very cool tool. 384 00:22:13,600 --> 00:22:14,820 That I use all the time. 385 00:22:21,720 --> 00:22:25,360 So step three is we're going to take one of the source packages that we find. 386 00:22:25,940 --> 00:22:29,420 We're going to replace it with the back door version of the actual source directory itself. 387 00:22:29,980 --> 00:22:32,720 And then we're going to grab our reverse shell executable and use it as a back door. 388 00:22:33,040 --> 00:22:36,040 And either you can use like MSF to then back door that executable or not. 389 00:22:36,500 --> 00:22:39,060 And then you have a new malicious package ready to be deployed. 390 00:22:39,340 --> 00:22:39,640 Don't advance. 391 00:22:39,880 --> 00:22:40,240 Hm? 392 00:22:40,640 --> 00:22:41,140 Don't advance. 393 00:22:41,420 --> 00:22:41,780 What? 394 00:22:41,780 --> 00:22:42,320 Don't advance. 395 00:22:42,640 --> 00:22:43,460 I want to go advance. 396 00:22:43,720 --> 00:22:43,940 Okay. 397 00:22:44,500 --> 00:22:47,740 So does anyone know why this right now would not work? 398 00:22:48,820 --> 00:22:50,720 If you have any SCCM administrators in here. 399 00:22:52,060 --> 00:22:52,500 Perfect. 400 00:22:53,600 --> 00:22:54,080 What's that? 401 00:22:54,220 --> 00:22:54,660 I heard it. 402 00:22:55,740 --> 00:22:56,180 Yes. 403 00:22:57,780 --> 00:22:58,560 The problem. 404 00:22:59,760 --> 00:23:01,840 Packages are not deployed without a proper signature or hash. 405 00:23:02,000 --> 00:23:05,880 So the way Microsoft does it is once a package is created, you have the source directory. 406 00:23:06,180 --> 00:23:08,840 It uses, it creates a, I think it's SHA-256. 407 00:23:08,880 --> 00:23:09,560 It creates a hash. 408 00:23:11,100 --> 00:23:11,760 And it keeps it. 409 00:23:11,760 --> 00:23:19,060 If we replace that and let's say we try to force a package refresh, it's going to basically 410 00:23:19,060 --> 00:23:20,900 say the hashes are not the same. 411 00:23:21,060 --> 00:23:21,680 We're not valid. 412 00:23:22,020 --> 00:23:23,080 It will not deploy. 413 00:23:23,320 --> 00:23:24,040 It will be in logs. 414 00:23:24,220 --> 00:23:24,980 We don't want that. 415 00:23:25,100 --> 00:23:26,140 We want to get away from that. 416 00:23:26,320 --> 00:23:29,740 So we need to find a way to update the signature in order to complete the deployment. 417 00:23:35,040 --> 00:23:37,220 I think it has nothing to do with the slides. 418 00:23:37,700 --> 00:23:39,740 So new script is being released today. 419 00:23:40,560 --> 00:23:41,740 Basically what we decided is that each of these has to have a password. 420 00:23:41,740 --> 00:23:44,460 So the easiest way to do is go into the startup directory of any user on that machine. 421 00:23:44,940 --> 00:23:49,320 So the way we've seen it configured in most environments is that the people that are on 422 00:23:49,320 --> 00:23:51,260 the SCCM server are also the SCCM admins. 423 00:23:52,400 --> 00:23:56,800 Being that, if we put a script in their startup directory that basically will refresh 424 00:23:56,800 --> 00:24:03,840 that package, that package refresh will actually cause it to rehash itself, therefore not having 425 00:24:03,840 --> 00:24:05,100 any hashing issues then. 426 00:24:05,740 --> 00:24:09,480 So automatically updates the package using SCCM admins credentials, creates a new signature 427 00:24:09,480 --> 00:24:09,960 for the file. 428 00:24:09,960 --> 00:24:14,680 And then after it forces the refresh, then initiates the deployment of it then. 429 00:24:15,300 --> 00:24:19,480 You'll see an automatic way that we've done after this, too, that automatically does it for you. 430 00:24:21,400 --> 00:24:22,260 So here's the script. 431 00:24:22,980 --> 00:24:28,920 Credit for this has had to go to one of our resident SCCM admins, Bill Reedshaw, who did not want to be mentioned. 432 00:24:30,200 --> 00:24:30,820 At all. 433 00:24:31,080 --> 00:24:33,760 He just got his certificate and he's worried Microsoft is going to take it away. 434 00:24:37,440 --> 00:24:38,240 Bill Reedshaw. 435 00:24:38,320 --> 00:24:38,960 Bill Reedshaw. 436 00:24:39,600 --> 00:24:39,940 Bill Reedshaw. 437 00:24:39,960 --> 00:24:40,440 So ‑‑ 438 00:24:45,340 --> 00:24:47,340 So we turn back time and I do that again. 439 00:24:48,920 --> 00:24:49,360 Readshaw. 440 00:24:49,480 --> 00:24:53,780 So what you're going to need is actually just two pieces of information, which you already 441 00:24:53,780 --> 00:24:55,020 have from the client machine. 442 00:24:55,460 --> 00:25:09,200 You need the SCCM server, which we're already going to be on, and you 443 00:25:09,960 --> 00:25:12,860 we should really care about is the second last, which is object 444 00:25:12,860 --> 00:25:15,880 package refresh, package source, refresh the package source at 445 00:25:15,880 --> 00:25:19,620 all distribution points. Some people, I believe it was 446 00:25:19,620 --> 00:25:24,620 McDouglas, said this is stupid simple. It's a correct way to 447 00:25:24,620 --> 00:25:29,320 say it. So it works. Now in scenario two, there's a bunch of 448 00:25:29,320 --> 00:25:32,140 stuff that we can do with actual database, the actual SCCM 449 00:25:32,140 --> 00:25:34,740 database. And this is what's actually getting built into the 450 00:25:34,740 --> 00:25:36,960 new release of the social engineering toolkit, which I 451 00:25:36,960 --> 00:25:42,100 decided to add last night. So it's working, which is good. And 452 00:25:42,100 --> 00:25:46,100 we got the troll guy in there. And so what this will do is 453 00:25:46,100 --> 00:25:49,660 automatically use a combination of PowerShell WMI and updating 454 00:25:49,660 --> 00:25:53,620 the database to deploy packages automatically for us. So we'll 455 00:25:53,620 --> 00:26:03,940 show you a demo of that in a few minutes. So in SCCM 2012, what 456 00:26:03,940 --> 00:26:06,800 we're running into a lot of is SCCM 2012 makes things a lot 457 00:26:06,800 --> 00:26:06,940 easier. So what we're running into a lot of is SCCM 2012 makes 458 00:26:06,960 --> 00:26:08,800 things a lot easier for us. It's more centralized. It's more 459 00:26:08,800 --> 00:26:11,120 confined in nature. There's not a lot of different granular rules 460 00:26:11,120 --> 00:26:14,060 and permissions. What we found with prior versions of SCCM, it 461 00:26:14,060 --> 00:26:16,800 was very difficult to pull this thing off. It required you to 462 00:26:16,800 --> 00:26:20,060 get a lot of information. And so with SCCM 2012, they're also 463 00:26:20,560 --> 00:26:23,620 adding patching for Unix, Linux, and OSX as well. So you can go 464 00:26:23,620 --> 00:26:25,820 and patch anything else that you want to on the actual system 465 00:26:25,820 --> 00:26:27,800 itself, not just Windows-based devices, which is going to be 466 00:26:27,800 --> 00:26:36,420 helpful for us. Right? Yep. Oh, okay. So easy enough. We 467 00:26:36,420 --> 00:26:36,940 talked about this before. We're going to talk about this 468 00:26:36,960 --> 00:26:39,340 before. PXE boot into a Windows environment, which I guarantee 469 00:26:39,340 --> 00:26:42,320 you guys, if you go on a pen test, you will find that. Or you 470 00:26:42,320 --> 00:26:45,060 social engineer somebody, right? You grab the information off of 471 00:26:45,060 --> 00:26:47,960 that and enumerate the SCCM location. You log into that with 472 00:26:47,960 --> 00:26:50,220 local admin rights or domain user credentials if you're 473 00:26:50,220 --> 00:26:52,600 allowed. Locate the source directory of the SCCM package. 474 00:26:55,860 --> 00:27:00,260 And then you grab the source files. A few people know that. 475 00:27:03,840 --> 00:27:06,140 So you grab the source files. You backdoor them either with 476 00:27:06,140 --> 00:27:06,940 malicious code or you add the source files. And then you 477 00:27:06,960 --> 00:27:09,400 add to the whatever script is refreshing on a regular basis. 478 00:27:10,100 --> 00:27:13,060 You update the startup scripts for logged in users. And then 479 00:27:13,060 --> 00:27:20,100 you wait for shells. Now also pop a box. So we're going to walk 480 00:27:20,100 --> 00:27:21,600 you through the manual attack and then we'll show you the 481 00:27:21,600 --> 00:27:34,040 automated one, which is sweet. Actually hang on a second. Sorry, 482 00:27:34,120 --> 00:27:35,740 I just want to see it one more time. Oh, wow. 483 00:27:37,560 --> 00:27:38,200 He's single. 484 00:27:39,620 --> 00:27:40,000 . 485 00:27:40,480 --> 00:27:40,860 . 486 00:27:44,740 --> 00:27:45,120 Shit. 487 00:27:46,280 --> 00:27:46,660 . 488 00:27:46,660 --> 00:27:46,680 . 489 00:27:50,440 --> 00:27:51,660 I'm going to get his number after this. 490 00:27:53,000 --> 00:27:53,960 He's rooming with Jamie. 491 00:27:54,500 --> 00:27:54,880 Go. 492 00:27:55,020 --> 00:27:58,180 All right. So we're on the compromise machine. We're on the 493 00:27:58,680 --> 00:28:01,820 zero touch machine. Basically go into control panel, look at 494 00:28:01,820 --> 00:28:05,820 configuration manager there which is installed with SCCM. We're 495 00:28:05,820 --> 00:28:06,600 just going to run through this quickly. 496 00:28:07,120 --> 00:28:09,580 There's a general tab. There's a components tab, what's 497 00:28:09,580 --> 00:28:13,600 installed. We have any actions you want to run on that client. 498 00:28:14,660 --> 00:28:17,560 File collection cycle, things like that. Advanced, you can 499 00:28:17,560 --> 00:28:19,980 look at your site code, configuration site code. Your 500 00:28:19,980 --> 00:28:23,880 update schedule. Didn't go to that tab. And then the general 501 00:28:23,880 --> 00:28:27,640 tab is really a tab that we need the information from. AD site 502 00:28:27,640 --> 00:28:35,860 name. We have our configuration site code. Log on user. Log on 503 00:28:35,860 --> 00:28:38,620 domain. Net BIOS name. And then the management point, as I 504 00:28:38,620 --> 00:28:40,380 said before, is what we're really looking for. 505 00:28:47,160 --> 00:28:50,400 So from that, we want to now take a look at the logs. See 506 00:28:50,400 --> 00:28:54,340 what other information we can get out of this. It's going to be 507 00:28:54,340 --> 00:29:02,940 Windows. CIS WOW 64, architecture. CCM. Logs. And 508 00:29:02,940 --> 00:29:05,220 then under exec manager, so anything that's executing on 509 00:29:05,220 --> 00:29:07,820 there is going to be under exec manager. SCCM has amazing logs 510 00:29:08,400 --> 00:29:12,580 for administrators and also for our purposes. So through here, 511 00:29:12,680 --> 00:29:14,300 you can't see because I had a blanket out because we were on a 512 00:29:14,300 --> 00:29:16,360 production server, but you have the advertisement ID, the 513 00:29:16,360 --> 00:29:19,400 package ID, what's being run, and all the way to the right, 514 00:29:19,460 --> 00:29:21,300 you're also going to see all the dates and times that it's 515 00:29:21,300 --> 00:29:24,360 running. So a quick search, you can see which ones are running 516 00:29:24,360 --> 00:29:27,300 repeatable, and those are the ones that we want to attack or 517 00:29:28,500 --> 00:29:30,860 target. So we have program name, package ID, and 518 00:29:30,860 --> 00:29:32,560 advertisement ID, which we're going to be using in our script. 519 00:29:33,220 --> 00:29:34,840 So now we're on the SCCM. I actually forgot what he was 520 00:29:34,840 --> 00:29:35,200 doing. I actually forgot what he was doing. I actually 521 00:29:35,220 --> 00:29:38,880 forgot what I was doing, so give it a second. Wait. Hold on. 522 00:29:39,100 --> 00:29:42,060 It's funny. He gets on the screen and he's like, I actually 523 00:29:42,060 --> 00:29:44,560 stopped it. I stopped it. Did you? Yeah. This is a dick. 524 00:29:46,280 --> 00:29:50,920 I was like, am I that retarded? He's got the menus down there 525 00:29:50,920 --> 00:29:53,820 and he's like, what am I doing? Wait. Wait. Did someone poop? 526 00:29:54,080 --> 00:29:58,920 Yeah. So from here, if you do a search in the event viewer for 527 00:29:58,920 --> 00:30:02,440 source, you could see basically you could have seen right there 528 00:30:02,440 --> 00:30:04,540 is going to be our source directory. We click on that 529 00:30:04,540 --> 00:30:07,740 source directory, let's say if it's local or remote, you're 530 00:30:07,740 --> 00:30:11,860 going to be able to access then all of the software that is to 531 00:30:11,860 --> 00:30:14,120 be packaged or is packaged. These are all the source 532 00:30:14,120 --> 00:30:18,360 directories, all the source files on there. I know it sucks 533 00:30:18,360 --> 00:30:20,220 that you can't see it, but you guys can use your imagination 534 00:30:20,220 --> 00:30:26,300 with explorer. So we pick one. So we pick this one. We go 535 00:30:26,300 --> 00:30:30,740 ahead, we backdoor it, and Dave will be showing that later. And 536 00:30:30,740 --> 00:30:33,460 then from that, the only thing left to do now is put the 537 00:30:33,460 --> 00:30:36,940 script in the startup directory. So we make our configuration 538 00:30:36,940 --> 00:30:40,820 changes, change the SCCM server name, which we are already on it 539 00:30:40,820 --> 00:30:45,200 right now, the package ID, which we have from the logs that are 540 00:30:45,200 --> 00:30:52,160 available to us on the client. Basically go ahead and put that 541 00:30:52,160 --> 00:30:58,680 into the startup directory of a targeted user or all users. Force 542 00:30:58,680 --> 00:31:03,440 them to log out or just wait. There you go. So we're going to 543 00:31:09,960 --> 00:31:11,000 go ahead and do that. I didn't even think about it. I could 544 00:31:11,000 --> 00:31:14,620 just say I'm going to do the second demo. So I'm going to do 545 00:31:14,620 --> 00:31:17,340 the second demo using the social engineer toolkit. And 546 00:31:17,340 --> 00:31:20,320 actually I want to do a shout out to Joey fur down there. I 547 00:31:20,320 --> 00:31:22,220 don't even see him here. He's on the development team for the 548 00:31:22,220 --> 00:31:26,920 social engineer toolkit. So give him a stand up. Thanks for all 549 00:31:26,920 --> 00:31:33,420 of his hard work. A lot of hard work on this. So we're 550 00:31:33,440 --> 00:31:38,260 VPNed in to a production environment, a fairly large 551 00:31:38,260 --> 00:31:43,580 infrastructure. Someday. Oh, wait. It was up there. Sorry. I 552 00:31:43,580 --> 00:31:46,860 thought it was black. So what we're going to do is run the 553 00:31:46,860 --> 00:31:49,260 social engineer toolkit. And this is version 3.6. Will be 554 00:31:49,260 --> 00:31:51,220 released probably later tonight when I get back to the hotel 555 00:31:51,220 --> 00:31:57,880 room. Yeah. It's called mm-hmm. Do the face. Do the face. 556 00:31:58,280 --> 00:32:03,320 Mm-hmm. Mm-hmm. So that's the new code name for SED. It's a 557 00:32:03,440 --> 00:32:07,180 long story. We've been walking around going mm-hmm all day 558 00:32:07,180 --> 00:32:10,200 long. So anyways, that's how we do our fun. And then you click 559 00:32:10,200 --> 00:32:12,800 on the fast track penetration testing side of the house. And 560 00:32:12,800 --> 00:32:16,880 it's kind of hard to see there. Make sure we got some music 561 00:32:16,880 --> 00:32:19,080 here. And we're going to go through number 3, which is the 562 00:32:19,080 --> 00:32:23,860 SCCM attack vector. And we're going to enter. You'll see it 563 00:32:23,860 --> 00:32:26,380 as it pops up. It kind of sucks that you can't. Let me see if I 564 00:32:26,380 --> 00:32:32,800 can blow it up here and move it up. Mm-hmm. 565 00:32:33,100 --> 00:32:33,420 Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. 566 00:32:33,440 --> 00:32:34,280 Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. Mm-hmm. 567 00:32:34,280 --> 00:32:36,580 right, cool. So then we're going to enter the IP address of the 568 00:32:36,580 --> 00:32:40,440 SCCM server. And the one that I'm going after is 192.168.225.131 569 00:32:41,460 --> 00:32:44,940 I hope. And then the reverse IP address of the attacker machine, 570 00:32:45,120 --> 00:32:49,020 which is me, is going to be 136. Let me just confirm that real 571 00:32:49,020 --> 00:32:59,420 quick. 136. And then the user name. It has something to do with 572 00:32:59,420 --> 00:33:03,420 hugs. And so what's going to happen here is that we're going to 573 00:33:03,420 --> 00:33:06,280 it's going to start the social engineer tool kit interactive 574 00:33:06,280 --> 00:33:11,100 listener which is multi-thread and patch the source 575 00:33:11,100 --> 00:33:13,000 directories for us automatically, insert the back 576 00:33:13,000 --> 00:33:16,480 door, compile it into the source path and do a bunch of cool 577 00:33:16,480 --> 00:33:16,640 stuff. 578 00:33:33,660 --> 00:33:34,140 . 579 00:33:34,140 --> 00:33:34,160 . 580 00:33:34,160 --> 00:33:34,400 . 581 00:34:03,980 --> 00:34:05,860 So that's my favorite band, Steel Panther, they're like 582 00:34:05,860 --> 00:34:07,680 vulgar and a bunch of other stuff, so if you get a chance 583 00:34:07,680 --> 00:34:08,120 check them out. 584 00:34:09,600 --> 00:34:11,900 But here we have 927 shell and they'll be more 585 00:34:11,900 --> 00:34:13,220 flowing in as we go through this. 586 00:34:14,420 --> 00:34:15,640 So we're going to interact with just one. 587 00:34:15,760 --> 00:34:17,840 So pick 917 and see what we got here. 588 00:34:18,500 --> 00:34:19,740 So we're going to drop into command shell. 589 00:34:19,880 --> 00:34:21,700 And this is the interactive tool kit built into this social 590 00:34:21,700 --> 00:34:22,340 engineer tool kit. 591 00:34:23,420 --> 00:34:24,040 Drop into shell. 592 00:34:25,320 --> 00:34:26,100 Type in who am I? 593 00:34:29,260 --> 00:34:32,280 So now we have shells basically over the entire network, as many 594 00:34:32,280 --> 00:34:32,720 as you want. 595 00:34:35,780 --> 00:35:03,400 Thank you. So wrapping things up. So bananas are awesome. And my son and my kids watch this show, the Fresh Beats Band, and they always do this banana song on it. But I figured a bunch of hackers wouldn't know what the Fresh Beat Band was. So I didn't play that one. 596 00:35:03,420 --> 00:35:33,280 But it's actually one of my favorite songs now. But this does work all the time for us. Like literally, I've been using the Pixie Boot technique for probably about four years. And I finally decided to talk about it. This works very, very easy on a lot of corporations. And everybody's using SCCM. So it's very easy to do. And it takes less than an hour to get everything up and running and actually sent out. And it's hard to protect against because everybody's using a combination of PXC and SCCM. But again, this doesn't have to be the only avenue that you use for this, right? It could be anything from social engineering to 597 00:35:33,420 --> 00:36:03,400 a direct attack on the actual server itself. I mean, we're not showing a zero day on compromising a server and getting access to it. We're showing how you actually patch the server itself. You actually patch the patching server and have that F stuff up. So diabetes. Diabetes. Diabetes. Diabetes. This is what gets me the most. Seriously. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes. Diabetes 598 00:36:05,360 --> 00:36:08,380 So when you're using PXE, you're using pixie boot, make sure that 599 00:36:08,380 --> 00:36:10,680 you can only pixie boot from certain network administrative 600 00:36:10,680 --> 00:36:14,200 level subnets and that they're VLANed off so that only support 601 00:36:14,200 --> 00:36:18,200 and everybody else can use the help desk or whatever. Monitor 602 00:36:18,200 --> 00:36:20,600 the SCCM service from malicious traffic. Any type of patching 603 00:36:20,600 --> 00:36:22,380 that's going to go on there are signature mismatches you can 604 00:36:22,380 --> 00:36:25,400 probably pick up on. Monitor source files for unwanted 605 00:36:25,400 --> 00:36:28,640 changes is going to be huge. A lot of times what I see a lot 606 00:36:28,640 --> 00:36:31,240 of organizations do once we actually go and do this attack, 607 00:36:31,920 --> 00:36:33,940 we show them preventive measures against it is they 608 00:36:33,940 --> 00:36:36,640 actually have change windows for specific patching and certain 609 00:36:36,640 --> 00:36:38,480 times that they allow patching and they have all of those 610 00:36:39,220 --> 00:36:41,280 signatures and hashes before they actually patch the server 611 00:36:41,280 --> 00:36:42,580 itself. File integrity monitoring. 612 00:36:42,760 --> 00:36:44,980 File integrity monitoring, things like that. Detect the 613 00:36:44,980 --> 00:36:46,620 controls is going to be your biggest thing on this but it's 614 00:36:46,620 --> 00:36:50,340 relatively hard to. Like I said, we find this successful 615 00:36:50,340 --> 00:36:55,140 about 90% of the people that we go after. So one more thing 616 00:36:55,140 --> 00:36:59,220 before we wrap up here. So I did one joke on one of my friends 617 00:36:59,220 --> 00:37:01,140 but I also want to embarrass the other because this is a 618 00:37:01,140 --> 00:37:01,220 really big one. This is a really big one. This is a 619 00:37:01,240 --> 00:37:04,060 really weird for me. So if you know the social engineer tool 620 00:37:04,060 --> 00:37:07,400 kit version 3.5 was called creepy Carl. The reason why it 621 00:37:07,400 --> 00:37:10,040 was called creepy Carl is because Carl which is right 622 00:37:10,040 --> 00:37:15,240 there. Can you come up here for a second? Yeah. He is 623 00:37:15,240 --> 00:37:21,260 creepy. Seriously. So I have a party at my house. I have a 624 00:37:21,260 --> 00:37:23,660 party at my house and I invite him over. He's a good friend of 625 00:37:23,660 --> 00:37:25,880 mine. And he doesn't know my wife really well. He's met her 626 00:37:25,880 --> 00:37:29,180 maybe once or twice. And so he goes over to my party and he's 627 00:37:29,180 --> 00:37:31,220 great. And then like three days go by. And then he's like, 628 00:37:31,220 --> 00:37:33,600 what's up? And he sends a direct message to my wife on Twitter. 629 00:37:35,020 --> 00:37:38,460 And it says, serious question. No creepy intention. I think you 630 00:37:38,460 --> 00:37:40,480 were wearing perfume. What brand of perfume do you wear? I'd 631 00:37:40,480 --> 00:37:43,920 like to get that for my fiance. I mean, seriously. Seriously. 632 00:37:45,760 --> 00:37:49,600 Who does this? Who does that? Who does that? Who does that? 633 00:37:49,960 --> 00:37:55,440 Fucking creepy Carl does it. Creepy Carl does it. Carl, go 634 00:37:55,440 --> 00:37:59,360 stand over there. Seriously. Don't touch him. Thank you. 635 00:37:59,560 --> 00:38:01,200 Thank you. Can we get that guy out of here? It's creepy. It's 636 00:38:01,200 --> 00:38:07,040 creepy. Thanks, everybody. One second. One second. One more 637 00:38:07,040 --> 00:38:10,800 thing. Oh, God, no. Seriously? Yes. So hold on. Hold on. You 638 00:38:10,800 --> 00:38:14,100 gotta be fucking kidding me. We have a birthday boy in the 639 00:38:14,100 --> 00:38:25,820 house. Okay? So Dave has done a lot for this community. As we 640 00:38:25,820 --> 00:38:27,780 all know, Dave has done a lot for me. It's my first time 641 00:38:27,780 --> 00:38:30,840 speaking. Seriously, I appreciate it. He's done the tools you're 642 00:38:31,200 --> 00:38:33,500 using, the information you provide us. Thank you so much. So 643 00:38:33,500 --> 00:38:37,900 from this, would everyone be cool singing Dave a happy birthday 644 00:38:37,900 --> 00:38:43,680 song? I think you'd really love it. We cool with this? Wait, the 645 00:38:43,680 --> 00:38:46,340 only problem is happy birthday, you gotta license it because it's 646 00:38:46,340 --> 00:38:50,600 going out on television. F. Okay. I did my job. You did your 647 00:38:50,600 --> 00:38:54,720 job. I got you something, though, Dave. There you go. Oh, 648 00:38:54,740 --> 00:39:00,780 thanks, man. So his birthday's on Monday if you see him. We'll see 649 00:39:00,780 --> 00:39:00,900 you next time. Bye. Bye. Bye. Bye. Bye. Bye. Bye. Bye. Bye. Bye. Bye. 650 00:39:02,780 --> 00:39:03,420 Bye. Bye. Bye. 651 00:39:03,420 --> 00:39:03,740 There you go. 652 00:39:10,440 --> 00:39:12,200 Is we good? No, 653 00:39:12,200 --> 00:39:15,900 that's not for boys and boys. The count of three. 654 00:39:15,980 --> 00:39:22,080 Count of three. One, two, three. Happy birthday to 655 00:39:23,080 --> 00:39:31,180 you. Happy birthday to you. Love you, man. Happy birthday. 656 00:39:31,200 --> 00:39:41,320 best present ever. Happy birthday to you. Thanks, everybody. Thanks, .com.