Latest / CyberCode Academy / Course 21 - Digital Forensics: Windows Shellbags | Episode 5: Shellbags Forensics: Validating Network Drive Activity
Transcript
- 0:00Speaker 1: Imagine this for a second. You're the uh, let's say,
- 0:03Speaker 1: the curious employee in a big company. You're smart, you
- 0:06Speaker 1: know your way around the network, and you want to
- 0:08Speaker 1: look at some files you definitely shouldn't.
- 0:10Speaker 2: The classic insider threat scenario. It's what keeps security teams up.
- 0:13Speaker 1: At night exactly. But you're also paranoid. You know they're watching,
- 0:18Speaker 1: so you think, Okay, I won't download anything to my desktop.
- 0:22Speaker 1: I won't plug in a USB drive.
- 0:24Speaker 2: Right, because those things leave obvious traces.
- 0:27Speaker 1: So you come up with what feels like the perfect plan.
- 0:30Speaker 1: You'll just peak, You'll use a network share.
- 0:32Speaker 2: A network share, right.
- 0:33Speaker 1: You figure, I'll map a drive to the company server.
- 0:36Speaker 1: I'll open the folder, look at the files on my screen,
- 0:38Speaker 1: but I won't save a single bite to my own computer.
- 0:41Speaker 1: In your mind, you're a ghost.
- 0:43Speaker 2: And that's a very logical way to think about it.
- 0:46Speaker 2: It makes sense in the physical world if I look
- 0:49Speaker 2: at something but don't take it, I don't possess it.
- 0:51Speaker 1: But in digital forensics, that intuition is just completely.
- 0:54Speaker 2: Wrong, so wrong, and that is what we are diving
- 0:57Speaker 2: into today. We are looking at the silent witness that
- 1:01Speaker 2: lives deep inside your computer.
- 1:03Speaker 1: This is a deep dive into network drive forensics, specifically
- 1:07Speaker 1: an artifact called shell bags.
- 1:10Speaker 2: Shell bags. Once you get how they work, it completely
- 1:12Speaker 2: changes how you think about using your computer. You realize
- 1:15Speaker 2: your OS is basically keeping a diary of everywhere you've been.
- 1:18Speaker 1: So our mission today is to walk through a forensic scenario.
- 1:22Speaker 1: Step by step. We're going to map a network drive,
- 1:25Speaker 1: access a restricted folder and see exactly what breadcrumbs get
- 1:29Speaker 1: left behind in the Windows registry.
- 1:31Speaker 2: And for anyone listening who's into cybersecurity or programming, or
- 1:35Speaker 2: just loves knowing how things work, this is just it's fundamental.
- 1:38Speaker 2: It's about proving file use and knowledge.
- 1:40Speaker 1: It's about proving intent.
- 1:42Speaker 2: Exactly, proving they knew what they were doing.
- 1:44Speaker 1: Okay, so before we get into the weeds, let's set
- 1:46Speaker 1: the scene. I want you to visualize this with us.
- 1:49Speaker 1: We're not in some chaotic real world network, not yet.
- 1:53Speaker 1: We're in a controlled lab, right.
- 1:54Speaker 2: A forensic test case. We're using a virtual machine a VM.
- 1:58Speaker 2: And why a VM because you want to clean slate
- 2:01Speaker 2: no noise from other programs. You perform one action, you
- 2:04Speaker 2: see one result, it's clean.
- 2:05Speaker 1: So in this clean room, we have a user, we'll
- 2:07Speaker 1: call him Dave. Dave connects to a shared folder and
- 2:11Speaker 1: he maps.
- 2:11Speaker 2: It to a drive letter, which is standard practice makes
- 2:14Speaker 2: it easy to access. Instead of a long server path,
- 2:16Speaker 2: you just get the Z drive.
- 2:17Speaker 1: Ah, the classic Z drive. So Dave maps this sensitive
- 2:22Speaker 1: share to Z and inside that drive there's a folder.
- 2:26Speaker 1: And it's not exactly subtle. It's called a one admin.
- 2:29Speaker 2: Only which is basically a giant flashing do not enter sign.
- 2:33Speaker 1: Which to someone like Dave means please come on in.
- 2:35Speaker 1: Of course, So he clicks on the Z drive. He
- 2:37Speaker 1: sees the one admin only folder m M, and then
- 2:41Speaker 1: he double clicks it. He's in.
- 2:43Speaker 2: He's in, and let's say he just opens the folder.
- 2:45Speaker 2: He doesn't even open a file inside. He just looks
- 2:46Speaker 2: at the list of file names.
- 2:47Speaker 1: Okay, freeze frame right there. The click happened. The data
- 2:51Speaker 1: is on a server somewhere else. My gut says, his
- 2:54Speaker 1: local laptop hasn't really done anything important yet.
- 2:56Speaker 2: And that's where the silent witness wakes up. You have
- 2:58Speaker 2: to ask why does win one knows remember that you
- 3:01Speaker 2: like to view a certain folder with large icons instead
- 3:04Speaker 2: of a list.
- 3:05Speaker 1: Oh, because it saves my preferences for that folder.
- 3:08Speaker 2: Correct. Windows is obsessed with that user experience. So to
- 3:12Speaker 2: make it seamless, it saves your view settings for every
- 3:15Speaker 2: single folder you open. Those saved settings those are the shell.
- 3:18Speaker 1: Bags sandbags sounds harmless, but it's actually the key to
- 3:21Speaker 1: the whole thing.
- 3:22Speaker 2: It is. They're stored in a file called USR class
- 3:25Speaker 2: dot d, which is part of your user profile. It's
- 3:28Speaker 2: unique to you.
- 3:28Speaker 1: So when Dave open one admin only, his PC made
- 3:32Speaker 1: a little bag of settings just for that.
- 3:34Speaker 2: Folder precisely, and that bag is full of forensic goodies.
- 3:38Speaker 2: So now we're the investigators. We get an image of
- 3:41Speaker 2: day's hard drive. We fire up a tool like shell
- 3:44Speaker 2: Bags Explorer, and we look at that USR class dat file.
- 3:48Speaker 1: Okay, I'm picturing the tool. I see a folder tree.
- 3:50Speaker 1: What's the first thing? We look for?
- 3:52Speaker 2: The entry for the z drive itself and what does
- 3:54Speaker 2: that tell us? Well, first, it proves the drive was
- 3:57Speaker 2: mapped and viewed. That's step one. But more importantly, there's
- 3:59Speaker 2: a t timestamp on it, the last written time last written.
- 4:03Speaker 1: Okay, let's unpack that because timestams can be tricky. If
- 4:06Speaker 1: it says Monday at nine am, does that mean that's
- 4:09Speaker 1: when he first connected the drive?
- 4:11Speaker 2: It could mean that. But you have to be so
- 4:14Speaker 2: so careful here. This is where context is everything in forensics.
- 4:18Speaker 2: Last written is not created, it's last updated, updated, well
- 4:22Speaker 2: rebated his preferences. Let's say he connects Monday at nine am,
- 4:26Speaker 2: the shell bag is created. Last written is Monday nine am.
- 4:30Speaker 1: Simple enough.
- 4:31Speaker 2: But then on Friday he opens the z drive again.
- 4:34Speaker 2: This time he switches the view from a list to
- 4:37Speaker 2: large icon. He changes the view and Windows goes, oh,
- 4:40Speaker 2: Dave likes large icons here. Now I need to remember
- 4:43Speaker 2: that it updates the shell bag. And now the last
- 4:46Speaker 2: written time is Friday four point five to five pm.
- 4:49Speaker 1: So the original timestamp from Monday is just need's gone.
- 4:53Speaker 1: It's over written on that specific key. Yes, if you
- 4:55Speaker 1: just look at that timestamp and say he first accessed
- 4:58Speaker 1: this on Friday, you've missed a whole week of potential activity.
- 5:01Speaker 2: That was a critical distinction. So it's more of an
- 5:03Speaker 2: I was here at this time marker, not an IE
- 5:06Speaker 2: arrived at this time marker.
- 5:07Speaker 1: It's an anchor point. It tells you about the most
- 5:09Speaker 1: recent interaction with the view settings, not the whole story. Okay,
- 5:13Speaker 1: so the z drive proves the connection, but that's not
- 5:18Speaker 1: enough to build a case everyone in the company might
- 5:21Speaker 1: have a z drive, we need to prove he went
- 5:23Speaker 1: into the forbidden folder.
- 5:24Speaker 2: Zero one admin only, right, And this is where shell
- 5:27Speaker 2: bags are beautiful. They're hierarchical, just like a file system.
- 5:31Speaker 2: So inside our forensic tool, under the z drive entry,
- 5:35Speaker 2: we can just expand the.
- 5:36Speaker 1: Tree and if you went inside, there should be an
- 5:38Speaker 1: entry for zero one admin only right.
- 5:40Speaker 2: There, there should be what Windows generally only creates a
- 5:43Speaker 2: shell bag for a folder you've actually browsed into. If
- 5:46Speaker 2: you never click it, there's no view preference to save.
- 5:48Speaker 1: Wow. Okay, so the existence of that entry alone proves
- 5:52Speaker 1: he navigated there. He can't claim he didn't know the
- 5:54Speaker 1: folder existed exactly.
- 5:56Speaker 2: It proves knowledge and action. It's the digital equivalent of
- 5:58Speaker 2: a footprint. But it gets even better. When we look
- 6:01Speaker 2: at the metadata for that subfolder. Things get really interesting.
- 6:05Speaker 2: How so well, we see a last access time, and
- 6:07Speaker 2: in our testing that timelines up perfectly with when Dave
- 6:10Speaker 2: actually clicked on the.
- 6:10Speaker 1: Folder, So we have a direct time correlation.
- 6:13Speaker 2: We do. But here's the part that really blows people's minds.
- 6:16Speaker 2: When you look deeper into the metadata stored in that
- 6:19Speaker 2: shell bag, specifically the created and modified time stamps. Yeah,
- 6:23Speaker 2: you're not looking at the time stamps of the registry
- 6:25Speaker 2: key on Dave's computer.
- 6:27Speaker 1: Wait what are we looking at?
- 6:28Speaker 2: Then you are looking at the actual file system timestamps
- 6:32Speaker 2: of the folder as it exists on the remote server.
- 6:34Speaker 1: Hold on, you're telling me. My local laptop, inside its
- 6:37Speaker 1: own registry cash is a copy of the date created
- 6:41Speaker 1: timestamp from the server's hard drive.
- 6:42Speaker 2: Yes, think about it. When you open that folder, Windows
- 6:46Speaker 2: Explorer needs to show you all the columns name, date modified,
- 6:50Speaker 2: date created. It has to ask the server for that
- 6:53Speaker 2: information to.
- 6:54Speaker 1: Display it, and then it just keeps it.
- 6:56Speaker 2: It cashes it. That's what shell bags do. They cash
- 6:58Speaker 2: properties to make things faster time.
- 7:00Speaker 1: That is incredible. So my PC is keeping a diary
- 7:03Speaker 1: of the server's files.
- 7:04Speaker 2: It is, and for an investigator this is unbelievably powerful.
- 7:08Speaker 2: Imagine the server logs are wiped or you don't have
- 7:11Speaker 2: legal access to the server itself, right, so the.
- 7:13Speaker 1: Primary evidence is gone or inaccessible.
- 7:16Speaker 2: But you have Dave's laptop. You can look at his
- 7:19Speaker 2: USR class dat. You'll see the entry for one admin only.
- 7:23Speaker 2: You'll see when he accessed it. But you'll also see
- 7:26Speaker 2: the created timestamp of the folder. From the server.
- 7:29Speaker 1: So if the IT department created that folder on the
- 7:31Speaker 1: server back in twenty twenty.
- 7:33Speaker 2: One and Dave accessed it in twenty twenty six, his
- 7:36Speaker 2: local registry will show created twenty twenty one and last
- 7:40Speaker 2: access twenty twenty six.
- 7:41Speaker 1: That's the link. That's the validation. It ties the local
- 7:45Speaker 1: action to the remote object.
- 7:47Speaker 2: It connects the dots in a way that is incredibly
- 7:49Speaker 2: hard to argue with. It proves this user on this
- 7:52Speaker 2: machine new about and navigated to the specific remote data
- 7:56Speaker 2: at a specific.
- 7:57Speaker 1: Time, which brings us to the so what of it all?
- 8:00Speaker 1: This is how you prove file use and.
- 8:02Speaker 2: Knowledge knowledge, that's the key. The common defense is I
- 8:05Speaker 2: didn't know, or I clicked it by accident. I was
- 8:07Speaker 2: just browsing, right, But these artifacts, they just dismantled that,
- 8:11Speaker 2: especially when you're talking about something like privilege escalation.
- 8:14Speaker 1: Which is just a fancy way of saying you went
- 8:15Speaker 1: somewhere you weren't supposed to.
- 8:17Speaker 2: Pretty much, if you're a standard user and I find
- 8:20Speaker 2: shell bags in your profile for a folder named restricted finance,
- 8:23Speaker 2: you have some explaining to do. The folder structure proves
- 8:27Speaker 2: you didn't just stumble, you explored.
- 8:29Speaker 1: You open the door walk down the hall and peeked.
- 8:31Speaker 2: Inside, and all the while the user has no idea
- 8:35Speaker 2: this is being recorded. They're so worried about not downloading
- 8:38Speaker 2: a file. But the whole time the registry is quietly
- 8:41Speaker 2: taking notes.
- 8:42Speaker 1: The silent witness. That's the perfect name for it. It's not
- 8:45Speaker 1: some special monitoring software. It's just Windows being Windows exactly. Okay,
- 8:49Speaker 1: but let's do a reality check. We've talked about a
- 8:52Speaker 1: clean VM and a simple Z drive. The real world
- 8:56Speaker 1: is messy. What about different network setups?
- 8:58Speaker 2: It's true, network con figurations are basically infinite.
- 9:01Speaker 1: So does this hold up? If I access a server
- 9:04Speaker 1: by its IP address instead of a mapped letter, do
- 9:07Speaker 1: I still get a shell bag?
- 9:08Speaker 2: Generally yes, The underlying Windows behavior of caching view settings
- 9:12Speaker 2: is remarkably consistent. A USB drive, a local folder, a
- 9:16Speaker 2: network share. The operating system wants to give you a
- 9:19Speaker 2: consistent experience across all of them.
- 9:21Speaker 1: But generally is a dangerous word in a report.
- 9:24Speaker 2: You never want to use it. And that's maybe the
- 9:26Speaker 2: most important takeaway for anyone who wants to do this
- 9:29Speaker 2: for real. You have to.
- 9:30Speaker 1: Validate, meaning you have to test it yourself.
- 9:32Speaker 2: Always. Don't just trust a theory from a deep dive
- 9:35Speaker 2: like this one. Set up your own test map, your
- 9:38Speaker 2: own network drive, access a folder. Then go pull your
- 9:41Speaker 2: own USR class DABT file and see what it recorded.
- 9:45Speaker 2: See how the time stamps behave on your system.
- 9:48Speaker 1: Because a Windows update could change things, a patch.
- 9:50Speaker 2: Could change things. A different version of Windows could behave
- 9:53Speaker 2: slightly differently. But the core logic access triggers a right.
- 9:58Speaker 2: The right creates an artifact that's pretty solid.
- 10:01Speaker 1: It's just so powerful to know that, even with all
- 10:04Speaker 1: that complexity, this one consistent thread of evidence is almost
- 10:08Speaker 1: always there.
- 10:09Speaker 2: It is you can't go back in time and capture
- 10:12Speaker 2: the network traffic from six months ago, but the echo
- 10:14Speaker 2: of that traffic is stamped right into the user's registry.
- 10:17Speaker 1: So we started with the idea of a perfect traceless
- 10:20Speaker 1: crime on a network share.
- 10:22Speaker 2: And found out it's not so perfect. We saw the
- 10:24Speaker 2: z drive, we understood the nuance of the timestamp, and
- 10:26Speaker 2: we found the smoking gun in the subfolder metadata.
- 10:29Speaker 1: We did Okay, Before we wrap, let's do a quick
- 10:32Speaker 1: challenge for everyone listening.
- 10:33Speaker 2: Let's do it a mental exercise. You're the investigator. You
- 10:37Speaker 2: suspect a user stole company secrets from a network drive,
- 10:40Speaker 2: right before they.
- 10:41Speaker 1: Quit the old smash and grab.
- 10:43Speaker 2: Yep, you look at their shell bags. You find an
- 10:46Speaker 2: entry for the wide drive. The last written time on
- 10:49Speaker 2: that drive entry is October twelfth, four point five to
- 10:53Speaker 2: eight pm. The user walked out for the last time
- 10:56Speaker 2: at five zero zero pm.
- 10:58Speaker 1: Ooh, that looks bad, two minutes before they leave slam donkreg.
- 11:02Speaker 2: It looks like it. But here's the question. Can you
- 11:05Speaker 2: state with one hundred percent certainty that four point five
- 11:08Speaker 2: eight pm was the first time they ever connected to
- 11:10Speaker 2: that drive.
- 11:11Speaker 1: I'll give you a second to think, Yeah, okay, what's
- 11:13Speaker 1: the verdict.
- 11:14Speaker 2: The answer is no, you absolutely cannot be certain that
- 11:16Speaker 2: was the first time.
- 11:17Speaker 1: Because of the view preferences exactly.
- 11:19Speaker 2: They could have connected to that drive three years ago.
- 11:21Speaker 2: They could have been in there every single day. But
- 11:23Speaker 2: at four point five eight pm, maybe they just nervously
- 11:26Speaker 2: resized a column or switched from icon view to list
- 11:29Speaker 2: view one last time, and.
- 11:31Speaker 1: That tiny, meaningless action over wrote the timestamp on that
- 11:34Speaker 1: main drive entry.
- 11:35Speaker 2: It updated the bag. So that timestamp is still fantastic evidence.
- 11:39Speaker 2: It proves they were active two minutes before they left.
- 11:42Speaker 2: But if you claim it was the first access, a
- 11:45Speaker 2: good defense attorney will pick that apart.
- 11:47Speaker 1: Context is everything, details matter always.
- 11:51Speaker 2: Assumptions are the enemy and forensics.
- 11:54Speaker 1: This has been a fascinating look into the hidden corners
- 11:57Speaker 1: of the OS. It really makes you think differently about
- 11:59Speaker 1: what's happening. When you click around.
- 12:01Speaker 2: You think you're just opening and closing windows, but the
- 12:04Speaker 2: system remembers. It remembers everything just in case you want
- 12:07Speaker 2: your icons to be a little bigger next time.
- 12:09Speaker 1: And that convenience is the investigator's best friend. Whether it's
- 12:13Speaker 1: a USB stick in your pocket or a server in
- 12:15Speaker 1: another continent, the silent witness is taking.
- 12:18Speaker 2: Notes, so be careful what you click.
- 12:20Speaker 1: Thanks for listening to this deep dive, Go validate your
- 12:22Speaker 1: own artifacts and stay curious. We'll see you on the
- 12:26Speaker 1: next one.