Latest / CyberSecurity Summary / Linux Forensics
Transcript
- 0:00Speaker 1: Welcome back everyone for another deep dive. This time we're
- 0:03Speaker 1: putting on our digital detective hats and uh yeah, we're
- 0:07Speaker 1: diving headfirst into the world of Linux forensics.
- 0:10Speaker 2: Oh, Linux forensics, that's my jam.
- 0:12Speaker 1: And to guide us on this thrilling adventure, we have
- 0:15Speaker 1: doctor Philip Polster's book. Now, this isn't your typical dry
- 0:19Speaker 1: technical manual.
- 0:20Speaker 2: No, no, not at all.
- 0:21Speaker 1: It's more like a gripping detective story. You know, even
- 0:25Speaker 1: if you've never ever touched a command line, you'll feel
- 0:28Speaker 1: like you're cracking a real life cybercrime case.
- 0:30Speaker 2: He's got this way of making the technical stuff feel
- 0:33Speaker 2: almost like cinematic.
- 0:35Speaker 1: Oh. Absolutely.
- 0:36Speaker 2: He walks you through this case right where a company
- 0:40Speaker 2: they're called Phil's Awesome Stuff, they get slammed with a
- 0:42Speaker 2: cyber attack. Their web server has been compromised, data's potentially stolen,
- 0:46Speaker 2: the whole shebang.
- 0:47Speaker 1: Oh man.
- 0:48Speaker 2: He uses this story right to teach you the ropes
- 0:51Speaker 2: of Linux forensics.
- 0:53Speaker 1: I love that approach, learning through a story. So we're
- 0:56Speaker 1: going to use this Phills Awesome stuffcase as our guide,
- 1:00Speaker 1: and our mission, should we choose to accept it, is
- 1:03Speaker 1: to equip you, dear listeners, with the knowledge tackle a
- 1:07Speaker 1: digital investigation head on.
- 1:09Speaker 2: That's right. And one of the first things you realize
- 1:11Speaker 2: in these situations is that your gut instinct, well it
- 1:15Speaker 2: might lead you astray. Oh really yeah, Like you see
- 1:17Speaker 2: a compromise system, you want to shut it down immediately, right.
- 1:20Speaker 1: Contain the damage seems logical.
- 1:22Speaker 2: Yeah, yeah, exactly, contained the damage. But as Polster points out,
- 1:27Speaker 2: that could actually be the worst move.
- 1:29Speaker 1: No, I'm really intrigued. Why would leaving a compromise system
- 1:32Speaker 1: running be like the right call?
- 1:35Speaker 2: Well, think about it this way. If you had like
- 1:38Speaker 2: a burglar in your house and they knew you were
- 1:40Speaker 2: onto them, what would they do.
- 1:43Speaker 1: They'd try to cover their tracks, get rid of any evidence.
- 1:46Speaker 2: Exactly, same thing with malware. If it senses the system
- 1:49Speaker 2: shutting down, it's like hitting the panic button. It might
- 1:51Speaker 2: wipe its activity logs, delete those stolen files.
- 1:54Speaker 1: So it basically disappears in the thin air poof gone wow.
- 1:58Speaker 1: So it's this like aast time. But sometimes hitting the
- 2:02Speaker 1: pause button actually helps the criminal, not.
- 2:05Speaker 2: Us exactly, And this is just one example of how
- 2:08Speaker 2: counterintuitive digital forensics can be. Polster also talks about this
- 2:11Speaker 2: thing called confirmation bias.
- 2:13Speaker 1: Confirmation bias, Yeah, it.
- 2:15Speaker 2: Could trip up even the most seasoned investigators.
- 2:17Speaker 1: Now, isn't confirmation bias, like when you're so convinced you're
- 2:21Speaker 1: right that you just ignore any evidence that says otherwise.
- 2:23Speaker 2: You got it? Polster uses this analogy. It's like a
- 2:27Speaker 2: magician asks a child to guess which hand has the coin.
- 2:30Speaker 1: Right, Okay, I'm following, and.
- 2:32Speaker 2: The child keeps getting right, and the parents they're convinced, Oh,
- 2:35Speaker 2: my kid's a mind reader. But the magician, sneaky magician,
- 2:39Speaker 2: had coins in both hands all along.
- 2:41Speaker 1: Oh wow, So the parents were so focused on proving
- 2:44Speaker 1: their kid a special that they totally missed the obvious.
- 2:47Speaker 2: Exactly, And investigators can fall into that same trap. They
- 2:50Speaker 2: get fixated on one theory and then they only see
- 2:53Speaker 2: the evidence that supports it. Yeah, we've got to turn
- 2:56Speaker 2: a blind eye to other possibilities.
- 2:58Speaker 1: Right, It's like having tunnel vision. So that's a good
- 3:00Speaker 1: reminder for all of us, right to stay open minded,
- 3:03Speaker 1: consider all the angles. Absolutely, But before we get ahead
- 3:06Speaker 1: of ourselves, let's take a step back for those who
- 3:08Speaker 1: are just starting out, Like, how would you define forensics,
- 3:11Speaker 1: especially in this digital world?
- 3:13Speaker 2: Okay, so forensic science at its core, it's about gathering
- 3:19Speaker 2: evidence that could hold up in court, even if you
- 3:23Speaker 2: never actually plan on going to court. Got it so
- 3:25Speaker 2: about being meticulous, documenting everything, following procedures.
- 3:30Speaker 1: Right, dotting your eyes, crossing your t's.
- 3:33Speaker 2: Yeah, and ensuring that all your findings, everything you discover
- 3:37Speaker 2: is credible and hasn't been tampered with.
- 3:39Speaker 1: So it's not just about finding those clues, it's about
- 3:42Speaker 1: doing it in a way that's like legit that can
- 3:44Speaker 1: stand up to scrutiny.
- 3:45Speaker 2: Exactly. In digital forensics, it's particularly tricky because digital evidence
- 3:50Speaker 2: is so easy to change, delete, even fabricate.
- 3:54Speaker 1: Oh that's right.
- 3:55Speaker 2: It's like imagine trying to solve a crime scene, but
- 3:58Speaker 2: the evidence can just vanish or morph into something else
- 4:01Speaker 2: at any given moment.
- 4:02Speaker 1: Oh wow, that's a great way to put it. So
- 4:04Speaker 1: we're dealing with much more fragile evidence than say, fingerprints
- 4:08Speaker 1: or I don't know, DNA.
- 4:10Speaker 2: Right. But here's the interesting part digital evidence. It also
- 4:14Speaker 2: leaves behind a ton of information that you know, traditional
- 4:17Speaker 2: forensics can only dream of.
- 4:18Speaker 1: Oh that's true.
- 4:19Speaker 2: We're talking time stamps, file access logs, internet history. I mean,
- 4:23Speaker 2: the list goes on and on.
- 4:24Speaker 1: So it's a double edged sword, right, It is more fragile,
- 4:27Speaker 1: but also potentially way more revealing exactly.
- 4:30Speaker 2: And this brings us back to low cards exchange principle,
- 4:33Speaker 2: which is like the couinderstone of forensic science.
- 4:36Speaker 1: Okay, remind me what's low cards exchange principle again.
- 4:39Speaker 2: It basically states that whenever two objects interact, they leave
- 4:43Speaker 2: traces on each other, right, right, So like paint transfer
- 4:46Speaker 2: in a car accident, fingerprints at a crime scene. Well,
- 4:50Speaker 2: in the digital world, those traces, those digital footprints, they're
- 4:53Speaker 2: often even more numerous and detailed.
- 4:55Speaker 1: Oh that's interesting. So every click, every download, every email,
- 4:59Speaker 1: every like everything is leaving a mark somewhere.
- 5:03Speaker 2: You got it. And that's why in this Fills Awesome
- 5:06Speaker 2: Stuff case, Polstra really emphasizes preserving that digital crime scene
- 5:12Speaker 2: as meticulously as possible.
- 5:14Speaker 1: Okay, it makes sense. So let's say we're called in
- 5:16Speaker 1: to investigate this compromise web server at Phill's Awesome Stuff.
- 5:21Speaker 1: What are like the first things we need to keep
- 5:23Speaker 1: in mind? What are the guiding principles as we start
- 5:26Speaker 1: our investigation.
- 5:27Speaker 2: Okay, the absolute top priority, the golden rule, is maintaining
- 5:31Speaker 2: the integrity of the evidence. Think of it like this,
- 5:35Speaker 2: any action you take on a compromised system. Even something small,
- 5:39Speaker 2: it has the potential to change the original state. So
- 5:42Speaker 2: before you even touch the system, you got to make
- 5:45Speaker 2: a forensic copy of the hard drive.
- 5:46Speaker 1: No, it's not just like copying and pasting files, right,
- 5:49Speaker 1: we're talking about a bit for bit replica, a clone
- 5:52Speaker 1: of the entire drive. Why is that so crucial.
- 5:54Speaker 2: Because even something that seems harmless, like just opening a file,
- 5:58Speaker 2: it can change the file's metadata at a day.
- 6:00Speaker 1: That's the time stamps, that access records, all that behind
- 6:02Speaker 1: the scenes stuff, you.
- 6:03Speaker 2: Got it, all that juicy stuff that helps us reconstruct
- 6:06Speaker 2: the what happened the timeline.
- 6:08Speaker 1: So we're working on a copy to avoid messing up
- 6:11Speaker 1: the original evidence exactly.
- 6:13Speaker 2: And while we're preserving that evidence, we got to document
- 6:16Speaker 2: every single step we take during the investigation. Makes us
- 6:18Speaker 2: who accessed what, when and for what reason.
- 6:21Speaker 1: Oh so that creates a chain of custody, that's.
- 6:23Speaker 2: Right, the chain of custody proving that the evidence is
- 6:26Speaker 2: authentic and hasn't been tampered with.
- 6:29Speaker 1: So it's not just about catching the bad guy, it's
- 6:31Speaker 1: about doing it in a way that's airtight, you know,
- 6:34Speaker 1: like building a legal case alongside the technical investigation.
- 6:38Speaker 2: Percisely.
- 6:38Speaker 1: Okay, So documentation super important. Are there any other standard
- 6:43Speaker 1: practices or guidelines that are like super crucial in Linux forensics.
- 6:49Speaker 2: Yeah, sticking to established procedures, that's super important. It's like
- 6:53Speaker 2: having a recipe, you know, for your investigator.
- 6:55Speaker 1: A recipe, okay, Yeah.
- 6:57Speaker 2: It ensures consistency, helps you avoid makeing those silly mistakes,
- 7:01Speaker 2: and makes your findings more credible in the end.
- 7:03Speaker 1: So it's not just about doing things right, it's about
- 7:07Speaker 1: doing them in a like a standardized, replicable way, like
- 7:10Speaker 1: a scientific method, but for digital detective work exactly.
- 7:15Speaker 2: And Polstra in his book he outlines these procedures. He
- 7:19Speaker 2: walks you through the three main phases of a digital
- 7:23Speaker 2: investigation out.
- 7:24Speaker 1: There are phases.
- 7:25Speaker 2: There are you got evidence preservation, which we just talked about.
- 7:28Speaker 2: Then there's the searching phase where you're digging through the
- 7:30Speaker 2: data for those clues. And finally event reconstruction.
- 7:34Speaker 1: Event reconstruction, so you secure the scene, then you hunt
- 7:38Speaker 1: for clues, and then finally you try to piece together
- 7:41Speaker 1: like the narrative, what actually happened.
- 7:44Speaker 2: You got it. But in practice, those phases they often overlap,
- 7:49Speaker 2: you know, they kind of blur together.
- 7:50Speaker 1: Yeah, and see that.
- 7:51Speaker 2: Like, for example, that dilemma of pulling the plug, you know,
- 7:54Speaker 2: shutting down the system, right, right, that decision you often
- 7:57Speaker 2: have to make that during the evidence preservation phase.
- 8:00Speaker 1: Oh, that's right, because the longer the system is running,
- 8:03Speaker 1: the more time the malware has to cover its tracks.
- 8:06Speaker 1: But shutting it down could mean losing vital data. It's
- 8:09Speaker 1: like a catch twenty two exactly.
- 8:11Speaker 2: It's a tough call and there's no one size fits
- 8:14Speaker 2: all answer, you know. It depends on the situation, the
- 8:16Speaker 2: type of malware we're dealing with, what we're hoping to achieve.
- 8:19Speaker 1: So sometimes it's a judgment call, right, weighing those risks
- 8:22Speaker 1: and benefits of each action precisely.
- 8:25Speaker 2: And this leads us to kind of the idea of
- 8:27Speaker 2: dead versus live.
- 8:29Speaker 1: Analysis, Dead versus live what's that?
- 8:31Speaker 2: So? Dead analysis that's when we're examining a system that's offline.
- 8:36Speaker 1: Offline, Yeah, like.
- 8:37Speaker 2: Analyzing that disk imagery talked about. Live analysis, Well, that's
- 8:41Speaker 2: when we're interacting with a system that's still running.
- 8:44Speaker 1: Okay, So dead analysis is like studying a frozen snapshot.
- 8:47Speaker 2: Yeah.
- 8:48Speaker 1: Well, live analysis is more like observing the system in
- 8:51Speaker 1: action as it's happening.
- 8:52Speaker 2: That's a great way to put it. Both approaches have
- 8:55Speaker 2: their you know, pluses and minuses, advantages and disadvantages. Yeah,
- 8:58Speaker 2: and the choice it really depends on the goals of
- 9:01Speaker 2: the investigation.
- 9:02Speaker 1: Makes sense. Okay, So let's say we've decided to do
- 9:04Speaker 1: some analysis. What kind of tools would we need in
- 9:08Speaker 1: our digital detective kit? Ah, the tools I'm picturing like
- 9:11Speaker 1: something straight out of a spy movie.
- 9:13Speaker 2: Well, on the hardware side, you'll need external hard drives,
- 9:17Speaker 2: you know, to store those forensic copies.
- 9:19Speaker 1: Right.
- 9:20Speaker 2: USB three point zero is usually the best. It's fast, okay,
- 9:23Speaker 2: but sometimes those older USB two point zero drives. They're
- 9:27Speaker 2: better for compatibility with virtual machines, oh okay. And absolutely
- 9:30Speaker 2: essential are right blockers.
- 9:32Speaker 1: Right blockers.
- 9:33Speaker 2: Yeah, they prevent you from accidentally modifying the evidence.
- 9:36Speaker 1: So it's like a safety guard for our digital evidence exactly.
- 9:39Speaker 2: Think of them as like gloves for a surgeon. You know,
- 9:44Speaker 2: you wouldn't operate without gloves, and you shouldn't image a
- 9:47Speaker 2: drive without a right blocker.
- 9:49Speaker 1: Good analogy. And you want to dedicate a forensics workstation
- 9:52Speaker 1: right absolutely completely separate from the compromise system.
- 9:55Speaker 2: Yeah, you don't want to be installing anything on the
- 9:57Speaker 2: suspect machine. You got to work on a copy on
- 9:59Speaker 2: a separate system to avoid any contamination.
- 10:01Speaker 1: Right, makes sense, But what about software? Do we need
- 10:04Speaker 1: expensive specialized tools for this?
- 10:07Speaker 2: Here's the beauty of Linux forensics. There are tons of
- 10:12Speaker 2: free and open source tools out there that are incredibly powerful.
- 10:15Speaker 1: Oh that's awesome.
- 10:16Speaker 2: And Polstra he actually includes a script in his book
- 10:19Speaker 2: that installs a whole bunch of these tools automatically.
- 10:22Speaker 1: Oh wow, So it's like setting up your digital forensics
- 10:25Speaker 1: lab with a single command.
- 10:26Speaker 2: That's the idea.
- 10:27Speaker 1: That's amazing. It sounds like Linux is a great platform
- 10:29Speaker 1: for this kind of work.
- 10:30Speaker 2: It really is. But remember, no matter how powerful your
- 10:33Speaker 2: tools are, the key is to use them responsibly ethically.
- 10:37Speaker 1: Right, of course, our.
- 10:39Speaker 2: Goal is to minimize disturbance to the subject system. Think
- 10:43Speaker 2: of it like walking through a like a delicate crime scene.
- 10:46Speaker 2: You want to leave the smallest footprint.
- 10:47Speaker 1: Possible, right, So avoid installing anything on the suspect system,
- 10:51Speaker 1: create that copy first, and use those tools responsibly.
- 10:55Speaker 2: Got it exactly. And when it comes to discreetly gathering data,
- 10:59Speaker 2: tools like net cat can be incredibly handy.
- 11:02Speaker 1: Netcat that sounds like something a hacker would use.
- 11:05Speaker 2: It can be used for both good and bad. But
- 11:07Speaker 2: in our context, it's a way to create a secure
- 11:10Speaker 2: channel between the suspect system and our workstation. We can
- 11:13Speaker 2: send commands, get data back, all without leaving a trace
- 11:17Speaker 2: on the compromise machine.
- 11:18Speaker 1: Okay, so netcat is like our secret back door for
- 11:21Speaker 1: collecting evidence. I'm starting to feel like a real digital
- 11:24Speaker 1: detective here.
- 11:25Speaker 2: That's the spirit.
- 11:26Speaker 1: This is exciting.
- 11:27Speaker 2: It's a combination of technical skills and that old fashioned
- 11:30Speaker 2: detective intuition.
- 11:31Speaker 1: Well said, So we've gathered our initial data, we've got
- 11:35Speaker 1: our tools ready to go, and now we're about to
- 11:37Speaker 1: enter the live analysis phase. Live analysis here we go,
- 11:40Speaker 1: assuming of course, that we've determined there's actually an incident
- 11:43Speaker 1: to investigate. Where do we even begin.
- 11:47Speaker 2: One of the first things to zero in on is
- 11:49Speaker 2: file metadata.
- 11:50Speaker 1: File metadata, Yeah.
- 11:52Speaker 2: Timestamps, permissions, ownership, all those little details can be incredibly revealing.
- 11:56Speaker 1: So it's like reconstructing the story of what happened, and
- 12:00Speaker 1: based on when and how files were created, modified, or accessed.
- 12:04Speaker 2: You got it, and don't forget about user command history.
- 12:07Speaker 2: It can give us a glimpse into what actions both
- 12:09Speaker 2: legitimate users and potential attackers took on the system.
- 12:12Speaker 1: Oh, right, like a trail of digital breadcrumbs exactly.
- 12:15Speaker 2: And log files they are another gold mine of information
- 12:18Speaker 2: system events, log in attempts, air messages, it's all there,
- 12:21Speaker 2: just waiting to be analyzed.
- 12:23Speaker 1: Wow. So it's like having a detailed chronicle of the
- 12:26Speaker 1: system's activity.
- 12:27Speaker 2: Precisely, and sometimes we need to go even deeper and
- 12:31Speaker 2: capture the entire system state. That's where ram dumps come.
- 12:35Speaker 1: In a ramdomp, what's that all about.
- 12:38Speaker 2: It's basically creating a snapshot of everything that's in the
- 12:41Speaker 2: computer's memory at a specific moment in time. It's like
- 12:45Speaker 2: freezing the brain of the computer, seeing what it was
- 12:48Speaker 2: thinking at that exact moment.
- 12:49Speaker 1: That's impressive, but I imagine it's pretty challenging to do.
- 12:52Speaker 2: It can be tricky, but there are tools designed specifically
- 12:55Speaker 2: for this purpose. One of them is called line BLI me. Yeah,
- 12:59Speaker 2: capturing a complete an accurate RAM dump is a delicate process,
- 13:03Speaker 2: but the insights you can glean from it, they're often invaluable.
- 13:06Speaker 1: Okay, so we've collected that volatile data from the running system,
- 13:09Speaker 1: but what about the data stored on the hard drive itself.
- 13:12Speaker 2: That's where disk images come into play.
- 13:14Speaker 1: Disk images creating a.
- 13:15Speaker 2: Forensic image of the hard drive is crucial for preserving
- 13:19Speaker 2: the evidence and ensuring we have a complete copy to
- 13:22Speaker 2: work with.
- 13:22Speaker 1: Right, So it's not just copying files, but creating a
- 13:25Speaker 1: bit for bit replica of the entire drive.
- 13:27Speaker 2: You, got it. And there are different formats for these images,
- 13:30Speaker 2: like raw images. Those are exact copies, and then there
- 13:33Speaker 2: are proprietary formats that offer compression or some extra features.
- 13:37Speaker 1: Okay, And which tools are commonly used to create these images.
- 13:41Speaker 2: DD is a classic a command line tool, but for forensics
- 13:44Speaker 2: we often use DCFLTD DCLLTD. Yeah, it's basically like DD
- 13:49Speaker 2: on steroids.
- 13:50Speaker 1: DC LTD on steroids. That sounds intense.
- 13:55Speaker 2: It's more robust, more reliable. It has features like verifying
- 13:59Speaker 2: the integrity the image as it's been created and splitting
- 14:02Speaker 2: it into multiple files if you need to.
- 14:04Speaker 1: Oh, that's handy.
- 14:04Speaker 2: And of course we always use it in conjunction with
- 14:06Speaker 2: a right blocker, just to be extra careful.
- 14:08Speaker 1: Right, safety first, So it's.
- 14:10Speaker 2: Like having a safety net, a quality control check all
- 14:13Speaker 2: rolled into one.
- 14:14Speaker 1: Got it. And if possible, it's always best to image
- 14:16Speaker 1: the entire drive, right, right, not just specific partitions.
- 14:19Speaker 2: Yeah, you never know where those valuable clues might be hiding.
- 14:21Speaker 1: Makes sense. It's like searching every nook and cranny of
- 14:24Speaker 1: the digital crime scene. So we've created our image, what's next.
- 14:29Speaker 2: The next step is to mount the image. Mount it, yeah,
- 14:32Speaker 2: which basically means making it accessible to our forensic tools
- 14:36Speaker 2: as if it were a physical drive plugged into our workstation.
- 14:39Speaker 1: Oh okay, so it's like virtually plugging in the hard
- 14:42Speaker 1: drive and exploring its content exactly.
- 14:44Speaker 2: But before we mount the image, we need to figure
- 14:46Speaker 2: out its partitioning scheme.
- 14:48Speaker 1: Partitioning scheme, yeah, it's.
- 14:50Speaker 2: Basically how the drive is divided up into these logical sections.
- 14:53Speaker 1: Oh right, right, like those C and D drives and
- 14:55Speaker 1: Windows exactly.
- 14:57Speaker 2: Yeah. But Linux it uses different partitioning schemes.
- 15:00Speaker 1: Oh okay.
- 15:01Speaker 2: The most common ones are MBR, which is the older scheme,
- 15:04Speaker 2: and then there's GP, which is newer and can handle
- 15:07Speaker 2: much larger drives.
- 15:08Speaker 1: Okay, so GPT is the way to go, right if
- 15:11Speaker 1: we're dealing with a modern system.
- 15:12Speaker 2: Ideally, yes, but for compatibility reasons, you really need to
- 15:16Speaker 2: know both. Think of it, like knowing both metric and
- 15:19Speaker 2: imperial measurements. Sometimes you encounter those older systems that still cling.
- 15:24Speaker 1: To the old ways, right, right, So how do we
- 15:26Speaker 1: figure out the partitioning scheme of our disk image?
- 15:30Speaker 2: We use a tool called f disc. It's a command
- 15:32Speaker 2: line utility that can analyze the drive without making any changes. Okay,
- 15:37Speaker 2: kind of like a harmless X ray.
- 15:38Speaker 1: So it's like reading the blueprint of the drive, seeing
- 15:42Speaker 1: how it's structured and where each partition is located exactly.
- 15:45Speaker 2: And once we have that information, we can use the
- 15:48Speaker 2: mount command to make those specific partitions accessible for analysis.
- 15:52Speaker 1: Sound straightforward enough, but I imagine it can get pretty
- 15:55Speaker 1: tedious if you're dealing with a lot of partitions.
- 15:57Speaker 2: You're right. That's where scripting can be a lifesaver. Polster's
- 16:00Speaker 2: book shows you how to automate this whole process using Python.
- 16:04Speaker 1: Oh.
- 16:04Speaker 2: Python, Yeah, it's like having a robot assistant handling all
- 16:07Speaker 2: those repetitive tasks.
- 16:08Speaker 1: So we can write these Python scripts to identify the
- 16:11Speaker 1: partitioning scheme, locate the partitions, and mount them all automatically exactly.
- 16:16Speaker 2: It makes the whole process much more efficient and less
- 16:19Speaker 2: prone to those pesky human errors. And speaking of efficiency,
- 16:25Speaker 2: importing filesystem data into a database, now that can be
- 16:28Speaker 2: a real game changer for analysis databases.
- 16:31Speaker 1: Yeah, now I thought those were for like storing structured
- 16:34Speaker 1: data like customer information or financial transactions.
- 16:37Speaker 2: They are, but they can also be incredibly powerful tools
- 16:41Speaker 2: for forensic analysis. Okay, imagine having this supercharged search engine
- 16:46Speaker 2: for all your evidence. Instead of manually digging through those files,
- 16:49Speaker 2: you can use SQL queries to pinpoint very specific information,
- 16:52Speaker 2: identify patterns, generate timelines, and all much much faster.
- 16:57Speaker 1: Oh wow, Okay, that's starting to sound really useful. Can
- 16:59Speaker 1: you give me like a concrete example of how this
- 17:01Speaker 1: might work.
- 17:01Speaker 2: Sure, Let's say you suspect that someone was stealing sensitive
- 17:05Speaker 2: data from Phil's awesome stuff. With a database, you could import,
- 17:09Speaker 2: like the file axislogs user login records and then write
- 17:13Speaker 2: a query that says, show me all the files accessed
- 17:15Speaker 2: by this specific user during these specific hours, and tell
- 17:19Speaker 2: me whether those files were sent over the network.
- 17:21Speaker 1: Wow, that's incredibly specific. It's like having laser focus on
- 17:24Speaker 1: the exact data we need exactly.
- 17:27Speaker 2: And databases they allow for much more complex queries than
- 17:30Speaker 2: your typical forensic tools.
- 17:31Speaker 1: So it's not just about finding a needle in a haystack,
- 17:33Speaker 1: it's about analyzing the whole haystack in seconds.
- 17:36Speaker 2: You got it, impolster. He actually shares a real world
- 17:39Speaker 2: case where those prepackaged forensic tools that were just hitting
- 17:43Speaker 2: their limits and importing the data into a database, Well
- 17:46Speaker 2: that's what allowed him to crack the case wide open.
- 17:49Speaker 1: Wow, I'm starting to see why databases are becoming so
- 17:52Speaker 1: essential in digital forensics. But let's step back for a
- 17:55Speaker 1: moment and talk about timeline analysis. Timeline analysis, you've mentioned
- 17:59Speaker 1: it a few times already. Yeah, how do we even
- 18:01Speaker 1: go about creating a timeline of events on a compromise system?
- 18:06Speaker 1: And like, how reliable is that timeline? Can we trust it?
- 18:10Speaker 2: Creating a timeline it's often the key to figuring out
- 18:13Speaker 2: what happened. And when we use time stamps from files,
- 18:16Speaker 2: from log in records, system logs, any source we can
- 18:20Speaker 2: get our hands on.
- 18:20Speaker 1: Oh okay, pulling it all together.
- 18:22Speaker 2: But here's the catch time stamps.
- 18:24Speaker 1: They can be manipulated, so we can't just take them
- 18:26Speaker 1: at face value. We need to be like skeptical exactly.
- 18:31Speaker 2: Think of time stamps as clues, not absolute truths. You
- 18:35Speaker 2: got to look for inconsistencies, suspicious patterns, time stamps that
- 18:38Speaker 2: just don't make sense in the context of other evidence.
- 18:41Speaker 1: Okay, So, like if we see a file modified before
- 18:44Speaker 1: it was supposedly created, that's a red flag.
- 18:46Speaker 2: Big red flag. Or if all the time stamps are
- 18:49Speaker 2: like suspiciously rounded to the nearest hour, that could mean
- 18:53Speaker 2: someone was trying to cover their tracks.
- 18:54Speaker 1: It's like noticing that all the clocks in a suspect's
- 18:57Speaker 1: house are set to the same time, even though they
- 18:59Speaker 1: were supposedly set independently.
- 19:02Speaker 2: That's a great analogy. And besides timestamps, another useful tool
- 19:05Speaker 2: for timeline analysis is the last command. It shows a
- 19:09Speaker 2: history of user logins on the system.
- 19:11Speaker 1: Oh okay, so we can see who logged in, when
- 19:13Speaker 1: they logged in, and even where they logged in from.
- 19:15Speaker 2: You got it? And this information, combined with other log files,
- 19:19Speaker 2: it can help us spot unusual log in patterns, track
- 19:22Speaker 2: user activity, and potentially pinpoint the exact time frame of
- 19:25Speaker 2: the security incident.
- 19:27Speaker 1: Okay, so we've got time stamps, timelines, and user log
- 19:30Speaker 1: in records. But now I'm curious about the filesystems themselves.
- 19:34Speaker 1: What makes Linux file systems unique? What are the quirks
- 19:38Speaker 1: we need to be aware of from a forensic perspective.
- 19:42Speaker 2: Well, the X file system it's commonly used in Linux.
- 19:45Speaker 2: It has its own quirks and intricacies.
- 19:47Speaker 1: Okay.
- 19:48Speaker 2: Understanding concepts like inodes, data blocks, indirect blocks, all that stuff.
- 19:53Speaker 2: It's crucial for effective forensic analysis.
- 19:56Speaker 1: Inodes, data blocks. It sounds like we're entering a within
- 20:00Speaker 1: the hard drive.
- 20:01Speaker 2: Think of it this way. The inode, that's like a
- 20:03Speaker 2: file's identity card. Okay, it contains all that metadata, the timestamps,
- 20:08Speaker 2: ownership permissions.
- 20:09Speaker 1: So the inode tells us who the file belongs to,
- 20:11Speaker 1: when it was created or modified, and what kind of
- 20:13Speaker 1: access permissions it has.
- 20:15Speaker 2: You've got. And the data blocks, well, that's where the
- 20:17Speaker 2: actual content of the file is stored.
- 20:18Speaker 1: So if we're trying to recover a deleted file, we
- 20:20Speaker 1: need to find both the inode and the data blocks.
- 20:23Speaker 2: You got it. And within the X filesystem there are
- 20:26Speaker 2: also these things called extended attributes and access control lists.
- 20:31Speaker 2: They can be used to store additional information about files.
- 20:35Speaker 1: Additional information like what kind of information it could be,
- 20:38Speaker 1: anything really, from security settings to user defined data.
- 20:42Speaker 2: And attackers they're clever. Sometimes they exploit these features to
- 20:46Speaker 2: hide data or malicious code.
- 20:49Speaker 1: Oh sneaky. So it's like they're playing a digital game
- 20:52Speaker 1: of hide and seek with us.
- 20:53Speaker 2: Exactly, And As filesystems evolve, they introduce new features, okay,
- 20:58Speaker 2: like extents, which are a more efficient way to manage
- 21:02Speaker 2: large files, but they can also be more complex to
- 21:05Speaker 2: analyze from a forensic standpoint.
- 21:06Speaker 1: So the landscape's always changing, always presenting new challenges for
- 21:10Speaker 1: both the attackers and the investigators.
- 21:12Speaker 2: It is. It's a constant cat and mouse game.
- 21:14Speaker 1: That's what makes this feel so exciting, right exactly.
- 21:16Speaker 2: It's a constant learning process. There's always something new to discover.
- 21:20Speaker 1: Okay, so we've got a grasp of the basics of
- 21:22Speaker 1: the X file system, but let's bring it back to
- 21:25Speaker 1: your case fills awesome stuff. How did Polstra use this knowledge,
- 21:31Speaker 1: this file system knowledge, to unravel the mystery of that
- 21:35Speaker 1: compromised web server.
- 21:37Speaker 2: Well, he used a few techniques, one of them being
- 21:39Speaker 2: analyzing a RAM dump with a tool called volatility.
- 21:43Speaker 1: Volatility that sounds familiar.
- 21:45Speaker 2: We talked about it earlier, remember when we were discussing
- 21:47Speaker 2: live analysis.
- 21:47Speaker 1: Oh right.
- 21:48Speaker 2: Volatility is a powerful tool. It lets us analyze the
- 21:51Speaker 2: contents of RAM even after the system has been shut down.
- 21:55Speaker 2: In this case, Polstry used it to uncover hidden processes
- 21:59Speaker 2: and files that wouldn't have been visible through normal file
- 22:02Speaker 2: system analysis.
- 22:03Speaker 1: Oh wow, so it's like using x ray vision right
- 22:05Speaker 1: exactly to see beneath the surface of the operating system.
- 22:08Speaker 2: You got it.
- 22:08Speaker 1: And he also used network traffic analysis, right, he did
- 22:11Speaker 1: to kind of trace the attacker's activity, reveal those suspicious connections,
- 22:16Speaker 1: maybe even backdoors.
- 22:17Speaker 2: Precisely so volatility it helped him understand what was happening
- 22:21Speaker 2: on the system itself, and then the network traffic analysis
- 22:24Speaker 2: showed him how the attacker was interacting with the outside world.
- 22:28Speaker 1: Okay, so he's putting together the pieces both internally and
- 22:31Speaker 1: external exactly.
- 22:32Speaker 2: And by combining those techniques, Polster was able to build
- 22:35Speaker 2: a really compelling narrative of the attack, ultimately leading to
- 22:39Speaker 2: the identification and apprehension of the culprit.
- 22:43Speaker 1: That's amazing. This fills awesome stuff case. It's a great
- 22:46Speaker 1: example of how powerful Linux forensics can be. But I
- 22:50Speaker 1: feel like we've only scratched the surface here.
- 22:52Speaker 2: Oh, we've just begun. There's a whole world of advanced
- 22:55Speaker 2: techniques and specialized tools out there.
- 22:57Speaker 1: Well, I guess that means we need to dive even deeper.
- 22:59Speaker 2: Right, let's do it.
- 23:00Speaker 1: But before we do, left, take a moment to recap
- 23:02Speaker 1: some of the key takeaways from this first part of
- 23:05Speaker 1: our investigation sounds good. What stood out to you as
- 23:09Speaker 1: particularly interesting or maybe unexpected? So far?
- 23:12Speaker 2: Oh, there's so much Where do we even begin.
- 23:15Speaker 1: Honestly, that whole idea of shutting down a compromise system
- 23:19Speaker 1: could actually be the wrong move. That was the real
- 23:21Speaker 1: eye opener for me. It's counterintuitive. You think you're containing
- 23:24Speaker 1: the damage, but you might actually be helping the attacker
- 23:27Speaker 1: cover their tracks.
- 23:28Speaker 2: It is, isn't. It's one of those things you only
- 23:30Speaker 2: learned through experience or by reading Polster's book, I guess
- 23:34Speaker 2: And in that Fills Awesome stuff case, he actually he
- 23:37Speaker 2: emphasizes talking to the users as like one of the
- 23:41Speaker 2: first steps.
- 23:42Speaker 1: Oh interesting. So good old fashioned human intelligence still crucial
- 23:46Speaker 1: even in a high tech cybercrime investigation.
- 23:49Speaker 2: Absolutely. Users can often provide insights that no amount of
- 23:52Speaker 2: technical analysis can you uncover. They might have noticed something strange,
- 23:56Speaker 2: like odd behavior on their computer, or recent software in
- 23:59Speaker 2: stations that shouldn't be there, or even you know, potential
- 24:02Speaker 2: security lapses. Things they could point us in the right direction.
- 24:05Speaker 1: Right, So it's like interviewing witnesses at a crime scene. Right,
- 24:09Speaker 1: they might have seen or heard something crucial that helps
- 24:12Speaker 1: you piece together the puzzle precisely.
- 24:14Speaker 2: And sometimes just talking to the users can quickly debunk
- 24:17Speaker 2: a suspected incident. Maybe a system administrator was performing like
- 24:21Speaker 2: routine maintenance and that triggered some unusual activity that was
- 24:24Speaker 2: mistaken for a security breach.
- 24:26Speaker 1: Oh okay, So it's always good to get the full story,
- 24:29Speaker 1: all perspectives before jumping to conclusions. But what are some
- 24:33Speaker 1: of the key questions we should be asking these users?
- 24:35Speaker 1: Like what kind of information are we really looking for?
- 24:39Speaker 2: You want to start with open ended questions? Well, if
- 24:41Speaker 2: it ended, yeah, things like what makes you think there's
- 24:44Speaker 2: a problem, or can you describe what you've observed? You know,
- 24:47Speaker 2: encourage them to share their perspective, and that can often
- 24:49Speaker 2: lead to unexpected insights.
- 24:51Speaker 1: So it's about understanding their concerns and getting them to
- 24:54Speaker 1: like really elaborate on what they've seen or experienced exactly.
- 24:58Speaker 2: And don't underestimate the power of of you know, active listening.
- 25:02Speaker 2: Pay attention to their tone of voice, body language, What
- 25:05Speaker 2: details do they emphasize, what do they kind of downplay?
- 25:08Speaker 2: You know, sometimes what's not said can be just as
- 25:12Speaker 2: revealing as what I have said, Right.
- 25:13Speaker 1: It's like reading between the lines, picking up on those
- 25:16Speaker 1: subtle cues that might point you in the right direction.
- 25:18Speaker 2: Right, And while you're gathering all this information, don't forget
- 25:21Speaker 2: to document everything. Use a notebook, voice recorder, whatever works
- 25:27Speaker 2: best for you, but make sure you have a clear
- 25:29Speaker 2: and accurate record of the conversation.
- 25:32Speaker 1: Right back to that crucial documentation step. But you know,
- 25:35Speaker 1: taking notes on a laptop during an interview, I feel
- 25:37Speaker 1: like it can be a bit distracting, both for you
- 25:41Speaker 1: and the person you're talking to. It creates this barrier between.
- 25:44Speaker 2: Oh, absolutely, a good old fashioned notebook, you know, pen
- 25:47Speaker 2: and paper. It's often the best tool for taking notes
- 25:50Speaker 2: during those interviews. It's less intrusive, you can jot down
- 25:53Speaker 2: key points quickly, and it doesn't create that psychological distance
- 25:56Speaker 2: that you know a laptop screen sometimes.
- 25:58Speaker 1: Can, right about fostering a more natural conversation exactly.
- 26:03Speaker 2: And besides all the information you gather from the users,
- 26:05Speaker 2: you want to document everything you know about the subject
- 26:08Speaker 2: system itself. Okay, what operating system are they running, what
- 26:12Speaker 2: software is installed? Are there any known vulnerabilities?
- 26:15Speaker 1: Right, So it's like building a profile, almost understanding its
- 26:19Speaker 1: strengths and weaknesses before you even start digging into the.
- 26:23Speaker 2: Evidence precisely, and you know, if it seems appropriate, you
- 26:27Speaker 2: might even want to snap a picture of the computer
- 26:30Speaker 2: and its surroundings.
- 26:31Speaker 1: Oh, like a crime scene photo. But why is that
- 26:34Speaker 1: necessary in a digital investigation, Well, it can provide context.
- 26:38Speaker 2: Maybe there's a sticky note on the monitor with a
- 26:41Speaker 2: password written on it. Oh, or the computers located in
- 26:45Speaker 2: an area with like really lacks physical security. Those seemingly
- 26:49Speaker 2: insignificant details, they can sometimes be incredibly revealing.
- 26:52Speaker 1: It's a good reminder that physical and digital security are
- 26:55Speaker 1: often like intertwined. They go hand in hand exactly.
- 26:58Speaker 2: And once you've gathered all this eliminary information, you know,
- 27:01Speaker 2: talk to the users documented the system. You're finally ready
- 27:04Speaker 2: to start interacting with the subject system itself. But before
- 27:07Speaker 2: you do, remember that golden rule of digital forensics.
- 27:12Speaker 1: Minimize disturbance, right, we talked about that earlier. It's like
- 27:15Speaker 1: avoiding contamination at a crime scene. Don't touch anything you don't.
- 27:18Speaker 2: Have to precisely, And one way to minimize disturbance is
- 27:23Speaker 2: to use what we call known good binaries.
- 27:27Speaker 1: Known good binaries and what are those?
- 27:29Speaker 2: They're basically trusted, verified copies of the tools we need
- 27:33Speaker 2: to use during our investigation. Think of them like sterile
- 27:37Speaker 2: instruments for a digital surgery.
- 27:38Speaker 1: Okay, so we're not installing any potentially compromised software on
- 27:42Speaker 1: the suspect machine. We're bringing our own clean.
- 27:45Speaker 2: Tools exactly, these known good binaries. They're usually stored on
- 27:49Speaker 2: a separate secure device, like a USB drive, and we
- 27:52Speaker 2: boot the subject system from that device to perform our analysis.
- 27:56Speaker 1: So we're creating a safe and controlled environment for our investigation. Yeah,
- 28:01Speaker 1: isolated from the potentially compromised system.
- 28:03Speaker 2: You got it. And by using those known good binaries,
- 28:06Speaker 2: we can be confident that the results of our analysis
- 28:09Speaker 2: are accurate and haven't been influenced by any external factors.
- 28:13Speaker 1: Makes sense. But how do we go about getting these
- 28:16Speaker 1: known good binaries? Do we just like download them from
- 28:18Speaker 1: the internet.
- 28:19Speaker 2: Well, you could, but that's not the most secure approach. Ideally,
- 28:23Speaker 2: you'd build them yourself, which involves compiling the source code
- 28:26Speaker 2: of the tools you need on a trusted system.
- 28:29Speaker 1: Compiling source code. That sounds a little uh technical, maybe
- 28:33Speaker 1: for someone who's just starting out in digital forensics, it
- 28:36Speaker 1: can be.
- 28:37Speaker 2: Yeah, but they're also pre built collections of known good
- 28:42Speaker 2: binaries available from reputable sources.
- 28:45Speaker 1: Oh okay.
- 28:45Speaker 2: Sans Institute, for example, they offer the SIFT work Station,
- 28:49Speaker 2: which is a virtual machine preloaded with a suite of
- 28:51Speaker 2: forensic tools.
- 28:52Speaker 1: So it's like choosing between building your own toolbox from
- 28:55Speaker 1: scratch or buying a pre assembled one from a trusted supply.
- 29:00Speaker 2: Exactly, And both options have their pros and cons. Building
- 29:03Speaker 2: your own binaries gives you more control, you can customize it,
- 29:06Speaker 2: but it requires a deeper understanding of those tools and
- 29:09Speaker 2: that compilation process, right.
- 29:11Speaker 1: Whereas using those pre BLOIWL binarrows is more convenient. Yeah,
- 29:15Speaker 1: but then you're relying on the trustworthiness of the source exactly.
- 29:19Speaker 2: So the choice really depends on your level of expertise,
- 29:22Speaker 2: your budget, and the specific needs of your investigation.
- 29:25Speaker 1: Okay, that makes sense. So let's say we've got our
- 29:27Speaker 1: known good binaries all set ready to go. What's next,
- 29:32Speaker 1: how do we actually interact with the suspect system without
- 29:35Speaker 1: contaminating it.
- 29:36Speaker 2: Remember netcat, that tool we talked about. It's not just
- 29:39Speaker 2: for discreetly gathering data. We can also use it to
- 29:42Speaker 2: create a secure communication channel between the suspect system and
- 29:47Speaker 2: our forensics workstation.
- 29:48Speaker 1: Oh right, right, So we're using netcat to send commands
- 29:51Speaker 1: to the Suspect system and get the output back on
- 29:54Speaker 1: our workstation, all without installing anything on the target machine.
- 29:57Speaker 2: Exactly. It's like having a remote control for the SUSTA
- 30:00Speaker 2: spec system, allowing us to perform our analysis safely, securely.
- 30:03Speaker 1: These tools are so resourceful it's like we're ma guivering
- 30:06Speaker 1: our way through this investigation. But speaking of resourcefulness, you
- 30:10Speaker 1: mentioned that Polster's book includes scripts to automate some of
- 30:12Speaker 1: these processes. How does scripting come into play during live analysis?
- 30:17Speaker 2: Scripting could be a huge time saver, and it can
- 30:20Speaker 2: also help reduce errors.
- 30:21Speaker 1: Okay.
- 30:22Speaker 2: For example, you could write a script to automate the
- 30:24Speaker 2: process of collecting that volatile data from the Suspect system
- 30:28Speaker 2: using netcat.
- 30:29Speaker 1: Oh right, So instead of manually typing out commands, copying
- 30:32Speaker 1: and pasting data, you can have a script do it
- 30:35Speaker 1: all for you.
- 30:35Speaker 2: Exactly. We can write scripts to gather information about running processes,
- 30:39Speaker 2: network connections, open files, even capture the contents of RAM,
- 30:43Speaker 2: all without leaving a trace on the system itself.
- 30:45Speaker 1: So scripting makes us much more efficient and thorough in
- 30:49Speaker 1: our live response.
- 30:50Speaker 2: Precisely, and it's a skill that's becoming honestly increasingly important
- 30:54Speaker 2: in digital forensics, as the volume and complexity of data just.
- 30:58Speaker 1: Keep growing, right, it's like having a superpower. Okay, so
- 31:00Speaker 1: we've gathered some initial data using our known good binaries
- 31:04Speaker 1: and netcat. What are some of the key things we
- 31:07Speaker 1: should be on the lookout for during this initial live
- 31:10Speaker 1: response phase, like what are the red flags at scream compromise.
- 31:14Speaker 2: One of the first things to check, It's simple, but important,
- 31:17Speaker 2: is the system's date and time settings.
- 31:19Speaker 1: Okay, date and time.
- 31:20Speaker 2: Yeah. Attackers often mess with those to cover their tracks
- 31:23Speaker 2: or to make it harder to correlate events.
- 31:25Speaker 1: So it's like checking the clocks at a crime scene
- 31:27Speaker 1: to see if they've been tampered with exactly.
- 31:30Speaker 2: And you'll also want to gather info about the operating system, version,
- 31:33Speaker 2: installed patches, any unusual software that might have been recently installed, right.
- 31:37Speaker 1: So taking inventory, looking for signs of weakness exactly.
- 31:41Speaker 2: And don't forget about network information, okay, check those network interfaces,
- 31:46Speaker 2: active connections, open ports. This can help you identify any
- 31:50Speaker 2: suspicious communication patterns or maybe backdoors that have been sneakily installed.
- 31:55Speaker 1: It's like tracing the system's communication channels, right, Yeah, seeing
- 31:58Speaker 1: who it's been talking to.
- 31:59Speaker 2: You got it. You'll also want to examine the system's
- 32:02Speaker 2: process list look for any unusual or suspicious programs that
- 32:06Speaker 2: are running.
- 32:06Speaker 1: So it's like taking a snapshot of the system's activity
- 32:09Speaker 1: and then looking for anything out of place precisely.
- 32:12Speaker 2: And you can use tools like ELSOF to see which
- 32:15Speaker 2: files are currently opened by different processes, which can often
- 32:19Speaker 2: reveal those hidden connections or data access patterns.
- 32:22Speaker 1: It's like following the data trail, seeing which files are
- 32:25Speaker 1: being touched and by whom precisely.
- 32:27Speaker 2: And don't forget to examine the system's routing tables.
- 32:30Speaker 1: Routing tables, yeah.
- 32:32Speaker 2: They determine how network traffic is directed.
- 32:34Speaker 1: Oh okay.
- 32:35Speaker 2: Attackers often modify these to redirect traffic to their own
- 32:39Speaker 2: servers or to create those sneaky back doors.
- 32:41Speaker 1: It's like checking the road signs, making sure they haven't
- 32:44Speaker 1: been altered to lead us astray exactly.
- 32:47Speaker 2: You'll also want to check the system's list of mounted
- 32:49Speaker 2: file systems that can reveal hidden partitions or external devices
- 32:53Speaker 2: that might be harboring evidence.
- 32:56Speaker 1: So we're making sure we're not missing any secret rooms
- 32:58Speaker 1: in our digital crime scene.
- 33:00Speaker 2: You got it. And finally, don't forget to examine the
- 33:03Speaker 2: system's list of loaded kernel modules. These are basically extensions
- 33:07Speaker 2: to the operating.
- 33:08Speaker 1: Systeml kernel module.
- 33:09Speaker 2: Yeah, and attackers sometimes use malicious kernel modules to hide
- 33:13Speaker 2: their presence or to gain that privileged access thereafter.
- 33:16Speaker 1: So it's like checking for unauthorized modifications to the heart
- 33:21Speaker 1: of the operating system itself exactly.
- 33:23Speaker 2: By carefully examining all these aspects of the system during
- 33:27Speaker 2: our initial live response, we can start to get a
- 33:30Speaker 2: clearer picture of what we're dealing with the potential incident
- 33:33Speaker 2: and determine how to proceed with the investigation.
- 33:36Speaker 1: Okay, that's quite a checklist. It sounds like there's a
- 33:38Speaker 1: lot to consider during this initial phase.
- 33:40Speaker 2: There is, But remember, the goal of live response isn't
- 33:44Speaker 2: to do a full blown analysis. It's to gather enough
- 33:47Speaker 2: information to assess the situation and make some smart decisions
- 33:52Speaker 2: about those next steps.
- 33:53Speaker 1: Right, So it's triage essentially, identify the key indicators of
- 33:57Speaker 1: compromise and then figure out the scope of the incident precisely.
- 34:01Speaker 2: And once we've gathered enough intel from our live response,
- 34:04Speaker 2: we can then move on to the more in depth
- 34:06Speaker 2: analysis of that disk image we created earlier.
- 34:09Speaker 1: Okay, so let's shift gears and talk about that process.
- 34:12Speaker 1: We've created our forensic image, whether we physically remove the
- 34:15Speaker 1: drive or used a live Linux distribution to do it. Now,
- 34:18Speaker 1: what how do we actually start digging into the contents
- 34:21Speaker 1: of that image.
- 34:22Speaker 2: First step got to mount the image.
- 34:24Speaker 1: Mounted.
- 34:25Speaker 2: That means making it accessible to our forensic tools as
- 34:28Speaker 2: if it were a physical drive plugged into our workstation.
- 34:31Speaker 1: Right we talked about mounting earlier. It's like virtually plugging
- 34:33Speaker 1: in the hard drive to our computer exactly.
- 34:36Speaker 2: But before we mount the image, remember, we need to
- 34:39Speaker 2: identify its partitioning scheme that determines how the drive sliced
- 34:43Speaker 2: up into those logical sections, right, like.
- 34:44Speaker 1: Those C and D drives you see in Windows. But
- 34:47Speaker 1: Linux it uses its own partitioning schemes, right.
- 34:50Speaker 2: You got it. The most common ones are MBR that's
- 34:53Speaker 2: the older scheme, and GBT, which is more modern and
- 34:56Speaker 2: can handle much larger drives.
- 34:58Speaker 1: Okay, so GPTI use the way to go then if
- 35:01Speaker 1: we're dealing with a more modern system.
- 35:03Speaker 2: Ideally, yes, but we still need to be aware of
- 35:06Speaker 2: both schemes because we might encounter those older systems that
- 35:09Speaker 2: are still using MBR.
- 35:11Speaker 1: Right, it's like knowing both metric and imperial measurements. You
- 35:14Speaker 1: need to be able to work with.
- 35:14Speaker 2: Both exactly, and to identify the partitioning scheme of our
- 35:18Speaker 2: disk image, we can use a tool called f disc f.
- 35:21Speaker 1: Disc okay, another command line tool. It seems like Linux
- 35:25Speaker 1: forensics involves a lot of command line wizardry.
- 35:27Speaker 2: It does, but f disc is actually pretty straightforward. We
- 35:31Speaker 2: run it on our mounted image and it tells us
- 35:33Speaker 2: whether it's MBR or GPT, and it gives us info
- 35:35Speaker 2: about each partition.
- 35:37Speaker 1: So it's like reading the blueprint of the hard drive,
- 35:40Speaker 1: seeing how it's structured, where each partition is located exactly.
- 35:43Speaker 2: And once we understand the partitioning scheme, we can then
- 35:46Speaker 2: mount the individual partitions that we're interested in analyzing.
- 35:50Speaker 1: Okay, so we've identified the partitioning scheme using updisc and
- 35:54Speaker 1: we're ready to mount the partitions. But I remember you
- 35:56Speaker 1: mentioned earlier that scripting can be used to automate the process.
- 36:01Speaker 1: How does that work?
- 36:02Speaker 2: Well? Mounting partitions manually can be a bit tedious, especially
- 36:06Speaker 2: if you're dealing with multiple partitions or complex file systems.
- 36:09Speaker 2: Scripting languages like Python can really help us automate this
- 36:13Speaker 2: whole process, making it way more efficient.
- 36:15Speaker 1: Oh okay, so we can write these Python scripts to
- 36:18Speaker 1: take care of those repetitive tasks, identifying partitions, mounting them,
- 36:22Speaker 1: and even maybe performing some basic analysis.
- 36:25Speaker 2: Exactly. It's like having a digital assistant taking care of
- 36:27Speaker 2: all the boring stuff, freeing us up to focus on
- 36:30Speaker 2: the more interesting and challenging aspects of the investigation.
- 36:33Speaker 1: I can see how that would be super helpful. Scripting
- 36:36Speaker 1: is like a secret weapon for digital forensics. But let's
- 36:40Speaker 1: say we've mounted our partitions and now we're faced with
- 36:43Speaker 1: this huge task of analyzing the data. We're talking potentially gigabytes,
- 36:48Speaker 1: maybe even terabytes of information. Where do we even begin
- 36:52Speaker 1: to make sense of all that?
- 36:54Speaker 2: That's one of the biggest challenges in digital forensics, right
- 36:57Speaker 2: the sheer volume of data we often have to deal with,
- 37:00Speaker 2: and a lot of those traditional forensic tools they involve
- 37:02Speaker 2: manually browsing through files and folders, which can be really
- 37:06Speaker 2: time consuming, not to mention incredibly inefficient.
- 37:09Speaker 1: So we need a better way, a more powerful way
- 37:12Speaker 1: to search and analyze this mountain of data.
- 37:15Speaker 2: Exactly, and that's where databases come into play.
- 37:17Speaker 1: Databases again, I thought those were for storing like structured data,
- 37:20Speaker 1: customer records, financial transactions.
- 37:23Speaker 2: They are, but they can also be incredibly valuable for
- 37:26Speaker 2: forensic analysis. Okay, by importing filesystem data into a database,
- 37:31Speaker 2: we can use SQL queries to like really quickly search, filter,
- 37:35Speaker 2: and analyze the data in ways that just aren't possible
- 37:38Speaker 2: with those traditional tools.
- 37:40Speaker 1: Oh okay, so it's like having this supercharged search engine
- 37:43Speaker 1: for our evidence. Instead of manually digging through files, we're
- 37:47Speaker 1: using SQL queries to pinpoint specific information, identify patterns, generate timelines.
- 37:52Speaker 2: You got it. Imagine you're investigating a case where you
- 37:56Speaker 2: suspect maybe a data breach, sensitive data way accessed, or
- 38:01Speaker 2: even exfiltrate it. With the database, you could import all
- 38:05Speaker 2: that relevant filesystem data, file time stamps, user log in records,
- 38:09Speaker 2: network connection logs, and then use SQL queries to ask
- 38:13Speaker 2: very specific questions.
- 38:14Speaker 1: Like what kind of questions? Give me an example.
- 38:16Speaker 2: Well, for instance, we could ask, show me all the
- 38:18Speaker 2: files that were modified between these two dates, but only
- 38:21Speaker 2: by users who logged in from this specific IP address.
- 38:24Speaker 1: Wow, that's super specific. So we're essentially zeroing in on
- 38:27Speaker 1: our search based on very precise criteria like the timeframe,
- 38:31Speaker 1: user activity.
- 38:32Speaker 2: Things like that decisely, and we can combine multiple criteria
- 38:35Speaker 2: in our queries, making those searches, much more targeted searches
- 38:38Speaker 2: that would take forever do manually.
- 38:40Speaker 1: Okay, I'm definitely seeing the power of databases now. But
- 38:43Speaker 1: setting them up, importing all that data that sounds pretty technical.
- 38:46Speaker 2: It can be, yeah, but thankfully there are these open
- 38:49Speaker 2: source database systems like my sequel that are relatively easy
- 38:53Speaker 2: to set up and use, and there's tons of documentation
- 38:57Speaker 2: tutorials online so you don't have to be a database
- 38:59Speaker 2: expit to get started.
- 39:00Speaker 1: Well, that's good to know. So databases are definitely a
- 39:03Speaker 1: powerful tool to have in our digital forensics arsenal. But
- 39:07Speaker 1: let's shift focus back to the analysis itself. We've talked
- 39:10Speaker 1: about time stamps building timelines, but how much can we
- 39:13Speaker 1: really rely on those timestamps as evidence? I mean, can
- 39:16Speaker 1: we trust them completely?
- 39:17Speaker 2: That's a great question. Time stamps they are super useful
- 39:21Speaker 2: for establishing a chronology of events, but we always have
- 39:24Speaker 2: to remember they can be manipulated by attackers.
- 39:26Speaker 1: So we can't just take them at face value exactly.
- 39:29Speaker 2: We need to view them as clues, not as you know,
- 39:32Speaker 2: the absolute truth, and we need to be on lookout
- 39:35Speaker 2: for any inconsistencies or suspicious patterns that might suggest tampering.
- 39:39Speaker 1: Okay, so what are some of the red flags we
- 39:42Speaker 1: should be looking for when we're analyzing timestamps.
- 39:44Speaker 2: Well, timestamps that are way out of sync with other
- 39:47Speaker 2: system logs or external time sources. That's a big one, right.
- 39:51Speaker 1: So if a file's timestamp says it was modified at
- 39:53Speaker 1: you know, three PM, but the system clock was off
- 39:56Speaker 1: by an hour, that's a problem exactly.
- 39:59Speaker 2: And another red flag is when time stamps are suspiciously rounded,
- 40:03Speaker 2: like to the nearest minute or hour. It's a little
- 40:05Speaker 2: too perfect.
- 40:06Speaker 1: Usually, right, it does seem a bit too convenient.
- 40:08Speaker 2: It does. And you should also watch out for identical
- 40:11Speaker 2: timestamps across multiple files that were supposedly created or modified
- 40:15Speaker 2: in different times.
- 40:15Speaker 1: Oh okay, Yeah, it's like finding several documents on a
- 40:18Speaker 1: suspect's computer that all claim to have been created at
- 40:21Speaker 1: the exact same second. That's not very likely exactly.
- 40:24Speaker 2: And finally, be wary of time stamps that have been
- 40:26Speaker 2: altered to pre date known events or to create this
- 40:29Speaker 2: false timeline of activity.
- 40:31Speaker 1: So the attacker is essentially trying to rewrite history to
- 40:34Speaker 1: fit their narrative.
- 40:35Speaker 2: Pcisely by carefully scrutinizing those timestamps, and corroborating them with
- 40:40Speaker 2: other evidence sources, we can reduce the risk of being
- 40:43Speaker 2: misled by attack or deception.
- 40:45Speaker 1: Okay, so timestamps useful, but handle with care. What about
- 40:49Speaker 1: other techniques for establishing a timeline? Are there any other
- 40:52Speaker 1: logs or records we can look at?
- 40:53Speaker 2: Absolutely? One handy tool is the last command. It shows
- 40:57Speaker 2: a history of user logins on the system, tells us
- 41:00Speaker 2: who logged in when and from where.
- 41:02Speaker 1: Oh okay, so we can see if there were any
- 41:04Speaker 1: unauthorized logins or if someone logged in from a suspicious
- 41:07Speaker 1: location exactly.
- 41:09Speaker 2: And by analyzing the output of last alongside those other
- 41:13Speaker 2: log files like WTMP and BTMP, we can create this
- 41:16Speaker 2: comprehensive timeline of user activity on the system.
- 41:20Speaker 1: WTP and BTP those sound familiar.
- 41:22Speaker 2: We talked about them earlier.
- 41:23Speaker 1: Oh that's right, that's right. WTMP stores records of successful
- 41:27Speaker 1: logins and BTM stores records of those failed login attempts.
- 41:31Speaker 2: You got it.
- 41:32Speaker 1: So. BTMP is especially helpful for identifying like brute force
- 41:35Speaker 1: attacks or other attempts to gain unauthorized access exactly.
- 41:39Speaker 2: And remember, these system files can be rotated or archived,
- 41:43Speaker 2: so you might need to examine multiple files to get
- 41:45Speaker 2: a complete picture of that login activity.
- 41:48Speaker 1: It's like piecing together a historical record from multiple.
- 41:51Speaker 2: Sources precisely, and by combining information from all these different sources,
- 41:56Speaker 2: we can really start to paint a much more complete
- 41:59Speaker 2: picture of what happened on that compromise system.
- 42:01Speaker 1: Okay, we've covered timestamps, timelines, user login records. Now I'm
- 42:06Speaker 1: curious to dig a bit deeper into the filesystems themselves.
- 42:10Speaker 1: What are some of the unique challenges and opportunities that
- 42:13Speaker 1: Linux filesystems present for you know, a digital forensics investigator.
- 42:18Speaker 2: Well, the X filesystem, which is used a lot in Linux,
- 42:21Speaker 2: it's got its own specific structure and its own features
- 42:23Speaker 2: that we need to be aware of. Okay, Understanding concepts
- 42:26Speaker 2: like you know, inodes, data blocks, indirect blocks, that stuff.
- 42:30Speaker 2: It's crucial for doing good forensic analysis.
- 42:33Speaker 1: Inodes, data blocks, indirect blocks. It's like we're going down
- 42:37Speaker 1: a level exploring those building blocks of the filesystem itself.
- 42:40Speaker 2: Think of it this way. The inode, it's like a
- 42:42Speaker 2: files identity card. Okay, it holds metadata about the file.
- 42:46Speaker 2: It's time, scams, owner permissions.
- 42:47Speaker 1: Size, So the inode tells us who the file belongs
- 42:50Speaker 1: to when it was created or modified, and what kind
- 42:53Speaker 1: of access permissions it has you got it?
- 42:55Speaker 2: And the data blocks that's where the actual content of
- 42:58Speaker 2: the file is stored.
- 42:59Speaker 1: Okay, so we're trying to say, recover a deleted file,
- 43:03Speaker 1: we need to find both the inode and the data
- 43:05Speaker 1: blocks exactly.
- 43:06Speaker 2: And within the excale system there are also these features
- 43:10Speaker 2: like extended attributes and access control lists. They can be
- 43:14Speaker 2: used to store additional information about.
- 43:16Speaker 1: Those files, additional information what kind of information it could be,
- 43:20Speaker 1: anything really, from security settings to user defined data.
- 43:25Speaker 2: And sometimes attackers, those crafty attackers, they exploit these features
- 43:30Speaker 2: to hide data, to hide malicious code.
- 43:32Speaker 1: Oh sneak.
- 43:33Speaker 2: It makes it harder for us to find what we're
- 43:35Speaker 2: looking for. It's like playing hide and seek, right. And
- 43:37Speaker 2: as file systems evolve, they introduce new features.
- 43:40Speaker 1: Like extens extense.
- 43:42Speaker 2: Yeah, they're more efficient way to manage those large files,
- 43:45Speaker 2: but they can also be more complex to analyze from
- 43:48Speaker 2: a forensic perspective.
- 43:50Speaker 1: So the landscape is constantly evolving, presenting new challenges for
- 43:54Speaker 1: both the attackers and the investigators exactly.
- 43:56Speaker 2: And that's one of the things that keeps digital forensics
- 43:59Speaker 2: so interesting. Yeah, it's a constant learning process. There's always
- 44:02Speaker 2: something new to discover, new techniques to learn.
- 44:05Speaker 1: Well, speaking of new discoveries in that fills awesome stuff case.
- 44:08Speaker 2: Yeah, how did.
- 44:09Speaker 1: Polstra use his knowledge of the x file system to
- 44:13Speaker 1: actually uncover evidence of the attack?
- 44:16Speaker 2: He used a few different techniques. One was analyzing a
- 44:20Speaker 2: RAM dump with volatility.
- 44:22Speaker 1: Volatility, didn't we talk about that earlier when we were
- 44:25Speaker 1: discussing live analysis I did.
- 44:26Speaker 2: Volatility is a powerful tool. It lets us analyze the
- 44:29Speaker 2: contents of RAM even after the system has been powered off.
- 44:33Speaker 2: In this case, he used it to uncover hidden processes
- 44:36Speaker 2: and files that weren't showing up in the regular filesystem analysis.
- 44:39Speaker 1: So it's like we're using x ray vision to peer
- 44:42Speaker 1: beneath the surface of the operating system exactly.
- 44:45Speaker 2: And he also used network traffic analysis uh huh to
- 44:48Speaker 2: track the attacker's movements, uncovered some suspicious connections, maybe even backdoors.
- 44:53Speaker 1: So volatility was helping him see what was happening on
- 44:56Speaker 1: the system itself. And then network traffic analysis showed how
- 44:59Speaker 1: the the attacker was interacting with the outside world precisely.
- 45:03Speaker 2: And by putting those two together, Polster was able to
- 45:06Speaker 2: create a compelling narrative of the attack led to the
- 45:09Speaker 2: identification and the capture of the culprit.
- 45:11Speaker 1: Wow. Impressive work. Okay, so we've covered a lot of
- 45:14Speaker 1: ground in the steep dive. We've talked about the importance
- 45:17Speaker 1: of preserving evidence, those key steps and live response, the
- 45:20Speaker 1: power of scripting and databases, and the challenges of timeline
- 45:24Speaker 1: analysis and filesystem forensics. What else is there anything else
- 45:28Speaker 1: you want to share before we move on to the
- 45:29Speaker 1: final part of our investigation.
- 45:31Speaker 2: Well, there's a whole world of you know, more advanced technique,
- 45:34Speaker 2: specialized tools. We haven't even scratched the surface. Oh yeah,
- 45:37Speaker 2: But I think the most important takeaway, the thing I
- 45:39Speaker 2: really want to emphasize is that Linitz forensics it's not
- 45:43Speaker 2: just about technical skills. It's also about mindset, minds.
- 45:47Speaker 1: Okay, what do you mean by that.
- 45:48Speaker 2: It's about being curious, skeptical, methodical. It's about approaching each
- 45:53Speaker 2: investigation with an open mind, you know, being willing to
- 45:57Speaker 2: challenge your assumptions, always be on the lookout those subtle
- 46:01Speaker 2: clues that might lead you to the truth.
- 46:03Speaker 1: So it's like you've got to be a digital detective,
- 46:05Speaker 1: constantly piecing together the puzzle, one clue at a time,
- 46:08Speaker 1: exactly and.
- 46:10Speaker 2: With the right tools, the right techniques, and the right mindset,
- 46:13Speaker 2: well you can uncover even the most cleverly hidden digital crimes.
- 46:18Speaker 1: Well said, But before we get too carried away with
- 46:20Speaker 1: our detective work, let's take a quick moment to recap
- 46:23Speaker 1: some key takeaways from this second part of our investigation.
- 46:26Speaker 1: What really stood out to you as particularly interesting or
- 46:30Speaker 1: unexpected in this section?
- 46:32Speaker 2: For me, it was definitely the idea of using databases
- 46:35Speaker 2: for forensic analysis. It just clicked. Why spend hours sifting
- 46:40Speaker 2: through files manually when you can have the computer do
- 46:43Speaker 2: the heavy lifting for you.
- 46:44Speaker 1: Right, It's like it's a total game changer, and it
- 46:47Speaker 1: shows how digital forensics is always evolving, always borrowing techniques
- 46:51Speaker 1: from other fields and adapting them to the unique challenges
- 46:54Speaker 1: of you know, cybercrime investigation exactly.
- 46:57Speaker 2: So, it's not enough to just be a tech wizy days.
- 47:00Speaker 2: You also need to be a bit of a database guru,
- 47:03Speaker 2: a scripting ninja, and maybe even a psychologist to understand
- 47:06Speaker 2: how these attackers think and operate. It's true, and speaking
- 47:10Speaker 2: of attackers, one of the things that never ceases to
- 47:13Speaker 2: amaze me is how they're always finding new ways to
- 47:16Speaker 2: cover their tracks to obfuscate their code. It's a constant challenge.
- 47:20Speaker 1: Yeah, it's like a never ending arms race with both
- 47:22Speaker 1: sides constantly upping their game. You mentioned earlier, there's a
- 47:26Speaker 1: whole whirl of advanced techniques and tools that we haven't
- 47:28Speaker 1: even touched on.
- 47:29Speaker 2: Oh, we barely scratch the surface.
- 47:31Speaker 1: Can you give us a little glimpse into what lies
- 47:33Speaker 1: beyond the basics?
- 47:35Speaker 2: Sure. One area that's becoming increasingly important is file hashing.
- 47:40Speaker 2: It's a technique that lets us identify known good or
- 47:43Speaker 2: bad files by comparing their unique digital fingerprints against massive databases.
- 47:49Speaker 1: Okay, so it's like a fingerprint database, but for files.
- 47:52Speaker 1: We can quickly flag suspicious ones or verify the integrity
- 47:55Speaker 1: of files we know are good.
- 47:56Speaker 2: Exactly, and this is especially useful when you're dealing with
- 47:59Speaker 2: huge amounts of data.
- 48:00Speaker 1: Oh I bet what else?
- 48:02Speaker 2: Then there's the world of reverse engineering, where we use
- 48:04Speaker 2: tools like obs, dumps, strays, GDB, all kinds of tools
- 48:08Speaker 2: to dissect malicious code and understand how it behaves.
- 48:11Speaker 1: So we're taking apart the attackers tools, figuring out how
- 48:14Speaker 1: they work and what they were designed to do. That
- 48:17Speaker 1: sounds pretty advanced, though, do you need to be like
- 48:19Speaker 1: a coding expert for that.
- 48:22Speaker 2: It definitely helps to have a solid understanding of programming concepts.
- 48:26Speaker 2: But there are resources out there to help investigators get
- 48:29Speaker 2: up to speed with reverse engineering techniques and the insights
- 48:32Speaker 2: you gain from analyzing malicious code. Those can be incredibly
- 48:36Speaker 2: valuable in understanding the attackers motives, their methods, their capabilities.
- 48:41Speaker 1: It's like getting inside the mind of the criminal exactly.
- 48:44Speaker 2: The more we understand how attackers operate, the better we
- 48:47Speaker 2: could defend against them.
- 48:49Speaker 1: Makes sense, So file hashing, reverse engineering just a couple
- 48:52Speaker 1: of examples of those advanced techniques using Linux forensics. But
- 48:57Speaker 1: where can someone go to learn more about this stuff?
- 48:59Speaker 1: Any resources you'd.
- 49:00Speaker 2: Recommend absolutely online communities like Reddit, specialized forums. Those are
- 49:05Speaker 2: great places to connect with other enthusiasts and experts. You
- 49:09Speaker 2: could share knowledge, ask questions, get help. Sans Institute they
- 49:13Speaker 2: offer excellent training courses and certifications in digital forensics covering
- 49:18Speaker 2: both Windows and Linux environments.
- 49:20Speaker 1: So it's like joining a global network of digital detectives
- 49:24Speaker 1: all working together to fight cybercrime.
- 49:27Speaker 2: That's a great way to put it. And the thing
- 49:28Speaker 2: about the digital forensics community is people are so willing
- 49:31Speaker 2: to share their knowledge, help each other out. It's very collaborative.
- 49:35Speaker 1: That's fantastic. So for anyone listening who's thinking about, you know,
- 49:39Speaker 1: diving deeper into this world, there are definitely resources out
- 49:42Speaker 1: there to help you get.
- 49:43Speaker 2: Started, absolutely, and I think the most important thing is
- 49:46Speaker 2: to just stay curious, keep learning, and never be afraid
- 49:51Speaker 2: to ask questions.
- 49:52Speaker 1: Well said, this deep dive has been an incredible journey
- 49:55Speaker 1: into the world of Linux forensics. I have to admit
- 49:58Speaker 1: I'm feeling pretty inspired to put on my digital detective
- 50:01Speaker 1: hat and start solving some cyber mysteries myself.
- 50:04Speaker 2: That's the spirit.
- 50:05Speaker 1: And remember the skills you learn in digital forensics, they're
- 50:09Speaker 1: not just applicable to investigating cybercrime, right, they can also
- 50:12Speaker 1: be valuable for incident response, data recovery. Oh absolutely, even
- 50:17Speaker 1: just you know, understanding how computer systems work at a
- 50:20Speaker 1: much deeper level.
- 50:21Speaker 2: It's all connected.
- 50:22Speaker 1: So it's not just about catching the bad guys. It's
- 50:24Speaker 1: about really understanding the digital world around us and using
- 50:28Speaker 1: that knowledge to make it a safer, more secure place
- 50:31Speaker 1: for everyone.
- 50:32Speaker 2: Goodness said it better myself, and.
- 50:33Speaker 1: Who knows, maybe one day you'll be the one writing
- 50:36Speaker 1: the next great book on Linux forensics. Sharing your knowledge
- 50:39Speaker 1: and inspiring others to join this amazing field.
- 50:42Speaker 2: Maybe you will. You seem to have an act for it.
- 50:44Speaker 1: Well. On that note, I think it's time to wrap
- 50:46Speaker 1: up our deep dive for today, but before we go,
- 50:49Speaker 1: any final words of wisdom for our listeners who are
- 50:52Speaker 1: eager to continue their digital detective journey.
- 50:55Speaker 2: Remember, knowledge is power, but it also comes with responsibility.
- 50:59Speaker 2: Use those skills you'll learn ethically, responsibly, and always strive
- 51:03Speaker 2: to make the digital world a safer place for everyone.
- 51:06Speaker 1: Well said, and be sure to check the show notes
- 51:08Speaker 1: for links to all those resources we mentioned today. Until
- 51:11Speaker 1: next time, happy investigating,