Latest / CyberCode Academy / Course 21 - Digital Forensics: Windows Shellbags | Episode 3: ShellBag Forensics: Practical Validation and Timestamp Analysis
Transcript
- 0:00Speaker 1: You know, I tend to think of my computer as
- 0:03Speaker 1: just a filing cabinet, a very logical, very rigid filing cabinet.
- 0:07Speaker 1: You put a file in, you take it out, you
- 0:09Speaker 1: delete it.
- 0:10Speaker 2: It's gone a very transactional relationship, exactly.
- 0:14Speaker 1: But the more we dig into digital forensics, the more
- 0:17Speaker 1: it feels like the operating system isn't a cabinet at all.
- 0:20Speaker 1: It's more like a very attentive, slightly creepy butler who
- 0:24Speaker 1: just never sleeps.
- 0:25Speaker 2: That is a disturbingly accurate metaphor, right.
- 0:28Speaker 1: It's not just watching what you do, it's watching how
- 0:30Speaker 1: you do it. It remembers if you prefer big icons
- 0:33Speaker 1: or a detailed list, or if you like the window
- 0:36Speaker 1: in a certain corner of the screen.
- 0:38Speaker 2: And that memory, as you call it, is a huge
- 0:41Speaker 2: liability if you're trying to hide something, But for an investigator,
- 0:44Speaker 2: it's a gold mine.
- 0:46Speaker 1: So that's what we're talking about today.
- 0:47Speaker 2: We are we're talking about shell bags. It's one of
- 0:50Speaker 2: the most overlooked artifacts. You can wipe your browser history
- 0:52Speaker 2: and clear your recent documents, run all the cleaner software
- 0:56Speaker 2: you want, but the.
- 0:56Speaker 1: Shell bags are still there.
- 0:58Speaker 2: They are still there unless you know exactly where to
- 1:01Speaker 2: look and how to get rid of them. The way
- 1:02Speaker 2: you arranged a folder three years ago could still be recorded.
- 1:07Speaker 1: So for this deep dive, we're not just going to
- 1:09Speaker 1: talk theory. We're going to run a simulation, a kind
- 1:12Speaker 1: of ghost in the machine experiment.
- 1:14Speaker 2: I love it. We're going to build a mental forensic lab.
- 1:17Speaker 2: We'll do something that seems completely invisible, something you do
- 1:20Speaker 2: every day, and then we're going to tear the os
- 1:22Speaker 2: apart to see if we can find the evidence.
- 1:23Speaker 1: Oh okay, I'm ready. Let's do some validation testing. So
- 1:26Speaker 1: let's set the stage. We've got a fresh Windows computer,
- 1:28Speaker 1: clean desktop. What's our first move our control action?
- 1:33Speaker 2: Okay, so picture your desktop. I'll cue to mentally write,
- 1:37Speaker 2: click and create a new folder. Let's call it test files.
- 1:42Speaker 1: Done. Test files is now sitting on the desktop.
- 1:44Speaker 2: Great, now open it up inside. Create a single text file.
- 1:48Speaker 2: Call it my first test file.
- 1:49Speaker 1: Okay, folder created, file created. Seems innocent enough.
- 1:53Speaker 2: Now here's the critical part. This is the action we're testing.
- 1:56Speaker 2: I'll want you to open the test files folder. Just
- 1:59Speaker 2: look at it for maybe a few seconds, and then
- 2:01Speaker 2: close the window.
- 2:02Speaker 1: That's it. I'm not opening the file or changing anything nothing.
- 2:05Speaker 2: Don't move anything, don't rename anything, just open, look and close.
- 2:08Speaker 1: All right, Open one, two, three, and closed.
- 2:13Speaker 2: That's our interaction. Now the big question is did the
- 2:16Speaker 2: operating system just record that specific event, and if it did, where.
- 2:22Speaker 1: My gut says yes, because computers just tracked everything. But
- 2:25Speaker 1: logically I didn't change anything. I didn't write any data.
- 2:29Speaker 1: The modified timestamp on that folder shouldn't have changed, right.
- 2:32Speaker 2: You're thinking about the file system, but we're not looking there.
- 2:35Speaker 2: We're going hunting in the user system, in the Windows registry.
- 2:38Speaker 1: We're looking for shell bags.
- 2:40Speaker 2: We are, and to find them we have to go
- 2:42Speaker 2: to some places on the computer that Microsoft really really
- 2:44Speaker 2: doesn't want you to go.
- 2:45Speaker 1: Sounds like we're going off road.
- 2:47Speaker 2: We definitely are to find this evidence. We're looking for
- 2:50Speaker 2: user specific registry hives. There are two primary files we're targeting.
- 2:54Speaker 1: Okay, what are they?
- 2:55Speaker 2: The first one is a file called endtwousar dot dt.
- 2:58Speaker 1: N to you dot com dbt Okay, that sounds familiar.
- 3:02Speaker 1: I feel like I've seen that when I've had to
- 3:04Speaker 1: fix a broken user profile or something exactly.
- 3:06Speaker 2: It's kind of a legacy file. It sits right in
- 3:09Speaker 2: the root of your user folder, so your username is Jane.
- 3:12Speaker 2: It's right there at s users Jane, USRR dot data.
- 3:17Speaker 2: Got it?
- 3:17Speaker 1: What's the second one?
- 3:18Speaker 2: The second and for our purposes today, the more important
- 3:20Speaker 2: file is called USR class dot data. Microsoft started splitting
- 3:25Speaker 2: things up around Windows seven.
- 3:26Speaker 1: USR class dot debt. Okay, that one sounds more obscure.
- 3:29Speaker 1: Where is it hiding?
- 3:30Speaker 2: It's buried deeper inside the app data structure. You have
- 3:33Speaker 2: to go users, your username, app data local Microsoft Windows.
- 3:37Speaker 2: It's way down in the.
- 3:38Speaker 1: Basement, and app data is hidden by default, isn't it?
- 3:41Speaker 2: It is, and for a very good reason. These files
- 3:44Speaker 2: NTSR data, USR class dot debt. They are basically the
- 3:48Speaker 2: spine of your user profile. They hold your settings, your configurations.
- 3:52Speaker 2: If you delete them, you can't log.
- 3:54Speaker 1: In, so Microsoft hides them to what savy from yourself.
- 3:57Speaker 2: Pretty much, they're marked is protected operating system files, a
- 4:00Speaker 2: big do not touch sign.
- 4:02Speaker 1: So in our mental lab if I just navigate to
- 4:04Speaker 1: that folder, I'm not going to see anything.
- 4:05Speaker 2: You'll see an empty folder. To be the detective, you
- 4:08Speaker 2: have to bypass the safety locks. You go into folder
- 4:11Speaker 2: options under the viewtap. First you check show hidden files, obviously,
- 4:15Speaker 2: but that's not enough. Nope. You also have to scroll
- 4:18Speaker 2: down and unchecked the box that says hide protected operating
- 4:21Speaker 2: system files.
- 4:22Speaker 1: Ah, and that's when you get the big scary warning pop.
- 4:26Speaker 2: Up, the one that says are you sure this could
- 4:29Speaker 2: destroy your system? And you have to confidently click yes.
- 4:33Speaker 1: Okay, so we've picked the locks. We can see the
- 4:35Speaker 1: files now. They look a little faded out right, like
- 4:38Speaker 1: ghost icons exactly.
- 4:40Speaker 2: Now here's where people mess up. They see the usrclass
- 4:43Speaker 2: dot dat file and their freak instinct is to double
- 4:46Speaker 2: click it.
- 4:47Speaker 1: You shouldn't do that.
- 4:48Speaker 2: You should never ever do that.
- 4:49Speaker 1: Why not?
- 4:50Speaker 2: Two big reasons. First, the operating system is actively using
- 4:54Speaker 2: that file. It's locked. You can't just open a file
- 4:56Speaker 2: that's keeping the lights on.
- 4:57Speaker 1: Okay, that makes sense, But.
- 4:59Speaker 2: More importantly for us, if you interact with it directly,
- 5:02Speaker 2: you change its access times. You can taminate your own evidence.
- 5:06Speaker 1: It's like the Heisenberg uncertainty principle of digital forensics. The
- 5:10Speaker 1: act of observing it changes it.
- 5:12Speaker 2: That's a perfect analogy. So we need a special tool
- 5:16Speaker 2: in the field. We'd use something like ftk imager. It's
- 5:19Speaker 2: a free tool that lets you take a forensic copy
- 5:22Speaker 2: of that file without disturbing the original.
- 5:24Speaker 1: So we're not operating on a live patient. We're taking
- 5:27Speaker 1: an X ray and then analyzing the x ray in
- 5:29Speaker 1: a separate room.
- 5:30Speaker 2: Precisely, we export a safe inert copy of usrclass dot
- 5:35Speaker 2: dat to our desktop. Now we need to read it,
- 5:38Speaker 2: because on its own it's just binary gibberish. We need
- 5:41Speaker 2: a translator, and for that we use a tool called
- 5:43Speaker 2: shellbag Explorer.
- 5:45Speaker 1: Okay, firing up shellbag Explorer in the lab. What am
- 5:47Speaker 1: I looking at?
- 5:48Speaker 2: It looks a lot like your normal Windows file explorer.
- 5:51Speaker 2: You've got a directory tree on the left and columns
- 5:53Speaker 2: with details on the right. We just scroll down the tree.
- 5:56Speaker 2: We look under the desktop entry and there it is
- 5:58Speaker 2: test file, test file. Else the system snitched on us.
- 6:01Speaker 2: It absolutely recorded that we opened it.
- 6:03Speaker 1: Wow. Okay, so now we have to interpret what it's telling.
- 6:06Speaker 2: Us, right, and this is where it gets really tricky.
- 6:10Speaker 2: Look at the columns on the right. You see a
- 6:12Speaker 2: bunch of time stamps. One of them is called last
- 6:14Speaker 2: right time.
- 6:15Speaker 1: That sounds like the smoking gun.
- 6:17Speaker 2: That's when I was there, right sort of. And this
- 6:19Speaker 2: is where investigations go wrong. First, the time itself. Let's
- 6:23Speaker 2: say we did our experiment at two point zero pm
- 6:26Speaker 2: Eastern time. What time. Do you think the last right
- 6:28Speaker 2: time shows?
- 6:29Speaker 1: Oh uh, it's registry data, so it's got to be
- 6:31Speaker 1: in UTC.
- 6:32Speaker 2: You got it coordinated universal time. So if you're in
- 6:35Speaker 2: New York that's four or five hours ahead, the timestamp
- 6:37Speaker 2: will say six point zero zero seven point zero PM.
- 6:40Speaker 1: That's a huge trap. If an investigator doesn't account for
- 6:43Speaker 1: that time zone offset, their entire timeline is wrong.
- 6:46Speaker 2: It happens more than you'd think. You always always have
- 6:49Speaker 2: to normalize your time stamps. But let's get to the
- 6:52Speaker 2: even trickier part. What last right time actually means?
- 6:55Speaker 1: Last right implies the last time the record was written.
- 6:58Speaker 2: Yes, but why was it written? Remember we opened the folder, looked,
- 7:02Speaker 2: and closed. The shell bag was created to store our
- 7:05Speaker 2: view preferences, window size.
- 7:07Speaker 1: Icon layout right because Windows wants to be helpful and
- 7:09Speaker 1: make it look the same next time.
- 7:11Speaker 2: Exactly. Yeah, So the last right time is really the
- 7:14Speaker 2: last preference change time, or if it's the very first time,
- 7:17Speaker 2: it's the first access time.
- 7:18Speaker 1: Okay, I think I'm following.
- 7:20Speaker 2: So here's the thought experiment. Tomorrow. You open test files again,
- 7:24Speaker 2: you look at it. You don't change the icon size,
- 7:26Speaker 2: you don't move the window. You just look and close,
- 7:30Speaker 2: does that last right time update?
- 7:33Speaker 1: Well, if the shell bag stores my preferences and my
- 7:36Speaker 1: preferences didn't change, then.
- 7:38Speaker 2: Correct, it does not update. You could open that folder
- 7:41Speaker 2: a thousand times. If you never change the view settings,
- 7:43Speaker 2: that timestamp stays frozen on day one.
- 7:45Speaker 1: That is hugely important. An investigator could look at that
- 7:48Speaker 1: and say the user hasn't been folder for a year,
- 7:51Speaker 1: when in reality they were in at five prints.
- 7:53Speaker 2: About it's a classic false negative. Yeah, it proves access
- 7:56Speaker 2: happened at least once on or before that date. It
- 7:59Speaker 2: does not prove last access. It's a record of the
- 8:01Speaker 2: room's layout, not who was in the room.
- 8:03Speaker 1: I like that it tracks when you move the furniture,
- 8:06Speaker 1: not when you just sit on the couch.
- 8:07Speaker 2: That is the perfect way to think about it.
- 8:09Speaker 1: But I see other columns here in Shellbag Explorer Created,
- 8:13Speaker 1: modified accessed, the MC times.
- 8:17Speaker 2: Yes, the embedded MP times modified access to created? Do
- 8:22Speaker 2: those help they give us context? They aren't timestams for
- 8:25Speaker 2: the shell bag entry itself. They're a snapshot of the
- 8:29Speaker 2: folders metadata at the moment the shellbag was created or updated.
- 8:33Speaker 1: So it tells you when the actual test files folder
- 8:36Speaker 1: was made on the desktop.
- 8:37Speaker 2: Exactly It freezes that information in time, and that brings
- 8:40Speaker 2: us to the second phase of our experiment. We need
- 8:43Speaker 2: to prove our furniture theory.
- 8:45Speaker 1: We need to make the couch.
- 8:46Speaker 2: We need to move the couch. So back to the
- 8:48Speaker 2: live machine. We open test files again.
- 8:50Speaker 1: Okay, it's open this time.
- 8:52Speaker 2: Let's actually interact. Let's say it's in details view. Go
- 8:54Speaker 2: up to the view menu and change it to large icons.
- 8:57Speaker 1: Click done. The view just changed.
- 8:59Speaker 2: Now close the window closed.
- 9:00Speaker 1: I've officially rearranged the furniture.
- 9:02Speaker 2: Okay, so now we repeat the process. Run ftk amager,
- 9:05Speaker 2: get a fresh copy of yesrclass dot dat, and load
- 9:08Speaker 2: this new one into Shellbag Explorer. What do we see.
- 9:11Speaker 1: I'm guessing the last right time has changed.
- 9:13Speaker 2: You look at the last right time and boom, it's
- 9:16Speaker 2: updated to the current time. In UTC, the OS saw
- 9:19Speaker 2: the change and said, Aha, the user wants large icons.
- 9:23Speaker 2: I need to write that down for next time.
- 9:25Speaker 1: And that action of writing it down updated the timestamp.
- 9:28Speaker 1: But what about the other ones, the embedded m mess
- 9:30Speaker 1: times for the folder itself.
- 9:32Speaker 2: Look closely, they haven't changed a bit. They're still reflecting
- 9:36Speaker 2: the folder's original creation date.
- 9:38Speaker 1: So now we have two different stories. The last right
- 9:40Speaker 1: time tells us when the view changed, and the embedded
- 9:42Speaker 1: times tell us about the folder itself. We can now
- 9:45Speaker 1: say the user made this on Monday, but they changed
- 9:48Speaker 1: how they looked at.
- 9:48Speaker 2: It on Friday. Now you're building a narrative. You're seeing
- 9:51Speaker 2: a pattern of behavior, not just a static data point.
- 9:54Speaker 1: You know, while we're looking at this in our mental lab,
- 9:56Speaker 1: I'm noticing something weird. I see our test files entry
- 9:59Speaker 1: with all its timestamps filled in, but I also see
- 10:02Speaker 1: entries for things like control panel or this PC, and
- 10:07Speaker 1: their created and modified columns are just blank. Is the
- 10:11Speaker 1: tool broken?
- 10:12Speaker 2: Nope, that's not an error. That's actually expected. Think about it.
- 10:16Speaker 2: What is control Panel? Is it a real folder?
- 10:18Speaker 1: I mean it acts like one. It has an icon,
- 10:21Speaker 1: you open it, there's stuff inside.
- 10:23Speaker 2: But can you navigate to see control Panel on your
- 10:25Speaker 2: hard drive?
- 10:26Speaker 1: No, it's just part of the system. It's not a
- 10:28Speaker 1: real place exactly.
- 10:29Speaker 2: It's a virtual object, a pointer. Since it's not a
- 10:33Speaker 2: physical directory on the file system. It doesn't have a
- 10:36Speaker 2: creation date. It's existed for as long as Windows has
- 10:39Speaker 2: so shell Bag's tracks. So you opened it, but it
- 10:42Speaker 2: has no creation day to record.
- 10:43Speaker 1: That's actually a really useful forensic indicator. If I'm looking
- 10:46Speaker 1: at a long list of shell bag entries and I
- 10:49Speaker 1: see blank m act of times, I can probably assume
- 10:52Speaker 1: it's a system object, not a folder. The user created.
- 10:55Speaker 2: It helps you separate the signal from the noise. If
- 10:58Speaker 2: it has a creation date, a human probably made it.
- 11:00Speaker 2: If it doesn't, the machine probably did.
- 11:02Speaker 1: This whole thing really turns the registry into an archaeological
- 11:05Speaker 1: dig site. You're finding these tiny fragments that tell a.
- 11:08Speaker 2: Story, and you have to check both layers. The ntocor
- 11:11Speaker 2: dot DEBT is the older, shallower layer, ESSR class dot
- 11:14Speaker 2: DEBT is the deeper, more modern one. You need the
- 11:17Speaker 2: full picture.
- 11:17Speaker 1: So let's see them out. Why does this matter for
- 11:19Speaker 1: the average person? Is this just for catching bad guys?
- 11:22Speaker 2: It's about understanding your own digital footprint. Imagine you plug
- 11:26Speaker 2: a USB drive into a work computer, You open a
- 11:29Speaker 2: folder on it, You just look at some files, you
- 11:31Speaker 2: don't copy or change them. Then you pull the drive out.
- 11:34Speaker 1: And you think you left no trace.
- 11:35Speaker 2: Right, the files were on the USB. The USB's in
- 11:38Speaker 2: your pocket, But the shell bags on that laptop just
- 11:42Speaker 2: recorded that you navigated to e confidential projects. That artifact
- 11:47Speaker 2: remains on the computer long after the drive is gone.
- 11:49Speaker 1: It proves knowledge. It proves you knew that folder existed
- 11:52Speaker 1: and that you looked inside.
- 11:54Speaker 2: It proves you navigated there, and in many investigations, that's
- 11:57Speaker 2: more than enough to establish intent.
- 12:00Speaker 1: So to wrap this up, let's do a final review
- 12:02Speaker 1: question some meanphis logic.
- 12:03Speaker 2: Let's do it a final exam for our mental ab
- 12:06Speaker 2: You are the investigator. You pull up shell Bag Explorer
- 12:09Speaker 2: and you see an entry for a folder called project X.
- 12:11Speaker 1: Got it.
- 12:12Speaker 2: The last right time is from June first, twenty twenty three.
- 12:16Speaker 2: It is now January of twenty twenty five. The user
- 12:19Speaker 2: you're interviewing swears up and down I open that folder
- 12:21Speaker 2: every single Friday to check on it. Is the user lying?
- 12:24Speaker 1: Okay? My pre deep dive instinct would be to say, yes,
- 12:28Speaker 1: absolutely lying. The log says you haven't touched it in
- 12:30Speaker 1: a year and a half. Uh Now, now I have
- 12:33Speaker 1: to say they could be telling the truth if they
- 12:35Speaker 1: have a routine. If every Friday they open it, look
- 12:39Speaker 1: and close it, They're just sitting on the couch, They're
- 12:42Speaker 1: never moving the furniture. The shell Bag has no reason
- 12:45Speaker 1: to update.
- 12:46Speaker 2: You've got it. And if you as an expert went
- 12:49Speaker 2: into a courtroom and said, the user has not accessed
- 12:52Speaker 2: this since twenty twenty three. You'd be wrong. You'd be
- 12:55Speaker 2: misinterpreting the artifact.
- 12:57Speaker 1: That's a very high stakes technicality.
- 12:58Speaker 2: Digital forensics is nothing abou high stakes technicalities. You have
- 13:01Speaker 2: to verify with other artifacts. Shell bags alone can't prove
- 13:05Speaker 2: the absence of access.
- 13:06Speaker 1: It really is that old saying absence of evidence is
- 13:09Speaker 1: not evidence of.
- 13:09Speaker 2: Absence, especially with showbags.
- 13:11Speaker 1: Well, I'm definitely going to look at my desktop a
- 13:13Speaker 1: little differently now. Every time I resize a window, I'm
- 13:16Speaker 1: going to imagine the registry making a little note.
- 13:18Speaker 2: Just remember you can clean a house, but the shell
- 13:21Speaker 2: bags are always waiting in the basement.
- 13:23Speaker 1: A perfectly creepy thought to end on. Thanks for walking
- 13:26Speaker 1: us through the lab, my pleasure, and to everyone listening,
- 13:29Speaker 1: keep asking questions and watch where you stet. You never
- 13:32Speaker 1: know who's tracking your footprints. We'll catch you on the
- 13:35Speaker 1: next deep dive.