Latest / CyberCode Academy / Course 22 - Digital Forensics: RAM Extraction Fundamentals | Episode 4: RAM Capture via Magnet and FTK Imager
Transcript
- 0:00Speaker 1: Welcome back to the deep dive. Today we're going somewhere interesting.
- 0:04Speaker 1: We're talking about capturing the ghost in the machine.
- 0:07Speaker 2: Ghost in the machine. That's a great way to put it. It
- 0:09Speaker 2: sounds like sci fi, but for us, it's very real.
- 0:12Speaker 2: We're talking about.
- 0:13Speaker 1: RAM random access memory and specifically how you catch it
- 0:17Speaker 1: before it just ganishes exactly.
- 0:20Speaker 2: It's called volatile memory for a.
- 0:21Speaker 1: Reason, right It's where everything is happening right now, the passwords,
- 0:25Speaker 1: the secret keys, any malware that's running. But as soon
- 0:28Speaker 1: as you pull the plug.
- 0:29Speaker 2: Poof, it's gone. And that's the big challenge in digital forensics.
- 0:33Speaker 2: You know, you're literally in a race against time.
- 0:36Speaker 1: So today we're going to put two tools under the microscope.
- 0:39Speaker 1: In one corner we've got magnet RAM capture and the
- 0:41Speaker 1: other the heavyweight FTK imager.
- 0:44Speaker 2: One's a scalpel, the other is more of a Swiss
- 0:46Speaker 2: army knife and.
- 0:47Speaker 1: The whole debate. The thing we're really digging into is
- 0:49Speaker 1: this idea of the footprint.
- 0:52Speaker 2: The footprint. This is where it gets really fascinating. There's
- 0:55Speaker 2: this principle in forensics low cards exchange principle, the idea
- 0:59Speaker 2: that every content leaves a trace.
- 1:01Speaker 1: You can't touch something without changing it.
- 1:03Speaker 2: You can't. And when you run a program to capture RAM,
- 1:07Speaker 2: that program itself needs RAM to run. It has to
- 1:10Speaker 2: load itself into the very memory you're trying to save.
- 1:13Speaker 1: So you're overrating a tiny piece of the evidence just
- 1:16Speaker 1: by trying to collect it.
- 1:18Speaker 2: You are. It's a paradox. The goal is to make
- 1:21Speaker 2: that footprint, that little bit of damage as small as
- 1:24Speaker 2: humanly possible.
- 1:25Speaker 1: Okay, so let's start with the lightweight champion, then Magnet
- 1:28Speaker 1: RAM capture.
- 1:29Speaker 2: Yeah, Magnet is a perfect example of a tool that
- 1:31Speaker 2: does one thing and it just does it incredibly well.
- 1:34Speaker 1: And the first thing you notice about it as a
- 1:35Speaker 1: user is what's not there. There's no installer, no next, next, finish.
- 1:41Speaker 2: And we really need to pause on that because that's
- 1:43Speaker 2: not just a convenience. That is a critical forensic feature.
- 1:47Speaker 1: Okay, let's break that down because for a normal person
- 1:49Speaker 1: that just means oh cool, it's fast. But for an investigator,
- 1:52Speaker 1: an installer is a total nightmare.
- 1:54Speaker 2: Isn't it. It's a catastrophe. Yeah, a complete disaster. Think
- 1:57Speaker 2: about what an installer actually does. It's not just a file,
- 2:01Speaker 2: it's writ into the Windows registry, creating tump files, changing
- 2:04Speaker 2: time stamps.
- 2:05Speaker 1: You're essentially stomping all over the crime scene before you've
- 2:08Speaker 1: even started looking for clues.
- 2:09Speaker 2: You are, you've just contaminated the timeline by using a
- 2:13Speaker 2: standalone dot exx file like Magnet. You just drop it
- 2:17Speaker 2: on your collection drive and run it from there. You
- 2:19Speaker 2: bypass all of that. You keep the system as clean
- 2:22Speaker 2: as you possibly can.
- 2:23Speaker 1: But you do need the keys to the kingdom. You
- 2:26Speaker 1: need to be an administrator.
- 2:27Speaker 2: Oh absolutely, you're asking the operating system's kernel. It's very
- 2:31Speaker 2: core to just hand over everything it's holding. A regular
- 2:34Speaker 2: user can't make that request.
- 2:36Speaker 1: Okay, so let's paint the picture. You're there on site,
- 2:39Speaker 1: You've got your USB drive plugged in. You double click
- 2:41Speaker 1: the Magnet executable. A simple little window pops up, and
- 2:44Speaker 1: there's a big trap right there, isn't there?
- 2:47Speaker 2: The destination the biggest rookie mistake. The tool asks, hey,
- 2:51Speaker 2: where should I save this huge memory file? And if
- 2:54Speaker 2: you're not thinking, you might just point it to the
- 2:56Speaker 2: desktop of the computer you're examining.
- 2:58Speaker 1: It, because it's easy. It's right there, right there.
- 3:00Speaker 2: But stop and think, Yeah, you're about to write a say,
- 3:04Speaker 2: sixteen gigaby file onto the very hard drive. That is
- 3:07Speaker 2: your evidence.
- 3:08Speaker 1: You're overwriting deleted files, You're crushing data in what we
- 3:12Speaker 1: call unallocated space.
- 3:14Speaker 2: You are you're changing file tables, you are actively destroying
- 3:17Speaker 2: potential evidence. You have to absolutely must browse to your
- 3:21Speaker 2: external collection drive. That data has to flow out of
- 3:24Speaker 2: the target system, never back into it.
- 3:27Speaker 1: Now, Magnet has this one feature that I love, but
- 3:29Speaker 1: it feels kind of retro, this splitting or chunking feature.
- 3:33Speaker 2: It does feel a bit like we're back in the
- 3:35Speaker 2: nineties with floppy disks, doesn't.
- 3:37Speaker 1: It a little bit? But it's actually a life saver,
- 3:39Speaker 1: and it's because of the file system on our drives.
- 3:41Speaker 2: You're talking about the fat thirty two problem exactly.
- 3:44Speaker 1: So you go out and buy a brand new USB
- 3:47Speaker 1: drive for your kit. Chances are it's formatted as FAT
- 3:49Speaker 1: thirty two because that works on everything Mac Windows, you
- 3:52Speaker 1: name it right.
- 3:53Speaker 2: But Fat thirty two has a critical weakness, a hard limit.
- 3:57Speaker 2: It cannot, under any circumstances, hand a single file that's
- 4:01Speaker 2: bigger than four gigabytes.
- 4:02Speaker 1: So here's the trap. You're capturing sixteen gigs of RAM
- 4:05Speaker 1: from a server. Hit start, it's running. Everything looks great.
- 4:09Speaker 1: It gets to three point nine to nine gigs.
- 4:10Speaker 2: And what happens, It just fails. The process errors out,
- 4:14Speaker 2: the file system literally can't write the next.
- 4:17Speaker 1: Bite, and you've just wasted all that time. And worse,
- 4:20Speaker 1: you've been running a process on the suspect machine for
- 4:22Speaker 1: nothing exactly.
- 4:23Speaker 2: So that little checkbox in Magnet that says split file
- 4:26Speaker 2: into segments, that's not a nice to have. If you're
- 4:29Speaker 2: using a fat thirty two drive, it is absolutely essential.
- 4:32Speaker 2: You tell it to make two GB chunks and it
- 4:34Speaker 2: just sails right past that four GB limit.
- 4:37Speaker 1: There's also the let's call it the government agency in case, right,
- 4:41Speaker 1: the DVD problem, Oh.
- 4:42Speaker 2: The DVD scenario. It sounds old fashion, but it happens.
- 4:46Speaker 2: You need to hand evidence over to a secure facility
- 4:48Speaker 2: and they have a strict no USB drives policy.
- 4:51Speaker 1: So the only way to get data in the door
- 4:53Speaker 1: is to burn it onto discs.
- 4:54Speaker 2: Right, and a DVD holds what four point seven gigs?
- 4:57Speaker 2: If you have one giant thirty two gigabyte RAM file,
- 5:00Speaker 2: well you're stuck. Yeah, But if you told Magnet to
- 5:02Speaker 2: chunk it into four GB segments from the start, you
- 5:05Speaker 2: just burn your discs and you're done.
- 5:06Speaker 1: It's clean, super clean, Okay, let's talk numbers the footprint.
- 5:10Speaker 1: How much damage is Magnet actually doing.
- 5:12Speaker 2: It's incredibly small. Benchmarks put it at around four point
- 5:15Speaker 2: two megabytes of RAM usage while it's running four.
- 5:18Speaker 1: Point two megs. I mean, my web browser probably uses
- 5:21Speaker 1: one hundred times that just to load a single tab.
- 5:24Speaker 2: In the grand scheme of a sixteen gigabyte system. It's
- 5:27Speaker 2: basically a rounding era. It is a very very acceptable footprint.
- 5:30Speaker 1: Okay, so that's the scalpel, precise light, smart about its limitations.
- 5:35Speaker 1: Now let's talk about the other guy, the one that
- 5:38Speaker 1: makes a bit more noise when it enters the room.
- 5:40Speaker 1: Ftk Immature, the heavy hitter.
- 5:42Speaker 2: For sure.
- 5:43Speaker 1: Ftk Imager is a legend. But it's not just for RAM.
- 5:47Speaker 1: It does everything, and that's.
- 5:49Speaker 2: The key difference. Magnet is a tool. Ftk immager is
- 5:52Speaker 2: a platform. When you open it, you don't just see
- 5:55Speaker 2: a start button. You see toolbars, file browsers, hex viewers,
- 5:59Speaker 2: the works.
- 6:00Speaker 1: And to capture RAM you have to hunt for that
- 6:02Speaker 1: little icon, the one that looks like a stick of memory.
- 6:04Speaker 2: Right. Once you're in there, you have more options. You
- 6:06Speaker 2: conclude the page file, which is great. You can output
- 6:08Speaker 2: to different formats.
- 6:09Speaker 1: But all that power has a cost, and the cost
- 6:12Speaker 1: is paid in RAM.
- 6:13Speaker 2: It is. Well, let's look at the stats. Magnet was
- 6:15Speaker 2: four point two megs FTK imager just sitting there doing nothing,
- 6:19Speaker 2: just idling, just idling. The window is open, it's already
- 6:22Speaker 2: using about ten or eleven megabytes of RAM.
- 6:24Speaker 1: Wow, so before you've even clicked a button, you've already
- 6:27Speaker 1: made more than double the impact of Magnet's entire operation.
- 6:31Speaker 2: Correct, And once you actually start the capture, it jumps
- 6:33Speaker 2: up to around twelve maybe thirteen megabytes.
- 6:35Speaker 1: Okay, I have to play Devil's advocate here. A lot
- 6:38Speaker 1: of people listening are going to be thinking, come on,
- 6:40Speaker 1: we're talking about systems with thirty two thousand megabytes of RAM?
- 6:44Speaker 1: Is thirteen megabytes really a big deal? Aren't we splitting hairs?
- 6:48Speaker 2: And that is the million dollar question? And for you know,
- 6:52Speaker 2: ninety nine percent of cases, you're probably right, it probably
- 6:54Speaker 2: won't matter. But our job is to worry about that
- 6:57Speaker 2: one percent.
- 6:58Speaker 1: The needle in the haystack.
- 6:59Speaker 2: That's it. RAM isn't a neat, orderly book, it's a
- 7:02Speaker 2: chaotic space. When FTK takes that thirteen nagabytes, the OS
- 7:06Speaker 2: just gives it whatever memory pages are available, and maybe
- 7:09Speaker 2: those pages are empty, or maybe one of them held
- 7:11Speaker 2: the password to an encrypted file that was cleared a
- 7:13Speaker 2: little second ago.
- 7:14Speaker 1: So it's like Russian roulette. The footprint is the bullet.
- 7:17Speaker 1: It's small, but if it hits the wrong.
- 7:19Speaker 2: Spot, the evidence is gone forever. And that's why the
- 7:22Speaker 2: purists are so cautious about it. Yeah, it's not just
- 7:25Speaker 2: that it's bigger, it's that it's unnecessarily bigger if all
- 7:28Speaker 2: you want to do is capture RAM.
- 7:30Speaker 1: There's a technical reason too. Write something about user mode
- 7:33Speaker 1: versus kernel mode.
- 7:34Speaker 2: Yeah, without getting too bogged down, think of it like
- 7:36Speaker 2: a restaurant. User mode where ftk imager runs is like
- 7:40Speaker 2: being a customer in the dining room. If you want something,
- 7:43Speaker 2: you have to ask the waiter the operating system to
- 7:46Speaker 2: go get it for you.
- 7:47Speaker 1: It's indirect.
- 7:48Speaker 2: It's indirect, and there's overhead. Kernel mode is like being
- 7:51Speaker 2: the chef. You can just go grab what you need
- 7:53Speaker 2: directly from the fridge. Magnet operates much closer to that
- 7:56Speaker 2: kernel mode.
- 7:56Speaker 1: Level, and that's part of what keeps its footprint so small.
- 7:59Speaker 2: Exactly. There are fewer layers of abstraction, which means fewer
- 8:02Speaker 2: resources are needed.
- 8:04Speaker 1: So we've got the light efficient scalpel and magnet and
- 8:07Speaker 1: the heavy powerful Swiss Army knife and FTK. Why would
- 8:11Speaker 1: anyone ever use FTK for RAM capture then.
- 8:14Speaker 2: Because sometimes you're already in a situation where you need
- 8:17Speaker 2: the whole Swiss Army knife.
- 8:18Speaker 1: This is the defense of FTK, ah the while i'm
- 8:21Speaker 1: here argument.
- 8:22Speaker 2: You got it. Imagine you're unseen. You don't just need
- 8:26Speaker 2: the RAM. You also need to quickly preview the hard drive,
- 8:30Speaker 2: you look at the registry, view a weird file, and
- 8:33Speaker 2: a hex editor, all.
- 8:34Speaker 1: Things that ftk imager does really, really well, brilliantly.
- 8:37Speaker 2: So the logic is, if I'm going to open FTK
- 8:40Speaker 2: imager anyway to do all that other work, I have
- 8:42Speaker 2: already paid the eleven megabyte RAM tax, the program is
- 8:46Speaker 2: already running.
- 8:46Speaker 1: Oh I see, the cost is already sunk. The footprint
- 8:49Speaker 1: is already there, so you might as well just click
- 8:51Speaker 1: the RAM capture button while you're at it.
- 8:53Speaker 2: Precisely, it becomes an issue of workflow efficiency. Why open
- 8:57Speaker 2: a second tool when the first one is already open
- 8:59Speaker 2: and capable.
- 9:00Speaker 1: Okay, but this feels like a conflict. Do you go
- 9:02Speaker 1: for purity with magnet or utility with FTK. How do
- 9:05Speaker 1: you solve that?
- 9:06Speaker 2: You solve it with the hybrid strategy. This is the
- 9:08Speaker 2: gold standard workflow.
- 9:09Speaker 1: Okay, walk us through it.
- 9:11Speaker 2: Simple. You walk up to the computer. What's the number
- 9:13Speaker 2: one priority preserving the most volatile evidence, which is the RAM.
- 9:17Speaker 2: So step one, you plug in your drive and you
- 9:20Speaker 2: run magnet RAM capture.
- 9:21Speaker 1: Because it has the smallest footprint, you get the ghost
- 9:24Speaker 1: in the bottle with the least amount of disturbance.
- 9:26Speaker 2: You got it. Secure the RAM first, wait for it
- 9:29Speaker 2: to finish. Now that evidence is safe on your collection drive,
- 9:32Speaker 2: and then what Then you fire up FTK imager and
- 9:35Speaker 2: now you don't care about its thirteen megabyte footprint.
- 9:39Speaker 1: Because you already have your clean copy exactly.
- 9:41Speaker 2: The pressure is gone. Now you can use FTK for
- 9:44Speaker 2: what it excels at, triage analysis, deep diving into the
- 9:48Speaker 2: file system. You use the scalpel for the delicate surgery.
- 9:51Speaker 2: Then you bring in the heavy machinery for the rest
- 9:53Speaker 2: of the job.
- 9:54Speaker 1: That makes perfect sense. It's not about one tool versus
- 9:57Speaker 1: the other. It's about the order of operation.
- 9:59Speaker 2: That's the secret to good forensics. So it's not just
- 10:01Speaker 2: what you do, it's the sequence you do it. In.
- 10:04Speaker 1: Okay, So let's wrap this up. Magnet Dot lightweight standalone
- 10:08Speaker 1: has that crucial file splitting feature and a tiny footprint.
- 10:12Speaker 1: Your preservation tool FTK Imager, a full featured analysis platform,
- 10:17Speaker 1: more powerful, but with a significantly heavier footprint your analysis tool,
- 10:22Speaker 1: and the winning move is always Magnet first, FTK second.
- 10:25Speaker 2: Always.
- 10:26Speaker 1: All right, Let's leave you with a quick challenge, a
- 10:27Speaker 1: little scenario to lock this in.
- 10:29Speaker 2: I like it. You're on a job. You need to
- 10:31Speaker 2: capture sixteen gigs of RAM from a server. The only
- 10:34Speaker 2: collection drive you have on you is an older one
- 10:37Speaker 2: that you know is formatted as FAT thirty two, a
- 10:40Speaker 2: classic problem. You have both magnet and FTK available. Which
- 10:44Speaker 2: tool do you use? And this is the important part,
- 10:47Speaker 2: What specific setting do you absolutely have to turn on
- 10:50Speaker 2: to make sure the whole thing doesn't fail.
- 10:53Speaker 1: Take a second, think about that file size on it.
- 10:55Speaker 2: The answer is you have to use magnet RAM capture,
- 10:59Speaker 2: and you must check the to split file into smaller
- 11:02Speaker 2: chunks like two GB.
- 11:03Speaker 1: Each, because if you don't, the capture will crash when
- 11:06Speaker 1: it hits that four GB fat thirty two wall, and
- 11:10Speaker 1: you'll have contaminated the system for nothing.
- 11:12Speaker 2: Exactly knowing why those little check boxes exist is what
- 11:15Speaker 2: makes all the difference.
- 11:16Speaker 1: It's the difference between just using a tool and actually
- 11:18Speaker 1: understanding your craft.
- 11:19Speaker 2: That's our deep dive for today. Remember, with volatile memory,
- 11:23Speaker 2: you only get one shot, so keep your footprint light
- 11:26Speaker 2: and make sure you catch that ghost.
- 11:27Speaker 1: See you next time.