1 00:00:00,000 --> 00:00:04,740 I am the author of the digital forensics blog and Ion Forensics, which I will wholeheartedly admit 2 00:00:04,740 --> 00:00:08,620 that I have not done a very good job of updating lately. There's been a lot of talks going and 3 00:00:08,620 --> 00:00:14,180 we've been kind of insanely busy. I'm a certified forensic analyst. I've been in MCSE since the 4 00:00:14,180 --> 00:00:21,620 NT4 days and I am a QSA. Here's the agenda for the talk. We're going to go over what MAC times 5 00:00:21,620 --> 00:00:28,340 are, where they're stored, what a forensic timeline is, why it's useful, why do it the way 6 00:00:28,340 --> 00:00:35,000 that I do it, and then a little bit about actually doing it the way that I do it. A new tool 7 00:00:35,000 --> 00:00:39,400 that's come out recently that's really just made the way that I do it almost entirely 8 00:00:39,400 --> 00:00:43,560 automated. And then we're going to get into a little bit of time stamp alteration and time 9 00:00:43,560 --> 00:00:49,420 stomping. And the reason we're going to do that is because we've done a lot of cases in the 10 00:00:49,420 --> 00:00:55,160 spider labs where hackers have been using time stamp alteration to hide malware. So I'm 11 00:00:55,160 --> 00:00:58,320 going to show you how to defeat time stamp alteration. If we're going to do a lot of 12 00:00:58,320 --> 00:01:01,820 time, I'm going to try to do some demos where I'm actually going to run through creating a 13 00:01:01,820 --> 00:01:07,280 timeline, a super timeline, extracting the master file table and parsing it and showing you 14 00:01:07,280 --> 00:01:11,700 guys what some of these modified time stamps look like. We'll go through some of the tools 15 00:01:11,700 --> 00:01:17,180 that I'm going to use and then we'll do the conclusion. So MAC B times, what do they stand 16 00:01:17,180 --> 00:01:22,400 for? The MAC B times are derived from the file system metadata and they stand for modified, 17 00:01:22,680 --> 00:01:28,300 accessed, changed, which in this case means the MFT has been modified, and birth. We've 18 00:01:28,320 --> 00:01:32,260 got the MFT, which is the file creation time. The B is in parentheses because not all the file 19 00:01:32,260 --> 00:01:38,760 systems that we work on record a birth time stamp. For the purposes of the presentation, I'm 20 00:01:38,760 --> 00:01:45,400 focusing on NTFS. It's still the most common that we're seeing and we're seeing this in a lot of 21 00:01:45,400 --> 00:01:51,340 investigations. So where are the time stamps stored? They're stored in two places. They're 22 00:01:51,340 --> 00:01:57,260 both located in the master file table. The first is the dollar standard info attribute or the SI 23 00:01:58,320 --> 00:02:04,280 standard info. It stores the file metadata like flags and SID and data about data. The file owner 24 00:02:04,280 --> 00:02:10,720 and one set of MAC B time stamps. This is the time stamp that's collected by Windows Explorer when 25 00:02:10,720 --> 00:02:17,740 you sort by date or by utilities like FLS and map time and time stamp. All the other utilities 26 00:02:17,740 --> 00:02:22,160 related to the display of time stamps. This is where they pull them from, the standard info. And 27 00:02:22,160 --> 00:02:26,160 that did come straight from one of the TechNet blogs. I've got a reference down there at the 28 00:02:26,160 --> 00:02:27,000 bottom if you want to read it. 29 00:02:28,320 --> 00:02:34,720 The second attribute is dollar file name attribute or dollar FN. Contains the file name in 30 00:02:34,720 --> 00:02:41,120 Unicode and another set of MAC B time stamps. So it doesn't contain nearly as much information as SI. 31 00:02:41,420 --> 00:02:47,240 The important thing there is that it contains a second set of MAC time stamps. So the 32 00:02:47,240 --> 00:02:53,440 difference. Standard info can be modified by user level processes like time stop or any other 33 00:02:53,440 --> 00:02:58,100 editor. Pearl scripts, things like that. Dollar file name can 34 00:02:58,320 --> 00:03:01,940 only be modified by the system kernel. There are no known 35 00:03:01,940 --> 00:03:05,560 utilities that can accomplish this. Anti forensic or not. 36 00:03:05,800 --> 00:03:08,200 There's nothing out there right now. At least not that I know 37 00:03:08,200 --> 00:03:13,300 of. It's possible. Maybe somebody in the room knows. What 38 00:03:13,300 --> 00:03:16,480 is a forensic timeline? Forensic timeline is a string of digital 39 00:03:16,480 --> 00:03:19,440 events that's sorted into a format that can be easily read 40 00:03:19,440 --> 00:03:22,700 and interpreted by a human being. Extremely useful in 41 00:03:23,300 --> 00:03:26,440 breach investigations. It can contain events from a single 42 00:03:26,440 --> 00:03:30,360 source like just the file system or log files, registry 43 00:03:30,360 --> 00:03:34,880 hives, event logs, just about anything that you can think of 44 00:03:34,880 --> 00:03:38,920 that records some kind of time stamp in the file system can be 45 00:03:38,920 --> 00:03:42,640 dumped into a super timeline. It's really the only way I know 46 00:03:42,640 --> 00:03:47,340 of to get that sort of 30,000 foot view of what happened on a 47 00:03:47,340 --> 00:03:50,420 particular host around a specific time. So you generate 48 00:03:50,420 --> 00:03:53,020 some keywords, you generate some leads, maybe you've 49 00:03:53,020 --> 00:03:55,900 identified a piece of malicious software and you 50 00:03:56,440 --> 00:04:00,080 think, great, so it happened at 3 p.m. on a Friday. What else 51 00:04:00,080 --> 00:04:03,920 was happening on that machine at 3 o'clock on Friday? You generate 52 00:04:03,920 --> 00:04:07,400 a timeline, bump it up, make it a super timeline, add some logs 53 00:04:07,800 --> 00:04:11,400 and all of a sudden you can get an amazing picture of everything 54 00:04:11,400 --> 00:04:15,640 that was happening on that machine. So why is it useful? 55 00:04:16,060 --> 00:04:20,100 They are infinitely useful at pinpointing all or most intruder 56 00:04:20,100 --> 00:04:22,580 activity at a given point in time. It's also an excellent 57 00:04:22,580 --> 00:04:25,900 place to actually generate initial case leads and keywords. 58 00:04:26,440 --> 00:04:29,160 If you have an idea of what timeframe you might be looking 59 00:04:29,160 --> 00:04:32,820 at for a breach, you can just kind of go straight to that 60 00:04:32,820 --> 00:04:36,500 period and look at that day or that, you know, those few hours 61 00:04:36,500 --> 00:04:39,800 in a timeline. Periods of intruder activity will stick 62 00:04:39,800 --> 00:04:43,900 out like a sore thumb. Once you start using timelines and 63 00:04:43,900 --> 00:04:47,740 actually going through them, you'll see executable births and 64 00:04:47,740 --> 00:04:52,640 DLL births in the middle of the day where there's nothing else 65 00:04:52,640 --> 00:04:56,280 going on. Pretty obvious what's going on there when you see that. 66 00:04:57,280 --> 00:04:59,400 Identifying a starting point of intrusion is absolutely 67 00:04:59,400 --> 00:05:02,700 invaluable to finding other pieces of malware and kind of 68 00:05:02,700 --> 00:05:05,420 more of the total activity that took place on the system. Right? 69 00:05:05,480 --> 00:05:08,980 So you see, maybe you see some enumeration tools and 15 70 00:05:08,980 --> 00:05:12,860 minutes later you see some unknown executable and you can 71 00:05:12,860 --> 00:05:15,740 go ahead and pull that other executable out there and start 72 00:05:15,740 --> 00:05:21,000 looking at what it does and what it is. So when you actually add 73 00:05:21,000 --> 00:05:24,340 in the registry timeline info, you get a more complete picture 74 00:05:24,340 --> 00:05:26,200 of code being dropped, services being 75 00:05:26,440 --> 00:05:30,900 installed. You can even in some cases you see hacker activity or 76 00:05:30,900 --> 00:05:33,400 intruder activity where they've moved a window and that actually 77 00:05:33,400 --> 00:05:36,660 leaves what are called shell bags in the registry. So you can 78 00:05:36,660 --> 00:05:39,060 actually tell, you've got proof that there's an interactive 79 00:05:39,060 --> 00:05:41,460 session going on. So it's pretty amazing what you can 80 00:05:41,460 --> 00:05:45,120 actually see inside of some of these timelines. In some cases 81 00:05:45,120 --> 00:05:48,300 you see definitive proof of the user ID that was used to 82 00:05:48,300 --> 00:05:51,380 compromise the system. You might see the NT user dot dat file or 83 00:05:51,380 --> 00:05:56,040 some other files in a particular user profile get updated. So 84 00:05:56,440 --> 00:06:00,540 now we get to why we do it my way. Everybody's seen some of the 85 00:06:00,540 --> 00:06:03,880 forensic suites that are out there or probably have that will 86 00:06:03,880 --> 00:06:07,220 sort stuff in the timelines and you can do some of this stuff. 87 00:06:07,340 --> 00:06:12,360 It's very limited. My way is fast. It's super easy and it's 88 00:06:12,360 --> 00:06:15,460 extremely easy to search. Whether you're more comfortable 89 00:06:15,460 --> 00:06:18,120 with the command line or the search prompt or the find 90 00:06:18,120 --> 00:06:22,140 command, it's amazing how searchable it is. So instead of 91 00:06:22,140 --> 00:06:25,140 doing your traditional shotgun forensics where you're looking 92 00:06:26,440 --> 00:06:28,940 for something, you can use your scalpel and go after what you're 93 00:06:28,940 --> 00:06:31,920 actually looking for and what you want to find. And it's free 94 00:06:31,920 --> 00:06:34,940 more or less. There's really only one piece of this that I 95 00:06:34,940 --> 00:06:37,380 detailed that's not free. The rest of this is open source 96 00:06:37,380 --> 00:06:41,120 stuff. I can generate a timeline including full file 97 00:06:41,120 --> 00:06:43,980 system data on all the registry hives and search it for 98 00:06:43,980 --> 00:06:48,120 keywords, identify altered files before any of the GUI based 99 00:06:48,120 --> 00:06:52,540 utilities have even loaded an image or verified it. Sorry to 100 00:06:52,540 --> 00:06:54,660 all of you NCASE users, you're slow. 101 00:06:56,860 --> 00:06:59,760 In a few minutes here, if I've got time, and I think I will, 102 00:06:59,900 --> 00:07:03,960 I'm going to show you guys how I'm actually doing this stuff. So 103 00:07:03,960 --> 00:07:08,740 the first piece of this, doing it my way, is the command FLS. 104 00:07:08,980 --> 00:07:11,180 This is open source. It's available as part of the sleuth 105 00:07:11,180 --> 00:07:17,640 kit, which is a free download from sleuth kit.org. I highly 106 00:07:17,640 --> 00:07:20,140 recommend going out there and checking it out. I've got the 107 00:07:20,140 --> 00:07:24,380 command here or a sample command, FLS-M. Name your mount 108 00:07:24,380 --> 00:07:26,420 point. This could be slash for root. This could be slash for 109 00:07:26,440 --> 00:07:30,420 D, C dollar, whatever you want. It really doesn't matter. You're 110 00:07:30,420 --> 00:07:35,680 just labeling your drive here. Designate file system and it 111 00:07:35,680 --> 00:07:39,040 supports, I think, 16 different file systems, not just NTFS. 112 00:07:40,440 --> 00:07:42,500 Recursively you want to search and then you're going to point 113 00:07:42,500 --> 00:07:46,780 it at either a physical drive by name, so that could be replaced 114 00:07:46,780 --> 00:07:50,060 with physical drive 7, physical drive 2, whatever you have it 115 00:07:50,060 --> 00:07:53,260 plugged in. Or you can point it at a drive letter. You get 116 00:07:53,260 --> 00:07:55,740 varying results by pointing it at a drive letter. I haven't 117 00:07:55,740 --> 00:07:56,420 figured out why. You can point it at a drive letter and you can 118 00:07:58,480 --> 00:08:02,960 point it at a Z drive. Then you output it with the greater than 119 00:08:02,960 --> 00:08:06,180 to an actual body file. In this case I just called it FS body 120 00:08:06,180 --> 00:08:09,200 file. I've got a little detail here about what this command is 121 00:08:09,200 --> 00:08:13,600 actually doing. Dash M is just output it in a standard format. 122 00:08:13,860 --> 00:08:18,800 In this case it's time machine format. Dash C names the mount 123 00:08:18,800 --> 00:08:22,260 point. Again, I said there could be D, could be root, could be 124 00:08:22,260 --> 00:08:25,540 whatever you're working on. Dash F, designate file system type. 125 00:08:25,540 --> 00:08:29,080 Dash R, you display everything recursively and then point it 126 00:08:29,080 --> 00:08:33,080 out at a logical device. And then that greater than dumps it 127 00:08:33,080 --> 00:08:35,640 out to whatever kind of file you want to call it. It doesn't 128 00:08:35,640 --> 00:08:39,080 matter. Whatever you want. Now here's one of the interesting 129 00:08:39,080 --> 00:08:42,320 pieces and the piece that's not free. You can actually do this 130 00:08:42,320 --> 00:08:46,200 while you're on site using F response. F response will 131 00:08:46,200 --> 00:08:51,900 actually let you, using some magic and iSCSI, it will 132 00:08:51,900 --> 00:08:55,460 actually let you mount a local draw or a machine over the 133 00:08:55,540 --> 00:08:59,780 network as a local read only drive on your investigative 134 00:08:59,780 --> 00:09:03,340 machine. It's a pretty amazing piece of software and it is very, 135 00:09:03,460 --> 00:09:07,120 very worth it. I don't know if Matt's here. He may actually be 136 00:09:07,120 --> 00:09:12,780 here from F response. No? That's too bad. But it's great software 137 00:09:12,780 --> 00:09:15,260 and I highly recommend it. It is, like I said, the only piece 138 00:09:15,260 --> 00:09:18,180 of this that's not free. You can obviously also do this 139 00:09:18,180 --> 00:09:21,200 against a previously gathered image. But F response lets you 140 00:09:21,200 --> 00:09:23,500 do it while you're on site instead of sitting there reading 141 00:09:23,500 --> 00:09:25,000 a book waiting for an image to finish. 142 00:09:26,840 --> 00:09:29,700 FLS can also be run against a static image or postmortem 143 00:09:29,700 --> 00:09:33,500 image and you just point it. Same thing, slightly different 144 00:09:33,500 --> 00:09:39,360 with a little offset there. FLS-M, name your device and you 145 00:09:39,360 --> 00:09:42,880 do have to add an offset sometimes where the actual file 146 00:09:42,880 --> 00:09:45,400 system starts. Sometimes it will pick it up by itself. Sometimes 147 00:09:45,400 --> 00:09:48,660 you have to add the offset. Dash R so it's recursive again 148 00:09:48,660 --> 00:09:51,820 and then you just point it at wherever your image is sitting. 149 00:09:52,820 --> 00:09:55,420 So there's your path to image and that could be, you know, a 150 00:09:55,540 --> 00:09:59,000 USB drive or on your local drive or wherever your evidence 151 00:09:59,000 --> 00:10:03,260 sits. And then again, just spit it out to the body file. That 152 00:10:03,260 --> 00:10:07,640 sector offset can be found with the MLS tool which is also free 153 00:10:07,640 --> 00:10:11,220 and part of the sleuth kit. Very, very easy to use. You can 154 00:10:11,220 --> 00:10:14,440 also do this against a split image. You could have, you know, 155 00:10:14,460 --> 00:10:20,640 100 different 001, 002, 003, 004 files. You just go 001 space, 156 00:10:20,780 --> 00:10:25,440 002, 003 and it works the same way. Again, the offset's there. 157 00:10:26,720 --> 00:10:30,760 So here's what a body file looks like. And it's admittedly 158 00:10:30,760 --> 00:10:34,340 ugly. It's not user friendly at all. You'd actually have to know 159 00:10:34,340 --> 00:10:39,820 how many seconds from 1969 or 1970 is what this, what these 160 00:10:39,820 --> 00:10:43,960 numbers here designate for each time stamp. So obviously that's 161 00:10:43,960 --> 00:10:46,060 not something that you're going to want to look at and try to 162 00:10:46,060 --> 00:10:49,380 use. But something interesting to look at here on this slide is 163 00:10:49,380 --> 00:10:52,880 this, I have it highlighted in red here. You have this INET 164 00:10:52,880 --> 00:10:55,520 manager executable. And we're going to see that here in just 165 00:10:55,540 --> 00:11:00,900 a second. So turning FLS output into something that's actually 166 00:11:00,900 --> 00:11:04,180 useful and human readable is done with the Mac time Perl 167 00:11:04,180 --> 00:11:08,620 script. It's also available as part of the sleuth kit. And 168 00:11:08,620 --> 00:11:12,480 here's the sample command again. Perl Mac time dot PL dash 169 00:11:12,480 --> 00:11:16,360 D dash B pointed at your body file and again just output it 170 00:11:16,360 --> 00:11:20,040 out to a CSV file. The dash D is going to output it in a common 171 00:11:20,040 --> 00:11:22,580 to limited format. So it's really, really easy to use with 172 00:11:22,580 --> 00:11:25,520 Excel or open office or command line. You can put it anywhere 173 00:11:25,540 --> 00:11:28,200 and search it, do whatever you want. And then dash B just 174 00:11:28,200 --> 00:11:31,200 designates your path to the body file and you're outputting it to 175 00:11:31,200 --> 00:11:36,400 a timeline, FS timeline. So this is probably not going to show up 176 00:11:36,400 --> 00:11:40,040 very well and I apologize. It's hard to catch what a timeline 177 00:11:40,040 --> 00:11:44,760 looks like in Excel. But obviously once you've got it 178 00:11:44,760 --> 00:11:47,160 full screen on your own machine, it's pretty easy to use. 179 00:11:47,420 --> 00:11:51,420 And control F is extremely effective when you're actually 180 00:11:51,420 --> 00:11:55,520 looking at this stuff in Excel. So if you could see, if you 181 00:11:55,540 --> 00:11:57,740 can see what I've got up here on the screen is actually some 182 00:11:57,740 --> 00:12:01,920 intruder activity that I pulled from a real case. And you can 183 00:12:01,920 --> 00:12:04,640 actually see the attacker doing some pinging and trace routing 184 00:12:05,060 --> 00:12:09,900 and then actually installing a service and there's some folders 185 00:12:09,900 --> 00:12:14,920 showing up here like win system 32 mem dump and then immediately 186 00:12:14,920 --> 00:12:20,740 followed by a whole bunch of Perl P2X TMP files. Pretty 187 00:12:20,740 --> 00:12:23,600 scary stuff. Not something that you would normally see on a 188 00:12:24,260 --> 00:12:25,520 little POS right now. So I'm going to go ahead and show you 189 00:12:25,540 --> 00:12:25,720 what that looks like. So this is a great example of a 190 00:12:25,720 --> 00:12:29,080 register back of house server. So kind of a cool example there. 191 00:12:29,280 --> 00:12:33,800 So there's your standard file system timeline which can be 192 00:12:33,800 --> 00:12:37,120 incredibly useful. But you start adding information to it 193 00:12:37,120 --> 00:12:39,780 and you really get a much larger picture of what's going 194 00:12:39,780 --> 00:12:42,620 on. So call it a super timeline when you start adding more 195 00:12:42,620 --> 00:12:45,800 information to it. I like to add the registry times and I 196 00:12:45,800 --> 00:12:49,420 don't usually add a lot else. You really get data overload 197 00:12:49,420 --> 00:12:54,000 extremely quickly. But that being said, sometimes you're 198 00:12:54,000 --> 00:12:55,520 not finding a lot. Adding a lot of data is not going to get 199 00:12:55,520 --> 00:12:57,280 you anywhere. Adding everything you can can be very useful. So 200 00:12:57,280 --> 00:13:01,380 obviously you just got to use your best judgment there. So you 201 00:13:01,380 --> 00:13:04,460 can actually add the registry MAC times. They're recorded more 202 00:13:04,460 --> 00:13:08,120 or less the same way as the file system timelines. And you can do 203 00:13:08,120 --> 00:13:12,660 that with reg time. Reg time is actually not was not publicly 204 00:13:12,660 --> 00:13:16,040 available until fairly recently. It's a Perl script written by 205 00:13:16,040 --> 00:13:19,460 Harlan Carvey and is actually included in the SANS incident 206 00:13:19,460 --> 00:13:22,740 response and forensics tool kit and he's also made it available 207 00:13:23,340 --> 00:13:25,500 fairly recently on regripper.net. So that's kind of a 208 00:13:27,620 --> 00:13:33,540 look for it. Now we also get to log to timeline which has just 209 00:13:33,540 --> 00:13:36,640 about rendered me completely obsolete in the last three 210 00:13:36,640 --> 00:13:39,820 weeks. It's a great utility. It was written by Kristen 211 00:13:39,820 --> 00:13:44,260 Gunjenson. It adds in Windows event logs, Dr. Watson logs, 212 00:13:44,420 --> 00:13:48,120 IIS logs. There's 32 different modules. There's probably 40 by 213 00:13:48,120 --> 00:13:51,700 now. It's been two weeks since I looked. Just about anything 214 00:13:51,700 --> 00:13:54,820 that has time stamps in it, it will parse it and dump it out 215 00:13:54,820 --> 00:13:55,500 into a body of code. So it's a great tool to use when you're 216 00:13:55,520 --> 00:13:57,780 working on a body file for you. It's amazing. So thanks a lot, 217 00:13:57,840 --> 00:14:01,540 Kristen. I'm probably going to lose my job. We'll talk more 218 00:14:01,540 --> 00:14:04,540 about it here in a few minutes. But it's really good stuff. It's 219 00:14:04,540 --> 00:14:06,560 a little difficult to get it working the first time, but 220 00:14:06,560 --> 00:14:10,960 really, really worth it. So the process. You extract the 221 00:14:10,960 --> 00:14:15,200 registry hives from system root, Windows system 32 config and the 222 00:14:15,200 --> 00:14:19,700 NTUser.dat files for each of your respective users. XP, C 223 00:14:19,700 --> 00:14:23,520 documents and settings, it's user name and in Windows 7 it's 224 00:14:23,520 --> 00:14:25,500 under C user's user name. So it's a great tool to use. It's a 225 00:14:26,200 --> 00:14:31,760 very simple command again. You're going to name your hive 226 00:14:31,760 --> 00:14:36,640 name. And again, this is just more for so you know which hive 227 00:14:36,640 --> 00:14:40,060 you're looking at in the timeline. So HKLM Sam, security, 228 00:14:40,340 --> 00:14:44,080 software, system, and that HKUser, you can actually add 229 00:14:44,080 --> 00:14:47,160 the name of the user whose NTUser.dat file you're 230 00:14:47,160 --> 00:14:51,240 actually parsing, which is pretty cool. Really, really easy 231 00:14:51,240 --> 00:14:54,980 obviously to tell which user was doing what when you do that. So 232 00:14:56,580 --> 00:15:02,900 here's adding it to the body file. Perl regtime.PL dash M, same 233 00:15:02,900 --> 00:15:07,420 command, recursively. And then you point it at that actual hive 234 00:15:07,420 --> 00:15:10,340 file, C case is registry Sam in this case. And then you append 235 00:15:10,340 --> 00:15:13,720 it to that body file. And this is kind of important. Notice 236 00:15:13,720 --> 00:15:18,120 there's two greater than symbols there. Use one and you truncate 237 00:15:18,120 --> 00:15:21,620 your whole file. So it's kind of important to make sure that you 238 00:15:21,620 --> 00:15:24,960 append and not truncate all the work you just did. And then you 239 00:15:26,520 --> 00:15:29,240 repeat that. Using a single will crush the data and always 240 00:15:29,240 --> 00:15:32,680 make a copy of the body file before you start messing around. 241 00:15:32,900 --> 00:15:36,620 It's just good practice. Just in case. Because it happens. You 242 00:15:36,620 --> 00:15:38,760 repeat that for each of the hive files that you want to add, 243 00:15:38,960 --> 00:15:41,680 the NTUser.dat files you want to add, and you run MacTime 244 00:15:41,680 --> 00:15:45,180 again. And that's pretty much it. MacTime.PL, point it at 245 00:15:45,180 --> 00:15:49,640 your body file, spit it out to a super timeline. Here's a nice 246 00:15:49,640 --> 00:15:54,920 example of what the what it actually looks like in a few 247 00:15:54,980 --> 00:15:56,640 minutes. You can see it in text when you actually do a grep 248 00:15:56,640 --> 00:15:59,200 search against this. And it's actually got a really nice 249 00:15:59,200 --> 00:16:02,360 format. And remember I told you we were going to see that INET 250 00:16:02,360 --> 00:16:05,860 manager again? There's several time stamps here. And you see one 251 00:16:05,860 --> 00:16:10,140 in 2003, which is really odd. Because this machine wasn't even 252 00:16:10,140 --> 00:16:14,180 built until 2007. But we're going to see that here in just a 253 00:16:14,180 --> 00:16:16,560 second on the next slide. We'll explain that. Then you also see 254 00:16:16,560 --> 00:16:20,680 some other interesting files there. You see two paths. System 255 00:16:20,680 --> 00:16:24,480 32 INET manager and system 32 INET serve with the same 256 00:16:24,980 --> 00:16:28,640 executable name. Definitely kind of odd. So that's 257 00:16:28,640 --> 00:16:32,740 alteration. That's actually a live example of it. There's a 258 00:16:32,740 --> 00:16:35,060 couple interesting things there. There's two separate locations 259 00:16:35,060 --> 00:16:39,020 that I just talked about. System 32 and it's also an INET 260 00:16:39,020 --> 00:16:43,200 serve. And the binary in system 32 is actually memory dumping 261 00:16:43,200 --> 00:16:46,860 malware. The date on the binary doesn't fit the rest of the 262 00:16:46,860 --> 00:16:50,200 system timeline. Like I said, the server that this image came 263 00:16:50,200 --> 00:16:54,620 from originally wasn't even built until 2007. And I've got a 264 00:16:54,620 --> 00:16:58,700 highlight there. You see Sunday, November 16, 2003. And 265 00:16:58,700 --> 00:17:02,420 you see that's actually the modified and the birth date. You 266 00:17:02,420 --> 00:17:06,800 see the two time stamps. The M and the B is modified and birth. 267 00:17:07,280 --> 00:17:10,080 Right? So how do we find out if this is just some kind of 268 00:17:10,080 --> 00:17:14,640 anomaly or if this has actually been forcibly altered? It's 269 00:17:14,640 --> 00:17:18,100 actually easier than it sounds. But before we do that, let's 270 00:17:18,100 --> 00:17:21,560 talk about Vincent Liu who actually created the utility 271 00:17:21,560 --> 00:17:24,600 called TimeStop. And this is a little bit older in the 272 00:17:24,620 --> 00:17:29,840 interview, but this is pretty common what he has to say about 273 00:17:29,840 --> 00:17:34,000 forensics people in general. So Mr. Liu said, but forensic people 274 00:17:34,000 --> 00:17:37,220 don't know how good or bad their tools are and they're going to 275 00:17:37,220 --> 00:17:40,240 court based on evidence gathered with those tools. You should 276 00:17:40,240 --> 00:17:42,660 test the validity of tools you're using before you go to 277 00:17:42,660 --> 00:17:45,580 court. And that's what we've done and guess what? These 278 00:17:45,580 --> 00:17:49,400 tools can be fooled and we've proven it. Well, I agree, I 279 00:17:49,400 --> 00:17:53,040 suppose. Tools can be fooled. That's not that hard. Good 280 00:17:53,040 --> 00:17:54,320 investigators can't be fooled. 281 00:17:54,620 --> 00:17:56,240 I mean, if you see something like this, you've got to dig 282 00:17:56,240 --> 00:17:59,500 further, right? You can't just rely on the output of one single 283 00:17:59,500 --> 00:18:02,420 thing. You've got to verify this stuff. Another quote from him 284 00:18:02,420 --> 00:18:05,040 says, for any case that relies on digital forensic evidence, 285 00:18:05,300 --> 00:18:08,400 Liu says, it would be a cake walk to come in and blow the 286 00:18:08,400 --> 00:18:11,880 case up. I can take any machine and make it look guilty or not 287 00:18:11,880 --> 00:18:17,760 guilty. Whatever I want. Yeah. I beg to differ. He's wrong. So 288 00:18:17,760 --> 00:18:20,620 here's proving him wrong. And we're actually going to do, we're 289 00:18:20,620 --> 00:18:23,080 going to defeat time stamp alteration or at least show you 290 00:18:23,080 --> 00:18:24,600 how you can fix it. So here's proving him wrong. We're going to 291 00:18:24,620 --> 00:18:27,380 figure it out. So here's where that second set of time stamps 292 00:18:27,380 --> 00:18:30,460 and the master file table comes in. Dollar file name, right? It's 293 00:18:30,460 --> 00:18:33,940 not accessible to anything but the system kernel. As of the 294 00:18:33,940 --> 00:18:36,420 writing of this presentation, there is nothing known that can 295 00:18:36,420 --> 00:18:40,200 change these attributes on the system short of extracting it, 296 00:18:40,340 --> 00:18:44,400 modifying it and putting it back on a live system. So it's not 297 00:18:44,980 --> 00:18:50,160 feasible. It could be done, but there would be, it would be a 298 00:18:50,160 --> 00:18:53,060 mess. I guarantee, or I can almost guarantee that the 299 00:18:53,060 --> 00:18:54,600 machine wouldn't even work again. If you don't have the 300 00:18:54,620 --> 00:18:58,300 software to do that. So how do we get to these attributes? It 301 00:18:58,300 --> 00:19:01,120 makes some sense out of the MFT because it's a disaster if you 302 00:19:01,120 --> 00:19:03,820 look at it in raw format. This is Harlan Carvey of the rescue 303 00:19:03,820 --> 00:19:07,200 again. He's written a script called MFT.PL. It's also 304 00:19:07,200 --> 00:19:10,600 available on regripper.net. And this script parses out all the 305 00:19:10,600 --> 00:19:13,760 data for both sets of file stamps and dumps it out into a 306 00:19:13,760 --> 00:19:17,180 human readable format. It's a great tool. And it's fast. So 307 00:19:17,180 --> 00:19:19,960 you rip the MFT with, again, another little Pearl command 308 00:19:19,960 --> 00:19:24,160 here. Pearl MFT.PL. Point it at your MFT.PL. And it's going to 309 00:19:24,160 --> 00:19:24,280 do the same thing over and over and over and over and over and 310 00:19:24,280 --> 00:19:26,480 over. So we can get to the master file table and dump it out 311 00:19:26,480 --> 00:19:29,040 to a text file. And that's all there is to it. It outputs a text 312 00:19:29,040 --> 00:19:31,660 file that contains all the attributes stored in the 313 00:19:31,660 --> 00:19:35,080 standard info and the file name. And it dumps them out and it's 314 00:19:35,080 --> 00:19:36,660 really easily searchable. I'll show you here in a couple 315 00:19:36,660 --> 00:19:39,740 minutes. So a little bit more grep foo and we've got what we 316 00:19:39,740 --> 00:19:43,540 need. Strings that file out or anything else that you want to 317 00:19:43,540 --> 00:19:48,500 look to actually read through it. Grep-C6-I and look for 318 00:19:48,500 --> 00:19:54,260 that executable that we know is bad. The C6 is context. It's a 319 00:19:54,280 --> 00:19:57,300 context switch for grep. It shows six lines of context 320 00:19:57,300 --> 00:20:00,680 surrounding that search hit and it's ignoring case for this 321 00:20:00,680 --> 00:20:04,560 search. Not much really to it. It's too bad that's cut off over 322 00:20:04,560 --> 00:20:11,160 here on this screen. This is the output of MFT. That 323 00:20:11,160 --> 00:20:16,120 particular search in the MFT there. And you can see file 324 00:20:16,120 --> 00:20:18,600 names highlighted here in blue. That's the file we were looking 325 00:20:18,600 --> 00:20:23,360 for. Inet manager.exe. And this is the standard info attribute. 326 00:20:24,360 --> 00:20:28,360 See if I can point it out over here. Get the FN inet manager.exe 327 00:20:28,360 --> 00:20:31,440 over there. So this one up here is the standard info and this one 328 00:20:31,440 --> 00:20:35,340 down here is the file name attribute. And you can see 329 00:20:35,340 --> 00:20:36,980 there's some definitive differences there, right? 330 00:20:37,220 --> 00:20:39,900 Standard info, which can be modified. You've got two time 331 00:20:39,900 --> 00:20:44,740 stamps that have been dumped back to November 16, 2003. That 332 00:20:44,740 --> 00:20:48,280 same set of file time stamps from the file name attribute 333 00:20:48,660 --> 00:20:51,820 shows the actual time that this file was created and modified, 334 00:20:52,000 --> 00:20:54,260 which is July 21, 2010. So you can see the actual time that 335 00:20:54,280 --> 00:20:57,980 this file was created. So I just told you everything that's on 336 00:20:57,980 --> 00:21:01,980 this slide. So I'm just going to skip it. Except that you see 337 00:21:01,980 --> 00:21:04,820 there that there's definitive evidence of time stamp 338 00:21:04,820 --> 00:21:06,840 alteration, right? I mean, you've got a set of time stamps 339 00:21:06,840 --> 00:21:11,340 that are obviously right. They fit your timeline. And the other 340 00:21:11,340 --> 00:21:15,040 set just flat doesn't. So this is definitive evidence of time 341 00:21:15,040 --> 00:21:18,580 alteration. And we're actually seeing this a lot. The second 342 00:21:18,940 --> 00:21:21,100 set of time stamps just blows away the use of time stamps. 343 00:21:21,340 --> 00:21:24,260 And it really kind of makes it look silly if you ask me. But, 344 00:21:24,280 --> 00:21:27,980 you know, we're encountering this all the time. I would say 345 00:21:27,980 --> 00:21:31,460 almost weekly we're seeing different pieces of malware 346 00:21:31,460 --> 00:21:34,720 that are employing this technology, that are actually 347 00:21:34,720 --> 00:21:38,840 employing time stomping. So it is out there. In fact, there's a 348 00:21:38,840 --> 00:21:41,540 couple of key loggers out there that do it by default when they 349 00:21:41,540 --> 00:21:44,680 install. They'll actually pull the date the system was built 350 00:21:44,680 --> 00:21:49,260 and stomp their own executables back to that or they'll move it 351 00:21:49,260 --> 00:21:54,260 back one year. So here we are back to log to timeline. So I'm 352 00:21:54,280 --> 00:21:56,820 going to tell you guys how to make all of this stuff that I 353 00:21:56,820 --> 00:21:59,980 just told you completely obsolete. Again, thanks Kristen. 354 00:22:00,220 --> 00:22:03,260 I really appreciate it. The latest version of log to 355 00:22:03,260 --> 00:22:05,880 timeline is added functionality that automates just about 356 00:22:05,880 --> 00:22:09,300 everything I just talked about and more. Here's a sample 357 00:22:10,500 --> 00:22:12,940 command. I'm not going to read that out to you. You can go play 358 00:22:12,940 --> 00:22:17,400 with log to timeline by downloading it. Version 6.0 359 00:22:17,400 --> 00:22:20,340 will run on Windows with some finagling. Look for a blog post 360 00:22:20,340 --> 00:22:23,900 in the very near future from Chris Pogue on exactly how to 361 00:22:23,900 --> 00:22:24,260 get it working. And I think that if you were to download it, you 362 00:22:24,280 --> 00:22:27,480 working if he doesn't already written it. It will automatically 363 00:22:27,480 --> 00:22:33,120 parse registry hives, event logs, MFT, IIS logs, just about 364 00:22:33,120 --> 00:22:35,920 anything you can think of that actually logs with a time stamp. 365 00:22:36,140 --> 00:22:39,300 It will do it automatically. You don't even have to really point 366 00:22:39,300 --> 00:22:43,360 it at a particular file. It actually does magic number 367 00:22:43,360 --> 00:22:46,840 searches. So it will automatically identify an EVT or 368 00:22:46,840 --> 00:22:50,700 an EVTX and parse it for you the way that it knows how. It's 369 00:22:50,700 --> 00:22:53,760 a pretty amazing tool and I'm actually looking forward to 370 00:22:53,760 --> 00:22:56,440 meeting Kristin and thanking him for writing. It's really 371 00:22:56,440 --> 00:23:01,140 awesome. So it's demo time already. Wow, I'm way ahead. So 372 00:23:01,140 --> 00:23:03,840 we're going to create a super time line from a postmortem 373 00:23:03,840 --> 00:23:08,360 image that I have loaded on my laptop. We're going to do a 374 00:23:08,360 --> 00:23:11,040 string search and look for some malicious files and then we're 375 00:23:11,040 --> 00:23:14,500 going to verify the time stamp of that. Probably only take a 376 00:23:14,500 --> 00:23:17,840 couple of minutes and then while the one command is 377 00:23:17,840 --> 00:23:21,800 running, we'll do, I'll show you how to actually extract the 378 00:23:21,800 --> 00:23:23,600 MFT and the registry hives a really easy way. 379 00:23:24,000 --> 00:23:35,100 So let me shrink this. Wrong button. I did cheat just a 380 00:23:35,100 --> 00:23:38,380 little bit. I already have my command prompt all open. Is it 381 00:23:38,380 --> 00:23:45,240 going to be big enough for everybody to see? Yeah, it's 382 00:23:45,240 --> 00:23:47,960 cutting off a big chunk of it, isn't it? That will be all 383 00:23:47,960 --> 00:23:52,480 right. So I have an image on here that I've already scrubbed 384 00:23:53,760 --> 00:23:56,640 the data out of so I'm not actually divulging anyone's 385 00:23:56,640 --> 00:24:02,700 private information. And I've actually already ripped out the 386 00:24:02,700 --> 00:24:05,460 hives and stuff because it's a little time consuming and I 387 00:24:05,460 --> 00:24:07,880 don't want to bore you with all the details. But I will show you 388 00:24:07,880 --> 00:24:12,660 how I did it. So the first step here, hey, wow, this is 389 00:24:12,660 --> 00:24:15,680 cool. I can actually move my stuff off screen so you can't 390 00:24:15,680 --> 00:24:20,260 see it. All right. So the first step is to actually generate a 391 00:24:20,260 --> 00:24:23,640 body file and that was the FLS command, right? FLS dash M. You 392 00:24:23,640 --> 00:24:27,240 name it, C colon, C colon back splash, whatever you want to do, 393 00:24:27,300 --> 00:24:30,720 whatever makes sense to you. Name the file system, it's NTFS. 394 00:24:31,540 --> 00:24:34,220 Look at it recursively and in this case I already have my 395 00:24:34,220 --> 00:24:36,740 image right here in this C DEFCON folder so I can just say 396 00:24:37,340 --> 00:24:40,820 demo image, demo.E01. This is an encase image. It's the only 397 00:24:40,820 --> 00:24:43,700 thing I like about encase is their compression. So there you 398 00:24:43,700 --> 00:24:47,240 go, encase users. Little something for you. So this takes 399 00:24:47,240 --> 00:24:50,440 a couple of minutes to run. While that's running, I forgot 400 00:24:50,440 --> 00:24:53,620 to direct it out to a body file. . . . . . . . . . . . . . . . . 401 00:24:56,460 --> 00:25:01,380 yin. Sorry about that demo fail. Anybody got a drink? 402 00:25:04,000 --> 00:25:15,800 I'll just redo it here. Hang on. FLS dash M. C dash F NTFS, dash 403 00:25:15,800 --> 00:25:21,600 R for recursive and pointed at demo . E01. Dump it out to a 404 00:25:21,600 --> 00:25:23,600 body file. . . . . . . . . . . . . FLS. Not that good. That's 405 00:25:24,460 --> 00:25:27,980 that's going to take a couple of minutes to run. The way I 406 00:25:27,980 --> 00:25:31,280 usually extract all these files is with the FTK imager which is 407 00:25:31,280 --> 00:25:34,880 another open source product. It's really, really easy. You 408 00:25:34,880 --> 00:25:43,260 just add the image file in here with FTK and once that loads up 409 00:25:43,260 --> 00:25:45,880 which doesn't take long you can just browse right through it 410 00:25:45,880 --> 00:25:50,780 here. So this is read only. What's that? I need to scoot it 411 00:25:50,780 --> 00:25:55,800 over. Thank you. That better? So here you go. You've got your 412 00:25:55,800 --> 00:26:00,960 entire file system and here's the root of the drive that will 413 00:26:00,960 --> 00:26:04,660 show you the MFT right here and you just right click and export. 414 00:26:05,020 --> 00:26:08,660 So it's insanely easy to get a hold of this stuff. And then 415 00:26:08,660 --> 00:26:12,900 obviously for your system hives and stuff, same place they are 416 00:26:12,900 --> 00:26:18,680 on every Windows machine, Windows system 32, config, 417 00:26:18,980 --> 00:26:20,520 wallah, there you go. There's your 418 00:26:20,520 --> 00:26:20,760 same system hives and stuff. Same place they are on every 419 00:26:20,780 --> 00:26:21,500 Windows machine, Windows system 32, config, wallah, there you 420 00:26:21,500 --> 00:26:25,820 security, your software hives, all that. And then the NT user 421 00:26:25,820 --> 00:26:29,620 .dat files are in their user profile spaces in C documents and 422 00:26:29,620 --> 00:26:34,500 settings or in C users. So that's really easy and the body 423 00:26:34,500 --> 00:26:39,300 files now done as well. So the next step's going to be to 424 00:26:39,300 --> 00:26:42,960 actually turn it into a super timeline, right? Is that what I 425 00:26:42,960 --> 00:26:47,540 said I was going to do? Yeah. Super timeline. So like I said, 426 00:26:47,600 --> 00:26:49,680 I've already got these registry hives ripped out and they're in 427 00:26:49,680 --> 00:26:54,400 this C DEF CON thing here. So I've also modified my path so 428 00:26:54,400 --> 00:26:57,880 that this stuff runs natively, which is kind of cheating as 429 00:26:57,880 --> 00:27:01,220 well. But it makes it a lot easier to use. So you're going 430 00:27:01,220 --> 00:27:03,940 to run reg time against the particular hive that you want to 431 00:27:03,940 --> 00:27:07,740 see here. In this case I'm just going to do probably two of them 432 00:27:07,740 --> 00:27:13,480 here. We'll just do the SAM file just for a demo here. Reg 433 00:27:13,480 --> 00:27:17,520 time dot PL dash M, name which hive you're going to do, point it 434 00:27:17,520 --> 00:27:19,660 at the path that you're going to for the, you know, for the, you 435 00:27:19,660 --> 00:27:23,380 know, the registry hive. Dump it out to a super body. And notice 436 00:27:23,380 --> 00:27:25,860 I've got the two greater than's there, right? So we're going to 437 00:27:25,860 --> 00:27:31,480 append. So there you go. Now you've got a super body file 438 00:27:31,480 --> 00:27:35,940 right there. Once you've added everything that you want to add 439 00:27:35,940 --> 00:27:39,120 to the super body, you just run MAC time against it again. Just 440 00:27:39,120 --> 00:27:42,380 like you would a regular timeline. And again, this runs 441 00:27:42,380 --> 00:27:48,500 very, very quickly. MAC time dot PL dash D dash B dash D is the 442 00:27:48,500 --> 00:27:49,640 outputted into CSS. So you're going to run a super body file. 443 00:27:51,440 --> 00:27:56,540 In this case we're going to do the super body. And let that run 444 00:27:56,540 --> 00:28:01,600 for a second. I suppose I ought to redirect it out. Super 445 00:28:02,660 --> 00:28:07,900 timeline dot CSV. Right. And there you go. Now in our 446 00:28:07,900 --> 00:28:10,600 directory here we're going to have a super timeline. And I 447 00:28:10,600 --> 00:28:12,700 should probably look at that one and make sure that it's actually 448 00:28:12,700 --> 00:28:18,720 got some content in it. It does. And then again, we're going to 449 00:28:18,720 --> 00:28:20,860 talk about how easily searchable a body file is, 450 00:28:20,980 --> 00:28:24,500 right? So you're going to do strings of the super timeline 451 00:28:24,960 --> 00:28:28,300 just so you can take a look at it. And in this case we're 452 00:28:28,300 --> 00:28:31,780 going to grip out something that I know is actually on here 453 00:28:32,300 --> 00:28:35,340 called RDP service, which is another memory dumper that I 454 00:28:35,340 --> 00:28:48,700 found on this case. Uh-oh. Did I blow up my demo? I'm going to 455 00:28:49,280 --> 00:29:04,480 hang on. Hang on. Hang on. Let me take a look here. What have I 456 00:29:04,480 --> 00:29:09,480 got going on? Sorry, I kind of lost track of where I was. So I 457 00:29:09,480 --> 00:29:16,860 got my body file. That's what I did. I didn't append the registry 458 00:29:18,720 --> 00:29:21,500 file. I didn't make a copy of the body file first. So let's do 459 00:29:21,500 --> 00:29:32,140 that real quick. Come back. Right. So here's my FS body. I'm 460 00:29:32,140 --> 00:29:36,600 going to copy it. Paste it. I'm going to rename it super body. 461 00:29:37,700 --> 00:29:41,940 And then I'm going to append that stuff to it. Sorry about 462 00:29:41,940 --> 00:29:48,260 that. It happens. Especially when you're on stage. All right. 463 00:29:48,260 --> 00:29:52,420 So now we've got the original body file there. Renamed to super 464 00:29:52,420 --> 00:29:55,440 body. And now we're going to append that SAM stuff into super 465 00:29:55,440 --> 00:29:58,920 body. And it moves very, very quickly. So now we're going to 466 00:29:58,920 --> 00:30:04,960 take a look at that body file. And with strings and grep again 467 00:30:04,960 --> 00:30:13,080 and look for that. I've got to turn it into a timeline. Okay. 468 00:30:24,280 --> 00:30:33,260 That'll take just a second to run through all that stuff. Anybody 469 00:30:33,260 --> 00:30:47,760 know any good jokes while this is running? Sure. Better? Okay. 470 00:30:48,260 --> 00:31:04,340 Too far over now? Come back here. There we go. How much does it need to be shrunk? 471 00:31:04,960 --> 00:31:15,880 It's kind of hard for me to see the screens. Better? Okay. That's the bottom of it. So 472 00:31:15,880 --> 00:31:18,240 this usually takes, I don't know, maybe two or three minutes. So I'm going to go ahead and 473 00:31:18,260 --> 00:31:22,280 check this. It really doesn't take very long. It's pretty fast. Again, if you were trying to 474 00:31:22,280 --> 00:31:30,640 sort this out with X ways or N case, you might have sorted it out and you'd have one set of time 475 00:31:30,640 --> 00:31:37,280 stamps by now. So this weighs a lot faster. Again, this can be done while you're sitting 476 00:31:37,280 --> 00:31:42,580 there at a customer site pulling these images if you're using f response without affecting it in 477 00:31:42,580 --> 00:31:48,240 any, without affecting the image in any way. Because you're completely set read only. So if you're 478 00:31:48,240 --> 00:31:53,140 using f, it's really a great tool. I really like f response. It's one of the only ways that I 479 00:31:53,140 --> 00:31:58,120 know of to actually get a little bit more efficiency out of an on site. I've actually seen 480 00:31:58,120 --> 00:32:05,300 forensic people pull up, set an image going and pull out a book instead of working. And I don't 481 00:32:05,300 --> 00:32:09,780 know about anybody else that's in here that does forensics for a living, but we bill a lot of 482 00:32:09,780 --> 00:32:13,940 money per hour. So I don't think clients like to see you sitting there reading a book. 483 00:32:34,040 --> 00:32:38,380 There we go. All right. So now let's take a look at what's in that body file. Again, you can pull 484 00:32:38,380 --> 00:32:41,740 this open with Excel if you want and search through it, but it's a heck of a lot faster to do it 485 00:32:41,740 --> 00:32:48,220 this way. So let's take a look at the, let's take a look at the, let's take a look at the 486 00:32:49,500 --> 00:32:55,160 supertimeline.csv. Again, we're going to just use a simple grep command to look for a piece of 487 00:32:55,160 --> 00:33:01,780 known malware that I know is in here. And so here's RDP service. And there's one hit. And 488 00:33:01,780 --> 00:33:07,060 again, we're looking at a 2003 time stamp. And then lo and behold, the very next hit is a 489 00:33:07,060 --> 00:33:12,580 prefetch hit. So that was the last time that this thing was run is actually in 2010, which is 490 00:33:12,580 --> 00:33:17,320 really odd. And then we've also got down at the bottom, we've got an access and a create time in 491 00:33:18,240 --> 00:33:25,960 it, but the modified and birth time are both in 2003, which is pretty odd, to say the least. So 492 00:33:25,960 --> 00:33:31,320 again, we're going to look at the MFT here. And I've already ripped the MFT, I think. I think 493 00:33:31,320 --> 00:33:39,060 I've already got it set. No. I don't. Good. I get to do it. Okay. So MFT.PL, really easy. 494 00:33:39,240 --> 00:33:44,400 This is probably the easiest one of the whole batch. Point it at the MFT and output it to a 495 00:33:44,400 --> 00:33:48,220 text file. And this takes like, I don't know, 60 seconds maybe. But it's done. You can do it. 496 00:33:48,780 --> 00:33:51,280 as soon as that's done we'll be able to pull those two time 497 00:33:51,280 --> 00:33:55,700 stamps out of there and look at that RDP service. This RDP 498 00:33:55,700 --> 00:33:59,720 service was actually a memory dumping malware that was just 499 00:33:59,720 --> 00:34:03,800 from a live case. And we actually see, when we see this 500 00:34:03,800 --> 00:34:08,820 malware, we see this same time stamping just about every single 501 00:34:08,820 --> 00:34:13,680 time that we found it. And it's actually done with Pearl during 502 00:34:13,680 --> 00:34:17,180 the install. There's a couple of lines in the Pearl installer for 503 00:34:17,180 --> 00:34:21,140 this malware that turns around and screws up these time stamps 504 00:34:21,140 --> 00:34:25,040 pretty bad. But it's pretty slick. You know, your average 505 00:34:25,040 --> 00:34:27,520 run-of-the-mill sys admin is going to go looking for new 506 00:34:27,520 --> 00:34:30,740 stuff on a box, right, when they think they've got malware. 507 00:34:31,000 --> 00:34:33,440 They're going to go looking for everything that just happened in 508 00:34:33,440 --> 00:34:37,200 the last six weeks, right? This will completely burn that down. 509 00:34:37,320 --> 00:34:41,280 They won't find it. All right. So now we've got a text file of 510 00:34:41,280 --> 00:34:43,780 the MFT and we're going to do the same thing. We're just going 511 00:34:43,780 --> 00:34:47,160 to use strings to look at that MFT and we're going to look at 512 00:34:47,180 --> 00:34:54,220 that MFT.text and grep dash I, get some context there, C6, and 513 00:34:54,220 --> 00:34:59,340 we know we're looking for RDP service again. And it's going to 514 00:34:59,340 --> 00:35:05,060 run through that MFT file and it will pop up here in just a 515 00:35:05,060 --> 00:35:10,220 second, I hope, with some hits. And there we go. So we've actually 516 00:35:10,220 --> 00:35:12,880 got two hits for RDP service, right? Remember that prefetch 517 00:35:12,880 --> 00:35:16,920 entry from earlier? Here's the prefetch entry. Pretty good idea. 518 00:35:17,180 --> 00:35:22,660 Those time stamps match. We've got June 14, 2010 and June 14, 519 00:35:22,840 --> 00:35:27,200 2010. Here's the actual executable right here, RDP 520 00:35:27,200 --> 00:35:31,480 service.exe. Here's the standard info attributes and 521 00:35:31,480 --> 00:35:35,640 that's that February 12, 2003 that's obviously wrong because 522 00:35:35,640 --> 00:35:39,040 here's your file name attribute and that one can't be altered. 523 00:35:39,780 --> 00:35:45,600 June 14, 2010, right? This is time stomping and like I said, 524 00:35:47,180 --> 00:35:50,500 look and feel of this is pretty easy to do. You can pretty well 525 00:35:50,500 --> 00:35:53,320 blow this open within a couple of minutes and it really makes 526 00:35:53,320 --> 00:35:57,940 time stomping feel sort of silly. So there's a demo real 527 00:35:57,940 --> 00:36:09,360 quick. Uh-oh, lost my page. Are we there? There we go. So here's 528 00:36:09,360 --> 00:36:11,440 some of the tools that we used here, right, and where you can 529 00:36:11,440 --> 00:36:14,680 find them all. And this is all going to be up on my blog as 530 00:36:14,680 --> 00:36:18,560 well. Ion forensics. So if you want to go and download all this 531 00:36:18,560 --> 00:36:22,720 stuff, you can go. It's out there. So tools used and credit 532 00:36:22,720 --> 00:36:26,320 to their creators. Regtime.pl and MFT. This is Harlan Carvey's 533 00:36:26,320 --> 00:36:29,640 stuff. He wrote Windows Forensic Analysis, Windows Registry 534 00:36:29,640 --> 00:36:32,820 Forensics and he's got the supporting blog for Windows 535 00:36:32,820 --> 00:36:37,020 incident response. Great blog. Harlan's always got new stuff 536 00:36:37,020 --> 00:36:40,040 out there. And he's pretty opinionated but he's a good guy. 537 00:36:40,980 --> 00:36:43,280 Everybody that I hear people chuckling, they must know 538 00:36:43,280 --> 00:36:43,580 Harlan. 539 00:36:45,020 --> 00:36:48,180 FLS and MacTime. These were written by Brian Carrier, the 540 00:36:48,180 --> 00:36:51,220 author of File System Forensic Analysis and the creator of the 541 00:36:51,220 --> 00:36:54,980 sleuth kit. Available for free out there. Log2 Timeline. This 542 00:36:54,980 --> 00:36:57,300 is Christian Gunjenson. I'm pretty sure I'm torturing his 543 00:36:57,300 --> 00:37:01,440 name. GCFA Gold Paper is where this came from. Mastering Super 544 00:37:01,440 --> 00:37:05,340 Timelines with Log2 Timeline. And he's also got a blog, IR and 545 00:37:05,340 --> 00:37:10,160 Forensics Talk, blog.kittiland.net. The original 546 00:37:10,160 --> 00:37:14,560 Mac Daddy was written by Rob Lee and was absorbed into MacTime. 547 00:37:16,400 --> 00:37:19,540 It's only fair to mention Rob because he's the original Mac 548 00:37:19,540 --> 00:37:23,640 Daddy. Great tool. Just a really a slightly different output for 549 00:37:23,640 --> 00:37:28,260 Mac Daddy. It's also good actually for Macs instead of just Windows 550 00:37:28,260 --> 00:37:32,100 machines. And a special thanks to Chris Pogue. He's right over 551 00:37:32,100 --> 00:37:35,120 here in the front row, for teaching me his sniper forensic 552 00:37:35,120 --> 00:37:37,380 methodology. I don't know if you guys have ever been on his blog 553 00:37:37,380 --> 00:37:40,820 or looked at his methodology for the stuff. It's fantastic. 554 00:37:41,380 --> 00:37:44,660 It's really the way that I learned how to do the Up to 555 00:37:44,660 --> 00:37:48,680 computer forensics. I love it. I can't imagine sitting there and 556 00:37:48,680 --> 00:37:51,940 waiting while all this stuff is running while sitting on my 557 00:37:51,940 --> 00:37:55,060 thumbs. So he's always got the time to mentor me even though 558 00:37:55,060 --> 00:37:57,120 he doesn't have the time to mentor me. Thanks, man. I 559 00:37:57,120 --> 00:38:01,220 appreciate it. Real world anti forensics. This stuff is 560 00:38:01,220 --> 00:38:04,620 happening. We're seeing it at least once a month and usually 561 00:38:04,620 --> 00:38:07,180 more frequently than that. In the course of real world 562 00:38:07,180 --> 00:38:09,960 investigations we regularly encounter malware and attackers 563 00:38:09,960 --> 00:38:13,260 that are using these techniques to try to obfuscate their 564 00:38:13,260 --> 00:38:17,020 trail. And as they start using these tools more regularly, if 565 00:38:17,020 --> 00:38:20,040 you're an investigator, you need to have the tools, you need to 566 00:38:20,040 --> 00:38:22,520 be better armed and you need to be better prepared to recognize 567 00:38:22,520 --> 00:38:26,540 these things and not just go, huh, that's an anomaly. This is 568 00:38:26,540 --> 00:38:30,860 easy enough to prove, figure it out, use this stuff and, you 569 00:38:30,860 --> 00:38:33,880 know, blow this stuff away instead of just going, oh, we 570 00:38:33,880 --> 00:38:37,760 had an anomaly. It's not right. Do your homework there. 571 00:38:38,280 --> 00:38:40,840 Everything leaves trace evidence somewhere, right? This is low 572 00:38:40,840 --> 00:38:43,080 cards exchange principle, the father of modern 573 00:38:43,080 --> 00:38:43,240 forensics. This is the father of modern forensics. This is 574 00:38:43,260 --> 00:38:46,040 the father of modern forensics. Know how your tools work, not 575 00:38:46,040 --> 00:38:49,620 just what they do. Make you a better investigator. And remember 576 00:38:49,620 --> 00:38:51,960 that the tools do not make the investigator. It's the 577 00:38:51,960 --> 00:38:55,580 investigator's use of the tools that make them effective, right? 578 00:38:55,700 --> 00:38:59,040 I have a miter saw and a biscuit joiner and a router at 579 00:38:59,040 --> 00:39:02,440 home. I am not a finished carpenter. I am a forensic 580 00:39:02,440 --> 00:39:06,460 analyst. So be aware that these tactics are in use. If you guys 581 00:39:06,460 --> 00:39:10,700 are doing forensics and you suspect malware and you're seeing 582 00:39:10,700 --> 00:39:13,240 stuff that just doesn't fit, give it a shot. It's not going to 583 00:39:13,240 --> 00:39:16,500 be that tough. And get some pretty amazing results out of 584 00:39:16,500 --> 00:39:21,460 this stuff. All right. So anybody have any questions? Any 585 00:39:21,460 --> 00:39:33,560 questions? All right. Go ahead. A graphical view of the 586 00:39:33,560 --> 00:39:36,840 timeline. There is stuff out there. There's Excel templates 587 00:39:36,840 --> 00:39:39,860 and stuff that I've seen people dump it into. But it's kind of 588 00:39:39,860 --> 00:39:43,080 a pain to make it all fit. And if you actually look at a time 589 00:39:43,080 --> 00:39:47,740 line, as a CSV, it's not just a handful of entries. I mean, it's 590 00:39:47,740 --> 00:39:52,780 literally 450,000 entries for your standard hard drive. Okay. 591 00:39:52,940 --> 00:39:55,400 And we'll do a Q&A later. So thank you guys very much for 592 00:39:55,400 --> 00:39:58,360 coming. I really appreciate it. Thanks, guys.