Latest / CyberCode Academy / Course 22 - Digital Forensics: RAM Extraction Fundamentals | Episode 2: Benchmarking Tools and Using MoonSols DumpIt
Transcript
- 0:00Speaker 1: Imagine this for a second. You're in a freezing cold
- 0:02Speaker 1: server room. The AC is just roaring, and you're staring
- 0:05Speaker 1: at a computer. This machine belongs to someone suspected of, say,
- 0:09Speaker 1: stealing company secrets, and the screen is unlocked, it's running.
- 0:14Speaker 2: Okay, So this is the high stake scenario exactly.
- 0:17Speaker 1: You know the proof you need is on that machine
- 0:19Speaker 1: right now, but it's not, you know, in a file
- 0:22Speaker 1: called stolen company secrets.
- 0:24Speaker 2: Right It's never that easy. It's floating in the ether.
- 0:27Speaker 1: It's the encryption keys, the act of chat logs, maybe
- 0:31Speaker 1: even malware that's still running.
- 0:34Speaker 2: All of which is sitting in the RAM, the random
- 0:36Speaker 2: access memory, most volatile part of the machine, and the.
- 0:39Speaker 1: Clock is just ticking. If that machine locks or reboots,
- 0:43Speaker 1: or you just trip over the power cord.
- 0:44Speaker 2: Poof, it's gone, and not just deleted. It physically no
- 0:48Speaker 2: longer exists.
- 0:49Speaker 1: It's the ultimate forensic nightmare. But there's an even bigger problem.
- 0:53Speaker 1: Isn't there something borrowed from physics?
- 0:56Speaker 2: The Heisenberg uncertainty principle of digital forensics. I love that.
- 0:59Speaker 1: Term, the idea that just by looking at something you
- 1:02Speaker 1: change it.
- 1:03Speaker 2: You have to to get the data out of RAM.
- 1:05Speaker 2: You have to run a program, and that program has
- 1:08Speaker 2: to load in to the very memory you're trying to capture, So.
- 1:11Speaker 1: You're overwriting potential evidence just by trying to save it.
- 1:15Speaker 2: That's the core problem we're going to unpack today. How
- 1:17Speaker 2: do you grab that evidence without destroying it? And we're
- 1:21Speaker 2: not just going to talk about tools, We're going to
- 1:23Speaker 2: talk about benchmarking them.
- 1:24Speaker 1: Justifying why you chose a specific tool exactly.
- 1:27Speaker 2: We'll get into the weeds on kernel mode versus user mode,
- 1:31Speaker 2: and then focus on one specific tool that a lot
- 1:33Speaker 2: of pros consider the gold standard Moonzol's dump it.
- 1:37Speaker 1: It sounds like we're about to do some real digital
- 1:40Speaker 1: depective work. This is the deep dive on memory forensics.
- 1:44Speaker 2: Let's do it.
- 1:44Speaker 1: Okay, So I want to start with that word you used, benchmarking,
- 1:47Speaker 1: because you know, my mind immediately goes to gamers testing
- 1:50Speaker 1: out new graphics.
- 1:51Speaker 2: Cards, right, kind of run crisis.
- 1:53Speaker 1: Yeah yeah, But in forensics it sounds less about fun
- 1:55Speaker 1: and more about liability.
- 1:58Speaker 2: It is one hundred percent about liability. You have to
- 2:00Speaker 2: remember the endgame. It's not just about finding the evidence,
- 2:03Speaker 2: it's about proving it in a way that.
- 2:05Speaker 1: Holds up in a court of law, you mean, or.
- 2:08Speaker 2: A corporate boardroom. Imagine a lawyer asking you, how do
- 2:11Speaker 2: I know your software didn't just plant this evidence or
- 2:15Speaker 2: maybe overwrite the evidence that would have cleared my client.
- 2:18Speaker 1: Oof. That's a tough question to answer. If you just
- 2:20Speaker 1: grabbed a tool from some random website, you can't.
- 2:23Speaker 2: Just say well it had good reviews. You need data.
- 2:26Speaker 2: You need a dossier on your own tools. How much
- 2:28Speaker 2: memory does it use? How fast is it? What traces
- 2:31Speaker 2: does it leave?
- 2:32Speaker 1: So what are we actually measuring? What are the key
- 2:34Speaker 1: metrics for a forensically sound tool?
- 2:37Speaker 2: Well, there are four main ones. The first and maybe
- 2:39Speaker 2: the most important for this topic is the RAM footprint.
- 2:42Speaker 1: How much space the tool itself.
- 2:44Speaker 2: Takes up in memory Exactly. If your tool is say
- 2:48Speaker 2: fifty megabytes, you are instantly wiping fifty megabytes of potential
- 2:51Speaker 2: evidence the moment you run it, and you have no
- 2:53Speaker 2: idea what you're overwriting.
- 2:54Speaker 1: It could be nothing, or it could be the one
- 2:57Speaker 1: thing you came for.
- 2:58Speaker 2: You're playing Russian Roulette with the evidence. Yeah, so metric
- 3:00Speaker 2: number one is be as small as humanly possible?
- 3:04Speaker 1: Okay, what's number two?
- 3:05Speaker 2: Mode of operation? And this is the real technical heavy hitter.
- 3:08Speaker 1: You mean, whether it runs in user mode or kernel mode.
- 3:11Speaker 2: That's the one, and it's the secret sauce of this
- 3:13Speaker 2: whole thing. So let's put a pin in that for
- 3:15Speaker 2: a moment.
- 3:15Speaker 1: Okay, So metric number three extraction speed. Now why does
- 3:21Speaker 1: that matter so much? I mean, I can wait a
- 3:22Speaker 1: few minutes. Is it just about being impatient?
- 3:25Speaker 2: No? No, it's about risk. A computer is a living system.
- 3:30Speaker 2: Things are changing every millisecond. Logs are being written, connections
- 3:33Speaker 2: are timing out. The longer you take, the more the
- 3:36Speaker 2: crime scene changes, and the.
- 3:37Speaker 1: More time a remote attacker has to realize you're there
- 3:40Speaker 1: and hit the kill switch.
- 3:41Speaker 2: Precisely, speed is security. A five minute job is much
- 3:45Speaker 2: safer than an hour long one. You're in and out
- 3:48Speaker 2: like a ghost.
- 3:49Speaker 1: Got it. Time equals exposure and the.
- 3:52Speaker 2: Fourth metric available options. You know, the bells and whistles.
- 3:55Speaker 2: Can it compress data? Can it send the dump over
- 3:58Speaker 2: the network?
- 3:58Speaker 1: But wait a minute, don't more feed like a fancy
- 4:00Speaker 1: interface or networking. Just make the RAM footprint bigger.
- 4:04Speaker 2: You found the trade off, that's the balancing act. More
- 4:07Speaker 2: features usually cost more.
- 4:08Speaker 1: Memory, So there's no single perfect tool.
- 4:12Speaker 2: Not really, It's about choosing the right tool for the job.
- 4:15Speaker 2: Sometimes you need the chainsaw, but most of the time,
- 4:17Speaker 2: especially in delicate situations, you need the scalpel. Being able
- 4:21Speaker 2: to justify that choice is what makes you a professional.
- 4:24Speaker 1: Okay, let's circle back to that pin metric number two.
- 4:28Speaker 1: Kernel mode versus user mode. I hear these terms all
- 4:31Speaker 1: the time, but can you break it down and plain
- 4:33Speaker 1: English for us?
- 4:33Speaker 2: Yeah? Sure. Think of your operating system like Windows as
- 4:37Speaker 2: a super secure building.
- 4:38Speaker 1: Okay, I'm with you.
- 4:39Speaker 2: User mode is like the lobby and the cubicles. It's
- 4:42Speaker 2: where all your normal apps run, your browser, your music player,
- 4:46Speaker 2: Microsoft Word.
- 4:47Speaker 1: The general population right, and they.
- 4:49Speaker 2: Have very restricted access. One program can't just look into
- 4:52Speaker 2: another program's memory. The OS acts like a security guard,
- 4:55Speaker 2: keeping everyone separated.
- 4:56Speaker 1: That's why when my browser crashes, my whole computer doesn't
- 4:59Speaker 1: go down exactly.
- 5:00Speaker 2: That's memory isolation. Now. Kernel mode, that's the security control
- 5:04Speaker 2: center in the basement, the all access pass. It is
- 5:07Speaker 2: the access it's not asking for permission. It has direct
- 5:11Speaker 2: raw access to the hardware and all the memory. It's
- 5:14Speaker 2: the core of the operating system.
- 5:16Speaker 1: So if I run a forensic tool in user mode,
- 5:19Speaker 1: what happens when I try to copy all the RAM.
- 5:22Speaker 2: You get blocked. The OS security guard steps in and says, nope,
- 5:26Speaker 2: you can't look here. This memory's protected. You get an
- 5:29Speaker 2: incomplete copy.
- 5:30Speaker 1: At best, and at worst, at.
- 5:32Speaker 2: Worst, you get lied to. Modern malware, especially rootkits, can
- 5:37Speaker 2: run in kernel mode.
- 5:38Speaker 1: Uh oh.
- 5:39Speaker 2: So when your user mode tool politely asks the OS, hey,
- 5:43Speaker 2: can I see a lift of all the running programs?
- 5:46Speaker 2: The malware can intercept that request.
- 5:48Speaker 1: It can edit the list before I see it.
- 5:50Speaker 2: It scrubs its own name off the list and hands
- 5:52Speaker 2: you a clean bill of health. Your tool reports everything
- 5:54Speaker 2: is fine, while the infection is running right underneath it.
- 5:57Speaker 1: That is terrifying.
- 5:58Speaker 2: It's why kernel mode is the preferred for forensics. Your
- 6:01Speaker 2: tool goes into that security control room. It doesn't ask
- 6:04Speaker 2: for a list. It looks directly at the security monitors,
- 6:07Speaker 2: at the physical memory itself, and sees what's really there.
- 6:10Speaker 1: It's the only way to get the objective truth.
- 6:12Speaker 2: In a compromised environment. Yes, it bypasses all those tricks,
- 6:16Speaker 2: which I.
- 6:16Speaker 1: Think brings us to the star of the show. We
- 6:19Speaker 1: need a tool that's tiny, fast and runs in kernel mode.
- 6:24Speaker 1: You mentioned Moonsol's dump it.
- 6:26Speaker 2: It is pretty much a legend in the digital forensics
- 6:28Speaker 2: and incident response community.
- 6:30Speaker 1: What makes it so special?
- 6:31Speaker 2: I'd say it's the pure elegance of its simplicity. It's
- 6:34Speaker 2: just a single executable file. There's no installer.
- 6:37Speaker 1: Why is having no installers such a big deal?
- 6:40Speaker 2: Because installing software changes the system, It writes to the registry,
- 6:44Speaker 2: creates temp files, alters timestamps on the hard drive. It's
- 6:48Speaker 2: like trampling all over a crime scene.
- 6:50Speaker 1: You're destroying other potential evidence.
- 6:52Speaker 2: Right with dumping, you just run it directly from a
- 6:54Speaker 2: USB drive. It barely touches the suspect machine.
- 6:57Speaker 1: Okay, so what about that RAM footprint talking?
- 7:00Speaker 2: The benchmark showed at about eight hundred and sixteen kilobytes.
- 7:03Speaker 1: Wait, kilobytes, not megabytes kilobytes.
- 7:06Speaker 2: Wow, that's less than one megabyte. That is microscopic, is
- 7:10Speaker 2: incredibly lean.
- 7:11Speaker 1: It's just enough code to get into kernel mode, take
- 7:15Speaker 1: control and start dumping data. The chances of it overwriting
- 7:18Speaker 1: something important are incredibly low. And what about speed? Did
- 7:22Speaker 1: it hold up on a modern USB three point zero connection?
- 7:25Speaker 2: The benchmark had it dumping nine gigabytes of RAM in
- 7:28Speaker 2: about five minutes.
- 7:29Speaker 1: That is seriously fast.
- 7:31Speaker 2: Yeah, it's hauling it gets the job done before anyone
- 7:33Speaker 2: even knows you were there.
- 7:34Speaker 1: Okay, I want to visualize this. Let's do a mental walkthrough.
- 7:37Speaker 1: I'm at the suspects computer. I've plugged in my USB.
- 7:39Speaker 1: What happens next?
- 7:40Speaker 2: Okay, so you open the drive, you see one file,
- 7:44Speaker 2: dump it dot exe. That's it.
- 7:47Speaker 1: No extra folders, no clutter, none.
- 7:49Speaker 2: You double click it and you don't get a fancy window.
- 7:52Speaker 2: You get a black command prompt.
- 7:53Speaker 1: Box, very old school. I like it.
- 7:55Speaker 2: It's pure function. It immediately tells you how much RAM
- 7:58Speaker 2: it detected and where it's going to save the file,
- 8:01Speaker 2: which by default is right back onto your USB.
- 8:03Speaker 1: Drive, which is critical. You never want to save evidence
- 8:06Speaker 1: onto the system you're investigating.
- 8:07Speaker 2: Never, And then it gives you a very simple question,
- 8:10Speaker 2: proceed do in.
- 8:12Speaker 1: That's it.
- 8:13Speaker 2: That's it, no complicated settings, It's designed for speed. You
- 8:17Speaker 2: hit why and press enter, and it just starts instantly.
- 8:21Speaker 2: It just starts streaming the memory directly from RAM to
- 8:23Speaker 2: your USB drive.
- 8:24Speaker 1: There is a neat trick mentioned for verifying the footprint claim, right,
- 8:28Speaker 1: could you actually watch it in task Manager?
- 8:30Speaker 2: You could? Yeah, with the big caveat that opening. Task
- 8:34Speaker 2: and manager itself uses memory, so you're slightly contaminating your.
- 8:38Speaker 1: Own experiment, right, for science only.
- 8:40Speaker 2: For science only. If you did, you'd see the dump
- 8:43Speaker 2: it process just sitting there, using somewhere between five hundred
- 8:46Speaker 2: and eight hundred kilobytes of memory. It doesn't grow or.
- 8:49Speaker 1: Bloat because it's a pipeline, not a bucket. It's streaming
- 8:52Speaker 1: the data out, not holding onto it exactly.
- 8:54Speaker 2: And then a few minutes later, the black box just
- 8:57Speaker 2: says success and closes, and on your u USB you
- 9:00Speaker 2: have a new dot raw file.
- 9:02Speaker 1: And the dot raw format is important.
- 9:04Speaker 2: Right, it's the universal format. It's a perfect bit forbid
- 9:07Speaker 2: copy of the memory. You can load that file into
- 9:09Speaker 2: any analysis tool you want. It doesn't lock you into
- 9:11Speaker 2: one company software.
- 9:12Speaker 1: Okay, let's hit the sow. What on this? Why does
- 9:15Speaker 1: all this nuce eight hundred kilobytes versus fifty megabytes really
- 9:19Speaker 1: matter in the grand scheme of things?
- 9:20Speaker 2: Because today everything is encrypted.
- 9:23Speaker 1: Full disc encryption, BitLocker on Windows, file vault on max. Right.
- 9:28Speaker 2: If the computer shuts down, the hard drive is just
- 9:31Speaker 2: a brick of scrambled data. It's mathematically impossible to break
- 9:34Speaker 2: into without the key.
- 9:35Speaker 1: And where is that key? When the computer is running.
- 9:37Speaker 2: It's sitting in the ramah in plain text, so that
- 9:41Speaker 2: memory dump is often your only way in. If your
- 9:43Speaker 2: tool is too big and overwrites that key, or if
- 9:46Speaker 2: it's unstable and crashes the.
- 9:47Speaker 1: Machine, you've lost everything. The entire case could be gone.
- 9:50Speaker 2: The case is gone. So that eight hundred and sixteen
- 9:53Speaker 2: kilobytes isn't just about being efficient. It's about preserving the
- 9:57Speaker 2: one thing that can unlock all the other evidence.
- 10:00Speaker 1: It's the difference between surgical precision and I don't know,
- 10:03Speaker 1: swinging a sledgehammer.
- 10:05Speaker 2: That's a great analogy, and you want to be able
- 10:07Speaker 2: to stand up in court and say I use the sharpest,
- 10:11Speaker 2: cleanest scalpel available to minimize impact.
- 10:13Speaker 1: What about the future, is this going to get harder
- 10:15Speaker 1: our operating systems fighting back.
- 10:17Speaker 2: It's a constant arms race. Microsoft and Apple are always
- 10:21Speaker 2: trying to lock down the kernel even more to stop malware.
- 10:24Speaker 2: They're building higher and higher.
- 10:25Speaker 1: Walls, which is good for security but bad for forensics.
- 10:29Speaker 2: Makes our job much harder. There are already systems where
- 10:32Speaker 2: you can't load a tool like dump it without rebooting,
- 10:36Speaker 2: which completely defeats the purpose.
- 10:38Speaker 1: Because a reboot wipes the RAM.
- 10:40Speaker 2: Exactly we're heading towards the future where hardware based solutions
- 10:43Speaker 2: might become necessary. The lock is always changing.
- 10:46Speaker 1: Okay, before we sign off, let's throw out a little
- 10:48Speaker 1: review question for everyone listening.
- 10:50Speaker 2: A pop quiz.
- 10:51Speaker 1: I like it based on everything we've talked about. If
- 10:54Speaker 1: a forensic tool successfully dumps memory and doesn't set off
- 10:58Speaker 1: the anti virus, but you find out later it was
- 11:01Speaker 1: running in user mode, why should you be suspicious of
- 11:04Speaker 1: the results?
- 11:04Speaker 2: Ooh, that's a good win. It really gets to the
- 11:06Speaker 2: heart of it. Did you get the truth or did
- 11:09Speaker 2: you just get the story the operating system or the
- 11:11Speaker 2: malware wanted you to hear.
- 11:13Speaker 1: Did you see the room yourself or did you just
- 11:15Speaker 1: trust the guy at the front desk.
- 11:16Speaker 2: That's it right there. Trust but verify, and in this field,
- 11:21Speaker 2: you verify from the kernel level.
- 11:23Speaker 1: And a final thought to leave everyone with, we spend
- 11:26Speaker 1: so much time worrying about our data being stolen, but
- 11:28Speaker 1: today really highlights just how incredibly fragile it is. It's
- 11:32Speaker 1: just a fleeting electrical state, it really is.
- 11:35Speaker 2: We're building these incredibly complex digital castles on sand and
- 11:38Speaker 2: our job is just to get a good picture before
- 11:40Speaker 2: the tide comes in.
- 11:41Speaker 1: That's a great way to put it, this has been
- 11:43Speaker 1: the deep dive. Stay curious, stay secure, and we'll catch
- 11:46Speaker 1: you on the next one.