So my name is Wesley McGrew, and to give you a little bit of background on why I might be giving this talk, I'm going to tell you a little bit about the different hats that I wear. So my day job currently is at Mississippi State University, where I've been for some time now, where I teach at the National Forensics Training Center. We develop course material and provide free training to anyone affiliated with law enforcement, also wounded veterans that are coming back from Iraq and Afghanistan, to give them skills that are needed to join the workforce in processing digital evidence and computer crime and child pornography and things like that. So in that aspect of my job, I write about forensics, I teach forensics, we experiment with forensics in our lab. We have a very nice lab in Starkville. Mississippi for this. But then after hours, whenever I go home and I kick up my feet in the home office, I break things. So I operate McGrewsecurity.com, I'm McGrewsecurity on Twitter, and one of my favorite things to do is to find vulnerabilities in things, break things, penetration testing, that sort of thing. So with this talk, I'm sort of being informed by both sides of those things and wanting to provide something for both the forensic community and the law enforcement. So I'm going to talk a little bit more about the forensics geeks and the penetration testing geeks that are in here. So what inspired this talk was actually straight out of the DEF CON 19 call for papers. One of the first lines on the kind of talks that they were looking for is James Bond man from uncle type spy stuff, which is right up my alley. I love any kind of spy movie. I love any kind of heist movie. Basically anything where somebody steals something, I'm completely cool with that. Very entertaining stuff. So that really called out to me. And I'm really happy to see that there's a really huge spy versus spy theme to this conference. It's a lot of fun. So with that, I figured, okay, let's get sneaky with forensics and penetration testing, and that's what we're going to do right here in this talk. So to break it down, when we talk about covert post exploitation forensics, by covert we mean without the suspect's knowledge or the subject's knowledge. Whoever the target of this forensics is, we want them to be able to just go about their business as normal without really knowing that we're going after them. So as we'll talk about here in a little bit, the whole idea with traditional forensics is somebody comes and takes your stuff. They kick down your door, they haul you off, and they take your stuff. With that, you know, you're not going to continue your activities. You're not going to continue to steal things and SQL inject folks and stuff like that. So we want to be able to have the capability of performing forensics. We want to be able to perform forensics without the suspect knowing about it. So that brings up some interesting issues, which I'll discuss. By post exploitation, we mean that to accomplish this covert goal, we want to do this after we've compromised the system remotely or by some local back door. Any way we can get a meterpreter shell up and going works for this. And by forensics, for the folks who are not the forensics geeks in the audience, we are reconstructing data above and beyond what the subject anticipates. So the subject may be anybody from a standard, barely computer literate user who's downloading and trading child pornography over peer-to-peer sites all the way up to, you know, your elite hackers and stuff that take lots of operational security into account. But on the scale from that, from the lowest to the highest skill, there's essentially misunderstandings there as to how data is stored, what's recoverable. What's really deleted and what's really gone, and what can be reconstructed after the fact by a good examiner. And it's all about layers of abstraction. So most computer users see files on their desktop, files in their documents, files in their downloads. They know that when they put something in a recycling bin, they realize they can probably still go and get that back until they empty out their recycling bin. But that's the level of abstraction that they're looking at for their system. And they're not shown anything. There's nothing else underneath that to reveal how this all really works and how it's all really implemented and why it's so darn fast to delete a one gig file. So as you get more skilled with this stuff, and especially if you're into forensics and follow it or practice it, you begin to realize that the way file systems are implemented is perhaps a bit different than how you see it and interact with it on a daily basis. So when you delete files, they may not necessarily be gone. When you format a file system, that data still might be there. So basically by taking advantage of the subject's lack of knowledge of how everything works underneath there, we can pull back things that they thought that they had already gotten rid of. So with that, we've got the peanut butter and jelly sandwich here of forensics and penetration testing. And this is supposed to be something for both sides. So for the forensic side, we're introducing the aspect of being able to do this remotely and covertly without having to be on scene or without having to make the subject aware. And for the penetration testing side of things, we want to make this a tactic or a post-exploitation skill that can be leveraged to gather more information out of every system. So we want to be able to, for every system that we break into at a company, we want to be able to extract more data out of it, more personally identifiable information that may have previously been deleted. More information. And old emails and things like that that may get us into other systems. So on the forensics side of things, the implications of this is that we may run into a situation where it's no subject location, no problem. So for the guys that you see running around here with the Guy Fawkes masks on and things like that, they're like, good luck, I'm behind seven proxies. Well perhaps you might want to be very careful about the things that you run from here on out. Because something like this may give you away. It may allow people to do, forensics on your drives and anything without you knowing about it. This allows for surreptitious acquisition and analysis. And so the obvious question here is of privacy concerns and the legal ability for government federal agents and local agents and state agents and things like that to perform this kind of analysis. The way it stands right now is there exists surreptitious entry warrants to, in some situations, so that federal investigators can go in surreptitiously and examine things or place things. It's been used at least once that I know of to place keystroke recorders on a computer. I believe that was a SCARFO or something. It was a mafia organized crime case. So the legal framework may be there. I'm not a lawyer. I'm barely what you might even consider a fed, federally funded. So I don't know all the details of how to do that, but it's sort of a solution looking for the problem there. But the main thing for the forensics geeks for being able to perform forensics on these remote systems like this is that we can use these familiar tools. So people go to long training events for things like FTK and in case and things like that. Either that or they're very familiar with Brian Carrier's work and they use sleuth kit. And there's no point in having a new set of modules for doing post-exploitation forensics that doesn't work anything like the old ones. It's best if we can just leverage all that old training. So we can use those familiar tools, sleuth kit, the commercial tools like FTK and in case. There's a really good free tool that AccessData, who puts out a forensics toolkit, it publishes called FTK Imager. It was originally intended as just a way to have a license-free program on a computer. It's a very common USB drive that can image drives for you. So that you can take it out in the field or use it on as many computers as you want. You don't have to worry about having your USB dongle for FTK with you. Well, it's actually kind of grown in capability and grown in capability. It turns out you can do some pretty cool stuff with just FTK Imager. And it's available free from their website, accessdata.com. On the other side of things, if you're a penetration testing geek, if you like to break things or hey, maybe even if you're a criminal, who knows, we'll call it penetration testing. For this side of things, you might get more value out of the systems that you break into. You may be able to get more important data out of every compromised system that you break into by using tactics like this if you suspect that that might be the case. There's always a situation for companies and organizations and individual systems that process sensitive data. They may need it for a short period of time. They may need time to verify something or to log it and send it off to some other location to encrypt it and back it up and everything like that. But there's always the statement there that we don't keep that kind of data. We don't keep sensitive data on this particular system or we don't keep this part of the data. We throw it out and anything and we save the stuff that's not sensitive. Or we encrypt that and then back it up over here. So what this will allow you to do is we can take advantage of weaknesses and how they go about that process. In order to recover remnants of that sensitive data that didn't get deleted quite as well as they thought it would. We may be able to find multiple revisions of files, old data, that sort of thing. Any kind of remnants of old source code or anything like that. Say if you built a program on a system, installed it and then removed the source code from it. Well, maybe we can go back and pull that back. A big thing that we cover in our Forensics Training Center classes is the concept of data carving. If all else is lost, if a file's been deleted and all the file system metadata that points to it is gone, there's still a good chance that there are portions or even whole files out there that aren't even pointed to by the operating system. So by doing signature analysis with the headers, basically we know what sequence of bytes a JPEG header starts with, GIF images, Word documents, things like that. If we know that, then we can set up a tool to go through every 512-byte sector of that image file or disk and look for those old files that aren't being pointed to anymore. One nice thing about the tools that I'm going to discuss here is since we're developing tools that essentially we map the victim's block devices to our local block devices, since we have the capability of doing that, in addition to running, off-the-shelf commercial or open source forensics tools, we can also just write our own scripts to manage things. So if you have a script that will go through a file system looking for personally identifiable information with regular expressions for social security numbers or credit card numbers or anything like that, then you can take those scripts that you would run on your local file system and just run it directly against the file system that you've mounted off of a victim's system. And all this is relatively stealthy with some caveats that we'll discuss. But overall, unless the victim is sharp, then it's going to go by pretty smoothly. So the typical forensic examination scenarios that you have right now are hardware seizure. You get a warrant and you go out and you take their stuff, basically. In commercial environments, in enterprise environments, you may have a situation where you have authorized software agents on the endpoint computer. So if I'm a forensic examiner or forensic investigator for a large company that has, you know, hundreds of machines or thousands of machines, each of those machines may have an in-case agent or an F-response agent on it that allows me to connect to it remotely from my examiner workstation and do some of the same things that we're talking about here, where we're able to look at the block devices directly, recover files, basically perform examinations remotely. The difference in this is that we don't have to have that agent anymore. So remote forensics without having to have the agent, without having to have the click-through or sign-on on user agreement saying, yeah, oh, yes, I agree that I may be investigated at any point. Most forensic examinations, if they're not done by taking your stuff, then they're done on-site. There are tools for forensic previews. Drives can be quickly hooked up by write blockers and to allow for... hooked up by write blockers to allow the examiner on-site to see if there's enough evidence there to warrant, you know, taking it with you and going further with it. Sometimes consent is given by the subject, and law enforcement are really good about convincing people to give consent. So a lot of people consent to being searched on their digital evidence, and it can quickly be looked at there. But in all these cases, the suspect or the subject is aware that they're being investigated. So here we have a situation where that may not necessarily be the case, and take that as you will as being informed. So with the covert remote forensics, we have an unaware subject. As long as it's a vulnerability in Metasploit or something that you can write a Metasploit module for to exploit this system, and it doesn't do crazy things to their desktop while it's doing it, which is the case with most of this stuff, it all works just perfectly fine. You're in, you get the meterpreter shell. The meterpreter shell itself has a very low footprint on the system. I'm not sure that it touches any files at all. It has a small memory footprint. It probably depends on the actual vulnerability being used as to the footprint. In this case, if there's no known physical location, it's not a deal killer anymore. Usually if you're going to get a warrant and you want to perform an investigation, a search and seizure, then you need to be able to say where that person is. But there may be situations where people are good at anonymizing themselves or coming in over borrowed wireless and things like that where you may not necessarily know where they physically are. And if you can make the case that I know that they're at this IP address and we can get them with this, then we can figure out their location once we get onto their system and start looking at their data that they have on that system. So in that case, you may have some sort of remote exploits if you have an IP address, or you may do some sort of client-side thing and then whenever it phones home to you, it's like, oh, there's the IP address right now once it calls back to you. So that gets all around all seven of those firewalls and proxies. We can have remote imaging. So the capabilities that these tools will allow you to have now are broken up into a few different things. We have three different tools. One's just for enumerating drives. The other tools, one of them is simply just a remote imaging solution, just the same thing as you would have for a handheld imager or an imaging program like DD on a local computer. This allows you to do essentially the DD process over the network through Meterpreter. But what's really cool is we have remote block device access. So remote physical drives and remote volumes on the victim Windows computers right now. Right now, just Windows. Remote devices on those computers, we can map those to local devices that we can run any tool we want to on. So this is good for folks who are in intelligence and don't really have to worry about the whole warrant thing. If the NSA wants to talk to me later, they can feel free. I'm not here hiring. There's penetration testers that are trying to up their post-exploitation game. So if you're a penetration tester and you want to be able to branch out from your systems more, you want to be able to say in your report, we pulled out more data than you normally pull out, this can help you out here. As far as compliance goes, it could be that, and I'm not very familiar with PCI and HIPAA and things like that, but if those standards, and other compliance standards, if those standards require the secure deletion of data, then these techniques will help you verify that. Because if you're simply looking at the file system through the normal meterpreter LS and getting files and things like that, you're looking at that very high level of abstraction that keeps you from seeing whether or not something was securely deleted. So we can verify if things have been wiped out. And finally, criminals can use this. Much like anything that's presented here, if crime is your thing, then that's the case. If you don't want crime being done against you, then this will inform you that maybe people might use it against you. So for the forensic side of things here for the penetration testers, at Mississippi State University, we have semester-long classes in digital forensics. So we teach them all about file system forensic analysis. We use Brian Carrier's file system forensic analysis book as the textbook. And we cover with them all the technical details of forensics. We talk to them about imaging and some of the legal aspects and things. We get law professors from Ole Miss to come help out with that. And it's a semester-long class. They have a project where they create cases, mock cases, based on a set of parameters we give them. And midway through the class, they swap up and investigate those cases. And then we usually have a mock trial at the end with real judges and attorneys. And we put them on the stand through cross-examination and all that. And it's a lot of fun. That's forensics on the long end scale, I think. It's a semester-long class. For law enforcement and veterans, we have more intense week-long classes that try to get them up to speed for doing simple examinations and giving them some information so that they can branch out from there or take some of our more advanced courses like the network forensics and some of the workshops that we're holding on commercial and open-source tools. We break those up into the week-long chunks. Now, for here at DEF CON, for penetration testers, we have, you know, one hour. Less than one hour, actually. So to teach you all about forensics is a little bit different. Now, I would say that most of our law enforcement and veterans are a little bit more motivated to learn than most of our undergraduate students. So I would like to think that the penetration testers who want to make more money off of their penetration tests and want to have better results would be very attentive and willing to do some personal research to get caught up on this. So with file system forensic analysis, we have a whole set of capabilities that are added on that aren't necessarily there with normal tools for looking at file systems like the LS and GET and things like that that are built into most exploitation tools. So of course we can get at allocated files, and really that's where it stops with most post-exploitation tools, where we can grab allocated files, and we can do things like forensics on their cookies and their browser history and grab a copy of their documents folder and things like that. But there's a lot more out there. There's deleted files. So if we delete a file on a file system, then typically either on NTFS, that file record is simply marked as bad. All the information in the file record is still there. All the data that's out on the disk is still there. If we delete a file on the FAT32 file systems, nowadays mostly used on USB drives and things like that, if we do that, then it simply changes the first character of the file name to mark it as being deleted. But all the information about where that is on the disk is still out there. There's a really interesting concept of Slack space, where we can essentially grab the bits and little bits and pieces of old files that are kind of sealed in time, sort of like the mosquitoes in amber from Jurassic Park. We can grab out some data on that. I'm going to talk a little bit more detail about that on the next slide. There's completely unallocated space, so eventually Windows may reuse one of those file records that was marked as deleted, as it will tend to do after some time, a surprisingly long time usually. But once that file record is reused or the disk is reformatted or there's a partial wipe or something like that, then the data of the file is perhaps still out there on the clusters and the sectors of the disk, and simply nothing's pointing to it. So we're down to data carving. We look for it by signatures, frequency analysis, that sort of thing. And most people have a misunderstanding about the differences between deleting and formatting and wiping. Essentially, if it didn't take very long for you to do it, then it didn't do it very securely. So it takes time to wipe a file. It takes time to reformat a disk with full wiping, and it'll take a better part of a day usually. And most file systems don't do this by default, and they don't do it by default because, one, it's very slow and it puts wear and tear on the drives and things like that. And Microsoft takes enough flack for Windows being slow already, and they're not going to introduce more slowness by forcing the user to sit there and wait while every file that's deleted is being wiped off the disk with overwritten zeros and ones and things. And finally, we can have the concept of imaging there, so getting a one-for-one copy of the target drive. So with the tools that we're going to show off here, we have the ability to... to image a remote drive, and if we can do it while the system's relatively calm, if we can get the system in a fairly stable state, heck, we could just take that image and boot it back up in VMware and have our very own local copy of the system to work with. Cool. So for Slackspace, typically when we have a file, it's allocated a set of clusters, and the clusters are essentially the way the operating system divides up the sectors of the disk. Every... every normal hard drive has 512 bytes per sector, and that's the smallest addressable unit of data that you can kind of pull off at a time. You request data sectors or groups of sectors at a time. The operating system will do one further on that and gather those sectors up into clusters, and it does that so that it can keep a bitmap of which clusters are allocated and which clusters aren't, and it can keep logical pointers to those clusters. Uh, that it uses to say, okay, this file's in this series of clusters, this series of clusters, and so on and so forth. Well, with this type of system, there is some space wasted at the end of files. If you have a file that does not end on a cluster boundary, then the rest of that cluster is wasted, essentially. It's... it's sitting there. It doesn't, um... It can't be used by the operating system to, uh... to, uh... to give it to another file or anything like that. It's just simply out there. So, uh, we have what's called Slack space there, and that Slack space will contain whatever data was in that... those sectors of that cluster before that file was allocated to it. So old files that have been deleted and then... and then, uh, brought back, uh, files that have been resized. So, uh, you'll see this quite frequently with, like, Info2 files and recycling bins. Those Info2 files that mark what files have been deleted will grow and shrink, and so you'll see the old contents of an Info2 in the Slack space of the current one. Um, in this case, we have two different kinds of Slack here. Uh, there's the RAM Slack, which is the remainder of data up until the next sector boundary, which is, uh, probably zeroed out. If you're looking at any Windows system past Windows 95B, that's gonna be zeroed out because that was historically what... what was containing, uh, data from RAM. So there would be a 512-byte buffer in RAM that would get written out to disk, and if you're only writing 20 bytes out... if you only put 20 bytes in there, then who knows what's in that rest of that 512-byte buffer. Uh, passwords and crazy stuff from programs in memory. Uh, that being a serious, uh, privacy concern, uh, Microsoft, uh, and most other modern operating systems have it rigged up to, uh, to zero that out. The remaining sectors in that cluster have the potential goodies. That's... that's old contents of files, uh, that are in there. Either... either contents of another version of this file or contents from some other, uh, file that was on the disk before. So, uh, the question is, is can we do all this on exploited systems already? And it's true. You can. Uh, but it may require loading your forensic tools onto the victim system. Uh, which would probably work, but there's a problem here is anytime we mess with the file system, anytime we load our forensic tools onto these things, we impact it. We may be overwriting deleted data. Uh, we're not that stealthy at that point. We may have a huge footprint on disk. Uh, and it's a little less elegant than what I'm proposing here. So with Metasploit, with Meterpreter, the, uh, the shell that you get whenever you, uh, or if you use the Meterpreter payloads, the shell that you get, um, with Meterpreter, there's a... a, uh, function or some functionality built into Meterpreter called Railgun, which really makes this stuff very easy. Uh, Railgun's by a guy who goes by the name Patrick H. Uh, dropping, trying to drop docs on him and anything. I can't find anything else about him. I don't know. I guess I could send him an email and tell him thanks, but if any of you know Patrick H.V.E. and anybody here Patrick H.V.E.? Five hands? Okay. Um, so, so, uh, if you're out there, massive thanks for making this dead easy. So Patrick H.V.E. has an extension from Interpreter Ruby and basically on your local attacker post exploitation scripts or post modules, you can make Windows API calls to the victim's host and get your data right back in your, uh, the return values right back in your, uh, in your local Ruby script. So basically we can make all sorts of arbitrary Windows API calls locally and just have the results just piped right back to us. So it's awesome for this. If we can call the Windows API remotely, we can access the disk like Windows does. We can access physical and logical block devices directly as long as we have permissions to do so. Uh, which means we can read arbitrary sectors from the disk and then really from that point on, that's all you need to do forensics. If we can say I want that sector, I want that sector, then we're good. We can start traversing out the master file tables and things like that and, uh, get at it. So why not make this really dead easy and map those remote block devices to local ones? So we have three tools for that. Uh, enum drives, which, uh, simply lists out the physical drives and volumes so you know what you're playing with. Uh, there's an imager that does byte for byte imaging, hashing, split images, all sorts of things that you would expect out of, uh, normal forensics tools. Uh, for imaging DD, uh, image masters and, and, uh, and talons and things like that, all your handheld imagers. It can do all this sort of stuff. But the coolest part of this is nbdserver.rb. Now, all of this stuff should be in the Metasploit SVN right now. Uh, it was supposed to be in there a couple days ago for my black hat talk. I've been kind of avoiding the internet around here. So, uh, so, uh, somebody else can verify this for me. But if you do an SVN update, along with all the back doors that the guys here are injecting, uh, you might get these tools as well. Uh, if not, then I'll make sure that they're available. Uh, with nbdserver, uh, you can run your forensics tools locally on local block devices that are mapped to remote block devices. The way we do this is through a dirty, dirty hack. Uh, I didn't feel like implementing my own block device drivers or anything like that. But there's a protocol in Linux called nbd which is a really dead easy protocol all to get programmatic block devices. So you can implement your own block device in code and just have it listening over tcp locally or remotely or whatever you want to do really. Uh, so with nbd we can, uh, we can map these things to local block devices that we can then do reading with. And the way this code works, the way it works as distributed, there's only read-only access. So, uh, essentially we're write blocking too. So we don't we have a minimal impact on the host. So now we can have direct access with open open source tools in Linux. Uh, so this is just essentially a diagram of how it all works out. We have, uh, the disk. Interpreter talks to it through the win API. Uh, Metasploit talks to Interpreter and, uh, locally we have Railgun uh, making those, uh, Railgun calls through the Windows API. We map dev nbd 0 through nbd to that disk on the target. And we run our forensics tools on it. And this works good for Linux tools because, uh, nbd is ported in Linux and everything. And so this is good for sleuth kit and all. But for Windows, uh, I was a bit, uh, I was kind of stumped. I was like, well, I'm gonna have to write a Windows block device driver or something like that to get this working in there. And then a couple of weeks ago, uh, preparing my slides for this talk and everything, I came up with a good stupid protocol trick to get this working in Windows very well. Uh, and that stupid protocol trick is to use i SCSI. So i SCSI is a little bit more complex of a protocol for block devices. But as it turns out, if I get an nbd block device in Linux, I can then map that as a i SCSI target in Linux and then have a Windows machine connect to that and treat it as a block device. So we have this stupid protocol trick where we're going over i SCSI, nbd, interpreter, Windows API and straight back from there to the disk. So the problems here, uh, you're going over a network, so your mileage may vary. If it's, uh, around the world, and over, you know, a phone line or something like that, then it's going to be slow. And, uh, and on the other hand, if it's a very fast network that you're doing this over, you may be able to get a lot of response out of it, but you may not be so stealthy at that point because you're, you know, pushing gigs of traffic over this thing. Uh, you may actually want to modify the code of this to, to, uh, try to, uh, throttle it if that's a problem. Um, on this, uh, it's possible that there's a good cleaner cross-platform implementation to this. Maybe instead of using NBD directly in Ruby, we, uh, make our own Ruby iSCSI target that we can use. How hard could it be? Uh, for the conclusions for this, if you're a pen tester, go out there and wring some more data out of the systems that you break into. Uh, if you're a criminal, you know, get caught. Uh, but from this we can build capability for forensic examiners and penetration testers and we can encourage people to use more secure wiping for their data. Now we're gonna roll into our demos real quick right, like right here. We're gonna see how much of this we can get through. We're gonna see if all three of my VMs will behave. If not, then I'll just go back to the ferret. Alright. You'll have to forgive me, I have some notes here on, on, uh, exactly how my demo goes. To introduce you to the actors in this demo, we have, we have our, uh, our victim over here running, uh, unpatched Windows XP Service Pack 3. I'm, I'm not on the wireless network. right now, so don't even try. Um, this thing is, is vulnerable to probably who knows how many things in Metasploit. We have our attacker here. Get out of my way, forensics machine. Uh, we have our attacker here running Metasploit. Uh, which we're gonna, uh, point at this thing. Uh, Metasploit here has, was updated 18 days ago. Metasploit 4 is out. Uh, I didn't want to update on here for fear of breaking my demo. Um, and over here we have a forensics machine running Windows 7 and we have access data FTK image you're on. So, the first thing I'm gonna do is I'm gonna make sure my victim didn't hop IP addresses on me. And we should be good. Yep. Still sitting there right where I left it. Thankfully. No low sec images up on it or anything. That's good. Alright, so we're going to use, you know, one of my favorite exploits of all time. You ever have a favorite exploit that, you know, just always works? MS 08067. That's one. That's one right there. Alright. And we're gonna set our payload. Let's zoom in a bit here. Oops. Windows interpreter bind TCP. The tab completion sometimes takes a little while. Alright, so we set our payload up. Set our remote host. Oops. 93. 155. Right where I left it. And we're gonna hit it. And big surprise, not quite 0 day and we have success. Alright. So, we're in. Now any vulnerability would work for this. Any exploit. If you got some 0 day to drop into Metasploit, feel free. Substitute is necessary. I'm keeping all my 0 day. So, for this we're gonna run some of these post modules here. We're gonna run the oops. Post windows gather. Gather. Enum drives. And that's gonna list out the one physical drive that's on that VM. A 40 gig physical drive. As well as the logical drives that are there. So, if that drive is partitioned out into multiple drive letters then it tells us about it. It also tells us the disks that are inserted. That's actually I think the DefCon CD that's in the DVD drive there. And now we map it to a block device. So we run the NBD server. And we tell it we want the C drive. So now for this we have the backslashes Windows style. You can do that in the meterpreter shell but you have to escape them. The forward slashes work just as well and you don't have to escape them. So, much easier to do that. So now we have an NBD server listening. And over here we can take a look at we can connect to that NBD server. So, we run NBD client. Local host. Running on port 1005. And we want to map it to dev NBD 0. So we've got that mapped. And now we can just take a look at it very quickly and verify that we are indeed looking at an NTFS disk here. So there's your partition boot record. And for my next trick we're going to mount that device directly. So now we can mount read only that device to a little mount point that I have here for my victim. And it takes it a moment to do that. So a lot of this stuff that you're doing with the remote forensics like this isn't the fastest stuff in the world. It's not nearly as responsive as working over a normal SATA cable. Some things take longer than others. This mount command took a while and tried to embarrass me during my black hat talk. But with that we can go into our victim and go into his documents and settings victim's victim is his username even. He wasn't holding out very high hopes. We can go to his desktop folder and there is a document full of personally identifiable information. We can How do I know that? There you go. And if you're wanting to take cell phone pictures and stuff don't bother. It's all from fakenamegenerator.com Alright so now we can run tools. All on this device as well so we can unmount that now. We can run forensic tools like NTFS undelete which is you know normally you'd want to use something like sleuthkit for this but this is kind of built in and quick and easy. So we can undelete any let's delete something first. See if it'll work. Actually let's just try undeleting csv's. I did delete a csv that was on here and we'll see if it finds it. If it doesn't we'll just move on. While that's working because that's going to take a moment we're going to start up a new tab here and start showing you the iSCSI capabilities here. So with iSCSI we have etc iet ietd.conf and we have a sudo make me a sandwich attacker so here we have this thing this device mapped to an iSCSI target on the windows side of things ok so it didn't find any deleted files there so that's fine we'll move on. On the windows side of things we can load up the iSCSI initiator which is a buggy piece of crap but it does work. I would hate to use this for anything other than leet hacks because relying on this for enterprise stuff would probably really suck. Let's see 93163 is my attacker. So quick connect to that and cross your fingers guys and hope this works. Oh I need to start the iSCSI service that would help iSCSI start alright now we should now we should be cooking with gas 168.93.163 168.93.163 168.93.163 168.93.163 come on Connection failed let's start that up again We'll give it one more chance here and we'll call it a wash Make sure my IP address hasn't hopped over here ah 164 you little bastard laughter sneaky. Just moving target there. So here we are. We're connected. So now we have a block device that we can use in FTK image or any of your favorite forensics tools at this point. File, add evidence item. And you can image these things. You can mount the images and use them in virtual machines, that sort of stuff. So we'll do it as a physical drive. And point it to physical drive one, which is the virtual disk over iSCSI moving over interpreter, moving over a million other protocols. And it takes this dandy time loading up. But it's a miracle it even works. So here we are. So now we're going to go ahead and load this up. And we're going to go ahead and load this up. And so speed improvements to this would be beneficial. We might implement some not chaining iSCSI and NBD would probably help matters. Oh, good. FTK images are not responding now. Oh, here it comes back. Just had to take its time. So now we have the physical drive here. We can navigate around this thing. We can look it on out. We can see it. We can see it. We can see it. We can see it. We can see it. We can see it. So we have an allocated space. We can run various and sundry undelete tools and any kind of scripts you have. And get all the nice emails that they deleted. So with that, that basically concludes my talk. We're going to be moving over to the question and answer room two which is approximately four or five miles around this whole thing and I'll answer any questions there. Thank you.