1 00:00:00,000 --> 00:00:05,760 So my name is Wesley McGrew, and to give you a little bit of background on why I might be giving this talk, 2 00:00:06,720 --> 00:00:09,180 I'm going to tell you a little bit about the different hats that I wear. 3 00:00:09,340 --> 00:00:13,920 So my day job currently is at Mississippi State University, where I've been for some time now, 4 00:00:14,480 --> 00:00:17,320 where I teach at the National Forensics Training Center. 5 00:00:17,520 --> 00:00:23,660 We develop course material and provide free training to anyone affiliated with law enforcement, 6 00:00:23,660 --> 00:00:27,660 also wounded veterans that are coming back from Iraq and Afghanistan, 7 00:00:28,040 --> 00:00:37,320 to give them skills that are needed to join the workforce in processing digital evidence 8 00:00:37,320 --> 00:00:41,800 and computer crime and child pornography and things like that. 9 00:00:42,180 --> 00:00:49,000 So in that aspect of my job, I write about forensics, I teach forensics, 10 00:00:49,100 --> 00:00:51,460 we experiment with forensics in our lab. 11 00:00:51,740 --> 00:00:53,640 We have a very nice lab in Starkville. 12 00:00:53,660 --> 00:00:54,440 Mississippi for this. 13 00:00:55,780 --> 00:01:03,140 But then after hours, whenever I go home and I kick up my feet in the home office, I break things. 14 00:01:03,740 --> 00:01:11,560 So I operate McGrewsecurity.com, I'm McGrewsecurity on Twitter, and one of my favorite things to do is 15 00:01:11,560 --> 00:01:15,800 to find vulnerabilities in things, break things, penetration testing, that sort of thing. 16 00:01:15,900 --> 00:01:21,360 So with this talk, I'm sort of being informed by both sides of those things and wanting 17 00:01:21,360 --> 00:01:23,640 to provide something for both the forensic community and the law enforcement. 18 00:01:23,660 --> 00:01:26,100 So I'm going to talk a little bit more about the forensics geeks and the penetration testing geeks that are in here. 19 00:01:27,140 --> 00:01:32,680 So what inspired this talk was actually straight out of the DEF CON 19 call for papers. 20 00:01:32,840 --> 00:01:40,160 One of the first lines on the kind of talks that they were looking for is James Bond man from uncle type spy stuff, 21 00:01:40,480 --> 00:01:42,200 which is right up my alley. 22 00:01:42,320 --> 00:01:43,580 I love any kind of spy movie. 23 00:01:43,800 --> 00:01:45,080 I love any kind of heist movie. 24 00:01:45,520 --> 00:01:49,500 Basically anything where somebody steals something, I'm completely cool with that. 25 00:01:49,620 --> 00:01:50,700 Very entertaining stuff. 26 00:01:51,020 --> 00:01:53,620 So that really called out to me. 27 00:01:53,660 --> 00:01:57,960 And I'm really happy to see that there's a really huge spy versus spy theme to this conference. 28 00:01:58,140 --> 00:01:58,700 It's a lot of fun. 29 00:01:59,780 --> 00:02:05,260 So with that, I figured, okay, let's get sneaky with forensics and penetration testing, 30 00:02:05,460 --> 00:02:07,440 and that's what we're going to do right here in this talk. 31 00:02:09,200 --> 00:02:13,720 So to break it down, when we talk about covert post exploitation forensics, 32 00:02:13,760 --> 00:02:17,260 by covert we mean without the suspect's knowledge or the subject's knowledge. 33 00:02:17,500 --> 00:02:23,440 Whoever the target of this forensics is, we want them to be able to just go about their business as normal 34 00:02:23,660 --> 00:02:26,680 without really knowing that we're going after them. 35 00:02:26,840 --> 00:02:33,060 So as we'll talk about here in a little bit, the whole idea with traditional forensics is 36 00:02:33,060 --> 00:02:34,640 somebody comes and takes your stuff. 37 00:02:34,760 --> 00:02:37,700 They kick down your door, they haul you off, and they take your stuff. 38 00:02:39,460 --> 00:02:42,180 With that, you know, you're not going to continue your activities. 39 00:02:42,420 --> 00:02:49,480 You're not going to continue to steal things and SQL inject folks and stuff like that. 40 00:02:49,620 --> 00:02:53,640 So we want to be able to have the capability of performing forensics. 41 00:02:53,660 --> 00:02:55,760 We want to be able to perform forensics without the suspect knowing about it. 42 00:02:55,980 --> 00:02:58,840 So that brings up some interesting issues, which I'll discuss. 43 00:02:59,820 --> 00:03:04,700 By post exploitation, we mean that to accomplish this covert goal, 44 00:03:04,880 --> 00:03:08,860 we want to do this after we've compromised the system remotely 45 00:03:08,860 --> 00:03:11,660 or by some local back door. 46 00:03:11,880 --> 00:03:15,880 Any way we can get a meterpreter shell up and going works for this. 47 00:03:16,600 --> 00:03:20,780 And by forensics, for the folks who are not the forensics geeks in the audience, 48 00:03:21,020 --> 00:03:23,220 we are reconstructing data above and beyond 49 00:03:23,660 --> 00:03:25,000 what the subject anticipates. 50 00:03:25,140 --> 00:03:31,600 So the subject may be anybody from a standard, barely computer literate user 51 00:03:31,600 --> 00:03:35,160 who's downloading and trading child pornography over peer-to-peer sites 52 00:03:35,160 --> 00:03:38,620 all the way up to, you know, your elite hackers and stuff 53 00:03:38,620 --> 00:03:42,160 that take lots of operational security into account. 54 00:03:42,540 --> 00:03:47,960 But on the scale from that, from the lowest to the highest skill, 55 00:03:48,140 --> 00:03:52,280 there's essentially misunderstandings there as to how data is stored, 56 00:03:52,600 --> 00:03:53,520 what's recoverable. 57 00:03:53,660 --> 00:03:55,900 What's really deleted and what's really gone, 58 00:03:56,120 --> 00:03:59,860 and what can be reconstructed after the fact by a good examiner. 59 00:04:00,040 --> 00:04:01,940 And it's all about layers of abstraction. 60 00:04:02,340 --> 00:04:06,340 So most computer users see files on their desktop, 61 00:04:06,480 --> 00:04:08,320 files in their documents, files in their downloads. 62 00:04:08,640 --> 00:04:11,200 They know that when they put something in a recycling bin, 63 00:04:11,320 --> 00:04:13,540 they realize they can probably still go and get that back 64 00:04:13,540 --> 00:04:15,300 until they empty out their recycling bin. 65 00:04:15,500 --> 00:04:20,720 But that's the level of abstraction that they're looking at for their system. 66 00:04:21,200 --> 00:04:23,360 And they're not shown anything. 67 00:04:23,660 --> 00:04:27,400 There's nothing else underneath that to reveal how this all really works 68 00:04:27,400 --> 00:04:28,500 and how it's all really implemented 69 00:04:28,500 --> 00:04:31,400 and why it's so darn fast to delete a one gig file. 70 00:04:33,480 --> 00:04:36,260 So as you get more skilled with this stuff, 71 00:04:36,340 --> 00:04:40,440 and especially if you're into forensics and follow it or practice it, 72 00:04:40,600 --> 00:04:43,800 you begin to realize that the way file systems are implemented 73 00:04:43,800 --> 00:04:49,200 is perhaps a bit different than how you see it and interact with it on a daily basis. 74 00:04:49,400 --> 00:04:52,180 So when you delete files, they may not necessarily be gone. 75 00:04:52,260 --> 00:04:53,440 When you format a file system, 76 00:04:53,660 --> 00:04:55,060 that data still might be there. 77 00:04:55,320 --> 00:05:00,340 So basically by taking advantage of the subject's lack of knowledge 78 00:05:00,340 --> 00:05:02,080 of how everything works underneath there, 79 00:05:02,160 --> 00:05:04,800 we can pull back things that they thought that they had already gotten rid of. 80 00:05:06,300 --> 00:05:09,660 So with that, we've got the peanut butter and jelly sandwich here 81 00:05:09,660 --> 00:05:11,340 of forensics and penetration testing. 82 00:05:11,520 --> 00:05:13,140 And this is supposed to be something for both sides. 83 00:05:13,340 --> 00:05:17,820 So for the forensic side, we're introducing the aspect of being able to do this remotely 84 00:05:17,820 --> 00:05:20,980 and covertly without having to be on scene 85 00:05:20,980 --> 00:05:24,220 or without having to make the subject aware. 86 00:05:25,120 --> 00:05:27,380 And for the penetration testing side of things, 87 00:05:27,460 --> 00:05:32,740 we want to make this a tactic or a post-exploitation skill 88 00:05:32,740 --> 00:05:37,280 that can be leveraged to gather more information out of every system. 89 00:05:37,480 --> 00:05:42,880 So we want to be able to, for every system that we break into at a company, 90 00:05:42,960 --> 00:05:45,400 we want to be able to extract more data out of it, 91 00:05:45,480 --> 00:05:48,680 more personally identifiable information that may have previously been deleted. 92 00:05:49,660 --> 00:05:50,620 More information. 93 00:05:50,980 --> 00:05:54,100 And old emails and things like that that may get us into other systems. 94 00:05:54,520 --> 00:05:57,660 So on the forensics side of things, 95 00:05:57,840 --> 00:06:02,220 the implications of this is that we may run into a situation where it's 96 00:06:02,220 --> 00:06:04,020 no subject location, no problem. 97 00:06:04,300 --> 00:06:08,340 So for the guys that you see running around here with the Guy Fawkes masks on 98 00:06:08,340 --> 00:06:11,700 and things like that, they're like, good luck, I'm behind seven proxies. 99 00:06:11,820 --> 00:06:17,200 Well perhaps you might want to be very careful about the things that you run from here on out. 100 00:06:17,340 --> 00:06:19,180 Because something like this may give you away. 101 00:06:19,360 --> 00:06:20,400 It may allow people to do, 102 00:06:20,980 --> 00:06:25,120 forensics on your drives and anything without you knowing about it. 103 00:06:25,720 --> 00:06:28,620 This allows for surreptitious acquisition and analysis. 104 00:06:28,940 --> 00:06:32,040 And so the obvious question here is of privacy concerns 105 00:06:32,040 --> 00:06:38,740 and the legal ability for government federal agents and local agents 106 00:06:38,740 --> 00:06:42,920 and state agents and things like that to perform this kind of analysis. 107 00:06:43,940 --> 00:06:49,200 The way it stands right now is there exists surreptitious entry warrants 108 00:06:49,200 --> 00:06:50,880 to, in some situations, 109 00:06:50,980 --> 00:06:56,000 so that federal investigators can go in surreptitiously 110 00:06:56,000 --> 00:07:00,340 and examine things or place things. 111 00:07:00,560 --> 00:07:04,840 It's been used at least once that I know of to place keystroke recorders 112 00:07:04,840 --> 00:07:05,460 on a computer. 113 00:07:05,680 --> 00:07:08,160 I believe that was a SCARFO or something. 114 00:07:08,220 --> 00:07:10,340 It was a mafia organized crime case. 115 00:07:10,740 --> 00:07:13,740 So the legal framework may be there. 116 00:07:13,800 --> 00:07:14,940 I'm not a lawyer. 117 00:07:15,520 --> 00:07:19,500 I'm barely what you might even consider a fed, federally funded. 118 00:07:20,620 --> 00:07:24,720 So I don't know all the details of how to do that, 119 00:07:24,780 --> 00:07:27,580 but it's sort of a solution looking for the problem there. 120 00:07:27,860 --> 00:07:31,800 But the main thing for the forensics geeks for being able to perform forensics 121 00:07:31,800 --> 00:07:35,400 on these remote systems like this is that we can use these familiar tools. 122 00:07:35,740 --> 00:07:41,800 So people go to long training events for things like FTK and in case 123 00:07:41,800 --> 00:07:42,960 and things like that. 124 00:07:43,000 --> 00:07:46,700 Either that or they're very familiar with Brian Carrier's work 125 00:07:46,700 --> 00:07:47,740 and they use sleuth kit. 126 00:07:47,740 --> 00:07:52,940 And there's no point in having a new set of modules for doing post-exploitation forensics 127 00:07:53,300 --> 00:07:54,840 that doesn't work anything like the old ones. 128 00:07:54,980 --> 00:07:57,280 It's best if we can just leverage all that old training. 129 00:07:57,380 --> 00:08:03,020 So we can use those familiar tools, sleuth kit, the commercial tools like FTK and in case. 130 00:08:03,540 --> 00:08:08,820 There's a really good free tool that AccessData, who puts out a forensics toolkit, 131 00:08:09,080 --> 00:08:11,700 it publishes called FTK Imager. 132 00:08:11,820 --> 00:08:16,740 It was originally intended as just a way to have a license-free program 133 00:08:17,360 --> 00:08:17,720 on a computer. 134 00:08:17,740 --> 00:08:19,940 It's a very common USB drive that can image drives for you. 135 00:08:20,020 --> 00:08:22,760 So that you can take it out in the field or use it on as many computers as you want. 136 00:08:22,900 --> 00:08:26,860 You don't have to worry about having your USB dongle for FTK with you. 137 00:08:27,120 --> 00:08:29,720 Well, it's actually kind of grown in capability and grown in capability. 138 00:08:30,040 --> 00:08:32,820 It turns out you can do some pretty cool stuff with just FTK Imager. 139 00:08:32,900 --> 00:08:35,580 And it's available free from their website, accessdata.com. 140 00:08:38,840 --> 00:08:43,800 On the other side of things, if you're a penetration testing geek, 141 00:08:43,860 --> 00:08:46,720 if you like to break things or hey, maybe even if you're a criminal, 142 00:08:46,720 --> 00:08:49,840 who knows, we'll call it penetration testing. 143 00:08:50,680 --> 00:08:57,340 For this side of things, you might get more value out of the systems that you break into. 144 00:08:57,660 --> 00:09:03,140 You may be able to get more important data out of every compromised system that you break into 145 00:09:03,140 --> 00:09:06,120 by using tactics like this if you suspect that that might be the case. 146 00:09:06,380 --> 00:09:12,580 There's always a situation for companies and organizations and individual systems 147 00:09:12,580 --> 00:09:14,100 that process sensitive data. 148 00:09:14,460 --> 00:09:16,620 They may need it for a short period of time. 149 00:09:16,620 --> 00:09:20,520 They may need time to verify something or to log it and send it off to some other location 150 00:09:20,520 --> 00:09:23,460 to encrypt it and back it up and everything like that. 151 00:09:23,660 --> 00:09:27,900 But there's always the statement there that we don't keep that kind of data. 152 00:09:28,020 --> 00:09:30,800 We don't keep sensitive data on this particular system 153 00:09:30,800 --> 00:09:32,640 or we don't keep this part of the data. 154 00:09:32,700 --> 00:09:35,900 We throw it out and anything and we save the stuff that's not sensitive. 155 00:09:36,120 --> 00:09:38,640 Or we encrypt that and then back it up over here. 156 00:09:38,940 --> 00:09:43,440 So what this will allow you to do is we can take advantage of weaknesses 157 00:09:43,440 --> 00:09:46,060 and how they go about that process. 158 00:09:46,060 --> 00:09:50,000 In order to recover remnants of that sensitive data 159 00:09:50,000 --> 00:09:52,920 that didn't get deleted quite as well as they thought it would. 160 00:09:54,020 --> 00:09:58,900 We may be able to find multiple revisions of files, old data, that sort of thing. 161 00:09:59,840 --> 00:10:03,500 Any kind of remnants of old source code or anything like that. 162 00:10:03,580 --> 00:10:08,860 Say if you built a program on a system, installed it and then removed the source code from it. 163 00:10:08,880 --> 00:10:10,860 Well, maybe we can go back and pull that back. 164 00:10:11,380 --> 00:10:15,840 A big thing that we cover in our Forensics Training Center classes 165 00:10:15,840 --> 00:10:17,600 is the concept of data carving. 166 00:10:17,800 --> 00:10:21,620 If all else is lost, if a file's been deleted 167 00:10:21,620 --> 00:10:24,820 and all the file system metadata that points to it is gone, 168 00:10:26,420 --> 00:10:29,620 there's still a good chance that there are portions or even whole files 169 00:10:29,620 --> 00:10:33,280 out there that aren't even pointed to by the operating system. 170 00:10:33,440 --> 00:10:36,520 So by doing signature analysis with the headers, 171 00:10:36,560 --> 00:10:41,160 basically we know what sequence of bytes a JPEG header starts with, 172 00:10:41,380 --> 00:10:44,160 GIF images, Word documents, things like that. 173 00:10:44,160 --> 00:10:46,460 If we know that, then we can set up a tool 174 00:10:46,460 --> 00:10:51,200 to go through every 512-byte sector of that image file or disk 175 00:10:51,200 --> 00:10:54,620 and look for those old files that aren't being pointed to anymore. 176 00:10:56,620 --> 00:10:59,860 One nice thing about the tools that I'm going to discuss here 177 00:10:59,860 --> 00:11:07,420 is since we're developing tools that essentially we map the victim's block devices 178 00:11:07,420 --> 00:11:09,220 to our local block devices, 179 00:11:09,920 --> 00:11:12,440 since we have the capability of doing that, 180 00:11:12,580 --> 00:11:14,080 in addition to running, 181 00:11:14,160 --> 00:11:17,120 off-the-shelf commercial or open source forensics tools, 182 00:11:17,260 --> 00:11:19,640 we can also just write our own scripts to manage things. 183 00:11:20,200 --> 00:11:24,000 So if you have a script that will go through a file system 184 00:11:24,000 --> 00:11:26,380 looking for personally identifiable information 185 00:11:26,380 --> 00:11:30,280 with regular expressions for social security numbers 186 00:11:30,280 --> 00:11:32,280 or credit card numbers or anything like that, 187 00:11:32,660 --> 00:11:35,640 then you can take those scripts that you would run on your local file system 188 00:11:35,640 --> 00:11:37,640 and just run it directly against the file system 189 00:11:37,640 --> 00:11:39,560 that you've mounted off of a victim's system. 190 00:11:40,080 --> 00:11:43,720 And all this is relatively stealthy with some caveats that we'll discuss. 191 00:11:43,720 --> 00:11:48,080 But overall, unless the victim is sharp, 192 00:11:48,220 --> 00:11:51,300 then it's going to go by pretty smoothly. 193 00:11:53,900 --> 00:11:57,700 So the typical forensic examination scenarios that you have right now 194 00:11:57,700 --> 00:11:58,940 are hardware seizure. 195 00:11:59,160 --> 00:12:01,620 You get a warrant and you go out and you take their stuff, basically. 196 00:12:02,720 --> 00:12:05,940 In commercial environments, in enterprise environments, 197 00:12:06,280 --> 00:12:10,740 you may have a situation where you have authorized software agents 198 00:12:10,740 --> 00:12:12,120 on the endpoint computer. 199 00:12:12,120 --> 00:12:15,760 So if I'm a forensic examiner or forensic investigator 200 00:12:15,760 --> 00:12:18,500 for a large company that has, you know, 201 00:12:18,580 --> 00:12:21,280 hundreds of machines or thousands of machines, 202 00:12:21,580 --> 00:12:25,220 each of those machines may have an in-case agent 203 00:12:25,220 --> 00:12:28,220 or an F-response agent on it 204 00:12:28,220 --> 00:12:31,940 that allows me to connect to it remotely from my examiner workstation 205 00:12:31,940 --> 00:12:34,880 and do some of the same things that we're talking about here, 206 00:12:35,020 --> 00:12:39,320 where we're able to look at the block devices directly, 207 00:12:39,600 --> 00:12:40,400 recover files, 208 00:12:40,400 --> 00:12:43,360 basically perform examinations remotely. 209 00:12:44,240 --> 00:12:47,680 The difference in this is that we don't have to have that agent anymore. 210 00:12:47,880 --> 00:12:50,900 So remote forensics without having to have the agent, 211 00:12:50,980 --> 00:12:54,540 without having to have the click-through or sign-on on user agreement 212 00:12:54,540 --> 00:12:58,040 saying, yeah, oh, yes, I agree that I may be investigated at any point. 213 00:12:59,200 --> 00:13:04,080 Most forensic examinations, if they're not done by taking your stuff, 214 00:13:04,180 --> 00:13:05,320 then they're done on-site. 215 00:13:06,080 --> 00:13:08,520 There are tools for forensic previews. 216 00:13:08,540 --> 00:13:09,960 Drives can be quickly hooked up 217 00:13:10,400 --> 00:13:13,180 by write blockers and to allow for... 218 00:13:14,240 --> 00:13:15,780 hooked up by write blockers 219 00:13:15,780 --> 00:13:18,860 to allow the examiner on-site 220 00:13:19,170 --> 00:13:21,260 to see if there's enough evidence there 221 00:13:21,260 --> 00:13:23,760 to warrant, you know, taking it with you 222 00:13:23,760 --> 00:13:25,420 and going further with it. 223 00:13:27,580 --> 00:13:30,880 Sometimes consent is given by the subject, 224 00:13:31,280 --> 00:13:34,260 and law enforcement are really good 225 00:13:34,260 --> 00:13:36,040 about convincing people to give consent. 226 00:13:36,680 --> 00:13:39,340 So a lot of people consent to being searched 227 00:13:40,400 --> 00:13:41,120 on their digital evidence, 228 00:13:41,360 --> 00:13:43,800 and it can quickly be looked at there. 229 00:13:44,120 --> 00:13:45,320 But in all these cases, 230 00:13:45,360 --> 00:13:47,200 the suspect or the subject is aware 231 00:13:47,200 --> 00:13:48,440 that they're being investigated. 232 00:13:48,640 --> 00:13:50,620 So here we have a situation 233 00:13:50,620 --> 00:13:52,520 where that may not necessarily be the case, 234 00:13:52,680 --> 00:13:55,560 and take that as you will as being informed. 235 00:13:57,040 --> 00:13:59,160 So with the covert remote forensics, 236 00:13:59,240 --> 00:14:00,300 we have an unaware subject. 237 00:14:01,260 --> 00:14:04,260 As long as it's a vulnerability in Metasploit 238 00:14:04,260 --> 00:14:07,120 or something that you can write a Metasploit module for 239 00:14:07,120 --> 00:14:10,000 to exploit this system, 240 00:14:10,000 --> 00:14:12,660 and it doesn't do crazy things to their desktop 241 00:14:12,660 --> 00:14:14,060 while it's doing it, 242 00:14:14,120 --> 00:14:15,720 which is the case with most of this stuff, 243 00:14:16,540 --> 00:14:18,360 it all works just perfectly fine. 244 00:14:20,540 --> 00:14:22,520 You're in, you get the meterpreter shell. 245 00:14:22,700 --> 00:14:23,720 The meterpreter shell itself 246 00:14:23,720 --> 00:14:25,700 has a very low footprint on the system. 247 00:14:25,780 --> 00:14:27,820 I'm not sure that it touches any files at all. 248 00:14:27,960 --> 00:14:29,320 It has a small memory footprint. 249 00:14:30,080 --> 00:14:32,520 It probably depends on the actual vulnerability 250 00:14:32,520 --> 00:14:34,540 being used as to the footprint. 251 00:14:36,540 --> 00:14:39,340 In this case, if there's no known physical location, 252 00:14:39,340 --> 00:14:40,760 it's not a deal killer anymore. 253 00:14:41,000 --> 00:14:43,320 Usually if you're going to get a warrant 254 00:14:43,320 --> 00:14:45,160 and you want to perform an investigation, 255 00:14:45,380 --> 00:14:45,980 a search and seizure, 256 00:14:47,200 --> 00:14:51,640 then you need to be able to say where that person is. 257 00:14:52,180 --> 00:14:54,260 But there may be situations where people 258 00:14:54,260 --> 00:14:57,100 are good at anonymizing themselves 259 00:14:57,100 --> 00:15:00,380 or coming in over borrowed wireless 260 00:15:00,380 --> 00:15:01,100 and things like that 261 00:15:01,100 --> 00:15:02,260 where you may not necessarily know 262 00:15:02,260 --> 00:15:03,320 where they physically are. 263 00:15:03,600 --> 00:15:05,420 And if you can make the case that 264 00:15:05,420 --> 00:15:07,460 I know that they're at this IP address 265 00:15:07,460 --> 00:15:08,880 and we can get them with this, 266 00:15:09,720 --> 00:15:11,920 then we can figure out their location 267 00:15:11,920 --> 00:15:13,940 once we get onto their system 268 00:15:13,940 --> 00:15:15,660 and start looking at their data 269 00:15:15,660 --> 00:15:16,800 that they have on that system. 270 00:15:17,020 --> 00:15:18,460 So in that case, 271 00:15:19,700 --> 00:15:22,220 you may have some sort of remote exploits 272 00:15:22,220 --> 00:15:23,920 if you have an IP address, 273 00:15:24,220 --> 00:15:27,140 or you may do some sort of client-side thing 274 00:15:27,140 --> 00:15:28,760 and then whenever it phones home to you, 275 00:15:28,800 --> 00:15:31,480 it's like, oh, there's the IP address right now 276 00:15:33,320 --> 00:15:34,680 once it calls back to you. 277 00:15:35,960 --> 00:15:39,160 So that gets all around all seven of those firewalls 278 00:15:39,340 --> 00:15:39,740 and proxies. 279 00:15:41,080 --> 00:15:42,480 We can have remote imaging. 280 00:15:42,760 --> 00:15:45,260 So the capabilities that these tools 281 00:15:45,260 --> 00:15:46,360 will allow you to have now 282 00:15:46,360 --> 00:15:49,120 are broken up into a few different things. 283 00:15:49,200 --> 00:15:50,160 We have three different tools. 284 00:15:50,320 --> 00:15:51,900 One's just for enumerating drives. 285 00:15:52,380 --> 00:15:53,640 The other tools, 286 00:15:54,220 --> 00:15:56,320 one of them is simply just a remote imaging solution, 287 00:15:57,500 --> 00:15:59,700 just the same thing as you would have 288 00:15:59,700 --> 00:16:00,920 for a handheld imager 289 00:16:00,920 --> 00:16:03,300 or an imaging program like DD 290 00:16:03,300 --> 00:16:05,500 on a local computer. 291 00:16:05,700 --> 00:16:06,820 This allows you to do essentially 292 00:16:07,300 --> 00:16:09,080 the DD process over the network 293 00:16:09,340 --> 00:16:10,020 through Meterpreter. 294 00:16:10,940 --> 00:16:12,100 But what's really cool 295 00:16:12,100 --> 00:16:14,100 is we have remote block device access. 296 00:16:14,300 --> 00:16:15,760 So remote physical drives 297 00:16:15,760 --> 00:16:17,120 and remote volumes 298 00:16:17,120 --> 00:16:19,760 on the victim Windows computers right now. 299 00:16:19,780 --> 00:16:20,660 Right now, just Windows. 300 00:16:21,420 --> 00:16:23,180 Remote devices on those computers, 301 00:16:23,440 --> 00:16:25,540 we can map those to local devices 302 00:16:25,540 --> 00:16:28,380 that we can run any tool we want to on. 303 00:16:30,380 --> 00:16:33,180 So this is good for folks who are in intelligence 304 00:16:33,180 --> 00:16:34,500 and don't really have to worry 305 00:16:34,500 --> 00:16:35,660 about the whole warrant thing. 306 00:16:35,980 --> 00:16:37,620 If the NSA wants to talk to me later, 307 00:16:37,680 --> 00:16:38,620 they can feel free. 308 00:16:39,340 --> 00:16:40,360 I'm not here hiring. 309 00:16:42,020 --> 00:16:43,540 There's penetration testers 310 00:16:43,540 --> 00:16:46,040 that are trying to up their post-exploitation game. 311 00:16:46,360 --> 00:16:48,480 So if you're a penetration tester 312 00:16:48,480 --> 00:16:50,520 and you want to be able to branch out 313 00:16:50,520 --> 00:16:51,420 from your systems more, 314 00:16:51,480 --> 00:16:52,640 you want to be able to say in your report, 315 00:16:52,760 --> 00:16:54,220 we pulled out more data 316 00:16:54,220 --> 00:16:56,360 than you normally pull out, 317 00:16:56,840 --> 00:16:58,680 this can help you out here. 318 00:16:59,000 --> 00:17:00,500 As far as compliance goes, 319 00:17:00,620 --> 00:17:01,440 it could be that, 320 00:17:01,600 --> 00:17:04,780 and I'm not very familiar with PCI 321 00:17:04,780 --> 00:17:06,360 and HIPAA and things like that, 322 00:17:06,460 --> 00:17:08,660 but if those standards, 323 00:17:08,660 --> 00:17:11,080 and other compliance standards, 324 00:17:11,200 --> 00:17:14,420 if those standards require the secure deletion of data, 325 00:17:14,700 --> 00:17:17,840 then these techniques will help you verify that. 326 00:17:17,980 --> 00:17:20,740 Because if you're simply looking at the file system 327 00:17:20,740 --> 00:17:23,440 through the normal meterpreter LS 328 00:17:23,440 --> 00:17:26,340 and getting files and things like that, 329 00:17:26,460 --> 00:17:28,780 you're looking at that very high level of abstraction 330 00:17:28,780 --> 00:17:32,780 that keeps you from seeing 331 00:17:33,400 --> 00:17:35,440 whether or not something was securely deleted. 332 00:17:35,820 --> 00:17:38,640 So we can verify if things have been wiped out. 333 00:17:38,640 --> 00:17:41,260 And finally, criminals can use this. 334 00:17:41,400 --> 00:17:43,740 Much like anything that's presented here, 335 00:17:43,940 --> 00:17:45,640 if crime is your thing, 336 00:17:45,760 --> 00:17:47,620 then that's the case. 337 00:17:47,740 --> 00:17:50,200 If you don't want crime being done against you, 338 00:17:50,320 --> 00:17:52,500 then this will inform you 339 00:17:52,500 --> 00:17:54,440 that maybe people might use it against you. 340 00:17:56,980 --> 00:17:59,900 So for the forensic side of things here 341 00:17:59,900 --> 00:18:01,640 for the penetration testers, 342 00:18:03,740 --> 00:18:05,440 at Mississippi State University, 343 00:18:05,540 --> 00:18:07,140 we have semester-long classes 344 00:18:07,140 --> 00:18:09,080 in digital forensics. 345 00:18:09,160 --> 00:18:12,700 So we teach them all about file system forensic analysis. 346 00:18:12,840 --> 00:18:14,300 We use Brian Carrier's 347 00:18:14,300 --> 00:18:17,020 file system forensic analysis book as the textbook. 348 00:18:17,380 --> 00:18:18,840 And we cover with them 349 00:18:18,840 --> 00:18:20,460 all the technical details of forensics. 350 00:18:20,580 --> 00:18:23,160 We talk to them about imaging 351 00:18:23,160 --> 00:18:26,520 and some of the legal aspects and things. 352 00:18:26,660 --> 00:18:30,740 We get law professors from Ole Miss 353 00:18:30,740 --> 00:18:31,700 to come help out with that. 354 00:18:32,020 --> 00:18:33,980 And it's a semester-long class. 355 00:18:34,240 --> 00:18:36,820 They have a project where they create cases, 356 00:18:37,140 --> 00:18:37,640 mock cases, 357 00:18:37,780 --> 00:18:39,960 based on a set of parameters we give them. 358 00:18:40,420 --> 00:18:41,580 And midway through the class, 359 00:18:41,620 --> 00:18:44,380 they swap up and investigate those cases. 360 00:18:44,720 --> 00:18:47,440 And then we usually have a mock trial at the end 361 00:18:47,440 --> 00:18:49,060 with real judges and attorneys. 362 00:18:49,440 --> 00:18:50,820 And we put them on the stand 363 00:18:50,820 --> 00:18:52,700 through cross-examination and all that. 364 00:18:52,820 --> 00:18:53,460 And it's a lot of fun. 365 00:18:55,540 --> 00:18:58,520 That's forensics on the long end scale, I think. 366 00:18:58,580 --> 00:18:59,540 It's a semester-long class. 367 00:18:59,860 --> 00:19:01,700 For law enforcement and veterans, 368 00:19:01,980 --> 00:19:04,820 we have more intense week-long classes 369 00:19:04,820 --> 00:19:06,780 that try to get them up to speed 370 00:19:07,140 --> 00:19:09,580 for doing simple examinations 371 00:19:09,580 --> 00:19:11,700 and giving them some information 372 00:19:11,700 --> 00:19:13,180 so that they can branch out from there 373 00:19:13,180 --> 00:19:15,220 or take some of our more advanced courses 374 00:19:15,220 --> 00:19:16,540 like the network forensics 375 00:19:16,540 --> 00:19:18,740 and some of the workshops that we're holding 376 00:19:18,740 --> 00:19:20,360 on commercial and open-source tools. 377 00:19:20,580 --> 00:19:22,540 We break those up into the week-long chunks. 378 00:19:23,040 --> 00:19:24,460 Now, for here at DEF CON, 379 00:19:25,400 --> 00:19:27,060 for penetration testers, 380 00:19:27,160 --> 00:19:29,040 we have, you know, one hour. 381 00:19:29,160 --> 00:19:30,340 Less than one hour, actually. 382 00:19:30,520 --> 00:19:33,960 So to teach you all about forensics 383 00:19:33,960 --> 00:19:34,880 is a little bit different. 384 00:19:34,880 --> 00:19:38,120 Now, I would say that most of our law enforcement 385 00:19:38,120 --> 00:19:41,220 and veterans are a little bit more motivated 386 00:19:41,220 --> 00:19:43,260 to learn than most of our undergraduate students. 387 00:19:44,300 --> 00:19:47,380 So I would like to think that the penetration testers 388 00:19:47,380 --> 00:19:49,740 who want to make more money off of their penetration tests 389 00:19:49,740 --> 00:19:51,600 and want to have better results 390 00:19:51,600 --> 00:19:53,340 would be very attentive 391 00:19:53,340 --> 00:19:55,600 and willing to do some personal research 392 00:19:55,600 --> 00:19:57,820 to get caught up on this. 393 00:19:59,180 --> 00:20:01,420 So with file system forensic analysis, 394 00:20:01,540 --> 00:20:02,940 we have a whole set of capabilities 395 00:20:02,940 --> 00:20:04,060 that are added on 396 00:20:04,060 --> 00:20:06,300 that aren't necessarily there with normal tools 397 00:20:06,300 --> 00:20:07,380 for looking at file systems 398 00:20:07,380 --> 00:20:10,320 like the LS and GET and things like that 399 00:20:10,320 --> 00:20:12,540 that are built into most exploitation tools. 400 00:20:13,180 --> 00:20:15,600 So of course we can get at allocated files, 401 00:20:15,700 --> 00:20:16,800 and really that's where it stops 402 00:20:16,800 --> 00:20:19,200 with most post-exploitation tools, 403 00:20:19,380 --> 00:20:21,000 where we can grab allocated files, 404 00:20:21,100 --> 00:20:22,820 and we can do things like forensics 405 00:20:22,820 --> 00:20:25,180 on their cookies and their browser history 406 00:20:25,180 --> 00:20:28,420 and grab a copy of their documents folder 407 00:20:28,420 --> 00:20:29,540 and things like that. 408 00:20:30,560 --> 00:20:32,280 But there's a lot more out there. 409 00:20:32,340 --> 00:20:33,260 There's deleted files. 410 00:20:33,260 --> 00:20:35,520 So if we delete a file on a file system, 411 00:20:35,700 --> 00:20:39,420 then typically either on NTFS, 412 00:20:40,020 --> 00:20:42,360 that file record is simply marked as bad. 413 00:20:42,520 --> 00:20:44,780 All the information in the file record is still there. 414 00:20:44,980 --> 00:20:47,360 All the data that's out on the disk is still there. 415 00:20:48,240 --> 00:20:51,000 If we delete a file on the FAT32 file systems, 416 00:20:51,120 --> 00:20:53,900 nowadays mostly used on USB drives and things like that, 417 00:20:54,020 --> 00:20:56,220 if we do that, then it simply changes 418 00:20:56,220 --> 00:20:58,140 the first character of the file name 419 00:20:58,140 --> 00:20:59,180 to mark it as being deleted. 420 00:20:59,460 --> 00:21:02,280 But all the information about where that is on the disk 421 00:21:02,280 --> 00:21:03,300 is still out there. 422 00:21:04,360 --> 00:21:07,040 There's a really interesting concept of Slack space, 423 00:21:07,420 --> 00:21:11,900 where we can essentially grab the bits and little bits 424 00:21:11,900 --> 00:21:14,420 and pieces of old files that are kind of sealed in time, 425 00:21:14,620 --> 00:21:17,600 sort of like the mosquitoes in amber from Jurassic Park. 426 00:21:18,500 --> 00:21:20,860 We can grab out some data on that. 427 00:21:21,000 --> 00:21:22,680 I'm going to talk a little bit more detail about that 428 00:21:22,680 --> 00:21:23,360 on the next slide. 429 00:21:24,320 --> 00:21:26,420 There's completely unallocated space, 430 00:21:26,580 --> 00:21:29,680 so eventually Windows may reuse one of those file records 431 00:21:29,680 --> 00:21:30,900 that was marked as deleted, 432 00:21:30,900 --> 00:21:33,320 as it will tend to do after some time, 433 00:21:33,400 --> 00:21:35,040 a surprisingly long time usually. 434 00:21:35,640 --> 00:21:37,760 But once that file record is reused 435 00:21:37,760 --> 00:21:39,440 or the disk is reformatted 436 00:21:43,420 --> 00:21:45,940 or there's a partial wipe or something like that, 437 00:21:46,200 --> 00:21:50,240 then the data of the file is perhaps still out there 438 00:21:50,240 --> 00:21:52,400 on the clusters and the sectors of the disk, 439 00:21:52,620 --> 00:21:54,600 and simply nothing's pointing to it. 440 00:21:54,680 --> 00:21:55,720 So we're down to data carving. 441 00:21:55,860 --> 00:21:58,880 We look for it by signatures, frequency analysis, 442 00:21:59,120 --> 00:21:59,880 that sort of thing. 443 00:22:01,380 --> 00:22:03,040 And most people have a misunderstanding 444 00:22:03,040 --> 00:22:05,140 about the differences between deleting 445 00:22:05,140 --> 00:22:06,560 and formatting and wiping. 446 00:22:07,520 --> 00:22:10,000 Essentially, if it didn't take very long for you to do it, 447 00:22:10,040 --> 00:22:11,680 then it didn't do it very securely. 448 00:22:12,840 --> 00:22:15,720 So it takes time to wipe a file. 449 00:22:15,900 --> 00:22:19,000 It takes time to reformat a disk with full wiping, 450 00:22:19,140 --> 00:22:20,860 and it'll take a better part of a day usually. 451 00:22:23,060 --> 00:22:25,560 And most file systems don't do this by default, 452 00:22:25,660 --> 00:22:26,860 and they don't do it by default because, 453 00:22:26,920 --> 00:22:29,540 one, it's very slow and it puts wear and tear 454 00:22:29,540 --> 00:22:30,820 on the drives and things like that. 455 00:22:30,900 --> 00:22:34,220 And Microsoft takes enough flack 456 00:22:34,220 --> 00:22:35,540 for Windows being slow already, 457 00:22:35,760 --> 00:22:37,660 and they're not going to introduce more slowness 458 00:22:37,660 --> 00:22:41,020 by forcing the user to sit there and wait 459 00:22:41,020 --> 00:22:43,600 while every file that's deleted is being wiped off the disk 460 00:22:44,120 --> 00:22:46,160 with overwritten zeros and ones and things. 461 00:22:47,760 --> 00:22:52,920 And finally, we can have the concept of imaging there, 462 00:22:53,000 --> 00:22:55,360 so getting a one-for-one copy of the target drive. 463 00:22:55,520 --> 00:22:57,140 So with the tools that we're going to show off here, 464 00:22:58,280 --> 00:23:00,040 we have the ability to... 465 00:23:01,940 --> 00:23:03,420 to image a remote drive, 466 00:23:03,580 --> 00:23:05,780 and if we can do it while the system's relatively calm, 467 00:23:06,020 --> 00:23:08,440 if we can get the system in a fairly stable state, 468 00:23:09,160 --> 00:23:10,640 heck, we could just take that image 469 00:23:10,640 --> 00:23:12,000 and boot it back up in VMware 470 00:23:12,000 --> 00:23:14,960 and have our very own local copy of the system to work with. 471 00:23:15,180 --> 00:23:15,580 Cool. 472 00:23:16,660 --> 00:23:17,660 So for Slackspace, 473 00:23:19,140 --> 00:23:20,600 typically when we have a file, 474 00:23:22,640 --> 00:23:24,240 it's allocated a set of clusters, 475 00:23:24,340 --> 00:23:25,600 and the clusters are essentially the way 476 00:23:25,600 --> 00:23:29,020 the operating system divides up the sectors of the disk. 477 00:23:29,140 --> 00:23:29,500 Every... 478 00:23:29,500 --> 00:23:32,220 every normal hard drive 479 00:23:32,220 --> 00:23:35,080 has 512 bytes per sector, 480 00:23:35,280 --> 00:23:39,560 and that's the smallest addressable unit of data 481 00:23:39,560 --> 00:23:41,040 that you can kind of pull off at a time. 482 00:23:41,160 --> 00:23:44,160 You request data sectors or groups of sectors at a time. 483 00:23:44,780 --> 00:23:47,560 The operating system will do one further on that 484 00:23:47,560 --> 00:23:50,120 and gather those sectors up into clusters, 485 00:23:50,320 --> 00:23:52,500 and it does that so that it can keep a bitmap 486 00:23:52,500 --> 00:23:55,400 of which clusters are allocated and which clusters aren't, 487 00:23:55,400 --> 00:23:58,840 and it can keep logical pointers to those clusters. 488 00:23:59,500 --> 00:24:00,800 Uh, that it uses to say, 489 00:24:00,980 --> 00:24:03,160 okay, this file's in this series of clusters, 490 00:24:03,260 --> 00:24:05,100 this series of clusters, and so on and so forth. 491 00:24:05,560 --> 00:24:07,620 Well, with this type of system, 492 00:24:07,760 --> 00:24:09,880 there is some space wasted at the end of files. 493 00:24:10,880 --> 00:24:13,960 If you have a file that does not end on a cluster boundary, 494 00:24:15,020 --> 00:24:18,540 then the rest of that cluster is wasted, essentially. 495 00:24:18,640 --> 00:24:19,740 It's... it's sitting there. 496 00:24:19,840 --> 00:24:20,660 It doesn't, um... 497 00:24:21,680 --> 00:24:23,640 It can't be used by the operating system 498 00:24:23,640 --> 00:24:25,880 to, uh... to, uh... 499 00:24:25,880 --> 00:24:28,240 to give it to another file or anything like that. 500 00:24:28,240 --> 00:24:29,860 It's just simply out there. 501 00:24:30,020 --> 00:24:33,120 So, uh, we have what's called Slack space there, 502 00:24:33,220 --> 00:24:35,460 and that Slack space will contain whatever data 503 00:24:35,460 --> 00:24:38,140 was in that... those sectors of that cluster 504 00:24:38,140 --> 00:24:41,480 before that file was allocated to it. 505 00:24:41,540 --> 00:24:43,700 So old files that have been deleted 506 00:24:43,700 --> 00:24:45,740 and then... and then, uh, brought back, 507 00:24:45,800 --> 00:24:47,280 uh, files that have been resized. 508 00:24:47,600 --> 00:24:50,180 So, uh, you'll see this quite frequently 509 00:24:50,180 --> 00:24:52,580 with, like, Info2 files and recycling bins. 510 00:24:52,740 --> 00:24:55,720 Those Info2 files that mark what files have been deleted 511 00:24:55,720 --> 00:24:57,280 will grow and shrink, 512 00:24:57,280 --> 00:24:59,540 and so you'll see the old contents of an Info2 513 00:24:59,540 --> 00:25:01,300 in the Slack space of the current one. 514 00:25:02,000 --> 00:25:03,000 Um, in this case, 515 00:25:03,040 --> 00:25:04,900 we have two different kinds of Slack here. 516 00:25:05,080 --> 00:25:06,440 Uh, there's the RAM Slack, 517 00:25:06,640 --> 00:25:08,260 which is the remainder of data 518 00:25:08,260 --> 00:25:09,780 up until the next sector boundary, 519 00:25:10,020 --> 00:25:12,720 which is, uh, probably zeroed out. 520 00:25:12,820 --> 00:25:14,120 If you're looking at any Windows system 521 00:25:14,120 --> 00:25:16,840 past Windows 95B, that's gonna be zeroed out 522 00:25:16,840 --> 00:25:18,800 because that was historically 523 00:25:18,800 --> 00:25:20,700 what... what was containing, uh, 524 00:25:21,200 --> 00:25:22,420 data from RAM. 525 00:25:22,620 --> 00:25:25,080 So there would be a 512-byte buffer in RAM 526 00:25:25,080 --> 00:25:26,340 that would get written out to disk, 527 00:25:27,280 --> 00:25:28,900 and if you're only writing 20 bytes out... 528 00:25:28,900 --> 00:25:30,140 if you only put 20 bytes in there, 529 00:25:30,220 --> 00:25:33,240 then who knows what's in that rest of that 512-byte buffer. 530 00:25:33,720 --> 00:25:36,960 Uh, passwords and crazy stuff from programs in memory. 531 00:25:37,300 --> 00:25:40,300 Uh, that being a serious, uh, privacy concern, 532 00:25:40,480 --> 00:25:41,740 uh, Microsoft, uh, 533 00:25:42,020 --> 00:25:44,400 and most other modern operating systems 534 00:25:44,400 --> 00:25:45,800 have it rigged up to, uh, 535 00:25:46,040 --> 00:25:47,220 to zero that out. 536 00:25:47,400 --> 00:25:49,440 The remaining sectors in that cluster 537 00:25:50,520 --> 00:25:52,000 have the potential goodies. 538 00:25:52,180 --> 00:25:54,200 That's... that's old contents of files, 539 00:25:54,380 --> 00:25:55,400 uh, that are in there. 540 00:25:55,400 --> 00:25:57,640 Either... either contents of another version of this file 541 00:25:57,640 --> 00:25:59,560 or contents from some other, uh, 542 00:25:59,640 --> 00:26:01,000 file that was on the disk before. 543 00:26:02,620 --> 00:26:03,360 So, uh, 544 00:26:03,440 --> 00:26:05,180 the question is, is can we do all this on 545 00:26:05,180 --> 00:26:06,460 exploited systems already? 546 00:26:06,800 --> 00:26:08,080 And it's true. You can. 547 00:26:08,400 --> 00:26:11,280 Uh, but it may require loading your forensic tools 548 00:26:11,280 --> 00:26:12,480 onto the victim system. 549 00:26:12,920 --> 00:26:14,860 Uh, which would probably work, but 550 00:26:14,860 --> 00:26:16,160 there's a problem here is 551 00:26:16,160 --> 00:26:17,920 anytime we mess with the file system, 552 00:26:18,060 --> 00:26:20,080 anytime we load our forensic tools onto these things, 553 00:26:20,160 --> 00:26:22,840 we impact it. We may be overwriting deleted data. 554 00:26:23,120 --> 00:26:25,060 Uh, we're not that stealthy at that point. 555 00:26:25,400 --> 00:26:26,580 We may have a huge footprint on disk. 556 00:26:27,040 --> 00:26:28,820 Uh, and it's a little less elegant 557 00:26:28,820 --> 00:26:29,900 than what I'm proposing here. 558 00:26:30,840 --> 00:26:33,300 So with Metasploit, with Meterpreter, 559 00:26:33,400 --> 00:26:35,720 the, uh, the shell that you get whenever you, 560 00:26:35,960 --> 00:26:38,660 uh, or if you use the Meterpreter payloads, 561 00:26:38,660 --> 00:26:39,420 the shell that you get, 562 00:26:39,520 --> 00:26:41,580 um, with Meterpreter, 563 00:26:41,600 --> 00:26:43,180 there's a... a, uh, 564 00:26:43,300 --> 00:26:45,160 function or some functionality 565 00:26:45,160 --> 00:26:47,620 built into Meterpreter called Railgun, 566 00:26:47,780 --> 00:26:49,340 which really makes this stuff 567 00:26:49,340 --> 00:26:50,520 very easy. 568 00:26:50,700 --> 00:26:53,220 Uh, Railgun's by a guy 569 00:26:53,220 --> 00:26:55,320 who goes by the name Patrick H. 570 00:26:56,460 --> 00:26:57,340 Uh, dropping, 571 00:26:57,500 --> 00:26:59,400 trying to drop docs on him and anything. 572 00:26:59,580 --> 00:27:01,120 I can't find anything else about him. 573 00:27:01,180 --> 00:27:03,000 I don't know. I guess I could send him an email 574 00:27:03,000 --> 00:27:05,460 and tell him thanks, but if any of you 575 00:27:05,460 --> 00:27:06,960 know Patrick H.V.E. and 576 00:27:06,960 --> 00:27:08,880 anybody here Patrick H.V.E.? 577 00:27:08,880 --> 00:27:10,040 Five hands? Okay. 578 00:27:11,000 --> 00:27:13,100 Um, so, so, uh, 579 00:27:13,200 --> 00:27:15,120 if you're out there, massive thanks for making this 580 00:27:15,120 --> 00:27:17,160 dead easy. So Patrick H.V.E. 581 00:27:17,160 --> 00:27:18,780 has an extension from Interpreter Ruby 582 00:27:19,360 --> 00:27:21,500 and basically on your local attacker 583 00:27:22,100 --> 00:27:23,500 post exploitation scripts 584 00:27:23,500 --> 00:27:24,460 or post modules, 585 00:27:25,400 --> 00:27:27,160 you can make Windows API calls 586 00:27:27,160 --> 00:27:29,500 to the victim's host and get your data 587 00:27:29,500 --> 00:27:31,300 right back in your, uh, the return 588 00:27:31,300 --> 00:27:32,880 values right back in your, uh, 589 00:27:33,000 --> 00:27:35,100 in your local Ruby script. 590 00:27:35,340 --> 00:27:37,540 So basically we can make all sorts 591 00:27:37,540 --> 00:27:39,100 of arbitrary Windows API calls 592 00:27:39,100 --> 00:27:41,480 locally and just have the results just piped right back 593 00:27:41,480 --> 00:27:43,500 to us. So it's awesome for this. 594 00:27:43,720 --> 00:27:45,480 If we can call the Windows API remotely, 595 00:27:45,740 --> 00:27:47,320 we can access the disk like 596 00:27:47,320 --> 00:27:49,260 Windows does. We can access physical and 597 00:27:49,260 --> 00:27:51,280 logical block devices directly 598 00:27:51,280 --> 00:27:53,240 as long as we have permissions to do so. 599 00:27:53,560 --> 00:27:55,300 Uh, which means we can read arbitrary 600 00:27:55,400 --> 00:27:57,300 sectors from the disk and then really from that 601 00:27:57,300 --> 00:27:58,960 point on, that's all you need to do forensics. 602 00:27:59,120 --> 00:28:01,300 If we can say I want that sector, I want that 603 00:28:01,300 --> 00:28:03,420 sector, then we're good. We can start 604 00:28:03,420 --> 00:28:05,480 traversing out the master file tables 605 00:28:05,480 --> 00:28:07,200 and things like that and, uh, 606 00:28:07,200 --> 00:28:09,320 get at it. So why 607 00:28:09,320 --> 00:28:10,860 not make this really dead easy 608 00:28:11,220 --> 00:28:13,020 and map those remote block devices 609 00:28:13,020 --> 00:28:15,340 to local ones? So we have three 610 00:28:15,340 --> 00:28:17,340 tools for that. Uh, enum drives, 611 00:28:17,540 --> 00:28:19,360 which, uh, simply lists 612 00:28:19,360 --> 00:28:21,160 out the physical drives and volumes 613 00:28:21,160 --> 00:28:22,480 so you know what you're playing with. 614 00:28:22,820 --> 00:28:25,100 Uh, there's an imager that does 615 00:28:25,400 --> 00:28:27,360 byte for byte imaging, hashing, split images, 616 00:28:27,660 --> 00:28:29,440 all sorts of things that you would 617 00:28:29,440 --> 00:28:31,220 expect out of, uh, normal 618 00:28:31,220 --> 00:28:32,800 forensics tools. Uh, 619 00:28:33,120 --> 00:28:34,920 for imaging DD, uh, 620 00:28:35,100 --> 00:28:37,440 image masters and, and, uh, 621 00:28:37,500 --> 00:28:39,220 and talons and things like that, all your 622 00:28:39,220 --> 00:28:41,280 handheld imagers. It can do all this sort of stuff. 623 00:28:41,580 --> 00:28:43,240 But the coolest part of this is 624 00:28:43,980 --> 00:28:45,160 nbdserver.rb. Now, 625 00:28:45,220 --> 00:28:47,140 all of this stuff should be in the 626 00:28:47,140 --> 00:28:48,660 Metasploit SVN right now. 627 00:28:48,920 --> 00:28:51,300 Uh, it was supposed to be in there a couple days ago 628 00:28:51,300 --> 00:28:52,620 for my black hat talk. 629 00:28:53,220 --> 00:28:55,340 I've been kind of avoiding the internet around here. 630 00:28:55,400 --> 00:28:57,300 So, uh, so, uh, 631 00:28:57,540 --> 00:28:59,560 somebody else can verify this for me. 632 00:28:59,660 --> 00:29:00,680 But if you do an SVN update, 633 00:29:00,900 --> 00:29:03,120 along with all the back doors that the guys here 634 00:29:03,120 --> 00:29:05,260 are injecting, uh, you might get these tools 635 00:29:05,260 --> 00:29:07,360 as well. Uh, if not, then I'll make 636 00:29:07,360 --> 00:29:08,100 sure that they're available. 637 00:29:09,300 --> 00:29:10,920 Uh, with nbdserver, 638 00:29:11,000 --> 00:29:13,180 uh, you can run your forensics tools locally 639 00:29:13,180 --> 00:29:15,140 on local block devices that are mapped to remote 640 00:29:15,140 --> 00:29:17,320 block devices. The way we do this is 641 00:29:17,320 --> 00:29:18,820 through a dirty, dirty hack. Uh, 642 00:29:18,980 --> 00:29:21,220 I didn't feel like implementing my own block 643 00:29:21,220 --> 00:29:23,300 device drivers or anything like that. But there's 644 00:29:23,300 --> 00:29:25,380 a protocol in Linux called nbd 645 00:29:25,400 --> 00:29:27,440 which is a really dead easy protocol 646 00:29:27,440 --> 00:29:29,720 all to get programmatic 647 00:29:29,720 --> 00:29:31,520 block devices. So you can implement 648 00:29:31,520 --> 00:29:33,240 your own block device in 649 00:29:33,240 --> 00:29:35,400 code and just have it listening over tcp 650 00:29:35,400 --> 00:29:37,400 locally or remotely or whatever you want 651 00:29:37,400 --> 00:29:39,520 to do really. Uh, so with nbd 652 00:29:39,520 --> 00:29:41,540 we can, uh, we can map these things 653 00:29:41,540 --> 00:29:42,980 to local block devices 654 00:29:42,980 --> 00:29:45,260 that we can then do reading with. 655 00:29:45,420 --> 00:29:47,160 And the way this code works, the way it 656 00:29:47,160 --> 00:29:49,200 works as distributed, there's only read-only 657 00:29:50,040 --> 00:29:51,100 access. So, 658 00:29:51,240 --> 00:29:53,360 uh, essentially we're write 659 00:29:53,360 --> 00:29:54,660 blocking too. So we don't 660 00:29:55,400 --> 00:29:56,840 we have a minimal impact on the host. 661 00:29:58,100 --> 00:29:59,240 So now we can have 662 00:29:59,240 --> 00:30:00,720 direct access with open 663 00:30:00,720 --> 00:30:02,760 open source tools in Linux. 664 00:30:03,280 --> 00:30:05,300 Uh, so 665 00:30:05,300 --> 00:30:07,200 this is just essentially a diagram of how 666 00:30:07,200 --> 00:30:09,260 it all works out. We have, uh, 667 00:30:09,420 --> 00:30:11,380 the disk. Interpreter talks 668 00:30:11,380 --> 00:30:12,300 to it through the win API. 669 00:30:12,880 --> 00:30:15,040 Uh, Metasploit talks to Interpreter 670 00:30:15,040 --> 00:30:17,180 and, uh, locally we have Railgun 671 00:30:17,180 --> 00:30:19,200 uh, making those, uh, Railgun 672 00:30:19,200 --> 00:30:20,340 calls through the Windows API. 673 00:30:21,020 --> 00:30:23,000 We map dev nbd 0 674 00:30:23,000 --> 00:30:25,020 through nbd to that 675 00:30:25,400 --> 00:30:27,240 disk on the target. And we run our 676 00:30:27,240 --> 00:30:29,280 forensics tools on it. And this works good for Linux tools 677 00:30:29,280 --> 00:30:31,120 because, uh, nbd is 678 00:30:31,120 --> 00:30:33,220 ported in Linux and everything. And so this is good 679 00:30:33,220 --> 00:30:35,040 for sleuth kit and all. But for Windows, 680 00:30:35,840 --> 00:30:37,140 uh, I was a bit, uh, 681 00:30:37,220 --> 00:30:39,300 I was kind of stumped. I was like, well, I'm gonna have to write 682 00:30:39,300 --> 00:30:41,300 a Windows block device driver or something like 683 00:30:41,300 --> 00:30:43,360 that to get this working in there. And then a couple 684 00:30:43,360 --> 00:30:45,240 of weeks ago, uh, preparing 685 00:30:45,240 --> 00:30:47,200 my slides for this talk and everything, 686 00:30:47,320 --> 00:30:49,420 I came up with a good stupid protocol 687 00:30:49,420 --> 00:30:51,300 trick to get this working in Windows 688 00:30:51,300 --> 00:30:53,260 very well. Uh, and that 689 00:30:53,260 --> 00:30:55,060 stupid protocol trick is to use i 690 00:30:55,400 --> 00:30:57,240 SCSI. So i SCSI is a little bit more complex 691 00:30:57,240 --> 00:30:58,980 of a protocol for block devices. 692 00:30:59,240 --> 00:31:01,220 But as it turns out, if I get an nbd 693 00:31:01,220 --> 00:31:02,580 block device in Linux, 694 00:31:03,160 --> 00:31:05,420 I can then map that as a i SCSI 695 00:31:05,420 --> 00:31:07,140 target in Linux and then have a Windows 696 00:31:07,140 --> 00:31:09,380 machine connect to that and treat it as 697 00:31:09,380 --> 00:31:11,200 a block device. So we have this stupid protocol 698 00:31:11,200 --> 00:31:13,100 trick where we're going over i SCSI, 699 00:31:13,280 --> 00:31:15,340 nbd, interpreter, Windows API 700 00:31:15,340 --> 00:31:17,300 and straight back from there to the disk. 701 00:31:18,940 --> 00:31:21,360 So the problems here, uh, you're going 702 00:31:21,360 --> 00:31:23,260 over a network, so your mileage may vary. 703 00:31:23,360 --> 00:31:25,380 If it's, uh, around the world, 704 00:31:25,400 --> 00:31:27,260 and over, you know, a phone line or something 705 00:31:27,260 --> 00:31:28,640 like that, then it's going to be slow. 706 00:31:29,420 --> 00:31:31,280 And, uh, and on the other hand, 707 00:31:31,320 --> 00:31:33,400 if it's a very fast network that you're doing this over, 708 00:31:33,500 --> 00:31:35,360 you may be able to get a lot of response out of it, 709 00:31:35,380 --> 00:31:37,340 but you may not be so stealthy 710 00:31:37,340 --> 00:31:39,300 at that point because you're, you know, pushing 711 00:31:39,300 --> 00:31:40,820 gigs of traffic over this thing. 712 00:31:41,600 --> 00:31:43,320 Uh, you may actually want 713 00:31:43,320 --> 00:31:45,360 to modify the code of this to, to, uh, 714 00:31:45,400 --> 00:31:47,100 try to, uh, throttle it 715 00:31:47,100 --> 00:31:48,340 if that's a problem. 716 00:31:50,060 --> 00:31:51,180 Um, on this, uh, 717 00:31:51,640 --> 00:31:52,920 it's possible that there's a good 718 00:31:52,920 --> 00:31:55,320 cleaner cross-platform implementation to this. 719 00:31:55,400 --> 00:31:57,200 Maybe instead of using NBD 720 00:31:57,200 --> 00:31:59,240 directly in Ruby, we, uh, make 721 00:31:59,240 --> 00:32:00,780 our own Ruby iSCSI 722 00:32:01,340 --> 00:32:02,200 target that we can use. 723 00:32:03,260 --> 00:32:04,280 How hard could it be? 724 00:32:04,920 --> 00:32:07,220 Uh, for the conclusions for this, if you're a 725 00:32:07,220 --> 00:32:09,160 pen tester, go out there and wring some more data 726 00:32:09,160 --> 00:32:10,500 out of the systems that you break into. 727 00:32:11,040 --> 00:32:13,280 Uh, if you're a criminal, you know, get caught. 728 00:32:14,100 --> 00:32:14,500 Uh, 729 00:32:16,460 --> 00:32:17,440 but from this 730 00:32:17,440 --> 00:32:18,380 we can build capability 731 00:32:18,980 --> 00:32:21,560 for forensic examiners and penetration testers 732 00:32:21,560 --> 00:32:23,060 and we can encourage people to use 733 00:32:23,060 --> 00:32:24,560 more secure wiping for their data. 734 00:32:25,400 --> 00:32:27,280 Now we're gonna roll into our demos real quick 735 00:32:27,280 --> 00:32:28,640 right, like right here. We're gonna 736 00:32:28,640 --> 00:32:30,660 see how much of this we can get through. 737 00:32:30,800 --> 00:32:33,000 We're gonna see if all three of my VMs will behave. 738 00:32:35,600 --> 00:32:37,540 If not, then I'll just go back to the ferret. 739 00:32:41,060 --> 00:32:43,320 Alright. You'll have to forgive me, I have some notes here 740 00:32:43,320 --> 00:32:45,140 on, on, uh, exactly how my demo goes. 741 00:32:45,360 --> 00:32:47,200 To introduce you to the actors in this demo, 742 00:32:47,260 --> 00:32:49,120 we have, we have our, uh, our 743 00:32:49,120 --> 00:32:50,920 victim over here running, uh, 744 00:32:51,720 --> 00:32:53,560 unpatched Windows XP Service Pack 3. 745 00:32:53,740 --> 00:32:55,320 I'm, I'm not on the wireless network. 746 00:32:55,400 --> 00:32:56,420 right now, so don't even try. 747 00:32:57,060 --> 00:32:59,120 Um, this thing is, is vulnerable 748 00:32:59,120 --> 00:33:01,320 to probably who knows 749 00:33:01,320 --> 00:33:02,640 how many things in Metasploit. 750 00:33:02,860 --> 00:33:04,360 We have our attacker here. 751 00:33:04,820 --> 00:33:06,420 Get out of my way, forensics machine. 752 00:33:06,700 --> 00:33:09,040 Uh, we have our attacker here running Metasploit. 753 00:33:09,120 --> 00:33:11,740 Uh, which we're gonna, uh, point at this thing. 754 00:33:11,940 --> 00:33:13,520 Uh, Metasploit here 755 00:33:13,520 --> 00:33:15,540 has, was updated 18 days ago. 756 00:33:15,720 --> 00:33:16,840 Metasploit 4 is out. 757 00:33:16,960 --> 00:33:18,540 Uh, I didn't want to update on here 758 00:33:18,540 --> 00:33:20,100 for fear of breaking my demo. 759 00:33:20,960 --> 00:33:22,720 Um, and over here we have a 760 00:33:23,300 --> 00:33:25,240 forensics machine running Windows 7 761 00:33:25,400 --> 00:33:27,140 and we have access data FTK image 762 00:33:27,140 --> 00:33:27,480 you're on. 763 00:33:28,780 --> 00:33:30,820 So, the first thing I'm gonna do is I'm gonna make sure my 764 00:33:31,260 --> 00:33:33,140 victim didn't hop IP addresses on me. 765 00:33:35,780 --> 00:33:37,240 And we should be good. Yep. 766 00:33:37,320 --> 00:33:39,160 Still sitting there right where I left it. 767 00:33:39,860 --> 00:33:41,140 Thankfully. No low sec 768 00:33:41,140 --> 00:33:43,040 images up on it or anything. That's good. 769 00:33:45,720 --> 00:33:47,160 Alright, so we're going to 770 00:33:47,560 --> 00:33:49,220 use, you know, one of my favorite 771 00:33:49,220 --> 00:33:50,200 exploits of all time. 772 00:33:51,340 --> 00:33:53,400 You ever have a favorite exploit that, you know, 773 00:33:53,420 --> 00:33:54,440 just always works? 774 00:33:55,400 --> 00:33:57,080 MS 08067. That's one. 775 00:33:57,200 --> 00:33:58,020 That's one right there. 776 00:34:02,500 --> 00:34:03,120 Alright. 777 00:34:04,440 --> 00:34:05,300 And we're 778 00:34:05,300 --> 00:34:06,480 gonna set our payload. 779 00:34:07,420 --> 00:34:09,020 Let's zoom in a bit here. 780 00:34:11,100 --> 00:34:11,720 Oops. 781 00:34:13,560 --> 00:34:14,180 Windows 782 00:34:14,180 --> 00:34:15,260 interpreter 783 00:34:17,520 --> 00:34:18,760 bind TCP. 784 00:34:19,520 --> 00:34:21,400 The tab completion sometimes takes 785 00:34:21,400 --> 00:34:21,860 a little while. 786 00:34:23,000 --> 00:34:24,820 Alright, so we set our payload up. 787 00:34:25,400 --> 00:34:26,280 Set our remote host. 788 00:34:28,860 --> 00:34:29,340 Oops. 789 00:34:31,680 --> 00:34:32,160 93. 790 00:34:34,180 --> 00:34:34,660 155. 791 00:34:35,180 --> 00:34:36,260 Right where I left it. 792 00:34:37,100 --> 00:34:38,440 And we're gonna hit it. 793 00:34:40,340 --> 00:34:40,820 And 794 00:34:41,560 --> 00:34:42,960 big surprise, not 795 00:34:42,960 --> 00:34:45,140 quite 0 day and we have 796 00:34:45,140 --> 00:34:45,460 success. 797 00:34:46,880 --> 00:34:49,120 Alright. So, we're in. Now any 798 00:34:49,120 --> 00:34:51,300 vulnerability would work for this. Any exploit. 799 00:34:51,540 --> 00:34:52,960 If you got some 0 day to drop into 800 00:34:53,620 --> 00:34:54,600 Metasploit, feel free. 801 00:34:55,560 --> 00:34:56,420 Substitute is necessary. 802 00:34:56,660 --> 00:34:57,680 I'm keeping all my 0 day. 803 00:34:58,480 --> 00:35:01,080 So, for this we're gonna run some of these post modules 804 00:35:01,080 --> 00:35:01,540 here. 805 00:35:02,920 --> 00:35:04,220 We're gonna run the 806 00:35:05,100 --> 00:35:05,660 oops. 807 00:35:11,680 --> 00:35:13,260 Post windows gather. 808 00:35:16,160 --> 00:35:16,720 Gather. 809 00:35:19,220 --> 00:35:20,340 Enum drives. 810 00:35:22,240 --> 00:35:23,300 And that's gonna list 811 00:35:23,300 --> 00:35:25,180 out the one physical drive 812 00:35:25,400 --> 00:35:27,160 that's on that VM. A 40 gig physical drive. 813 00:35:27,380 --> 00:35:29,360 As well as the logical drives 814 00:35:29,360 --> 00:35:30,980 that are there. So, if that drive is 815 00:35:30,980 --> 00:35:33,440 partitioned out into multiple drive letters 816 00:35:33,440 --> 00:35:35,400 then it tells us about it. It also tells us 817 00:35:35,400 --> 00:35:37,220 the disks that are inserted. That's actually 818 00:35:37,220 --> 00:35:39,060 I think the DefCon CD that's in the 819 00:35:39,060 --> 00:35:40,220 DVD drive there. 820 00:35:43,540 --> 00:35:45,280 And now we map it to 821 00:35:45,280 --> 00:35:46,880 a block device. So we run 822 00:35:47,240 --> 00:35:48,140 the NBD server. 823 00:35:50,800 --> 00:35:52,420 And we tell it we want 824 00:35:53,040 --> 00:35:54,560 the C drive. So 825 00:35:55,400 --> 00:35:57,380 now for this we have the backslashes 826 00:35:57,380 --> 00:35:59,280 Windows style. You can 827 00:35:59,280 --> 00:36:01,100 do that in the meterpreter shell 828 00:36:01,100 --> 00:36:03,160 but you have to escape them. The 829 00:36:03,160 --> 00:36:05,280 forward slashes work just as well and you don't have to 830 00:36:05,280 --> 00:36:07,260 escape them. So, much easier 831 00:36:07,260 --> 00:36:09,320 to do that. So now we have an NBD server 832 00:36:09,320 --> 00:36:11,200 listening. And over here 833 00:36:11,200 --> 00:36:13,280 we can take a look at 834 00:36:13,280 --> 00:36:15,460 we can connect to that NBD server. 835 00:36:15,660 --> 00:36:16,700 So, we run 836 00:36:17,920 --> 00:36:18,680 NBD client. 837 00:36:21,460 --> 00:36:22,420 Local host. 838 00:36:23,320 --> 00:36:25,180 Running on port 1005. 839 00:36:25,400 --> 00:36:26,440 And we want to map it to 840 00:36:26,440 --> 00:36:27,820 dev NBD 0. 841 00:36:29,660 --> 00:36:31,100 So we've got that mapped. 842 00:36:31,320 --> 00:36:33,540 And now we can just take a look at it 843 00:36:33,540 --> 00:36:35,200 very quickly and verify that we 844 00:36:35,200 --> 00:36:37,440 are indeed looking at 845 00:36:37,440 --> 00:36:39,400 an NTFS disk here. So there's 846 00:36:39,400 --> 00:36:40,440 your partition boot record. 847 00:36:43,340 --> 00:36:45,200 And for my next trick 848 00:36:45,200 --> 00:36:47,040 we're going to mount that device directly. 849 00:36:47,400 --> 00:36:49,460 So now we can mount 850 00:36:49,460 --> 00:36:50,440 read only 851 00:36:51,420 --> 00:36:52,360 that device 852 00:36:54,380 --> 00:36:54,940 to 853 00:36:55,400 --> 00:36:57,060 a little mount point that I have here 854 00:36:57,060 --> 00:36:57,760 for my victim. 855 00:37:00,240 --> 00:37:01,420 And it takes it a moment 856 00:37:01,420 --> 00:37:03,100 to do that. So 857 00:37:03,100 --> 00:37:05,040 a lot of this stuff that you're doing with the 858 00:37:05,040 --> 00:37:07,300 remote forensics like this isn't the fastest 859 00:37:07,300 --> 00:37:09,380 stuff in the world. It's not 860 00:37:09,380 --> 00:37:11,240 nearly as responsive as working over 861 00:37:11,240 --> 00:37:13,340 a normal SATA cable. Some things 862 00:37:13,340 --> 00:37:14,940 take longer than others. This mount command 863 00:37:15,400 --> 00:37:17,400 took a while and tried to embarrass me 864 00:37:17,400 --> 00:37:18,500 during my black hat talk. 865 00:37:19,920 --> 00:37:21,040 But with that 866 00:37:21,040 --> 00:37:22,300 we can go into our victim 867 00:37:22,960 --> 00:37:25,100 and go into his documents and settings 868 00:37:26,100 --> 00:37:26,700 victim's 869 00:37:26,700 --> 00:37:28,800 victim is his username even. 870 00:37:28,900 --> 00:37:31,140 He wasn't holding out very high hopes. 871 00:37:32,260 --> 00:37:33,320 We can go to his 872 00:37:33,320 --> 00:37:35,420 desktop folder and there is 873 00:37:35,420 --> 00:37:36,880 a document full of 874 00:37:37,220 --> 00:37:38,580 personally identifiable information. 875 00:37:39,220 --> 00:37:39,400 We can 876 00:37:40,540 --> 00:37:41,840 How do I know that? 877 00:37:43,180 --> 00:37:44,940 There you go. And if you're 878 00:37:44,940 --> 00:37:46,800 wanting to take cell phone pictures and stuff 879 00:37:46,800 --> 00:37:48,100 don't bother. It's all from 880 00:37:48,100 --> 00:37:49,520 fakenamegenerator.com 881 00:37:51,440 --> 00:37:52,460 Alright so 882 00:37:52,460 --> 00:37:55,200 now we can run tools. All on this device 883 00:37:55,400 --> 00:37:57,260 as well so we can unmount 884 00:37:57,260 --> 00:37:57,860 that now. 885 00:37:59,940 --> 00:38:01,320 We can run forensic tools 886 00:38:01,320 --> 00:38:03,100 like NTFS undelete 887 00:38:03,880 --> 00:38:05,120 which is you know 888 00:38:05,120 --> 00:38:07,080 normally you'd want to use something like sleuthkit 889 00:38:07,080 --> 00:38:09,100 for this but this is kind of built in 890 00:38:09,100 --> 00:38:10,080 and quick and easy. 891 00:38:11,620 --> 00:38:13,340 So we can undelete any 892 00:38:13,340 --> 00:38:14,840 let's delete something first. 893 00:38:17,880 --> 00:38:18,820 See if it'll work. 894 00:38:19,540 --> 00:38:21,400 Actually let's just try undeleting 895 00:38:21,400 --> 00:38:23,300 csv's. I did delete a csv that 896 00:38:23,300 --> 00:38:25,280 was on here and we'll see 897 00:38:25,400 --> 00:38:27,160 if it finds it. If it doesn't we'll just move on. 898 00:38:32,300 --> 00:38:33,240 While that's 899 00:38:33,240 --> 00:38:35,340 working because that's going to take a 900 00:38:35,340 --> 00:38:37,220 moment we're going to 901 00:38:37,220 --> 00:38:38,580 start up a new tab here 902 00:38:40,660 --> 00:38:43,060 and start showing you the iSCSI capabilities 903 00:38:43,060 --> 00:38:45,480 here. So with iSCSI 904 00:38:46,180 --> 00:38:47,200 we have 905 00:38:48,580 --> 00:38:49,100 etc 906 00:38:51,240 --> 00:38:51,760 iet 907 00:38:53,020 --> 00:38:54,060 ietd.conf 908 00:38:54,060 --> 00:38:54,580 and we have a 909 00:38:55,920 --> 00:38:57,440 sudo make me a sandwich 910 00:39:02,340 --> 00:39:02,860 attacker 911 00:39:03,820 --> 00:39:05,220 so here we have 912 00:39:07,720 --> 00:39:08,860 this thing this 913 00:39:08,860 --> 00:39:10,900 device mapped to an iSCSI target 914 00:39:11,520 --> 00:39:12,980 on the windows side of things 915 00:39:12,980 --> 00:39:15,220 ok so it didn't find any deleted 916 00:39:15,220 --> 00:39:17,200 files there so that's fine we'll move on. 917 00:39:17,540 --> 00:39:19,300 On the windows side of things we can 918 00:39:19,300 --> 00:39:20,500 load up the 919 00:39:22,020 --> 00:39:22,540 iSCSI 920 00:39:24,420 --> 00:39:25,300 initiator which is a 921 00:39:25,400 --> 00:39:27,240 buggy piece of crap but it 922 00:39:27,240 --> 00:39:29,360 does work. I would hate to use 923 00:39:29,360 --> 00:39:31,280 this for anything other than leet hacks because 924 00:39:31,280 --> 00:39:33,420 relying on this for enterprise stuff 925 00:39:33,420 --> 00:39:34,780 would probably really suck. 926 00:39:37,520 --> 00:39:39,480 Let's see 93163 927 00:39:39,480 --> 00:39:40,560 is my attacker. 928 00:39:41,940 --> 00:39:43,340 So quick connect to 929 00:39:43,340 --> 00:39:45,320 that and cross your fingers guys and hope 930 00:39:45,320 --> 00:39:45,820 this works. 931 00:39:53,020 --> 00:39:55,940 Oh I need to start the iSCSI service 932 00:39:55,940 --> 00:39:56,700 that would help 933 00:39:59,100 --> 00:39:59,780 iSCSI 934 00:39:59,780 --> 00:40:00,920 start 935 00:40:03,140 --> 00:40:03,820 alright 936 00:40:03,820 --> 00:40:05,020 now we should 937 00:40:05,020 --> 00:40:06,760 now we should be cooking with gas 938 00:40:08,380 --> 00:40:10,080 168.93.163 939 00:40:11,640 --> 00:40:12,020 168.93.163 940 00:40:15,120 --> 00:40:15,800 168.93.163 941 00:40:17,000 --> 00:40:17,640 168.93.163 942 00:40:17,640 --> 00:40:18,100 come on 943 00:40:28,300 --> 00:40:29,320 Connection failed 944 00:40:30,060 --> 00:40:31,660 let's start that up again 945 00:40:31,660 --> 00:40:33,480 We'll give it one more chance here and 946 00:40:33,480 --> 00:40:35,440 we'll call it a wash 947 00:40:37,600 --> 00:40:39,540 Make sure my IP address hasn't 948 00:40:39,540 --> 00:40:41,180 hopped over here ah 949 00:40:41,820 --> 00:40:43,560 164 you little bastard 950 00:40:43,560 --> 00:40:44,660 laughter 951 00:40:48,260 --> 00:40:56,760 sneaky. Just moving target there. So here we are. We're connected. So now we have a block device 952 00:40:56,760 --> 00:41:08,660 that we can use in FTK image or any of your favorite forensics tools at this point. File, add 953 00:41:08,660 --> 00:41:13,300 evidence item. And you can image these things. You can mount the images and use them in 954 00:41:13,300 --> 00:41:19,380 virtual machines, that sort of stuff. So we'll do it as a physical drive. And point it to 955 00:41:19,380 --> 00:41:25,980 physical drive one, which is the virtual disk over iSCSI moving over interpreter, moving over a 956 00:41:25,980 --> 00:41:31,260 million other protocols. And it takes this dandy time loading up. But it's a miracle it even 957 00:41:31,260 --> 00:41:43,280 works. So here we are. So now we're going to go ahead and load this up. And we're going to 958 00:41:44,540 --> 00:41:48,860 go ahead and load this up. And so speed improvements to this would be beneficial. We might 959 00:41:48,860 --> 00:41:59,660 implement some not chaining iSCSI and NBD would probably help matters. Oh, good. FTK images are not 960 00:41:59,660 --> 00:42:06,840 responding now. Oh, here it comes back. Just had to take its time. So now we have the 961 00:42:07,780 --> 00:42:13,140 physical drive here. We can navigate around this thing. We can look it on 962 00:42:13,140 --> 00:42:13,280 out. We can see it. We can see it. We can see it. We can see it. We can see it. We can 963 00:42:13,280 --> 00:42:20,760 see it. So we have an allocated space. We can run various and sundry undelete tools and any kind 964 00:42:20,760 --> 00:42:27,620 of scripts you have. And get all the nice emails that they deleted. So with that, that basically 965 00:42:27,620 --> 00:42:32,760 concludes my talk. We're going to be moving over to the question and answer room two which is 966 00:42:32,760 --> 00:42:39,040 approximately four or five miles around this whole thing and I'll answer any questions 967 00:42:39,040 --> 00:42:41,060 there. Thank you.