Latest / CyberCode Academy / Course 21 - Digital Forensics: Windows Shellbags | Episode 2: Forensic System Setup and Local Drive Integration
Transcript
- 0:00Speaker 1: Welcome back to the deep dive. We are doing something
- 0:03Speaker 1: a little different today.
- 0:04Speaker 2: Yeah.
- 0:04Speaker 1: Usually we take a high level look at a concept,
- 0:07Speaker 1: you know, the thirty thousand foot view of a topic.
- 0:10Speaker 1: But today we are landing the plane.
- 0:12Speaker 2: We really are.
- 0:13Speaker 1: We are getting our hands dirty. We're building a lab.
- 0:15Speaker 2: That's right. We aren't just talking about digital forensics as
- 0:18Speaker 2: some abstract idea like, oh, isn't it cool how they
- 0:21Speaker 2: catch bad guys in the movies with a few keystrokes, right,
- 0:24Speaker 2: we are talking about the actual nuts and bolts preparation.
- 0:27Speaker 2: You need to do this work yourself.
- 0:29Speaker 1: And the mission today is, well, it's incredibly specific. We're
- 0:33Speaker 1: going to walk through setting up a digital forensics toolkit.
- 0:37Speaker 1: They can analyze a very specific and honestly a very
- 0:40Speaker 1: weirdly named artifact called shell.
- 0:42Speaker 2: Bags, Which is a great place to start. It really is,
- 0:46Speaker 2: because it forces you to deal with the two main
- 0:48Speaker 2: pillars of forensics h acquisitions getting the data, getting the
- 0:52Speaker 2: data exactly, and analysis, which is, you know, actually understanding
- 0:56Speaker 2: what that data means.
- 0:58Speaker 1: But before we can even think about it nownalysis, we
- 1:00Speaker 1: have a huge problem to solve. A digital crime scene
- 1:04Speaker 1: isn't like a physical one. You can't just walk in
- 1:06Speaker 1: and start dusting for fingerprints. So because your very presence
- 1:10Speaker 1: changes the scene, doesn't.
- 1:11Speaker 2: It It absolutely does. This is essentially the Heisenberg uncertainty principle,
- 1:16Speaker 2: But for digital forensics, the very act of observing a
- 1:20Speaker 2: system changes that system just by looking. Just by looking,
- 1:23Speaker 2: If you just double click a folder to see what's inside,
- 1:26Speaker 2: you've already changed access timestamps, You've created a new registry
- 1:30Speaker 2: entry you have, I mean, you've effectively contaminated the evidence.
- 1:34Speaker 1: So today is all about learning how to be a ghost.
- 1:37Speaker 1: We're going to look at the essential software that lets
- 1:39Speaker 1: you extract evidence surgically without leaving any footprints. And we're
- 1:44Speaker 1: focusing on two specific tools, Shelby's Explorer and ftk Imager.
- 1:49Speaker 2: Think of it this way. One is your scalpel and
- 1:52Speaker 2: the other is the clamp that holds the patient steady.
- 1:54Speaker 2: You really need both to perform the operation.
- 1:56Speaker 1: I love that analogy. Okay, let's start with the scalpel
- 1:59Speaker 1: the specialist. We need to analyze shell bags. First off,
- 2:05Speaker 1: For anyone who's new to this, shell bags it sounds
- 2:09Speaker 1: like something you'd buy at a beach resort.
- 2:10Speaker 2: It's a terrible name.
- 2:11Speaker 1: What are we actually talking about?
- 2:12Speaker 2: Here.
- 2:13Speaker 1: Why is this our focus?
- 2:14Speaker 2: It is a terrible name for an incredibly powerful artifact. See.
- 2:19Speaker 2: To understand shell bags, you have to understand how Windows thinks.
- 2:23Speaker 2: Windows wants to be helpful. It wants to remember your
- 2:26Speaker 2: preferences to make your life easier. Okay, So when you
- 2:29Speaker 2: open a folder, say a folder full of photos, and
- 2:32Speaker 2: you resize the window, or you sort the icons by date,
- 2:35Speaker 2: or you switch to detail view, Windows records all of that.
- 2:39Speaker 1: It remembers how I like to look at my.
- 2:40Speaker 2: Stuff exactly, and it stores that memory in a little
- 2:43Speaker 2: bag within the Windows registry. That's the shell bag.
- 2:46Speaker 1: All right. So Windows remembers that I like my invoice's
- 2:48Speaker 1: folder to be a small square in the bottom right
- 2:50Speaker 1: corner of the screen. Why does a forensic investigator care
- 2:54Speaker 1: about that? It seems so trivial.
- 2:55Speaker 2: It seems trivial until you realize that preference file persists
- 2:59Speaker 2: even if the full itself is deleted.
- 3:01Speaker 1: Oh yeah, oh wow, Okay, now I see where this
- 3:04Speaker 1: is going.
- 3:04Speaker 2: Let's say a bad guy has a folder on his
- 3:06Speaker 2: desktop called stolen credit Cards. He opens it, looks at
- 3:10Speaker 2: the files, and then, you know, realizing the authorities are
- 3:13Speaker 2: closing in, he deletes the folder and empties the recycle bin.
- 3:16Speaker 1: So the folder's gone.
- 3:17Speaker 2: The folder is gone, but the shell Bag the registry
- 3:19Speaker 2: entry that says user X opened a folder named stolen
- 3:22Speaker 2: credit Cards on this date and viewed it as large
- 3:25Speaker 2: icons that remains.
- 3:26Speaker 1: It's the ghost of the folder.
- 3:28Speaker 2: Precisely. It proves knowledge, it proves intent, It proves the
- 3:31Speaker 2: folder existed and that the user interacted with it. And
- 3:33Speaker 2: that's why we need a specialist tool. You can't just
- 3:36Speaker 2: open the registry editor and read this stuff. It's encoded
- 3:38Speaker 2: in well in binary blobs. It's unreadable to the human eye.
- 3:43Speaker 1: Enter our first tool, shell Bag's Explorer.
- 3:45Speaker 2: This is my absolute go to for this specific artifact.
- 3:49Speaker 2: It parses that binary mess into a clean, readable history
- 3:53Speaker 2: of every folder a user has ever browsed it. It
- 3:57Speaker 2: translates the machine language into human language.
- 4:00Speaker 1: And the sources we're looking at mentioned this tool comes
- 4:02Speaker 1: from a site called four to six k dot.
- 4:04Speaker 2: Com, right, and this brings up a really interesting point
- 4:07Speaker 2: about the forensics community. A lot of the best tools
- 4:10Speaker 2: aren't these massive million dollar enterprise suites.
- 4:13Speaker 1: They're not from big corporations.
- 4:15Speaker 2: No, they're written by security researchers who just had a
- 4:19Speaker 2: specific problem they needed to solve. They're free, sometimes they're
- 4:23Speaker 2: open source, and they're often updated much faster than commercial software.
- 4:27Speaker 1: That's a key insight for our listeners. Then you don't
- 4:30Speaker 1: need a huge corporate budget to get started with this.
- 4:32Speaker 1: You can download Shellbags Explore right now.
- 4:35Speaker 2: Absolutely. And just a quick note on versions. Forensics moves
- 4:39Speaker 2: incredibly fast. The sources we're looking at might reference an
- 4:42Speaker 2: older version number, but if you're setting up your lab today,
- 4:46Speaker 2: always grab the latest build. Artifacts change with every Windows update,
- 4:50Speaker 2: so your tools need to keep up.
- 4:51Speaker 1: Okay, so let's imagine we've downloaded shell Bags. As for
- 4:54Speaker 1: we open it up. It's got a nice interface buttons, menus,
- 4:57Speaker 1: but it's empty. It's just sitting there.
- 4:59Speaker 2: It's a blank canvas. It's waiting for data.
- 5:01Speaker 1: And this is where we hit our first wall. Shell
- 5:04Speaker 1: Bags Explorer needs to read the registry files files like
- 5:07Speaker 1: usreclass dot dat or ntusr dat dat. But those files
- 5:12Speaker 1: they're locked inside the operating system.
- 5:14Speaker 2: Right If you go to your seed drive right now
- 5:16Speaker 2: and try to copy your NtUser dot dot file to
- 5:20Speaker 2: the desktop, Windows will just yell at you. It'll say
- 5:22Speaker 2: something like action cannot be completed because the file is
- 5:25Speaker 2: open in system.
- 5:26Speaker 1: You can't touch it.
- 5:27Speaker 2: You can't you can't copy a file that the OS
- 5:29Speaker 2: is currently using to run itself. It's a kernel level lock.
- 5:32Speaker 1: It's like trying to change a tire while the car
- 5:34Speaker 1: is driving down the highway.
- 5:35Speaker 2: That's the classic analogy. Yep. And this is exactly why
- 5:39Speaker 2: we need our second tool. We need a way to
- 5:41Speaker 2: grab those files to extract that evidence without stopping the
- 5:45Speaker 2: car and without changing the tires.
- 5:46Speaker 1: Trend this brings us to ftk imager.
- 5:48Speaker 2: The industry standard. I mean, there are other tools, for sure,
- 5:51Speaker 2: but ftk imager is the Swiss army knife that almost
- 5:54Speaker 2: everyone starts with. You can get it from the Access
- 5:57Speaker 2: Data website. It lets you create forensic images and sport
- 6:00Speaker 2: files from live systems.
- 6:02Speaker 1: Now looking at the specs here, there are a few
- 6:04Speaker 1: ways to get this, but you were very clear in
- 6:06Speaker 1: our pre show chat about a specific version.
- 6:09Speaker 2: You will have the light version, Yes, this is crucial.
- 6:12Speaker 2: When you go to the download page, you'll see the
- 6:14Speaker 2: full installer and you'll see ftk imager light. Usually in tech,
- 6:20Speaker 2: light means bad. It means they took features out, like
- 6:23Speaker 2: the free.
- 6:24Speaker 1: Version of an app that's full of ads and won't
- 6:25Speaker 1: let you save your work exactly.
- 6:27Speaker 2: But in forensics, light means portable, it means it doesn't
- 6:31Speaker 2: need to be installed.
- 6:32Speaker 1: Why is that the better choice? Why not just install
- 6:35Speaker 1: the full program?
- 6:36Speaker 2: Go back to that crime scene analogy. If I run
- 6:38Speaker 2: an installer, if I click setup, dot exc what happens.
- 6:42Speaker 2: Windows starts copying files to the program files directory. It
- 6:46Speaker 2: creates a shortcut on the desktop. It writes new keys
- 6:49Speaker 2: to the registry, saying ftk imager was installed at this time.
- 6:52Speaker 1: You're trampling all over the evidence.
- 6:54Speaker 2: You are stomping all over it. You're overwriting data that
- 6:57Speaker 2: might have been important. The light version is just a folder.
- 7:01Speaker 2: You can put it on a USB stick. You plug
- 7:03Speaker 2: the stick in, you double click the executable, and it
- 7:06Speaker 2: runs right from the stick. It touches the hard drive
- 7:09Speaker 2: as little as humanly possible.
- 7:11Speaker 1: That is a subtle but absolutely massive difference. It's about hygiene,
- 7:16Speaker 1: forensic hygiene.
- 7:17Speaker 2: Yes, we want to be invisible. We want to observe
- 7:20Speaker 2: without interacting.
- 7:21Speaker 1: Okay, so we have shell bags explorer ready to analyze,
- 7:24Speaker 1: and we have ftk imager light on our USB stick
- 7:27Speaker 1: ready to extract. We're sitting in front of our target computer.
- 7:30Speaker 1: Let's just say it's our own lab machine. For practice.
- 7:32Speaker 1: I want to visualize this. Pink the picture for me.
- 7:35Speaker 2: Okay, so close your eyes if you have to, Unless
- 7:37Speaker 2: you're driving, of course, you're at the desk, You plug
- 7:39Speaker 2: in your USB drive, you navigate to that folder on
- 7:42Speaker 2: the USB stick, and you see the icon for FTK imager.
- 7:45Speaker 2: You double click it, and what happens?
- 7:47Speaker 1: Is it a command line? Are we hacking the mainframe
- 7:50Speaker 1: here like in the movies?
- 7:52Speaker 2: No? And that's why FTK is so popular. It looks
- 7:54Speaker 2: very familiar. It looks a lot like Windows Explore. You've
- 7:58Speaker 2: got a menu bar at the top of big empty
- 8:00Speaker 2: pain in the middle and a pain on the left
- 8:02Speaker 2: that says evidence tree.
- 8:04Speaker 1: But right now that tree is empty.
- 8:06Speaker 2: It's empty because we haven't mounted anything yet. We need
- 8:09Speaker 2: to tell the tool what to look at. So step one,
- 8:12Speaker 2: you go to the top left, you click file, and
- 8:15Speaker 2: then you select add evidence.
- 8:16Speaker 1: Item, Add evidence item. I love that terminology. It instantly
- 8:21Speaker 1: shifts your mindset from computer user to.
- 8:23Speaker 2: Investigator, it really does. And once you click that, you
- 8:26Speaker 2: get a dialogue box asking for the source. Now, this
- 8:29Speaker 2: is where people can get tripped up. It gives you
- 8:31Speaker 2: options like physical drive, logical drive, image file or contents
- 8:34Speaker 2: of a folder.
- 8:35Speaker 1: Break that down for us, what are we choosing for
- 8:37Speaker 1: this mission?
- 8:38Speaker 2: For a lab setup where you are analyzing the machine
- 8:41Speaker 2: you're currently sitting at, you want to select logical or
- 8:44Speaker 2: local drive.
- 8:45Speaker 1: Why not physical drive? That sounds more complete, doesn't physical
- 8:49Speaker 1: imply you get everything?
- 8:51Speaker 2: Physical drive gives you the whole raw disc. It includes
- 8:54Speaker 2: the empty space, the deleted space, everything. It's great, but
- 8:58Speaker 2: it's more complex sometimes requires you to parse the partition
- 9:01Speaker 2: table yourself. For this mission, just getting the registry hives.
- 9:06Speaker 2: Logical drive is much cleaner. It just treats the drive
- 9:09Speaker 2: as the partition the operating system sees. It's the Sea
- 9:12Speaker 2: drive as you know it.
- 9:13Speaker 1: Okay, so I select logical drive.
- 9:15Speaker 2: I hit next, Then it asks you which drive. You'll
- 9:19Speaker 2: see a drop down menu. You just pick Sea.
- 9:21Speaker 1: Drive the heart of the machine.
- 9:23Speaker 2: You click finish and this This is the satisfying moments.
- 9:28Speaker 2: The interface just blinks for a second and suddenly that
- 9:31Speaker 2: empty evidence tree on the left is populated. You see
- 9:34Speaker 2: C with the little hard drive icon next to it.
- 9:36Speaker 1: We're in.
- 9:37Speaker 2: We're in now. To the untrained eye, this just looks
- 9:39Speaker 2: like you open your regular file browser, you see folders
- 9:42Speaker 2: like Windows program files users, but you're looking at them
- 9:45Speaker 2: through a forensic filter. You are completely bypassing the operating
- 9:49Speaker 2: system's file locks.
- 9:50Speaker 1: So if I tried to drag and drop a locked
- 9:52Speaker 1: file out of here, it would actually work.
- 9:54Speaker 2: It would ftk imager talks directly to the Master Filetable,
- 9:58Speaker 2: the MFT. That's the database that tells the computer where
- 10:01Speaker 2: files physically live on the disc. It doesn't ask Windows,
- 10:05Speaker 2: pretty please, can I have this file? It just goes
- 10:08Speaker 2: to the address on the disc and reads the data directly.
- 10:11Speaker 1: That's such a powerful distinction. It's like having a pass
- 10:14Speaker 1: key to every single door in the building exactly. Okay,
- 10:16Speaker 1: we have the drive loaded, but a seed drive is
- 10:19Speaker 1: a massive haystack. We are looking for a very specific needle.
- 10:23Speaker 1: We need those registry highs to feed into shell bags explorer.
- 10:28Speaker 1: So where do we go?
- 10:29Speaker 2: This is where you need to know your digital geography.
- 10:31Speaker 2: If you don't know where the artifacts live, the best
- 10:34Speaker 2: tools in the world won't help you. We aren't looking
- 10:36Speaker 2: in the Windows folder, we aren't looking in program files.
- 10:39Speaker 2: We're looking for human activity.
- 10:41Speaker 1: So we're tracking the user.
- 10:42Speaker 2: You navigate to the user's folder, click the little plus
- 10:45Speaker 2: sign plus next to it. To expand the tree.
- 10:47Speaker 1: Okay, I see it. I see folders for administrator, public, default,
- 10:52Speaker 1: and I see my own username.
- 10:53Speaker 2: That folder with your username, that is the user home folder,
- 10:56Speaker 2: that is your destination.
- 10:58Speaker 1: Why is that specific folder so critical? I mean, I
- 11:02Speaker 1: store my work in my documents folder, not just loosely
- 11:05Speaker 1: in my user folder.
- 11:06Speaker 2: Sure, your documents are in subfolders like documents or desktop,
- 11:10Speaker 2: but the registry files that track what you do. The
- 11:13Speaker 2: file NTWO user dot dat specifically, that lives right there
- 11:17Speaker 2: at the root of your user home folder.
- 11:19Speaker 1: Wait, NTI user dot dat. I don't think I've ever
- 11:21Speaker 1: seen that file on my computer. I'm looking at my
- 11:23Speaker 1: own desktop right now, and I don't see it.
- 11:24Speaker 2: You haven't because Windows hides it from you. It's a
- 11:27Speaker 2: protected operating system file. Windows basically assumes that if you
- 11:31Speaker 2: see it, you might delete it and break everything, so
- 11:33Speaker 2: it just makes it invisible.
- 11:34Speaker 1: But ftk imager doesn't care.
- 11:36Speaker 2: Ftk imager shows you everything. Hidden files, system files, they're
- 11:40Speaker 2: all visible here.
- 11:41Speaker 1: So that NtUser dot dat file, that's the one that
- 11:44Speaker 1: contains the showbags.
- 11:45Speaker 2: It contains some of them. Yeah, there's another important file
- 11:48Speaker 2: deeper in a hidden folder called app data named U
- 11:51Speaker 2: uscall cost dot debt that holds others, but the principle
- 11:54Speaker 2: is the same. The user home folder is the root
- 11:57Speaker 2: of that user's specific evidence. It's where theystem records their worldview,
- 12:01Speaker 2: their settings, their history, their bags.
- 12:03Speaker 1: So if I'm an investigator and I'm looking for evidence
- 12:07Speaker 1: that a suspect browsed for, I don't know, bomb making
- 12:10Speaker 1: instructions or company secrets, I'm not just looking for the
- 12:14Speaker 1: PDF file itself. No, I'm going to this user home
- 12:17Speaker 1: folder to find the registry hives that prove they open
- 12:20Speaker 1: that folder exactly.
- 12:21Speaker 2: Even if they burn the PDF, the registry hive remembers.
- 12:25Speaker 2: So you export those hives using FTK imager. You can
- 12:28Speaker 2: just write click and export file, and then you load
- 12:30Speaker 2: those exported files into shell Bags Explorer, and that.
- 12:33Speaker 1: Completes the loop. We use the imager to bypass the
- 12:36Speaker 1: lock and grab the evidence, and we use the explorer
- 12:39Speaker 1: to decode it.
- 12:40Speaker 2: That is the workflow. It sounds simple when you break
- 12:42Speaker 2: it down like that, but that process identify, acquire, analyze
- 12:46Speaker 2: is the foundation of every major digital investigation, from corporate
- 12:50Speaker 2: espionage to criminal cases.
- 12:52Speaker 1: It's really about demystifying the magic of the computer. Isn't it.
- 12:55Speaker 1: It's not magic, it's just files.
- 12:57Speaker 2: It's just files, and if you know where they live,
- 13:00Speaker 2: you have the right tools to grab them. They tell
- 13:02Speaker 2: a story that the user often doesn't even realize is
- 13:04Speaker 2: being written.
- 13:05Speaker 1: That's a sobering thought. Every click, every window resize is
- 13:10Speaker 1: writing a line in a history book you can't read,
- 13:13Speaker 1: but an expert can.
- 13:14Speaker 2: That's the job. We read the history book.
- 13:17Speaker 1: Let's recap because we covered a lot of technical ground there.
- 13:20Speaker 1: To set up this lab, you really need two things.
- 13:23Speaker 2: First, the specialist shellbags Explorer, free, powerful and designed specifically
- 13:29Speaker 2: to parse user fold or browsing history.
- 13:31Speaker 1: Second, the extractor FTK imager.
- 13:34Speaker 2: And specifically the light or self executing version. Remember this
- 13:38Speaker 2: is key. We want to maintain that forensic integrity. We
- 13:41Speaker 2: do not want to install software on the evidence machine
- 13:43Speaker 2: if we can possibly avoid it.
- 13:45Speaker 1: We launched the imager, we add the logical seed drive
- 13:47Speaker 1: as evidence not physical logical, and we navigate past all the.
- 13:52Speaker 2: Distractions straight to the user's directory and then into the
- 13:55Speaker 2: specific user home folder that is where the treasure is boried.
- 13:58Speaker 1: Simple, effective, and I love it. Now, before we let
- 14:01Speaker 1: you go to start downloading these tools, we have a
- 14:03Speaker 1: challenge for you. We don't want to see. If you're
- 14:05Speaker 1: really listening to the why behind the what?
- 14:07Speaker 2: This is the review question. When you are using ftk imager,
- 14:11Speaker 2: you have to navigate to a specific folder in the
- 14:13Speaker 2: user's directory to find the registry hives. My question is
- 14:17Speaker 2: why that specific location? Why not the Windows folder? Why
- 14:22Speaker 2: not program files? What is so unique about the user
- 14:25Speaker 2: home folder that makes it the primary target for this
- 14:27Speaker 2: kind of analysis.
- 14:29Speaker 1: Think about who we are investigating. Are we investigating the
- 14:31Speaker 1: machine or are we investigating the person?
- 14:34Speaker 2: That's the hint. If you can answer that, you really
- 14:37Speaker 2: understand the core philosophy of user forensics.
- 14:39Speaker 1: I hope this deep dive gave you a little glimpse
- 14:41Speaker 1: behind the curtain. It's a bit scary, but it's also fascinating.
- 14:45Speaker 1: You're now one step closer to being a digital detective.
- 14:48Speaker 2: The tools are there, Go build your lab.
- 14:50Speaker 1: Thanks for listening. We'll see you on the next deep dive.
- 14:53Speaker 2: Stay curious.