1 00:00:00,000 --> 00:00:01,960 All right, guys. The few, the proud. 2 00:00:02,280 --> 00:00:04,280 The guys who made it all the way to the end of the day here. 3 00:00:04,960 --> 00:00:05,580 Pretty amazing. 4 00:00:06,840 --> 00:00:08,760 Everybody can hear me? In the back, you can hear me? 5 00:00:09,480 --> 00:00:10,160 All right, good. 6 00:00:10,660 --> 00:00:14,300 Well, we are here to talk about advanced file system hiding and detection. 7 00:00:14,580 --> 00:00:17,720 You'll have to forgive me because you either get the... 8 00:00:18,140 --> 00:00:21,320 We got nothing on the laptop here, but we got both screens. 9 00:00:21,560 --> 00:00:23,440 So if I fade in and out, just let me know. 10 00:00:24,220 --> 00:00:25,380 I'll stick to this one. 11 00:00:25,620 --> 00:00:28,140 Anyway, I'm Irby Thompson. This is Matthew Monroe. 12 00:00:28,140 --> 00:00:31,100 My colleague. We work at Lockheed Martin. 13 00:00:31,760 --> 00:00:33,120 But don't hold that against us. 14 00:00:34,560 --> 00:00:35,780 Anyway, all right. 15 00:00:35,860 --> 00:00:37,060 What we're going to talk about today. 16 00:00:37,760 --> 00:00:43,120 First thing is doing a little history and analysis of traditional data hiding methods. 17 00:00:43,540 --> 00:00:46,540 Then we're going to do a case study on finding new places to hide. 18 00:00:46,980 --> 00:00:50,820 We chose NTFS because there have been some projects on Linux 19 00:00:50,820 --> 00:00:53,620 about data hiding in the file system. 20 00:00:53,860 --> 00:00:55,660 But we wanted to look at something different. 21 00:00:55,940 --> 00:00:57,300 NTFS was closed sourced. 22 00:00:57,340 --> 00:00:58,060 Made it more fun to reverse. 23 00:01:02,120 --> 00:01:03,180 We're going to do a demo of that. 24 00:01:03,400 --> 00:01:06,080 We'll talk about detection a little bit and maybe some future considerations. 25 00:01:08,360 --> 00:01:11,720 So let's start off with why is data hiding important? 26 00:01:13,860 --> 00:01:18,880 A lot of people will say that modern rootkits alleviate need to hide data persistently. 27 00:01:20,080 --> 00:01:21,520 I would disagree with them. 28 00:01:21,640 --> 00:01:22,620 I think they're wrong. 29 00:01:23,020 --> 00:01:26,580 I think rootkits are really good at hiding data on a live system. 30 00:01:26,780 --> 00:01:27,960 But what happens? 31 00:01:27,960 --> 00:01:30,440 The problem is if you need to store data on that system until you can get it off, 32 00:01:31,280 --> 00:01:34,460 how would you be able to hide from offline forensic analysis? 33 00:01:34,760 --> 00:01:39,380 Say an investigator pulls the hard drive and runs encase against it. 34 00:01:39,540 --> 00:01:41,180 You want to be able to hide against that as well. 35 00:01:42,680 --> 00:01:45,120 Of course, you can say what if the rootkit is entirely memory based? 36 00:01:45,320 --> 00:01:46,260 It never touches the disk. 37 00:01:47,060 --> 00:01:49,220 You never have any traces on the hard drive itself. 38 00:01:50,060 --> 00:01:52,540 Well, I mean that certainly buys you something. 39 00:01:52,740 --> 00:01:55,200 But you don't have reboot persistence. 40 00:01:55,620 --> 00:01:57,620 If you reboot, you're going to lose. 41 00:01:57,620 --> 00:02:02,860 Access to that machine if you were trying to actually save like say you had a keystroke 42 00:02:02,860 --> 00:02:07,200 logger on the machine, you're going to lose obviously those keystrokes. 43 00:02:07,300 --> 00:02:12,400 So I think there are situations where you want to be able to hide on the machine covertly. 44 00:02:12,580 --> 00:02:14,120 I would call this the patient hacker. 45 00:02:14,460 --> 00:02:19,540 There might be some foreign intelligence type types that would be interested in being able 46 00:02:19,540 --> 00:02:26,480 to maintain access on the machine through reboots and also staying pretty low on the 47 00:02:26,480 --> 00:02:26,980 radar screen. 48 00:02:27,620 --> 00:02:28,560 From forensic analysis. 49 00:02:30,680 --> 00:02:32,720 So just moving on a little bit. 50 00:02:32,860 --> 00:02:34,100 Information hiding is nothing new. 51 00:02:34,300 --> 00:02:36,640 We're not really pulling any new tricks out of the hat. 52 00:02:37,160 --> 00:02:40,840 I mean we're kind of taking existing ideas and applying them to modern technology. 53 00:02:41,160 --> 00:02:46,160 So I'm sure many of you as kids wrote with invisible ink, used the lemon juice, you know, 54 00:02:46,180 --> 00:02:48,800 take the little candle and you got your hidden message there. 55 00:02:49,340 --> 00:02:51,140 Kind of trying to do similar stuff to that. 56 00:02:52,240 --> 00:02:56,640 Hiding data on computers is just the modern application of old principles basically. 57 00:02:57,620 --> 00:03:01,220 And we categorize data hiding into three major areas. 58 00:03:01,400 --> 00:03:04,120 The first is out of band and we'll get into that a little more. 59 00:03:04,260 --> 00:03:05,780 Then in band and application layer. 60 00:03:06,960 --> 00:03:08,120 So just diving right in. 61 00:03:08,200 --> 00:03:12,980 Out of band data hiding is what I would call the portion of a medium that's outside the 62 00:03:12,980 --> 00:03:15,440 format specification of that medium, which means nothing. 63 00:03:15,680 --> 00:03:17,460 So what does that mean exactly? 64 00:03:17,800 --> 00:03:23,840 Well say you had a radio channel that was, you know, 210 megahertz. 65 00:03:24,100 --> 00:03:27,600 Well what about the area that's like 210.9 plus? 66 00:03:28,520 --> 00:03:30,260 209 point, you know, whatever. 67 00:03:30,440 --> 00:03:33,140 So it's, you're trying to hide outside the normal realm of operation. 68 00:03:34,440 --> 00:03:39,220 Going to a hard drive in our specific case, if you're hiding beyond the end of a partition. 69 00:03:39,500 --> 00:03:41,220 So a hard drive might be 100 gigs big. 70 00:03:41,600 --> 00:03:46,620 The partition might only be 99 gigs and that last gigabyte of space is just kind of, it's 71 00:03:46,620 --> 00:03:47,260 just kind of out there. 72 00:03:47,360 --> 00:03:51,440 It's beyond, it's not really being used but it's still, you know, part of the drive. 73 00:03:52,620 --> 00:03:56,240 There's a program called Slacker that came out last Black Hat. 74 00:03:56,420 --> 00:03:56,900 Two years ago. 75 00:03:57,600 --> 00:03:58,100 Two Black Hats ago. 76 00:03:58,620 --> 00:04:00,680 That used Slack space at the end of files. 77 00:04:00,960 --> 00:04:07,820 So if you know how files are stored on a hard drive, they're stored in basically a page 78 00:04:07,820 --> 00:04:08,120 boundary. 79 00:04:08,320 --> 00:04:11,880 So if a file's only like 3K, it'll still take up 4K on the disk. 80 00:04:12,220 --> 00:04:18,500 And so that last K is just unused and so Slacker would stuff data in those little Slack spaces 81 00:04:18,500 --> 00:04:19,520 at the end of files. 82 00:04:20,340 --> 00:04:24,000 You could take a hard drive and mark certain sectors as bad and they would no longer be 83 00:04:24,000 --> 00:04:25,400 within the realm of normal use. 84 00:04:25,660 --> 00:04:27,580 But they might still be, you know. 85 00:04:27,600 --> 00:04:28,760 Able to store data. 86 00:04:29,100 --> 00:04:30,460 And finally, host protected area. 87 00:04:30,680 --> 00:04:36,400 I'm not going to go into that too much but basically, modern hard drives present one 88 00:04:36,400 --> 00:04:41,180 amount of data to a system but they actually underneath can store more data. 89 00:04:41,320 --> 00:04:43,560 They can have system management information stored there and whatnot. 90 00:04:45,100 --> 00:04:47,000 In band is kind of the opposite of out of band. 91 00:04:47,140 --> 00:04:48,600 You're hiding within the format specification. 92 00:04:49,520 --> 00:04:53,740 You're not breaking the format in any way or you're not doing anything illegal, so to 93 00:04:53,740 --> 00:04:54,000 speak. 94 00:04:54,140 --> 00:04:57,580 You're kind of using the file system in ways it wasn't necessarily necessary. 95 00:04:57,580 --> 00:04:58,400 You're kind of using the file system in ways it wasn't necessarily intended to be used. 96 00:04:58,940 --> 00:05:00,400 Alternate file streams is the big one here. 97 00:05:01,440 --> 00:05:04,720 NTFS supports multiple data streams for a single file. 98 00:05:05,180 --> 00:05:08,700 And most people, you know, just see the regular data stream. 99 00:05:08,860 --> 00:05:12,340 If you open up Windows Explorer, it only shows you the regular data stream. 100 00:05:12,480 --> 00:05:17,820 But if you go to the command line, you can do like copy data into another data stream 101 00:05:17,820 --> 00:05:21,520 of the same file name and it won't show up for most tools. 102 00:05:22,720 --> 00:05:24,900 Similarly, you could use a file system journal log. 103 00:05:25,120 --> 00:05:27,560 You could say I need 100 megabytes for my journal log. 104 00:05:27,580 --> 00:05:30,580 But it only uses the first, you know, 200K. 105 00:05:31,260 --> 00:05:35,060 All the data after that or all the space after that, we would consider that to be in band. 106 00:05:35,240 --> 00:05:40,640 You know, you're hiding in space that's been reserved but you're not actually, I mean, 107 00:05:40,660 --> 00:05:41,780 you're not supposed to be there really. 108 00:05:41,960 --> 00:05:47,300 And reserved but unallocated sectors, going back to our original hard drive example, what 109 00:05:47,300 --> 00:05:51,220 if we had a, you know, partition that was 99 gigs but we might only be using the first 110 00:05:51,220 --> 00:05:51,740 20 gigs? 111 00:05:51,980 --> 00:05:55,140 Well, we could put data out later on that partition. 112 00:05:56,120 --> 00:05:57,180 Within the partition. 113 00:05:58,040 --> 00:06:00,880 But not showing up as a file per se. 114 00:06:02,740 --> 00:06:03,840 Finally, application layer. 115 00:06:04,060 --> 00:06:06,540 This is kind of hiding in a higher level format specification. 116 00:06:07,980 --> 00:06:11,520 It's kind of like in band data hiding except at a different level of granularity. 117 00:06:12,180 --> 00:06:15,600 Most people would recognize this with steganography. 118 00:06:15,720 --> 00:06:18,900 You think about steganography where you try to hide data within, say, a picture. 119 00:06:19,340 --> 00:06:20,640 So you can take a picture. 120 00:06:20,800 --> 00:06:24,420 You can manipulate the bits in such a way that you hide data in there but the picture 121 00:06:24,420 --> 00:06:25,180 still looks the same. 122 00:06:25,960 --> 00:06:29,600 Similarly, you could take a Word document and you could add extra spaces. 123 00:06:30,540 --> 00:06:36,020 You could add maybe tabs and new lines in a way that it doesn't make it look any different 124 00:06:36,020 --> 00:06:39,560 to the naked eye but actually it's storing information that you might want to be hiding. 125 00:06:40,920 --> 00:06:45,020 There was a tool called Hydrant that came out a while ago and I haven't played with 126 00:06:45,020 --> 00:06:51,680 it in a while but it actually used redundancies in the i3886 opcodes to restructure the opcodes 127 00:06:51,680 --> 00:06:54,560 of a program in such a way that you could hide data. 128 00:06:55,180 --> 00:06:56,880 But it would still execute exactly the same. 129 00:06:57,700 --> 00:07:00,220 A really quite novel tool, I would say. 130 00:07:01,280 --> 00:07:03,320 And so that's kind of the application layer hiding. 131 00:07:04,380 --> 00:07:07,540 We're going to do a little more analysis on each of these because it's important to 132 00:07:08,140 --> 00:07:11,140 think about if you're going to hide something, how should you do it? 133 00:07:12,880 --> 00:07:15,980 Specifically, forensic tools know about many of these methods. 134 00:07:16,280 --> 00:07:18,440 Alternate file streams, they know about that. 135 00:07:18,560 --> 00:07:20,760 Slack space at the end of files, they know about that too. 136 00:07:20,860 --> 00:07:22,540 And they will flag the data as such. 137 00:07:22,620 --> 00:07:24,940 They'll say, hey, this data is hiding. 138 00:07:25,680 --> 00:07:26,860 It's an alternate file stream. 139 00:07:27,040 --> 00:07:28,780 It will just show it as if it were a separate file. 140 00:07:29,580 --> 00:07:34,160 Similarly, if you were using a strings or signature search across a whole hard drive, 141 00:07:34,380 --> 00:07:37,680 you're going to find the data if you know what to look for no matter where it is. 142 00:07:37,900 --> 00:07:43,180 So say you're a forensic analyst and you think somebody's hiding data on this hard 143 00:07:43,180 --> 00:07:43,500 drive. 144 00:07:43,900 --> 00:07:49,360 Well, if you know they're hiding some special character sequence, you can just search from 145 00:07:49,360 --> 00:07:50,680 beginning to end and you're going to find it. 146 00:07:51,500 --> 00:07:54,040 There's ways to get around that obviously with encryption obfuscation. 147 00:07:54,040 --> 00:07:59,460 But that obviously, even our methods of hiding are not going to be able to hide if they 148 00:07:59,460 --> 00:08:00,920 know exactly what they're looking for. 149 00:08:02,780 --> 00:08:06,140 But just going a little further, experienced analysts are going to find stuff beyond what 150 00:08:06,140 --> 00:08:07,680 the tools give them. 151 00:08:07,980 --> 00:08:11,380 As long as they have the time and money available and they know that there's something there 152 00:08:11,380 --> 00:08:12,840 they need to find, they're going to be able to find it. 153 00:08:13,460 --> 00:08:17,300 Fortunately for us, they usually don't have the time available to them. 154 00:08:19,260 --> 00:08:19,660 Okay. 155 00:08:19,740 --> 00:08:21,560 So let's just do pros and cons of each of these. 156 00:08:22,520 --> 00:08:23,480 Out-of-band analysis. 157 00:08:23,940 --> 00:08:27,820 The strengths is that being outside the boundaries means you're often overlooked. 158 00:08:28,180 --> 00:08:31,680 I mean, how many of you guys have actually looked at the space beyond the end of your 159 00:08:31,680 --> 00:08:31,980 partition? 160 00:08:33,000 --> 00:08:34,420 Probably, well, a few of you have. 161 00:08:34,520 --> 00:08:34,920 That's good. 162 00:08:35,040 --> 00:08:35,320 That's good. 163 00:08:35,420 --> 00:08:36,280 You're on top of things. 164 00:08:36,420 --> 00:08:37,720 But I'll be honest. 165 00:08:37,860 --> 00:08:40,620 I've never brought up the hex editor to look at the end of the drive. 166 00:08:41,440 --> 00:08:42,960 There's often a lot of space available there. 167 00:08:43,240 --> 00:08:48,040 But it is hard to discover without special tools and it's also resilient. 168 00:08:48,500 --> 00:08:51,480 The weakness is that it's also hard to access without special tools. 169 00:08:53,480 --> 00:08:58,200 You know, if you just do a file open, you can't do it on the space beyond the end of 170 00:08:58,200 --> 00:08:58,460 the drive. 171 00:08:58,700 --> 00:09:02,920 I mean, you could, well, I won't get into all that, but it's harder to access, basically. 172 00:09:03,620 --> 00:09:06,380 And it's hard to hide from plain sight analysis. 173 00:09:06,620 --> 00:09:10,200 So as the gentleman back there was saying, he's actually looked at the end of the drive. 174 00:09:10,520 --> 00:09:15,340 Well, if you open a hex editor to look at it, well, you're kind of a sitting duck to 175 00:09:15,340 --> 00:09:16,540 say the least. 176 00:09:18,080 --> 00:09:19,000 In-band analysis. 177 00:09:20,240 --> 00:09:23,300 The strengths are that it's usually easy to access. 178 00:09:23,300 --> 00:09:24,180 It's easy to access with existing tools. 179 00:09:24,360 --> 00:09:27,160 So you can use your regular file system calls to do things. 180 00:09:27,320 --> 00:09:28,360 You're not breaking the specifications. 181 00:09:28,660 --> 00:09:33,600 So you're using the system the way it was intended to use, even if it's maybe kind 182 00:09:33,600 --> 00:09:35,200 of an obscure way of using it. 183 00:09:36,160 --> 00:09:39,660 You're less devious in some senses because you're not doing anything illegal. 184 00:09:41,420 --> 00:09:45,300 The weakness is that the storage space is often small and scattered. 185 00:09:45,540 --> 00:09:50,260 You'll have a few bytes here, a few bytes there, but you don't have a contiguous big 186 00:09:50,260 --> 00:09:51,520 space to hide data in. 187 00:09:51,700 --> 00:09:52,160 And that... 188 00:09:53,300 --> 00:09:56,260 Part of our FRAGFS is we address that issue, and we'll get into that a little bit more. 189 00:09:56,880 --> 00:09:58,860 And you're relying on security through obscurity. 190 00:09:59,000 --> 00:10:03,880 So as soon as the method becomes known, such as alternate file streams, it's not really 191 00:10:03,880 --> 00:10:05,280 worth anything anymore. 192 00:10:06,220 --> 00:10:07,760 And the specifications may change. 193 00:10:07,960 --> 00:10:12,360 That great hiding location you used to have is now either being used for something else 194 00:10:12,360 --> 00:10:15,520 or it's no longer useful, basically. 195 00:10:17,320 --> 00:10:18,480 Application layer analysis. 196 00:10:18,980 --> 00:10:20,920 The biggest strength is you're hiding in plain sight. 197 00:10:21,160 --> 00:10:22,320 I can show you a picture. 198 00:10:23,300 --> 00:10:25,580 You would never know that there was data hidden within it. 199 00:10:26,620 --> 00:10:30,900 If you had the right tools, you might be able to detect it, but nine times out of ten, it 200 00:10:30,900 --> 00:10:31,660 just looks like a picture. 201 00:10:32,600 --> 00:10:33,580 So you're hard to detect. 202 00:10:33,740 --> 00:10:34,560 You're hiding in plain sight. 203 00:10:35,600 --> 00:10:39,900 Obviously your weakness is that the amount of storage space you have relies on the size 204 00:10:39,900 --> 00:10:41,160 of the data you're trying to hide within. 205 00:10:41,600 --> 00:10:43,820 So the bigger the picture, the more you can hide there. 206 00:10:45,200 --> 00:10:47,020 But obviously that's a trade-off. 207 00:10:47,560 --> 00:10:49,640 It's difficult to access without special tools. 208 00:10:49,760 --> 00:10:53,280 You need special algorithms to do this kind of hiding in a way that's not going to be 209 00:10:53,300 --> 00:10:53,660 obvious. 210 00:10:54,720 --> 00:10:59,840 I think it's Johnny Long that presented where he just opened up MP3 and typed some text 211 00:10:59,840 --> 00:11:00,160 in there. 212 00:11:01,200 --> 00:11:05,260 You can make it a little more obscure than that, but that was one way to do it. 213 00:11:06,060 --> 00:11:08,540 So they're complex algorithms, and it's not very resilient. 214 00:11:08,700 --> 00:11:13,260 If the data, if somebody opens the picture in Photoshop and changes it, then you just 215 00:11:13,260 --> 00:11:17,460 lost all your hidden data, which may be okay, but we're trying to be resilient here. 216 00:11:17,580 --> 00:11:19,200 We're trying to be persistent in some ways. 217 00:11:20,540 --> 00:11:23,200 So let's look at just a screenshot here of NCASE. 218 00:11:23,300 --> 00:11:25,160 It's detecting alternate file streams. 219 00:11:25,400 --> 00:11:30,000 As you can see, well, the text is a little bit small, but the first one that's checked 220 00:11:30,000 --> 00:11:31,940 there, 11452, is test file. 221 00:11:32,280 --> 00:11:34,080 And I created an alternate file stream. 222 00:11:34,600 --> 00:11:39,940 I just opened the command prompt, and I said, you know, cat this data into test file dot 223 00:11:39,940 --> 00:11:40,260 hidden. 224 00:11:40,660 --> 00:11:44,400 And so it created an alternate file stream of the same file. 225 00:11:44,620 --> 00:11:48,560 So in Windows Explorer, you only see one file, but NCASE obviously will show you the second 226 00:11:48,560 --> 00:11:49,780 file as if it were something different. 227 00:11:50,000 --> 00:11:53,280 So in the bottom, you can see a hex dump of what that second data is. 228 00:11:53,300 --> 00:11:57,300 It says, this is our hidden text in an alternate data stream. 229 00:11:57,480 --> 00:11:58,460 Not very exciting. 230 00:11:59,900 --> 00:12:04,260 Slacker similarly is hiding, again, at the end of files, in the Slack space at the end 231 00:12:04,260 --> 00:12:04,620 of files. 232 00:12:05,280 --> 00:12:12,300 And NCASE will mark any space that's beyond the end of a file, I mean, that still belongs 233 00:12:12,300 --> 00:12:15,780 to the file, but it's not, like, within the file size, it'll mark it in red. 234 00:12:15,980 --> 00:12:22,340 So obviously at the bottom there, I've highlighted that with the cursor, but that data in red, 235 00:12:23,300 --> 00:12:24,680 it's obviously not supposed to be there. 236 00:12:24,740 --> 00:12:26,000 It should just be nulls. 237 00:12:26,040 --> 00:12:30,780 So NCASE is pretty good about detecting those kind of things. 238 00:12:32,820 --> 00:12:35,340 So now Matt's going to talk to us a little bit about finding new places to hide. 239 00:12:39,000 --> 00:12:42,040 MATTHEW HENDERSHOT Yeah, my section of the talk is going to be, basically it's a 240 00:12:42,040 --> 00:12:42,700 case study. 241 00:12:43,720 --> 00:12:49,100 My goal is that, nothing we're showing is necessarily super revolutionary, like, our 242 00:12:49,100 --> 00:12:52,040 ideas and how we do things are somewhat similar to what people have done in the past. 243 00:12:52,040 --> 00:12:54,940 But I also want to, a lot of people don't know how this works. 244 00:12:55,060 --> 00:12:59,100 So the goal of this part of the talk is to help step you through how you would find a 245 00:12:59,100 --> 00:13:03,040 new place to hide, or if you're an analyst, how to think like people are trying to hide 246 00:13:03,040 --> 00:13:03,400 their data. 247 00:13:03,600 --> 00:13:06,680 Where you want to look where you currently aren't, where your tools aren't going to 248 00:13:06,680 --> 00:13:09,120 show you what are the things you need to look out for. 249 00:13:10,720 --> 00:13:13,580 And the basic start off is, you want to hide some data. 250 00:13:13,880 --> 00:13:17,320 When you're doing so, you have to figure out the domain of your problem. 251 00:13:17,660 --> 00:13:19,160 How much space do you want to hide? 252 00:13:19,260 --> 00:13:21,300 Do you need a few K to hide what you're hiding? 253 00:13:21,360 --> 00:13:22,020 Do you want several minutes? 254 00:13:22,040 --> 00:13:22,380 Do you want megabytes? 255 00:13:22,500 --> 00:13:23,160 Maybe you want gigabytes. 256 00:13:23,440 --> 00:13:25,100 Do you want to hide movie files or something? 257 00:13:25,240 --> 00:13:27,500 Like, those are very different problems. 258 00:13:28,860 --> 00:13:31,260 Also, you want to figure out what type of access. 259 00:13:31,560 --> 00:13:33,220 Do you just want to be able to read and write it? 260 00:13:33,380 --> 00:13:35,100 Do you want to be able to execute programs? 261 00:13:36,240 --> 00:13:37,060 Things like that. 262 00:13:38,760 --> 00:13:40,360 Also, what are your performance requirements? 263 00:13:40,600 --> 00:13:42,100 Does this need to be like high speed access? 264 00:13:42,440 --> 00:13:43,580 Can you write it really slowly? 265 00:13:43,840 --> 00:13:44,700 Do you need to read it quickly? 266 00:13:44,960 --> 00:13:47,420 And that can make a difference in how you hide things. 267 00:13:48,140 --> 00:13:51,660 For example, Stego tends to be very slow. 268 00:13:52,040 --> 00:13:52,780 Algorithms are complex. 269 00:13:53,000 --> 00:13:56,600 So that might not work if you have high speed data requirements. 270 00:13:57,820 --> 00:13:59,520 Also, how sensitive your data is it? 271 00:13:59,580 --> 00:14:01,600 Is it OK if your forensic analyst finds it? 272 00:14:01,920 --> 00:14:03,120 Like, how bad is that for you? 273 00:14:04,080 --> 00:14:07,320 And how well do you want to hide it beyond just making it less obvious 274 00:14:07,320 --> 00:14:10,900 where it's at, but actually, if they see it, can they tell what it is? 275 00:14:12,320 --> 00:14:14,340 Finally, is how long does it need to stay around? 276 00:14:14,620 --> 00:14:18,080 Is it something that's going to be like, do you need an hour to store on disk? 277 00:14:18,240 --> 00:14:19,560 Are you talking about months on disk? 278 00:14:19,740 --> 00:14:22,020 And what place do you want to hide it? 279 00:14:22,040 --> 00:14:23,020 And how do you want to hide it? 280 00:14:23,280 --> 00:14:24,340 Those things will affect. 281 00:14:25,980 --> 00:14:28,440 Once you figure out a basic idea of what you want to do, 282 00:14:28,600 --> 00:14:31,140 start looking at how people have hidden before. 283 00:14:31,380 --> 00:14:35,360 Because any time someone's presented how to hide data or whatever else, 284 00:14:35,400 --> 00:14:37,140 you've got tools out there that will detect it. 285 00:14:37,320 --> 00:14:38,940 And if you're serious about hiding stuff, 286 00:14:39,240 --> 00:14:41,180 you don't want to use something people already know about. 287 00:14:41,340 --> 00:14:42,440 You want to come up with something new. 288 00:14:43,600 --> 00:14:45,920 Then start looking at some file system specifications 289 00:14:46,520 --> 00:14:49,580 and try to find new places to hide within them. 290 00:14:49,740 --> 00:14:51,880 And what you're looking for within the file system 291 00:14:52,040 --> 00:14:54,300 are something that's unused, reserved, 292 00:14:54,720 --> 00:14:56,820 otherwise not being used by something else. 293 00:14:58,700 --> 00:15:02,700 We chose, in this case, NTFS because it's used on Windows. 294 00:15:02,860 --> 00:15:07,260 It's the default file system since NT 3.5. 295 00:15:07,680 --> 00:15:12,040 And XP has it, 2003 has it, Vista will use it. 296 00:15:12,460 --> 00:15:14,600 They talked about putting a new file system, which really 297 00:15:14,600 --> 00:15:18,120 was a new file system, was NTFS with a database added to it. 298 00:15:18,200 --> 00:15:21,760 But even that they're not doing, it's going to be NTFS just by itself. 299 00:15:23,120 --> 00:15:29,700 The core part of NTFS is what they call the master file system table or master file table. 300 00:15:30,140 --> 00:15:34,800 And this is the, it's an actual file on the drive that holds all the metadata, 301 00:15:35,080 --> 00:15:38,360 all the information about all the other files and directors on the entire system. 302 00:15:38,500 --> 00:15:39,740 It's stored in one place. 303 00:15:41,020 --> 00:15:42,640 And it's a big table. 304 00:15:42,720 --> 00:15:43,560 It's got entries. 305 00:15:43,740 --> 00:15:46,600 A file, a directory, they all have entries within this big table 306 00:15:46,600 --> 00:15:48,340 that store information about them. 307 00:15:48,520 --> 00:15:51,960 And it's this big file that grows as you add more files. 308 00:15:51,980 --> 00:15:52,020 And it's this big file that grows as you add more files. 309 00:15:52,040 --> 00:15:52,580 to your system. 310 00:15:52,680 --> 00:15:53,720 But it doesn't actually shrink. 311 00:15:53,820 --> 00:15:55,780 If you delete a whole bunch of files, it doesn't get smaller suddenly. 312 00:15:57,620 --> 00:16:00,140 Unfortunately, this is something that's not very well documented or understood. 313 00:16:00,360 --> 00:16:01,320 It's Microsoft proprietary. 314 00:16:01,860 --> 00:16:03,700 They don't release, they don't talk about it. 315 00:16:03,800 --> 00:16:07,060 Fortunately, some people in the Linux community 316 00:16:07,060 --> 00:16:09,900 have worked very hard for several years to reverse engineer it. 317 00:16:10,000 --> 00:16:11,480 And there's a lot known about it. 318 00:16:11,940 --> 00:16:15,880 Unfortunately, not everything we'd like, but enough to serve our purposes 319 00:16:15,880 --> 00:16:16,360 at least. 320 00:16:17,720 --> 00:16:21,600 Looking more closely, what we know by reverse engineering this, 321 00:16:21,600 --> 00:16:27,540 file system is that you have these entries in the MFT and they all have a 322 00:16:27,540 --> 00:16:31,340 fixed size when you're forming a drive it makes them each a size by default 323 00:16:31,340 --> 00:16:39,280 this is 1k on Windows for each entry and each of these file every file and 324 00:16:39,280 --> 00:16:42,960 directory system normally takes up one entry technically they can take up more 325 00:16:42,960 --> 00:16:48,460 but generally it's one entry per file and the information about each entry is 326 00:16:48,460 --> 00:16:51,060 stored as attributes there's a whole bunch of different attributes for each 327 00:16:51,060 --> 00:16:55,800 file and it can be stored in any order to help explain what those attributes 328 00:16:55,800 --> 00:17:01,860 are basically an attribute is this block of data they've got types associated 329 00:17:01,860 --> 00:17:06,680 with them there's lots of different types there's 13 different types of 330 00:17:06,680 --> 00:17:14,880 metadata currently in NTFS and basically these attributes some of them can be 331 00:17:14,880 --> 00:17:17,900 repeated for example we talked about alternate data streams there is a 332 00:17:17,900 --> 00:17:20,660 attribute that's type data for 333 00:17:20,660 --> 00:17:21,040 for 334 00:17:21,060 --> 00:17:25,020 files and you can have more than one attribute of type data for a file and 335 00:17:25,020 --> 00:17:28,660 that's how you keep as many streams of data as you want for a single file name 336 00:17:28,660 --> 00:17:34,740 it's just by adding more attributes to it and directories each directory is 337 00:17:35,300 --> 00:17:39,820 stored as an attribute and each of the attributes can have different 338 00:17:39,820 --> 00:17:42,860 characteristics you can have them some of them can have names some of them can 339 00:17:42,860 --> 00:17:46,220 be compressed or encrypted and you have different attributes that each one can 340 00:17:46,220 --> 00:17:50,980 have independently and important for us ends up being this feature they call 341 00:17:51,060 --> 00:17:53,880 resident or non-resident and what that really means is a resident attributes 342 00:17:53,880 --> 00:18:01,080 something which stored in the MFT itself and compare that to non-resident non-resident 343 00:18:01,080 --> 00:18:05,100 would mean it's an attribute where the MFT has a pointer to where else on disk it is 344 00:18:05,100 --> 00:18:10,000 for example with a file if you have a hundred byte file and NTFS it will store the 345 00:18:10,000 --> 00:18:17,480 entire file in the data attribute in MFT itself but if it's like 200k file it's way 346 00:18:17,480 --> 00:18:20,900 too big to fit in MFT so they have a pointer to worlds on disk that 347 00:18:21,060 --> 00:18:25,040 data is at. And that's the difference between resident and non-resident attributes. 348 00:18:28,540 --> 00:18:34,140 A little more examples of what you'll see is what you'll see during forensic analysis 349 00:18:34,140 --> 00:18:38,140 is you're going to look at two things that show up immediately, everyone looks at is 350 00:18:38,580 --> 00:18:43,680 the standard information attribute and the file name attribute. These have your timestamps, 351 00:18:43,720 --> 00:18:47,960 your file names, all that sort of information stored in those attributes. And basically 352 00:18:47,960 --> 00:18:53,260 every file has them. Every directory has them. They're just there. All files have a 353 00:18:53,260 --> 00:18:57,180 data attribute, of course, even if it's zero length you have a data attribute that says 354 00:18:57,180 --> 00:19:03,760 hey, I have no data. Directories are interesting because you look at them and every directory 355 00:19:03,760 --> 00:19:07,340 entry stores a separate attribute. Actually more importantly it stores two attributes 356 00:19:07,340 --> 00:19:10,940 currently, which is you have the long file name that stores an attribute and the dos 357 00:19:10,940 --> 00:19:15,820 file name that stores a separate attribute. So it ends up taking a lot of attributes for 358 00:19:15,820 --> 00:19:16,420 every directory. 359 00:19:16,420 --> 00:19:21,880 If you've got 2,000 files in a directory, you've got 4,000 attributes for that directory, 360 00:19:22,060 --> 00:19:23,360 which is quite a few. 361 00:19:24,120 --> 00:19:28,860 And once you're, after all the attributes, because they're stored in any order, the sort 362 00:19:28,860 --> 00:19:33,120 of mismatch, they can go whatever, they have this little marker that says, hey, there's 363 00:19:33,120 --> 00:19:35,060 no more attributes for this current MFT entry. 364 00:19:35,740 --> 00:19:38,780 So it knows to stop trying to parse the MFT for it. 365 00:19:40,280 --> 00:19:44,160 And as I said a little bit earlier, you've got 13 attributes. 366 00:19:44,160 --> 00:19:48,740 Currently, you only use about five of those 13 different types, because you've got a whole 367 00:19:48,740 --> 00:19:52,760 bunch of ones kept over from like NT days, they did security differently, but all those 368 00:19:52,760 --> 00:19:57,900 attribute types still exist, but they're not currently used by Windows XP, for example. 369 00:19:58,080 --> 00:20:03,220 So if you're thinking about, hey, where might I hide data, well, I could use an old attribute 370 00:20:03,220 --> 00:20:04,660 maybe to put data there or something. 371 00:20:06,100 --> 00:20:12,640 To help explain this hopefully better, I have a picture here, a little example MFT entry. 372 00:20:12,780 --> 00:20:14,020 You've got a little MFT header. 373 00:20:14,080 --> 00:20:14,140 You've got a little MFT header. 374 00:20:14,160 --> 00:20:17,780 It's got all sorts of different information, different flags about what it is. 375 00:20:18,440 --> 00:20:21,380 Is this a deleted MFT entry or not? 376 00:20:21,600 --> 00:20:22,140 Such things. 377 00:20:22,800 --> 00:20:25,340 Then you've got, for example, over here, you've got a resident attribute. 378 00:20:25,520 --> 00:20:26,460 It's got a little bit of header information. 379 00:20:27,120 --> 00:20:30,940 Then at the bottom of it, it's got a whole bunch of attribute data for whatever goes 380 00:20:30,940 --> 00:20:31,520 with that attribute. 381 00:20:31,740 --> 00:20:39,220 If it was, say, data, that might be data for your file, it might be a directory entry, 382 00:20:39,440 --> 00:20:40,180 so on and so forth. 383 00:20:40,420 --> 00:20:44,000 Below that, you might have a different non-resident attribute that is very similar. 384 00:20:44,000 --> 00:20:47,400 Similar information, except at the bottom it's got what you call a data run that says, 385 00:20:47,560 --> 00:20:49,700 hey, this is where else on disk to look for this attribute. 386 00:20:50,860 --> 00:20:54,840 Then you might have variable number of different attributes, and finally, an end of attribute 387 00:20:54,840 --> 00:20:55,100 marker. 388 00:20:56,660 --> 00:20:59,700 After that, you've got a whole bunch of slack space to your 1K boundary. 389 00:21:01,920 --> 00:21:04,220 So we're thinking, hey, that's basically how it works. 390 00:21:05,840 --> 00:21:08,140 I want to go, okay, so this is MFT. 391 00:21:08,360 --> 00:21:10,660 We want to look at, let's hide some information there. 392 00:21:11,340 --> 00:21:12,220 Let's see what we can do. 393 00:21:12,380 --> 00:21:13,760 So let's look for places. 394 00:21:13,760 --> 00:21:14,280 We can hide it. 395 00:21:14,500 --> 00:21:16,880 Looking at Nband, you've got a whole bunch of reserve space. 396 00:21:17,240 --> 00:21:19,940 You end up a whole bunch of bytes in every attribute are reserved. 397 00:21:21,200 --> 00:21:26,360 And doing a little bit of research analysis of live systems, we found out that for every 398 00:21:26,360 --> 00:21:30,920 file on the system, you've got about 32 bytes of reserve space within its attributes. 399 00:21:31,180 --> 00:21:32,940 And for every directory, about 64 bytes. 400 00:21:34,920 --> 00:21:36,400 That's not a whole lot of data. 401 00:21:36,500 --> 00:21:39,680 Maybe it'll work if you want to hide just a small amount of data, but that's not much. 402 00:21:40,060 --> 00:21:43,620 But what's more interesting is that you've got a whole bunch of slack space after every 403 00:21:43,620 --> 00:21:44,500 MFT entry. 404 00:21:44,980 --> 00:21:51,320 Is that normally an average file directory, whatever, on a system has about 450 bytes 405 00:21:52,440 --> 00:21:54,540 of attributes stored within the MFT. 406 00:21:54,920 --> 00:21:57,440 Yet it's formatted to be 1K in size. 407 00:21:57,700 --> 00:22:04,480 So you have almost 600 bytes for every single file or directory on your system that's there 408 00:22:04,480 --> 00:22:05,000 and unused. 409 00:22:06,020 --> 00:22:07,280 Seems like a lot of space. 410 00:22:07,940 --> 00:22:10,580 So we want to look at, well, how can we use that? 411 00:22:10,680 --> 00:22:11,680 What are things we have to worry about? 412 00:22:14,840 --> 00:22:18,660 Well, first is what happens when people delete files? 413 00:22:19,160 --> 00:22:24,120 Fortunately for us, NTFS has this thing where when you delete a file, it marks a bit in 414 00:22:24,120 --> 00:22:25,440 the MFT entry that says it's deleted. 415 00:22:26,060 --> 00:22:29,900 It doesn't actually delete anything except says we're not valid anymore. 416 00:22:31,360 --> 00:22:36,420 Actually the entries will get deleted if that MFT entry is ever reallocated for a new file, 417 00:22:36,480 --> 00:22:37,360 will zero everything out. 418 00:22:37,540 --> 00:22:38,940 But otherwise it just stays there. 419 00:22:39,320 --> 00:22:43,560 So if somebody deletes an MFT entry which you're using, it's still there. 420 00:22:43,560 --> 00:22:44,580 They changed one bit. 421 00:22:46,900 --> 00:22:52,520 The reserved space, though you have a problem with, is that NTFS has changed. 422 00:22:55,040 --> 00:22:59,600 There's been five or six different versions basically, if you count the minor versions 423 00:22:59,600 --> 00:22:59,940 of it. 424 00:23:00,120 --> 00:23:01,380 So it might change in the future. 425 00:23:01,480 --> 00:23:04,800 Some of the currently reserved space might go away, some new stuff might become reserved, 426 00:23:04,940 --> 00:23:05,460 so on and so forth. 427 00:23:05,960 --> 00:23:10,520 So you have that problem of, hey, technology might change, what we're doing now doesn't 428 00:23:10,520 --> 00:23:10,760 work. 429 00:23:10,760 --> 00:23:15,880 And you also have a problem of all that reserved space, it's zeroed normally. 430 00:23:16,400 --> 00:23:21,960 So hey, if you're a forensic analyst and there's some non-zero reserved space in MFT, 431 00:23:22,240 --> 00:23:24,900 you have a good hint that something's going on there. 432 00:23:25,060 --> 00:23:27,060 It's pretty obvious that something's wrong. 433 00:23:28,300 --> 00:23:35,140 Looking at the after attribute slack space, you have a problem of these are attributes 434 00:23:35,140 --> 00:23:36,420 and they might expand and grow. 435 00:23:36,960 --> 00:23:38,640 Someone adds more data to a file. 436 00:23:38,720 --> 00:23:40,660 Someone adds an alternate data stream to a file. 437 00:23:40,660 --> 00:23:44,880 You suddenly got another attribute taking up space, and all that slack space you thought 438 00:23:44,880 --> 00:23:47,360 you had may go away dynamically on a system. 439 00:23:47,520 --> 00:23:48,840 So that's a pretty big concern. 440 00:23:50,140 --> 00:23:53,940 On the other hand, we actually have an advantage here is that because of how the MFT works 441 00:23:53,940 --> 00:24:00,960 dynamically, that space isn't always zeroed, is that NTFS only changes stuff on the drive 442 00:24:00,960 --> 00:24:01,600 it has to. 443 00:24:01,840 --> 00:24:06,660 If it gets rid of an attribute or something, it doesn't zero out that space. 444 00:24:06,860 --> 00:24:09,480 It just marks it as no longer used. 445 00:24:09,480 --> 00:24:13,180 The end of attribute marker will just move up higher if you delete an attribute. 446 00:24:13,840 --> 00:24:15,400 It won't actually remove the old data. 447 00:24:15,480 --> 00:24:18,320 It will still keep it and write it back to disk, which means you end up with a whole 448 00:24:18,320 --> 00:24:20,800 bunch of garbage in the supposed slack space. 449 00:24:21,020 --> 00:24:22,620 This is really common in directories. 450 00:24:22,880 --> 00:24:27,600 For example, if you have a directory, the first five or six files you add to it, all 451 00:24:27,600 --> 00:24:29,580 of that information is stored in MFT. 452 00:24:30,540 --> 00:24:34,160 But after that point, it gets bigger than 1K, so it copies it all out to disk somewhere 453 00:24:34,160 --> 00:24:38,200 else and puts a little non-resident attribute in that says, here's where all the directory 454 00:24:38,200 --> 00:24:39,400 information is really stored at. 455 00:24:40,460 --> 00:24:43,300 It keeps the old directory information still there, though. 456 00:24:43,740 --> 00:24:48,180 So it looks like if you're just looking at a raw hex dump of it, you're like, where 457 00:24:48,180 --> 00:24:51,900 does the attributes end and whatever else, because it's not clear unless you really understand 458 00:24:51,900 --> 00:24:54,500 what's going on because of how it does that. 459 00:24:57,780 --> 00:25:02,220 Well we talked a little about these problems, now let's go into how can we avoid them. 460 00:25:02,440 --> 00:25:06,860 What are techniques we can use so that these problems don't become a real problem for us, 461 00:25:06,900 --> 00:25:07,720 that we can get around them? 462 00:25:09,500 --> 00:25:12,200 The basic idea is, let's find some safe entries. 463 00:25:12,340 --> 00:25:14,420 Let's find some safe MFT entries. 464 00:25:14,700 --> 00:25:15,960 Some things are more safe than others. 465 00:25:16,700 --> 00:25:20,320 And the basic idea is that some files rarely get modified or deleted. 466 00:25:20,960 --> 00:25:24,220 Operating system files, you install your operating system. 467 00:25:24,560 --> 00:25:28,080 You get patches, but a lot of operating system files never change. 468 00:25:28,340 --> 00:25:29,800 Font files are a great example. 469 00:25:30,260 --> 00:25:35,300 You might add new fonts to your system, but who deletes fonts off their systems or modifies 470 00:25:35,300 --> 00:25:35,940 the font files? 471 00:25:36,200 --> 00:25:36,960 It's very rare. 472 00:25:37,460 --> 00:25:39,160 You also have a thing of... 473 00:25:39,480 --> 00:25:41,120 Old files tend to be pretty safe. 474 00:25:41,220 --> 00:25:44,320 People install the applications they use as soon as they get a machine, and they're not 475 00:25:44,320 --> 00:25:45,440 likely to delete them. 476 00:25:45,540 --> 00:25:47,480 They might upgrade them, but they don't delete them. 477 00:25:47,760 --> 00:25:49,620 And so those files tend to stay around. 478 00:25:51,180 --> 00:25:56,360 You also have another interesting characteristic of NTFS, talking about attributes possibly 479 00:25:56,360 --> 00:26:01,120 growing and stuff, is that once an attribute goes non-resident, it never becomes resident 480 00:26:01,120 --> 00:26:01,400 again. 481 00:26:01,500 --> 00:26:06,880 If you have this big file and you truncate it down to zero size, it doesn't make the 482 00:26:06,880 --> 00:26:08,280 data attribute suddenly resident again. 483 00:26:08,380 --> 00:26:09,460 It still keeps it non-resident. 484 00:26:09,480 --> 00:26:12,360 It keeps blocks allocated elsewhere on disk for it. 485 00:26:12,840 --> 00:26:16,840 So we know that attributes themselves won't tend to grow a lot. 486 00:26:16,900 --> 00:26:18,980 Non-resident attributes don't tend to grow a lot. 487 00:26:20,540 --> 00:26:24,100 You also have a thing of directories tend not to get deleted. 488 00:26:25,520 --> 00:26:26,240 Various reasons. 489 00:26:26,520 --> 00:26:28,460 You have to delete all the files is a basic one. 490 00:26:28,740 --> 00:26:32,980 And even that, a lot of uninstaller programs, if you notice, won't even delete the directories 491 00:26:32,980 --> 00:26:34,480 for the programs that uninstall. 492 00:26:34,780 --> 00:26:36,660 Like you have to go back and manually delete them all. 493 00:26:36,900 --> 00:26:38,220 A lot of people don't do that. 494 00:26:38,220 --> 00:26:41,440 So director entries tend to stay around. 495 00:26:42,560 --> 00:26:43,920 Which is quite useful to know. 496 00:26:44,680 --> 00:26:50,060 Basic summary is, if you're looking for safe MFT entries to put data in, you want to look 497 00:26:50,060 --> 00:26:55,920 for something that has non-resident attributes, it's never been modified, because files that 498 00:26:55,920 --> 00:26:59,800 aren't modified don't tend to be, and it's been around for a long time. 499 00:27:03,180 --> 00:27:03,660 Okay. 500 00:27:05,460 --> 00:27:05,940 Well. 501 00:27:07,000 --> 00:27:07,960 Talked a little about. 502 00:27:08,040 --> 00:27:08,200 Okay. 503 00:27:08,220 --> 00:27:08,760 About NTFS. 504 00:27:08,820 --> 00:27:10,640 I want to go, well, how much can we actually store? 505 00:27:10,740 --> 00:27:11,760 What are we actually talking about? 506 00:27:12,540 --> 00:27:20,420 And basically is, if you stall Windows XP, base professional install, 12,000 MFT entries 507 00:27:21,020 --> 00:27:21,580 by default. 508 00:27:21,800 --> 00:27:23,820 That's how many files and directories it has. 509 00:27:26,000 --> 00:27:28,080 Most systems have at least 100,000. 510 00:27:28,360 --> 00:27:33,060 I know Erby's laptop has 230,000 MFT entries in it. 511 00:27:35,080 --> 00:27:36,700 And not all of these are safe. 512 00:27:36,700 --> 00:27:41,180 Using our basic metrics, we found about 60% of MFT entries we'd consider safe. 513 00:27:42,660 --> 00:27:46,940 In looking at the case, we're looking at, we want to look at the Slack space height 514 00:27:46,940 --> 00:27:47,960 and then the attributes. 515 00:27:48,180 --> 00:27:49,760 So we're talking about 600 bytes per entry. 516 00:27:50,120 --> 00:27:51,620 100,000 entries. 517 00:27:52,220 --> 00:27:55,700 At 60% of them we'd consider safe enough to store data in. 518 00:27:55,880 --> 00:28:02,800 That gives us 36 megabytes of hidden storage on an average NTFS drive. 519 00:28:04,600 --> 00:28:05,660 That's a lot of storage. 520 00:28:05,660 --> 00:28:07,200 That's a lot of storage for something that you can't see. 521 00:28:07,740 --> 00:28:09,320 Or most people can't see. 522 00:28:10,700 --> 00:28:14,260 But there's still a few issues about actually implementing this and getting this to work. 523 00:28:14,520 --> 00:28:18,220 The first issue is that you've got 600-byte chunks all over the disk. 524 00:28:18,440 --> 00:28:20,620 And that tends not to be very useful. 525 00:28:20,900 --> 00:28:24,340 So you want to have a technique where you can map these different chunks across the 526 00:28:24,340 --> 00:28:26,720 disk into a contiguous address space. 527 00:28:26,860 --> 00:28:32,780 Something that you can access like it's flat, like it's a drive itself even, so that all 528 00:28:32,780 --> 00:28:35,640 your current IDs of how you access files, write files, do all of that stuff, you can 529 00:28:35,660 --> 00:28:37,240 do all that sort of stuff, work. 530 00:28:37,420 --> 00:28:42,760 You don't have to change your pentagram of thinking about how you access your data in 531 00:28:42,760 --> 00:28:43,700 order to use this. 532 00:28:45,140 --> 00:28:47,780 Also you want to have that mapping system be dynamic. 533 00:28:48,800 --> 00:28:52,040 We try to be safe and not lose an MFT entry, but what happens if we do? 534 00:28:52,180 --> 00:28:57,700 We want a way to be able to replace it, perhaps grow if we need more space, people add more 535 00:28:57,700 --> 00:28:59,040 files to their file system. 536 00:28:59,460 --> 00:29:04,180 We're able to dynamically change how we're doing stuff to keep up and modify and try 537 00:29:04,180 --> 00:29:05,640 to maintain both our percentage. 538 00:29:08,200 --> 00:29:10,260 We need some sort of dynamic mapping. 539 00:29:12,180 --> 00:29:16,300 You also have to think about no matter where you hide, no matter whatever else, forensic 540 00:29:16,300 --> 00:29:17,720 analysts will be able to find you. 541 00:29:18,620 --> 00:29:21,340 If they really want to and they have enough time, they'll find you. 542 00:29:21,380 --> 00:29:23,540 They can do a string search across the drive and find some data. 543 00:29:24,320 --> 00:29:29,480 So you have to think about more than just hiding out of their vision, what happens when 544 00:29:29,480 --> 00:29:30,160 they do find you? 545 00:29:30,320 --> 00:29:32,440 And big thing there is encryption. 546 00:29:34,200 --> 00:29:35,500 Maybe you just want XOR. 547 00:29:35,640 --> 00:29:36,360 That's good enough for you. 548 00:29:36,840 --> 00:29:42,960 We gave talk earlier this year and at that time our proof of concept code used Blowfish, 549 00:29:43,120 --> 00:29:44,280 which was okay. 550 00:29:45,140 --> 00:29:53,320 Now we've gone to GCM AES, which is actually a data encryption specifically designed for 551 00:29:53,320 --> 00:29:53,760 data storage. 552 00:29:54,040 --> 00:29:57,680 And the advantage here is note is that it's authenticating encryption. 553 00:29:57,980 --> 00:30:03,840 You can tell when an encrypted data block gets changed and that's quite useful is if 554 00:30:03,840 --> 00:30:05,580 somebody overwrites your header. 555 00:30:05,640 --> 00:30:05,780 Overwritten data. 556 00:30:06,660 --> 00:30:08,400 You know that it got overwritten. 557 00:30:08,640 --> 00:30:12,860 You can say I might not have the data anymore but at least I know something changed. 558 00:30:13,340 --> 00:30:16,120 And you can do that with your encryption if you use the right algorithms. 559 00:30:16,440 --> 00:30:17,300 That's quite useful. 560 00:30:18,240 --> 00:30:21,120 Unfortunately with all encryption is key management is pretty hard. 561 00:30:23,340 --> 00:30:27,700 Well if someone only has a raw hard drive that pulled it out, they might have a hard 562 00:30:27,700 --> 00:30:28,580 time getting your key back. 563 00:30:28,720 --> 00:30:32,460 If you use some key dispersal algorithms and stuff, you can make it really hard for forensic 564 00:30:32,460 --> 00:30:35,620 analysts to say well here's an encryption key to decode all the rest of the data. 565 00:30:35,620 --> 00:30:40,920 But if they have it on a live running system and can do run time analysis and watch you 566 00:30:40,920 --> 00:30:43,800 as you encrypt and decrypt, you're pretty much gone. 567 00:30:44,000 --> 00:30:47,400 They can find your encryption key and they'll get your encrypted data if they want. 568 00:30:48,460 --> 00:30:52,040 That's an unfortunate thing and I wish there were better ways to do it but currently nobody's 569 00:30:52,780 --> 00:30:54,880 really figured out a way that I know of to do so. 570 00:30:56,200 --> 00:30:57,800 But that doesn't mean we should throw it out. 571 00:30:57,940 --> 00:30:59,080 Encryption is still quite useful. 572 00:31:00,260 --> 00:31:05,260 You also have the problem here of changing the way you encrypt. 573 00:31:05,260 --> 00:31:05,600 You also have the problem here of changing the way you encrypt. 574 00:31:05,620 --> 00:31:05,720 You also have the problem here of changing the way you encrypt. 575 00:31:05,720 --> 00:31:09,500 Change tracking is basically the thing is what happens when Windows decides to change 576 00:31:09,500 --> 00:31:09,920 your files. 577 00:31:12,480 --> 00:31:14,740 Fortunately, it doesn't change what doesn't need to change. 578 00:31:15,180 --> 00:31:17,480 But it does change some of it and we might lose our data. 579 00:31:17,700 --> 00:31:20,960 As talked about, you want to be able to dynamically remap it, so on and so forth. 580 00:31:22,660 --> 00:31:23,280 Checksums work. 581 00:31:24,500 --> 00:31:26,680 We've gone to authenticated encryption. 582 00:31:27,100 --> 00:31:28,100 That works quite well. 583 00:31:28,940 --> 00:31:32,020 But actually for this technique, we found one of the best things to do is just keep 584 00:31:32,020 --> 00:31:33,340 extra copies of your data around. 585 00:31:33,340 --> 00:31:38,920 Is that if you are smart about it and you use different MFT entries, it's unlikely two 586 00:31:38,920 --> 00:31:42,800 files on different parts of the system will change at the exact same time and you'll lose 587 00:31:42,800 --> 00:31:43,980 both copies of your data. 588 00:31:44,440 --> 00:31:48,980 So if you keep two, three, four copies of it, you can say, hey, I lost one copy. 589 00:31:49,080 --> 00:31:52,900 Let's make a new copy somewhere else and keep up with any file system changes. 590 00:31:54,000 --> 00:31:57,500 You also have the problem of NTFS might notice some changes you do on your file system. 591 00:31:58,840 --> 00:32:02,440 Fortunately, if you use the slack space at the end of attributes, they tend not to notice, 592 00:32:02,440 --> 00:32:03,780 which is very good. 593 00:32:05,300 --> 00:32:09,500 Ultimately, you'd really like to watch your file system changing, the disk, and be able 594 00:32:09,500 --> 00:32:11,800 to respond to say, hey, it's going to overwrite my data. 595 00:32:11,920 --> 00:32:13,760 I want to move my data before it does so. 596 00:32:14,660 --> 00:32:15,980 That's possible, but it's complicated. 597 00:32:16,120 --> 00:32:19,260 I won't go into it in this talk, but as a note, if you're really interested, it can 598 00:32:19,260 --> 00:32:19,640 be done. 599 00:32:23,940 --> 00:32:26,320 Finally, you want to think a little bit about usability. 600 00:32:26,940 --> 00:32:27,740 You've got your space. 601 00:32:27,900 --> 00:32:28,540 You know we're going to hide. 602 00:32:28,680 --> 00:32:31,500 We're going to hide in this case slack space at the end. 603 00:32:31,500 --> 00:32:33,340 And after the attributes in the MFT table. 604 00:32:33,700 --> 00:32:34,880 But how are we going to use it? 605 00:32:36,280 --> 00:32:39,640 Well the big thing is none of us want to rewrite all our applications and suddenly use this 606 00:32:39,640 --> 00:32:40,840 hidden data area. 607 00:32:41,300 --> 00:32:45,440 So you want to be able to write some way of accessing it that uses standard techniques. 608 00:32:47,880 --> 00:32:52,020 You also have to worry about how it's presented to the operating system. 609 00:32:53,100 --> 00:32:55,480 Does the operating system even recognize it? 610 00:32:55,580 --> 00:32:56,960 Is it something it sees it doesn't see? 611 00:32:58,840 --> 00:33:00,620 And the big thing is standard interfaces. 612 00:33:00,620 --> 00:33:06,640 And see your files read, write, open, close, those kind of things are very useful. 613 00:33:07,880 --> 00:33:10,080 Unfortunately file execution on Windows is very hard. 614 00:33:10,780 --> 00:33:16,560 Windows because of how it does file execution says it will only run files out of file systems 615 00:33:16,560 --> 00:33:17,200 it recognizes. 616 00:33:17,520 --> 00:33:21,860 So to get it to run an executable out of the hidden data area is actually quite difficult. 617 00:33:23,420 --> 00:33:26,980 But if you can convince it that it knows what file system you're running, it works great. 618 00:33:30,100 --> 00:33:30,520 Specifically. 619 00:33:30,620 --> 00:33:35,160 I'll go now move on to the final parts which is what FragFS actually does. 620 00:33:36,180 --> 00:33:40,900 Basically what we do with FragFS is proof of concept code that this technique actually 621 00:33:40,900 --> 00:33:41,180 works. 622 00:33:41,420 --> 00:33:43,680 And it starts up, you tell it to format. 623 00:33:43,900 --> 00:33:48,680 It will scan the entire MFT on your system and look for what it considers safe entries. 624 00:33:49,060 --> 00:33:54,900 And then it will put how much space is in each entry and it will put a little chunk 625 00:33:54,900 --> 00:33:55,520 of data there. 626 00:33:55,740 --> 00:33:58,100 In this case there are 160 byte chunks of data. 627 00:33:59,420 --> 00:33:59,900 Any. 628 00:34:00,620 --> 00:34:05,220 And if you have 320 bytes it will put two chunks in one entry and so on and so forth. 629 00:34:06,480 --> 00:34:11,380 And the advantage of this technique is that we keep no indexing of any of the blocks we 630 00:34:11,380 --> 00:34:11,820 use on disk. 631 00:34:12,320 --> 00:34:17,240 And I know for example like Slacker and some of the other tools that come out, all the 632 00:34:17,240 --> 00:34:19,600 forensics tools detect them by their indexes. 633 00:34:19,680 --> 00:34:23,960 They don't actually look for data, they just look for index pointing to where the hidden 634 00:34:23,960 --> 00:34:24,420 data is at. 635 00:34:24,620 --> 00:34:30,600 And we totally avoid that by each block has all the information it needs to be a data. 636 00:34:34,280 --> 00:34:35,540 And that's quite useful. 637 00:34:40,260 --> 00:34:43,760 Basically how it works is we have unlimited redundancy, you can keep as many copies of 638 00:34:43,760 --> 00:34:45,160 each block of data as you want. 639 00:34:45,960 --> 00:34:47,600 When you format you tell it how many times. 640 00:34:47,880 --> 00:34:51,080 It detects when it's been modified and can respond to that. 641 00:34:52,040 --> 00:34:55,200 If you lose one chunk you don't lose them all because each one is independent. 642 00:34:55,820 --> 00:34:59,380 There's nothing to be, there's no central database that can be overridden. 643 00:34:59,380 --> 00:35:05,740 And each chunk can easily be relocated, if one of it is overridden you can take a copy 644 00:35:05,740 --> 00:35:07,480 and put it somewhere else on disk, quite fine. 645 00:35:08,420 --> 00:35:11,960 Unfortunately it does have a disadvantage by doing this is that you have to scan the 646 00:35:11,960 --> 00:35:16,260 entire MFT to find all the chunks for your hidden data before you can actually start 647 00:35:16,260 --> 00:35:17,020 modifying stuff. 648 00:35:17,240 --> 00:35:22,060 Which can be slow but if you cache that information and keep it in memory you don't have to keep 649 00:35:22,060 --> 00:35:22,600 rescanning. 650 00:35:26,640 --> 00:35:29,060 Specifically we have two different versions of the code. 651 00:35:29,060 --> 00:35:34,200 One is a user space library which you can basically link programs against, provide standard 652 00:35:34,200 --> 00:35:41,600 interfaces of open read write, has a built in mini file system in it, basically store 653 00:35:41,600 --> 00:35:45,800 files like they were just normal files and read and write from it. 654 00:35:45,880 --> 00:35:47,780 Can link with any program. 655 00:35:49,900 --> 00:35:53,480 Specifically actually people are interested in if the Black Hat website from Black Hat 656 00:35:53,480 --> 00:35:56,440 Federal actually has the demo code you can download executables of it. 657 00:35:57,620 --> 00:35:59,040 And we also have a demo code. 658 00:35:59,060 --> 00:36:04,660 For a kernel driver which is actually much more sophisticated and works in the kernel 659 00:36:04,660 --> 00:36:10,780 and can create a virtual drive on the system that Windows sees as a DOS drive. 660 00:36:11,260 --> 00:36:15,600 And you can actually run programs out of it and do everything like it was a normal 661 00:36:15,600 --> 00:36:15,880 drive. 662 00:36:16,300 --> 00:36:19,600 Interestingly enough because of how you can set up those virtual drives it won't show 663 00:36:19,600 --> 00:36:22,880 up in Windows Explorer but will show up from command prompt into programs. 664 00:36:26,660 --> 00:36:27,620 And finally. 665 00:36:27,940 --> 00:36:29,040 Everybody will give a check. 666 00:36:29,060 --> 00:36:30,620 So that's the demo of the user space code. 667 00:36:38,460 --> 00:36:39,500 All right guys. 668 00:36:39,640 --> 00:36:41,080 Well now for the more fun part. 669 00:36:41,440 --> 00:36:41,980 No offense. 670 00:36:43,240 --> 00:36:44,540 What is this code actually doing? 671 00:36:45,520 --> 00:36:47,480 The proof of concept is called hammer.exe. 672 00:36:48,520 --> 00:36:49,420 I've run it here. 673 00:36:49,540 --> 00:36:50,400 I've gone ahead and started it. 674 00:36:51,380 --> 00:36:53,040 And obviously you have a bunch of options. 675 00:36:53,320 --> 00:36:55,460 The most important is what drive you want to do this on. 676 00:36:55,860 --> 00:36:57,320 Obviously if there's more than one hard drive. 677 00:36:57,320 --> 00:36:59,220 You can do it separately for each one. 678 00:36:59,760 --> 00:37:01,920 There's a format command which is what we run first. 679 00:37:02,100 --> 00:37:03,260 And I just actually have run it. 680 00:37:03,800 --> 00:37:09,920 And what the format will do is set up the MFT or set up our hidden space so that we 681 00:37:09,920 --> 00:37:10,400 can use it. 682 00:37:10,960 --> 00:37:15,480 I've just run the format command here and it says with four times redundancy which means 683 00:37:15,480 --> 00:37:17,000 we're keeping four copies of each byte. 684 00:37:17,240 --> 00:37:19,780 We have a little over 15 megabytes available. 685 00:37:20,000 --> 00:37:27,300 So in my system standard 40 gig laptop that's 60 megabytes of hidden space. 686 00:37:27,300 --> 00:37:28,300 In the MFT. 687 00:37:28,520 --> 00:37:31,460 Just slack space that Microsoft decided wasn't important. 688 00:37:33,680 --> 00:37:35,580 So the next thing I'm going to do is store a file. 689 00:37:35,880 --> 00:37:38,820 If I do a DIR we have usage.txt. 690 00:37:38,900 --> 00:37:40,520 Let's just put that into our hidden file system. 691 00:37:41,040 --> 00:37:44,700 Then we'll take a look at it and then we'll pull it back out so you guys can see it. 692 00:37:45,380 --> 00:37:46,420 So I'm going to run hammer. 693 00:37:46,640 --> 00:37:48,100 I'm going to say I want to do it on drive C. 694 00:37:48,320 --> 00:37:50,440 I'm going to store usage.txt. 695 00:37:51,160 --> 00:37:54,500 I'm going to store it as file number one. 696 00:37:55,000 --> 00:37:57,280 And what this is doing is as Matt said. 697 00:37:57,280 --> 00:38:02,900 The library at user space library has a mini file system in it. 698 00:38:02,940 --> 00:38:04,540 And basically it just stores files as numbers. 699 00:38:05,240 --> 00:38:07,500 So you can go file number one, file number two. 700 00:38:08,020 --> 00:38:08,380 Whatever. 701 00:38:08,540 --> 00:38:10,360 So it's going to take a little bit of time. 702 00:38:10,580 --> 00:38:11,240 Hopefully not too long. 703 00:38:11,420 --> 00:38:13,500 Because what it's doing right now is reading the entire MFT. 704 00:38:14,180 --> 00:38:15,680 And that's the trade off of our system. 705 00:38:15,820 --> 00:38:21,500 By not having a central index we have to read the entire MFT which causes it to be a little bit slow. 706 00:38:21,780 --> 00:38:23,080 But we've stored a file in there now. 707 00:38:24,020 --> 00:38:27,260 We can actually list the files that are in the system. 708 00:38:27,280 --> 00:38:28,940 In the hidden area. 709 00:38:29,480 --> 00:38:31,260 And it will go through again the MFT. 710 00:38:31,580 --> 00:38:32,680 It will find all the hidden files. 711 00:38:33,020 --> 00:38:34,260 It's going to show you file number zero. 712 00:38:34,360 --> 00:38:36,560 Which is the actual book keeping information. 713 00:38:37,320 --> 00:38:39,340 And then file number one which is the file we just hid. 714 00:38:41,260 --> 00:38:42,140 So there we go. 715 00:38:42,260 --> 00:38:43,080 File number zero. 716 00:38:43,520 --> 00:38:44,380 And file number one. 717 00:38:44,440 --> 00:38:46,020 File number zero is not really useful. 718 00:38:46,980 --> 00:38:48,260 Well it is useful for us. 719 00:38:48,320 --> 00:38:51,420 But not really so much to store data in. 720 00:38:51,800 --> 00:38:53,140 So now let's pull it back out. 721 00:38:56,820 --> 00:38:57,260 Retrieve data. 722 00:38:57,260 --> 00:38:57,800 Retrieve number one. 723 00:38:57,960 --> 00:39:00,860 And store this file name. 724 00:39:01,940 --> 00:39:02,960 Usage two dot text. 725 00:39:04,120 --> 00:39:05,360 So now what it's going to do. 726 00:39:05,900 --> 00:39:08,040 It's going to pull the file that we just stored back out. 727 00:39:08,120 --> 00:39:09,960 Put it back on the regular hard drive. 728 00:39:10,540 --> 00:39:13,260 And we'll do a comparison to make sure those two files are the same. 729 00:39:14,840 --> 00:39:16,640 Unless something fails they will be. 730 00:39:18,600 --> 00:39:20,340 So let's compare usage text. 731 00:39:20,680 --> 00:39:23,580 Usage two dot text. 732 00:39:25,380 --> 00:39:27,060 And they are the same file. 733 00:39:27,260 --> 00:39:29,800 If I do a DIR you can see they are the exact same size. 734 00:39:30,500 --> 00:39:33,900 So that would be basically how the tool works. 735 00:39:34,280 --> 00:39:35,300 There are a few other options. 736 00:39:35,640 --> 00:39:38,360 As far as if you want to get rid of yourself off the drive. 737 00:39:38,500 --> 00:39:39,720 You can run the cleanse command. 738 00:39:39,940 --> 00:39:40,900 And it's like you were never there. 739 00:39:41,640 --> 00:39:42,800 Which can be useful obviously. 740 00:39:46,700 --> 00:39:47,780 So I'm going to go a little bit further. 741 00:39:47,920 --> 00:39:49,160 We're going to look at a little bit of detection. 742 00:39:50,920 --> 00:39:52,000 How do you detect this? 743 00:39:52,160 --> 00:39:54,700 Well current forensic tools don't. 744 00:39:55,240 --> 00:39:56,980 They treat the MFT as a black box. 745 00:39:57,260 --> 00:40:00,820 They don't know what the MFT is supposed to look like. 746 00:40:01,000 --> 00:40:03,600 They know how to look at all the files on the drive. 747 00:40:03,780 --> 00:40:05,800 But they don't really look at the MFT for its own sake. 748 00:40:06,180 --> 00:40:07,940 And it's a pretty big chunk of the drive. 749 00:40:09,000 --> 00:40:12,300 So there's a need for the forensic tools to understand the file structure. 750 00:40:12,540 --> 00:40:13,600 The file structure is better. 751 00:40:14,160 --> 00:40:17,060 And the analysts don't have time to comb through hex stumps. 752 00:40:17,300 --> 00:40:19,780 And even if they do I'll show you what it looks like. 753 00:40:19,860 --> 00:40:22,000 It's not obvious really that you're there. 754 00:40:23,200 --> 00:40:27,100 We did develop a detection tool specifically for detecting ourselves. 755 00:40:27,100 --> 00:40:29,340 So since we knew how we were hiding. 756 00:40:29,780 --> 00:40:30,980 We thought we'd be good guys. 757 00:40:31,080 --> 00:40:32,760 And also develop a way of detecting that. 758 00:40:33,880 --> 00:40:36,880 We consider any data beyond the end of attribute marker to be suspicious. 759 00:40:37,560 --> 00:40:38,660 So I'll flip back over. 760 00:40:41,340 --> 00:40:43,020 Our detection tool is called Looker. 761 00:40:43,460 --> 00:40:45,100 And I'll just run Looker. 762 00:40:45,760 --> 00:40:46,820 See what the options are. 763 00:40:46,940 --> 00:40:47,920 Because I never can remember. 764 00:40:50,320 --> 00:40:52,480 So we want to do a verbose. 765 00:40:52,560 --> 00:40:55,180 Which will print out dumps of interesting information. 766 00:40:55,700 --> 00:40:57,040 And I'm going to skip directory entry. 767 00:40:57,100 --> 00:40:59,180 Because if you remember Matt said earlier. 768 00:40:59,640 --> 00:41:01,460 When directory entries become non-resident. 769 00:41:02,540 --> 00:41:04,200 Microsoft doesn't ever clean them out. 770 00:41:04,380 --> 00:41:05,900 And so you can get false positives there. 771 00:41:06,480 --> 00:41:09,100 It's just easier for me to skip them. 772 00:41:09,220 --> 00:41:13,120 It'll be nice if I actually put the drive letter within there. 773 00:41:13,200 --> 00:41:14,280 So it's scanning through. 774 00:41:14,440 --> 00:41:15,720 It's seeing like some junk data. 775 00:41:16,440 --> 00:41:18,040 And there if you can see it. 776 00:41:18,080 --> 00:41:18,500 I just stopped. 777 00:41:18,900 --> 00:41:19,960 There's our usage text. 778 00:41:20,100 --> 00:41:25,020 Actually hiding beyond the end of attribute marker of different MFT entries. 779 00:41:25,160 --> 00:41:26,700 So an entry number 190. 780 00:41:27,640 --> 00:41:29,380 We found data at offset 760. 781 00:41:30,620 --> 00:41:32,260 So that's how the detection tool works. 782 00:41:32,480 --> 00:41:34,460 Both of those are on the Black Hat website. 783 00:41:35,100 --> 00:41:36,920 From Black Hat Federal this past year. 784 00:41:37,340 --> 00:41:38,640 And feel free to pull them down. 785 00:41:38,760 --> 00:41:39,160 And take a look. 786 00:41:39,220 --> 00:41:39,700 Play with them. 787 00:41:40,940 --> 00:41:41,300 No. 788 00:41:41,360 --> 00:41:42,500 We didn't get the source code out. 789 00:41:42,600 --> 00:41:44,960 Because we had some other interested parties. 790 00:41:47,200 --> 00:41:47,800 All right. 791 00:41:51,160 --> 00:41:51,520 Finally. 792 00:41:51,620 --> 00:41:53,600 I just wanted to show you what NCASE finds. 793 00:41:53,860 --> 00:41:55,880 NCASE is kind of the defacto forensic tool. 794 00:41:55,880 --> 00:41:59,040 And I basically scanned. 795 00:41:59,240 --> 00:42:00,620 I pulled up the MFT. 796 00:42:01,060 --> 00:42:02,840 I opened up the hex view window. 797 00:42:03,240 --> 00:42:05,040 And I just started scanning through it. 798 00:42:05,160 --> 00:42:06,400 And it took about ten minutes. 799 00:42:06,700 --> 00:42:11,440 And I finally got to an MFT entry that had some hidden data in it. 800 00:42:11,960 --> 00:42:14,080 At the very beginning you can see there's a magic number. 801 00:42:14,220 --> 00:42:15,260 It's called file zero. 802 00:42:15,420 --> 00:42:17,600 That just is a magic number for an MFT entry. 803 00:42:18,540 --> 00:42:21,100 Then you'll see the different attributes there at the top. 804 00:42:21,340 --> 00:42:22,400 And there's a little bit of. 805 00:42:22,520 --> 00:42:24,800 There's the four double Fs. 806 00:42:24,800 --> 00:42:26,620 Which is the end of attribute marker. 807 00:42:27,000 --> 00:42:28,400 There's a little bit of slack space. 808 00:42:28,880 --> 00:42:30,180 And then our hidden data. 809 00:42:30,600 --> 00:42:32,100 Now obviously that's encrypted data. 810 00:42:32,640 --> 00:42:35,980 It's somewhat more dense than the data above it. 811 00:42:36,080 --> 00:42:40,820 But obviously you could mitigate that if you really wanted to do some kind of statistical analysis. 812 00:42:40,860 --> 00:42:42,160 So that you looked the same. 813 00:42:42,880 --> 00:42:45,160 We just chose to dump ourselves in there. 814 00:42:45,820 --> 00:42:49,200 NCASE doesn't do any kind of like flagging or marking. 815 00:42:49,340 --> 00:42:51,580 Doesn't show that hey this is something suspect. 816 00:42:51,980 --> 00:42:53,160 It doesn't know what it is. 817 00:42:53,220 --> 00:42:54,340 It doesn't know anything about it. 818 00:42:54,400 --> 00:42:54,560 So. 819 00:42:55,740 --> 00:42:56,720 Pretty well hidden there. 820 00:42:56,840 --> 00:42:59,900 Unless analysts start doing a bit by bit. 821 00:43:00,020 --> 00:43:00,340 You know. 822 00:43:00,560 --> 00:43:01,500 Search of the raw drive. 823 00:43:03,320 --> 00:43:03,720 So. 824 00:43:04,020 --> 00:43:05,560 I've already showed you the detection demonstration. 825 00:43:07,180 --> 00:43:07,980 Future considerations. 826 00:43:08,940 --> 00:43:11,100 Obviously hiding through obscurity only buys you time. 827 00:43:11,300 --> 00:43:11,960 Now that we've. 828 00:43:12,120 --> 00:43:12,420 You know. 829 00:43:13,540 --> 00:43:14,120 Discussed this. 830 00:43:14,560 --> 00:43:16,280 It's not nearly as useful as it would have been. 831 00:43:16,440 --> 00:43:17,200 A few months ago. 832 00:43:20,180 --> 00:43:20,580 Yeah. 833 00:43:21,660 --> 00:43:21,840 Well. 834 00:43:22,100 --> 00:43:23,540 There's still no tool that detects it. 835 00:43:23,680 --> 00:43:23,860 But. 836 00:43:24,280 --> 00:43:24,600 It's. 837 00:43:24,600 --> 00:43:25,060 You know. 838 00:43:25,340 --> 00:43:26,360 We have other ways to hide. 839 00:43:27,440 --> 00:43:29,680 There are many other unexplored data storage areas. 840 00:43:29,840 --> 00:43:30,000 So. 841 00:43:30,020 --> 00:43:31,200 This was just one place we saw. 842 00:43:31,420 --> 00:43:31,640 Hey. 843 00:43:31,720 --> 00:43:32,280 This is kind of cool. 844 00:43:32,380 --> 00:43:33,020 Look at all this space. 845 00:43:33,200 --> 00:43:33,900 We can hide there. 846 00:43:34,000 --> 00:43:35,820 But there's plenty of other places to do similar type stuff. 847 00:43:36,260 --> 00:43:37,420 And the way we built our tools. 848 00:43:37,920 --> 00:43:40,480 We can just retarget it towards whatever space we want to hide in. 849 00:43:41,580 --> 00:43:43,580 You still have the problem of hiding the access tools. 850 00:43:43,880 --> 00:43:44,140 So. 851 00:43:44,820 --> 00:43:48,260 The Hammer and Looker executables were residing in the normal file system. 852 00:43:48,540 --> 00:43:48,680 And. 853 00:43:49,100 --> 00:43:50,320 We've kind of been looking at ways. 854 00:43:50,500 --> 00:43:53,020 How can we bootstrap ourselves out of the hidden space. 855 00:43:53,020 --> 00:43:53,800 So. 856 00:43:54,120 --> 00:43:55,340 That we never have anything. 857 00:43:55,920 --> 00:43:57,160 That's not in the hidden space. 858 00:43:57,400 --> 00:43:57,900 And that's. 859 00:43:58,380 --> 00:43:59,520 A pretty hard problem. 860 00:43:59,660 --> 00:44:01,340 We've got some leads on how to do that. 861 00:44:01,440 --> 00:44:02,820 But we haven't explored it fully yet. 862 00:44:03,460 --> 00:44:04,000 And then. 863 00:44:04,040 --> 00:44:06,220 I just want to close with kind of a side thought. 864 00:44:06,480 --> 00:44:06,700 And that's. 865 00:44:06,780 --> 00:44:08,140 Should file system standards be open. 866 00:44:08,800 --> 00:44:09,760 Or at least like. 867 00:44:09,820 --> 00:44:10,800 The specs be published. 868 00:44:12,320 --> 00:44:13,000 If they were. 869 00:44:13,100 --> 00:44:14,820 The forensics tools could do a better job of understanding. 870 00:44:15,220 --> 00:44:15,540 Hey. 871 00:44:15,640 --> 00:44:16,220 This is good data. 872 00:44:16,320 --> 00:44:17,340 This is what good data looks like. 873 00:44:18,660 --> 00:44:20,140 There's also kind of the counter argument. 874 00:44:20,420 --> 00:44:22,260 Would it be easier to exploit file systems. 875 00:44:22,460 --> 00:44:22,720 If. 876 00:44:22,780 --> 00:44:23,000 You know. 877 00:44:23,000 --> 00:44:24,860 Somebody could look at the source code. 878 00:44:25,180 --> 00:44:26,740 And find a little flaw or whatever. 879 00:44:27,580 --> 00:44:28,840 My general feeling is. 880 00:44:29,000 --> 00:44:29,380 If. 881 00:44:29,600 --> 00:44:30,280 It's open. 882 00:44:30,680 --> 00:44:31,880 It's just better for everybody. 883 00:44:32,620 --> 00:44:34,920 The forensic tools know exactly what good data looks like. 884 00:44:35,000 --> 00:44:36,080 Anything that doesn't fit that. 885 00:44:36,240 --> 00:44:37,380 Is automatically suspect. 886 00:44:38,700 --> 00:44:40,060 A hacker only has to find. 887 00:44:40,320 --> 00:44:41,260 One way to hide. 888 00:44:41,540 --> 00:44:41,840 Whereas. 889 00:44:41,960 --> 00:44:43,060 Somebody trying to play defense. 890 00:44:43,400 --> 00:44:45,700 Has to think of every possible way a hacker would try. 891 00:44:46,220 --> 00:44:46,880 To hide. 892 00:44:47,000 --> 00:44:47,120 Or. 893 00:44:47,180 --> 00:44:48,160 Do whatever they want to do. 894 00:44:48,300 --> 00:44:48,480 So. 895 00:44:49,340 --> 00:44:50,000 I'm all for. 896 00:44:50,100 --> 00:44:50,380 Just. 897 00:44:50,460 --> 00:44:50,680 You know. 898 00:44:50,860 --> 00:44:51,620 Opening the spec. 899 00:44:51,780 --> 00:44:52,240 At least. 900 00:44:52,320 --> 00:44:52,880 At least. 901 00:44:52,880 --> 00:44:52,980 You know. 902 00:44:53,000 --> 00:44:53,280 Just publishing. 903 00:44:53,420 --> 00:44:54,400 What it's supposed to look like. 904 00:44:55,240 --> 00:44:55,600 So. 905 00:44:55,700 --> 00:44:56,620 I hope you guys have some questions. 906 00:44:56,880 --> 00:44:57,460 Feel free to. 907 00:44:57,540 --> 00:44:57,960 You know. 908 00:44:58,020 --> 00:44:58,560 Stick around. 909 00:44:58,660 --> 00:44:58,760 Or. 910 00:44:58,780 --> 00:44:59,200 Give us questions. 911 00:44:59,420 --> 00:44:59,740 Go ahead. 912 00:45:01,240 --> 00:45:01,600 . 913 00:45:16,960 --> 00:45:17,820 Are we done? 914 00:45:18,060 --> 00:45:18,320 Yeah. 915 00:45:18,380 --> 00:45:18,600 Well. 916 00:45:19,120 --> 00:45:19,480 . 917 00:45:20,180 --> 00:45:20,540 Question. 918 00:45:20,860 --> 00:45:21,220 . 919 00:45:22,620 --> 00:45:22,980 . 920 00:45:23,000 --> 00:45:23,220 Never mind. 921 00:45:23,220 --> 00:45:23,420 Do we have questions. 922 00:45:23,420 --> 00:45:23,740 Do you do exercises. 923 00:45:23,740 --> 00:45:23,900 Oh, yeah. 924 00:45:23,960 --> 00:45:24,140 Guys. 925 00:45:24,220 --> 00:45:25,120 If you do have questions. 926 00:45:25,200 --> 00:45:25,700 Either go to the mic. 927 00:45:25,820 --> 00:45:25,960 Or. 928 00:45:26,380 --> 00:45:27,400 We can talk offline. 929 00:45:27,560 --> 00:45:28,800 But your question was. 930 00:45:29,940 --> 00:45:30,300 . 931 00:45:30,300 --> 00:45:30,500 . 932 00:45:30,500 --> 00:45:30,720 . 933 00:45:30,720 --> 00:45:32,180 I just sent in some percentage of the stuff. 934 00:45:32,220 --> 00:45:32,420 . 935 00:45:32,420 --> 00:45:34,040 You could consider stable to use. 936 00:45:34,280 --> 00:45:35,820 Is there like a way of algorithm. 937 00:45:36,500 --> 00:45:39,760 So that it's part of the . 938 00:45:40,500 --> 00:45:40,860 Well. 939 00:45:41,220 --> 00:45:41,580 Actually. 940 00:45:41,620 --> 00:45:42,720 It is part of our algorithm. 941 00:45:42,840 --> 00:45:44,080 That's how we come up with the 60% number. 942 00:45:44,480 --> 00:45:44,840 Actually. 943 00:45:44,920 --> 00:45:46,580 The question was is. 944 00:45:46,620 --> 00:45:47,580 It said like 40%. 945 00:45:47,580 --> 00:45:51,800 percent isn't stable for storing stuff in is I cannot be algorithmically determined. 946 00:45:52,020 --> 00:45:56,620 And actually it was. That number came from algorithm. I didn't say it, but it's basically 947 00:45:58,340 --> 00:46:04,540 the file never been modified. It's been more than a year old. Those are the two key characteristics. 948 00:46:04,940 --> 00:46:08,200 And if those things are true, it's unlikely to be modified any time soon. 949 00:46:11,540 --> 00:46:11,980 Yeah. 950 00:46:12,500 --> 00:46:13,700 Does it work in the VMware? 951 00:46:14,240 --> 00:46:17,120 Yes. In fact, that's where I did the initial testing. 952 00:46:19,360 --> 00:46:21,300 How does EFS affect it? 953 00:46:21,640 --> 00:46:22,280 Does what? 954 00:46:22,540 --> 00:46:23,020 EFS. 955 00:46:23,700 --> 00:46:24,220 EFS. 956 00:46:24,560 --> 00:46:26,060 Encrypted file system for NT. 957 00:46:26,960 --> 00:46:32,100 EFS actually works by encrypting individual attributes such as the data attribute would be encrypted. 958 00:46:32,480 --> 00:46:36,460 So in fact, it actually makes no difference whatsoever because we ignore the normal attributes. 959 00:46:36,640 --> 00:46:40,380 We store ourselves after them. EFS doesn't do a whole drive encryption. 960 00:46:40,660 --> 00:46:42,360 It only does per data stream encryption. 961 00:46:42,700 --> 00:46:43,620 So it does like the AC. 962 00:46:43,700 --> 00:46:45,440 So it's like the ACL instead of the MTF or MFT. 963 00:46:45,640 --> 00:46:46,080 Yeah. 964 00:46:46,220 --> 00:46:46,660 Okay. 965 00:46:46,740 --> 00:46:48,700 So therefore, we don't interfere with it. 966 00:46:48,880 --> 00:46:49,160 Yeah. 967 00:46:49,240 --> 00:46:51,180 Okay. So the MFT is outside of EFS? 968 00:46:51,580 --> 00:46:52,020 Correct. 969 00:46:52,280 --> 00:46:52,540 Okay. 970 00:46:59,660 --> 00:47:03,740 Are you aware of anything that actually is using some of these techniques that you're talking about? 971 00:47:05,300 --> 00:47:06,980 None that I can talk about publicly. 972 00:47:09,460 --> 00:47:13,480 At techno security, there was quite a bit of discussion about, you know, 973 00:47:13,480 --> 00:47:20,480 everything's going to EFS and the current standard of imaging an entire drive is probably going to go away, 974 00:47:21,560 --> 00:47:26,980 which, you know, means that there's just going to be specialized tools to find, you know, 975 00:47:27,000 --> 00:47:29,780 certain types of data in certain ways. 976 00:47:30,140 --> 00:47:37,020 You know, is that going to make it easier then to find stuff that is hidden in Slack space, et cetera? 977 00:47:37,540 --> 00:47:39,180 Well, yes and no. 978 00:47:40,200 --> 00:47:42,840 Take your question as, is that... 979 00:47:42,840 --> 00:47:46,380 In some senses, yes and no, because ultimately, you have to have a file system. 980 00:47:46,580 --> 00:47:52,360 Even if you have a whole drive underneath the file system, there's still the file system on top. 981 00:47:52,600 --> 00:47:55,020 And even if your data is getting encrypted by the encryption layer, 982 00:47:55,280 --> 00:47:58,820 you can still store yourself in the file system where people aren't looking now. 983 00:47:59,540 --> 00:48:02,560 So it will change somewhat, but not... 984 00:48:02,560 --> 00:48:04,620 The fundamental concepts stay the same. 985 00:48:04,940 --> 00:48:06,640 Let me give you my personal view, okay? 986 00:48:07,000 --> 00:48:07,740 Does that... 987 00:48:12,840 --> 00:48:13,120 How it's going to change?