Latest / CyberCode Academy / Course 36 - Windows Forensics and Tools | Episode 2: Windows Forensic Imaging and Drive Nomenclature
Transcript
- 0:00Speaker 1: Picture this. You are a digital investigator, right, You've just
- 0:05Speaker 1: executed a search warrant, right, high stakes, exactly, and you're
- 0:09Speaker 1: staring at the suspect's laptop just sitting right there on
- 0:12Speaker 1: the desk.
- 0:13Speaker 2: The adrenaline is definitely pumping at that point.
- 0:15Speaker 1: Oh absolutely, and your very first instinct, naturally, is to
- 0:19Speaker 1: just flip open the lid, press the power button, and
- 0:22Speaker 1: you know, start clicking through their folders to see what
- 0:25Speaker 1: they've been hiding, which.
- 0:26Speaker 2: Is h well, it's the fastest way to completely destroy
- 0:29Speaker 2: a case.
- 0:29Speaker 1: Wait, really just turning it on.
- 0:31Speaker 2: Yeah, I mean it is a completely natural human instinct
- 0:35Speaker 2: because we operate in the physical world. You know, you
- 0:37Speaker 2: find a lock safe, you open it to look inside, right,
- 0:40Speaker 2: But the digital realm operates under entirely different physical laws.
- 0:44Speaker 2: The mere act of turning that computer on it actively
- 0:48Speaker 2: alters the scene of the crime.
- 0:49Speaker 1: Okay, let's unpack this. Because looking through the foundational concepts
- 0:53Speaker 1: of digital forensics and low level operating system architecture we're
- 0:57Speaker 1: exploring today, it becomes well terrifyingly clear just how fragile
- 1:02Speaker 1: digital evidence really is.
- 1:03Speaker 2: Oh, it's incredibly delicate.
- 1:05Speaker 1: So today we are taking you on a deep dive
- 1:08Speaker 1: into the hidden architecture of Windows and the incredibly meticulous
- 1:12Speaker 1: methodology of digital forensics.
- 1:14Speaker 2: It's a fascinating world.
- 1:16Speaker 1: We're going to figure out how investigators actually like freeze
- 1:19Speaker 1: a machine in time, mathematically prove its authenticity, and then
- 1:22Speaker 1: rip it open to see how the data executes.
- 1:24Speaker 2: Yeah, and what's fascinating here is that this journey completely
- 1:29Speaker 2: shifts how you view every day computing how so well
- 1:32Speaker 2: in forensics, your methodology is everything. I mean, if you
- 1:35Speaker 2: boot that suspect's laptop, the operating system instantly starts running
- 1:39Speaker 2: background tasks just automatically, exactly. It alters file access timestamps,
- 1:44Speaker 2: it overwrites temporary data in the memory. You are effectively
- 1:47Speaker 2: walking through a muddy crime scene in golf shoes.
- 1:50Speaker 1: Okay, wow, So how do we capture what is on
- 1:53Speaker 1: that machine without altering a single microscopic detail?
- 1:57Speaker 2: Right? That's the big challenge.
- 1:58Speaker 1: Because my mind immediately goes to just making a backup.
- 2:01Speaker 1: You just plug in a hard drive, hit copy and
- 2:03Speaker 1: paste everything over.
- 2:04Speaker 2: Yeah, and a standard backup is actually useless in a
- 2:07Speaker 2: forensic context pretty much, Yeah, because it is highly selective.
- 2:11Speaker 2: The operating system is acting like a tour guide only
- 2:14Speaker 2: showing you the active visible files it thinks are important,
- 2:17Speaker 2: like my documents, my photos exactly, and the system files,
- 2:21Speaker 2: but it completely ignores the hidden alleys and the trash bits.
- 2:25Speaker 2: What investigators do instead is create a forensic image.
- 2:29Speaker 1: A forensic image, Yeah.
- 2:30Speaker 2: This is a bit by bit sector bisector, direct physical
- 2:34Speaker 2: clone of the storage device.
- 2:36Speaker 1: Okay, So to make sure I'm visualizing this right, A
- 2:38Speaker 1: normal backup is like taking a quick inventory of the
- 2:41Speaker 1: furniture in a house, right, you note the couch, the TV,
- 2:44Speaker 1: the dining table, right. But a forensic image is like
- 2:47Speaker 1: schooming up the entire house at an atomic level, including
- 2:51Speaker 1: like the dust bunnies under the rug, the secret compartments,
- 2:54Speaker 1: and the floorboards and the trash someone tried to burn.
- 2:56Speaker 2: I love that visualization, and we really need to talk
- 2:59Speaker 2: about those digital dust bunnies because they're important, because that
- 3:02Speaker 2: is exactly where the truly incriminating evidence lives. I mean,
- 3:07Speaker 2: when you make a bit by bit clone, you bypass
- 3:10Speaker 2: the operating system entirely.
- 3:11Speaker 1: So you're not listening to the tour guide at all.
- 3:13Speaker 2: Exactly. You aren't just capturing the visible files. You are
- 3:16Speaker 2: capturing deleted files. You're capturing unallocated free space, and most importantly,
- 3:22Speaker 2: you are capturing something called slack space.
- 3:25Speaker 1: Slack space. Yeah, I've seen this term a lot in
- 3:27Speaker 1: our preparation. How does space get slack?
- 3:31Speaker 2: Think about how a hard drive actually stores data. The
- 3:35Speaker 2: physical disc is divided into these fixed size storage chunks
- 3:39Speaker 2: called clusters.
- 3:40Speaker 1: Okay, chunks of storage.
- 3:41Speaker 2: Got it. Let's say your system uses clusters that are
- 3:44Speaker 2: exactly four kilobytes in size. Every time you save a file,
- 3:48Speaker 2: the system hands out these four kilobyte boxes.
- 3:51Speaker 1: So what happens if I read like a tiny text
- 3:53Speaker 1: file that is only one kilobyte.
- 3:55Speaker 2: The system still gives you the whole four kilobyte box. Really, Yeah,
- 3:58Speaker 2: your tiny file goes in side, leaving three kilobytes of
- 4:01Speaker 2: perfectly empty space in that box, and the operating system
- 4:05Speaker 2: essentially puts a lock on the box and just ignores
- 4:07Speaker 2: the empty space.
- 4:08Speaker 1: And the unused room is the slack space exactly? Wait,
- 4:12Speaker 1: if it's empty, why do investigators care about it?
- 4:14Speaker 2: Because it's rarely actually empty. Imagine that box previously held
- 4:19Speaker 2: an old, highly illegal document, or say a deleted chat log.
- 4:25Speaker 1: But if it's deleted, Ah, when.
- 4:27Speaker 2: A file is deleted, the computer doesn't actually scrub the
- 4:30Speaker 2: ones and zeros away.
- 4:31Speaker 1: Wait really, so when I empty my recycle bin, the
- 4:34Speaker 1: files are still just sitting there.
- 4:36Speaker 2: They are completely intact on the physical disc. That is
- 4:39Speaker 2: terrifying it is you see, the operating system uses something
- 4:42Speaker 2: like an index card catalog at a library to keep
- 4:45Speaker 2: track of files. Okay, when you delete a file, you
- 4:48Speaker 2: are just tearing up the.
- 4:49Speaker 1: Index card, but the book is still sitting on the
- 4:51Speaker 1: shelf exactly.
- 4:53Speaker 2: The system just marks that shelf space as available for
- 4:55Speaker 2: new data. So eventually a new file comes along, like
- 4:58Speaker 2: your tiny one kilobyte tech file and gets placed in
- 5:01Speaker 2: that box.
- 5:02Speaker 1: Okay, so it overwrites it.
- 5:03Speaker 2: Then it overwrites the first kilobyte of the old deleted.
- 5:05Speaker 1: Chatlock, oh, leaving the remaining three kilobytes of the deleted
- 5:10Speaker 1: chat log sitting invisible in the slack space.
- 5:12Speaker 2: You've got it, and a standard backup leaves all of
- 5:16Speaker 2: that behind. But a forensic clone grabs every single one
- 5:19Speaker 2: and zero on the physical platter, preserving those exact fragments.
- 5:24Speaker 1: So how do they make the clone without accidentally changing things?
- 5:27Speaker 2: The investigator makes that massive atomic clone using a specialized
- 5:31Speaker 2: device called a right blocker. The right blocker right it
- 5:35Speaker 2: physically prevents any data from flowing back onto the suspect's drive.
- 5:39Speaker 1: So it's a one way street.
- 5:40Speaker 2: Exactly. Once the clone is made, the original drive is labeled,
- 5:43Speaker 2: locked in a secure evidence room, and all the analysis
- 5:46Speaker 2: is done strictly on the duplicate.
- 5:48Speaker 1: Okay, so the bit by bit clone ensures we have
- 5:50Speaker 1: the dust bunnies. But if we eventually find a smoking
- 5:54Speaker 1: gun fragment in that slack space and we bring this
- 5:56Speaker 1: clone into a courtroom, we hit a massive logical opera
- 6:00Speaker 1: proving it's real. Right, the defense attorney's going to stand
- 6:03Speaker 1: up and say, how do we know you didn't plant
- 6:04Speaker 1: that evidence? You're a computer expert. You could have just
- 6:07Speaker 1: typed that chat log into the clone.
- 6:09Speaker 2: It's the classic defense.
- 6:10Speaker 1: So how do investigators prove to a judge that this
- 6:13Speaker 1: massive ocean of binary is an exact, unaltered replica.
- 6:18Speaker 2: They rely on cryptography, right, you know you can't just
- 6:20Speaker 2: swear under oath you didn't touch anything.
- 6:22Speaker 1: Yeah, that wouldn't hold up, right.
- 6:24Speaker 2: You need absolute mathematical proof, and the gold standard for
- 6:27Speaker 2: that is a hashing algorithm, most commonly one called MD five,
- 6:30Speaker 2: which stands for Message Digest five.
- 6:32Speaker 1: Okay, so the research says, MD five reads the file
- 6:35Speaker 1: and spits out one hundred and twenty eight bit summary.
- 6:38Speaker 1: But one hundred and twenty eight bits. What does that
- 6:42Speaker 1: actually look like on my screen? Is it just a
- 6:44Speaker 1: massive unreadable wall of ones and zeros? Well?
- 6:47Speaker 2: No, to make it readable for humans, that one hundred
- 6:50Speaker 2: and twenty eight bit binary string is translated into a
- 6:53Speaker 2: thirty two digit exodecimal.
- 6:54Speaker 1: String exdescimal that means letters and numbers right exactly.
- 6:58Speaker 2: It uses sixteen symbols, the numbers zero through nine, and
- 7:01Speaker 2: the letters A through F. So you end up with
- 7:03Speaker 2: a sequence of thirty two characters that looks kind of
- 7:05Speaker 2: like a random Wi Fi password gotcha, and that string
- 7:08Speaker 2: acts as an unfakable digital fingerprint for the data.
- 7:11Speaker 1: Hold on, this is where I really need to push
- 7:13Speaker 1: back on the math here, go for it. Let's scale
- 7:15Speaker 1: this up. If we have a massive two terabyte hard
- 7:18Speaker 1: drive and on the other hand, a tiny ten kilobyte
- 7:22Speaker 1: text file. Are you telling me they both run through
- 7:25Speaker 1: this algorithm and generate the exact same size, thirty two
- 7:29Speaker 1: digit fingerprint they do? How is that mathematically possible without
- 7:32Speaker 1: two different files accidentally getting the exact same hash. I mean,
- 7:36Speaker 1: there has to be a limit to how many combinations exist.
- 7:39Speaker 2: This raises an important question about scale. Actually, you are
- 7:42Speaker 2: right to point out that there is a finite number
- 7:45Speaker 2: of combinations.
- 7:45Speaker 1: Right.
- 7:46Speaker 2: A situation where two different files produce the same hash
- 7:50Speaker 2: is called a collision. But let's look at the math
- 7:52Speaker 2: of hexadecimal. Correct, you have sixteen possible characters for each
- 7:55Speaker 2: of the thirty two slots. That means there are sixteen
- 7:59Speaker 2: to the power of thirty two two possible combinations.
- 8:01Speaker 1: Which a lot.
- 8:02Speaker 2: It is a number roughly equal to three hundred and
- 8:04Speaker 2: forty one decillion undecillion.
- 8:06Speaker 1: That's not a word I use every day.
- 8:07Speaker 2: Yeah, it's a thirty four followed by thirty six zeros.
- 8:10Speaker 1: Oh wow.
- 8:11Speaker 2: It is a number so incomprehensibly massive that you could
- 8:15Speaker 2: hash every single file ever created in the history of
- 8:18Speaker 2: humanity billions of times over. Yeah, and the mathematical probability
- 8:23Speaker 2: of accidentally hitting a collision is effectively zero.
- 8:26Speaker 1: Okay, that definitely satisfies the uniqueness part. But here's where
- 8:29Speaker 1: it gets really interesting.
- 8:30Speaker 2: Okay.
- 8:31Speaker 1: Let's say I take a five hundred page, highly sensitive
- 8:34Speaker 1: legal document tens of thousands of words, I hash it,
- 8:38Speaker 1: and I get my thirty two character fingerprint. Right, then
- 8:41Speaker 1: I open the document and I maliciously change exactly one
- 8:45Speaker 1: single comma into a period. Does the fingerprint just like
- 8:49Speaker 1: change by one or two letters to reflect that tiny tweak?
- 8:52Speaker 2: Not at all? And understanding why is the actual key
- 8:55Speaker 2: to cryptographic security? Okay? The MD five algorithm doesn't just
- 8:59Speaker 2: read the data sequally and add it up. It processes
- 9:02Speaker 2: the binary data.
- 9:03Speaker 1: In blocks, blocks of data.
- 9:05Speaker 2: Right. It takes a chunk of ones and zeros, performs
- 9:07Speaker 2: complex mathematical operations on it, like shifting bits around and
- 9:10Speaker 2: mixing them together, and then feeds the result of that
- 9:13Speaker 2: block into the mathematical operation for the next block.
- 9:15Speaker 1: Oh, so everything is entangled.
- 9:16Speaker 2: Deeply entangled. If you change a single comma, you are
- 9:20Speaker 2: flipping a single bit of binary data, right, Because that
- 9:24Speaker 2: bit is fed into the first mathematical blender, which feeds
- 9:27Speaker 2: into the next and the next. It causes what cryptographers
- 9:30Speaker 2: called the avalanche effect.
- 9:32Speaker 1: The avalanche effect, I like that term.
- 9:34Speaker 2: Yeah, That single tiny change cascades through the entire calculation.
- 9:39Speaker 2: The resulting thirty two digit string doesn't just change by
- 9:42Speaker 2: one character. It generates a wildly different, completely unrecognizable string.
- 9:47Speaker 1: So it's very binary in its judgment. Then it's either
- 9:50Speaker 1: a flawless perfect match or it's just garbage. There is
- 9:53Speaker 1: no such thing as ninety nine percent.
- 9:55Speaker 2: Amous exactly, which is why it holds.
- 9:57Speaker 1: Up in court, because there's no gray area none.
- 10:00Speaker 2: The investigator hashes the suspect's original drive at the crime scene,
- 10:03Speaker 2: they hash the clone in the lab. If those three
- 10:05Speaker 2: hundred and forty one decillion to one fingerprints match, the
- 10:09Speaker 2: judge knows with absolute mathematical certainty that not a single comma,
- 10:13Speaker 2: not a single bit of slack space, was altered during
- 10:15Speaker 2: the cloning process.
- 10:16Speaker 1: That is incredibly solid. So the MD five hash proves
- 10:19Speaker 1: our clone as a perfect replica. But if an investigator
- 10:22Speaker 1: actually opens up that raw physical clone, they aren't going
- 10:26Speaker 1: to just see neatly organized folders, right, They are just
- 10:29Speaker 1: gonna see billions of ones and zero just be noise.
- 10:33Speaker 1: So how does anyone translate that endless ocean of binary
- 10:37Speaker 1: back into a readable system so we can actually find
- 10:40Speaker 1: the evidence.
- 10:41Speaker 2: Well, we have to shift from looking at the physical
- 10:43Speaker 2: hardware to looking at the logical architecture.
- 10:46Speaker 1: Okay, logical architecture.
- 10:48Speaker 2: We need the operating system's file system to map it
- 10:51Speaker 2: all out for us. You can think of the file
- 10:53Speaker 2: system as the grand architect of that index card catalog
- 10:56Speaker 2: we talked about earlier.
- 10:57Speaker 1: The classic analogy I usually hear is the physical office
- 11:00Speaker 1: file cabinet. That's a good one, right, The steelbox holding
- 11:03Speaker 1: everything is the operating system, and inside the cabinet you
- 11:06Speaker 1: have drawers, which Windows calls logical drives.
- 11:09Speaker 2: Yeah. I actually like to expand that analogy to capture
- 11:11Speaker 2: this year's scale of it. Think of the physical hard
- 11:14Speaker 2: drive as an empty warehouse. The logical drives, your C drive,
- 11:17Speaker 2: your D drive are the massive shelving units built inside
- 11:21Speaker 2: the warehouse to make it usable.
- 11:23Speaker 1: Ah okay, So when I plug in a digital camera,
- 11:26Speaker 1: Windows suddenly builds a new shelving unit, maybe assigns it
- 11:30Speaker 1: the letter F just to manage those photos.
- 11:32Speaker 2: Yes, exactly. And on those shelves you have directories, which
- 11:36Speaker 2: most people just call folders.
- 11:37Speaker 1: Shoulders.
- 11:38Speaker 2: Directories are really just organizational tools to hold files and
- 11:41Speaker 2: other subdirectories, And the only limit to how many files
- 11:44Speaker 2: a directory can hold is the physical size of the
- 11:47Speaker 2: disc itself.
- 11:48Speaker 1: Now, I assume the files themselves, the actual documents, have
- 11:52Speaker 1: strict rules for how they can be indexed in this system.
- 11:55Speaker 2: Oh, very strict in Windows, a file name max is
- 11:59Speaker 2: out at two hundred and fifty five characters, and crucially,
- 12:02Speaker 2: you have to be really careful which characters you use,
- 12:05Speaker 2: like what well, you can never use a backslash, a
- 12:08Speaker 2: forward slash, or a question market a filename?
- 12:11Speaker 1: Really? Why not? Is it just a stylistic choice by Microsoft.
- 12:14Speaker 2: No, it's a functional limitation. The operating system relies on
- 12:17Speaker 2: those specific characters for its internal pathing syntax.
- 12:20Speaker 1: Like the address to the file exactly.
- 12:22Speaker 2: A backslash, the divider between directories. If your filepath is
- 12:26Speaker 2: ce colon backslash, documents backslash, and you try to name
- 12:31Speaker 2: a file with the backslash in it, the operating system's
- 12:34Speaker 2: parsing logic.
- 12:34Speaker 1: Breaks because it thinks it's a folder.
- 12:36Speaker 2: Yes, it thinks you're trying to create a new folder
- 12:39Speaker 2: instead of just a filename.
- 12:40Speaker 1: That makes perfect sense. Speaking of syntax, what is actually
- 12:43Speaker 1: happening under the hood when a specialized forensic tool queries
- 12:47Speaker 1: the main system drive Because I know it doesn't just
- 12:49Speaker 1: like ask for the seed drive.
- 12:51Speaker 2: Now, low level tools need to bypass the friendly user
- 12:54Speaker 2: interface entirely okay to access the entire seed drive mount point. Logically,
- 12:59Speaker 2: the exact syntax required is two backslashes a dot, a
- 13:03Speaker 2: backslash the letter C and a colon.
- 13:05Speaker 1: Two backslashes, dot backslash C colon.
- 13:08Speaker 2: Yes. And a critical rule here is that drive letters
- 13:11Speaker 2: must be completely unique on a single computer.
- 13:14Speaker 1: Like, you can't have two C drives, right, You.
- 13:16Speaker 2: Can have two hard drives with the exact same volume name,
- 13:19Speaker 2: like let's say suspect backup and Windows doesn't care. It
- 13:22Speaker 2: ignores the human readable name.
- 13:23Speaker 1: But you absolutely cannot have two C drives exactly.
- 13:27Speaker 2: The letter is the primary address routing the traffic.
- 13:30Speaker 1: You know, here's where it gets really interesting if we
- 13:33Speaker 1: connect this to the bigger picture. There is a fascinating
- 13:36Speaker 1: historical quirk here.
- 13:38Speaker 2: Oh about the letters.
- 13:39Speaker 1: Yeah, we always talk about the C drive, the D drive,
- 13:42Speaker 1: the E drive. My main partition is literally always C always.
- 13:48Speaker 1: Whatever happened to the AMB drives? Like why does Windows
- 13:50Speaker 1: just skip the first two letters of the alphabet.
- 13:52Speaker 2: It's a great example of legacy architecture surviving decades. Actually,
- 13:56Speaker 2: the A and B drive designations are basically digital.
- 13:59Speaker 1: Gohosts, digital ghosts.
- 14:01Speaker 2: Yeah. In the early days of personal computing, long before
- 14:04Speaker 2: massive internal hard drives were standard, computers booted entirely from
- 14:09Speaker 2: floppy disks.
- 14:10Speaker 1: Oh wow, floppy disks. I haven't thought about those in years.
- 14:12Speaker 2: Most people haven't. But drive A was physically wired and
- 14:16Speaker 2: reserved for the primary floppy drive, and drive B was
- 14:20Speaker 2: reserved for the secondary floppy drive.
- 14:22Speaker 1: Ah, so when internal hard drives finally became a standard component, they.
- 14:26Speaker 2: Simply took the next available letter, which was C. That
- 14:28Speaker 2: is wild, and even though floppy drives have been practically
- 14:32Speaker 2: extinct for twenty years, modern Windows architecture still respectfully reserves
- 14:38Speaker 2: A and B just in case you ever decided to
- 14:40Speaker 2: blog one in.
- 14:41Speaker 1: The ghost of the floppy disk haunts the modern operating system.
- 14:45Speaker 2: It really does. It highlights the difference between physical and logical.
- 14:50Speaker 2: You know, a physical drive is raw silicon and platters
- 14:54Speaker 2: the drive letters, the syntax, the directories. That is entirely
- 14:59Speaker 2: a logical construct layered on top. So human investigators and
- 15:03Speaker 2: software can actually make sense of the space.
- 15:05Speaker 1: Okay, so finding the file is one thing. We've imaged
- 15:08Speaker 1: the drive, verified the hash, mapped the logical file cabinet,
- 15:12Speaker 1: and located our suspects malicious malware file.
- 15:14Speaker 2: We found the evidence.
- 15:16Speaker 1: But a file just sitting on a hard drive is dormant.
- 15:18Speaker 1: It's just static ink on paper. Nothing actually happens until
- 15:21Speaker 1: you double click it, right, What is the mechanism under
- 15:23Speaker 1: the hood when a piece of software springs to life.
- 15:26Speaker 2: This takes us from the realm of static storage into
- 15:29Speaker 2: the dynamic realm of execution. And to understand how investigators
- 15:34Speaker 2: track active threats, we have to define three distinct terms
- 15:38Speaker 2: that people constantly mix up. Wait, application, process, and thread.
- 15:42Speaker 1: Break it down for us.
- 15:43Speaker 2: Let's start with the application. An application is simply a
- 15:46Speaker 2: collection of executable programs and supporting files resting dormant on
- 15:50Speaker 2: the disc.
- 15:50Speaker 1: Like Microsoft word right.
- 15:52Speaker 2: Microsoft word is an application. The malware we just found
- 15:55Speaker 2: is an application. It represents the potential to do work,
- 15:59Speaker 2: but it's doing nothing.
- 16:00Speaker 1: So when I double click that malware to run at
- 16:02Speaker 1: what happens?
- 16:03Speaker 2: The operating system wakes up and creates a process. A
- 16:06Speaker 2: process is a running instance of an applications a running instance,
- 16:10Speaker 2: and crucially, the OS builds a protective bubble around it
- 16:14Speaker 2: called an allocated memory space.
- 16:16Speaker 1: Why does it need a protective bubble?
- 16:18Speaker 2: Mainly for security instability. If you have ten different processes
- 16:21Speaker 2: running your web browser, your email, your music player, you
- 16:26Speaker 2: don't want them crashing into each other. That makes sense.
- 16:28Speaker 2: If your browser crashes, it's isolated memory space collapses, but
- 16:32Speaker 2: your music just keeps right on playing.
- 16:33Speaker 1: So if I have three different word documents open in
- 16:36Speaker 1: separate windows, I have three different processes running, each in.
- 16:39Speaker 2: Their own bubble precisely. But here is the trick. The
- 16:43Speaker 2: process itself doesn't actually execute the program code.
- 16:47Speaker 1: It doesn't.
- 16:48Speaker 2: No, it's just the container. The actual heavy lifting is
- 16:51Speaker 2: done by the thread the threat. Okay, A thread is
- 16:53Speaker 2: an object within a process that is allocated actual processor
- 16:57Speaker 2: time by the CPU. Threats are what execute the code.
- 17:01Speaker 1: So the thread is the worker exactly.
- 17:04Speaker 2: Every process must have at least one thread, but modern
- 17:07Speaker 2: computing is built on multi threading.
- 17:09Speaker 1: Multi threading, Yeah.
- 17:11Speaker 2: That's where a process spins up dozens of threads to
- 17:14Speaker 2: do multiple things simultaneously within that shared memory bubble.
- 17:17Speaker 1: Let me try an analogy to visualize this workflow. Let's
- 17:20Speaker 1: say I am running a massive restaurant.
- 17:22Speaker 2: All right, okay, let's hear it.
- 17:23Speaker 1: The application, that collection of dormant files is the recipe
- 17:27Speaker 1: book sitting on the shelf. It tells you how to
- 17:30Speaker 1: make the meal, but it isn't the meal peg. When
- 17:33Speaker 1: a customer orders, I set up a process the process
- 17:37Speaker 1: is an isolated kitchen station. I allocate memory space, which
- 17:41Speaker 1: means I set up the cutting boards, the bowls, and
- 17:43Speaker 1: the raw ingredients on the counter spot on. But the
- 17:46Speaker 1: ingredients aren't going to chop themselves. The thread is the
- 17:49Speaker 1: actual chef standing at the station holding the knife doing
- 17:52Speaker 1: the chopping.
- 17:53Speaker 2: That is incredibly accurate, and we can use your kitchen
- 17:56Speaker 2: to explain multi threading perfectly. Okay, how so if your
- 17:59Speaker 2: application is a complex program like rendering a massive video file,
- 18:04Speaker 2: and you only have one thread, you only have one
- 18:07Speaker 2: chef at that station doing everything sequentially.
- 18:10Speaker 1: Chopping then boiling, then plating exactly, which would take hours.
- 18:14Speaker 2: But with multi threading, you assigned five chefs to that
- 18:16Speaker 2: exact same kitchen station. One chops, one boils, one sears,
- 18:21Speaker 2: all at the same time, sharing the same ingredients in
- 18:23Speaker 2: that same memory space.
- 18:25Speaker 1: But how does the computer actually manage all those chefs
- 18:27Speaker 1: without them bumping into each other.
- 18:29Speaker 2: Well that's the tricky part because.
- 18:31Speaker 1: I remember back in the day my old family computer
- 18:34Speaker 1: only had one single CPU core, but it still felt
- 18:37Speaker 1: like I could listen to music, download a file, and
- 18:40Speaker 1: type a document at the same time. How is one
- 18:43Speaker 1: single processor doing all of that.
- 18:45Speaker 2: This is where operating systems perform absolute magic. In a
- 18:49Speaker 2: modern multiprocessor environment with multiple CPU cores, you literally have
- 18:53Speaker 2: multiple separate chefs working at the exact same time, right,
- 18:57Speaker 2: But in a single process or environment, you only have
- 18:59Speaker 2: one chef for the entire restaurant.
- 19:01Speaker 1: Wow, one chef Yeah.
- 19:03Speaker 2: To make it feel simultaneous, the operating system uses a
- 19:06Speaker 2: mechanism called time slicing or context switching.
- 19:09Speaker 1: Time slicing. How does it pause a chef midschop without
- 19:13Speaker 1: ruining the meal?
- 19:14Speaker 2: It's an incredibly violent, high speed micromanagement. The operating system
- 19:18Speaker 2: gives a thread a tiny fraction of a millisecond to
- 19:21Speaker 2: run on the CPU. When time is up, the OS
- 19:24Speaker 2: physically yanks the thread off the processors, pulls them away.
- 19:27Speaker 2: It saves the exact state of everything where the knife was,
- 19:31Speaker 2: what ingredient was being chopped, into a register. Then it
- 19:34Speaker 2: instantly loads the save state of the next thread. Let's
- 19:37Speaker 2: it run for a millisecond, saves it, and loops to
- 19:40Speaker 2: the next.
- 19:41Speaker 1: So that single processor is just sprinting between the music
- 19:44Speaker 1: player station, the browser station, and the word processor station
- 19:48Speaker 1: thousands of times a second.
- 19:50Speaker 2: Thousands of times a second. It happens so incredibly fast
- 19:53Speaker 2: that to the human eye the illusion is flawless. It
- 19:56Speaker 2: looks like everything is running simultaneously.
- 19:58Speaker 1: That is exhausting to even think about it really is.
- 20:01Speaker 1: It really exposes how much heavy lifting is happening invisible
- 20:04Speaker 1: to the user. I mean, from organizing invisible dust bunnies
- 20:08Speaker 1: on a physical platter all the way up to microscopic
- 20:11Speaker 1: time slicing in the CPU.
- 20:12Speaker 2: It is a masterpiece of logical organization. And knowing these
- 20:16Speaker 2: mechanisms is what separates someone who just uses a computer
- 20:19Speaker 2: from someone who can actually investigate one.
- 20:21Speaker 1: Which brings us to the end of today's deep dive.
- 20:24Speaker 1: But before we wrap up, think about how your perspective
- 20:27Speaker 1: has shifted since we started. Now, when you save a file,
- 20:30Speaker 1: you know you aren't just putting a piece of paper
- 20:32Speaker 1: in a folder.
- 20:33Speaker 2: No, you are allocating logical space and leaving slack behind exactly.
- 20:38Speaker 1: And when you launch an app, you know you're spinning
- 20:40Speaker 1: up an isolated process and sending threads to the CPU.
- 20:44Speaker 1: You aren't just a user anymore. You can see the
- 20:46Speaker 1: matrix underneath.
- 20:47Speaker 2: It empowers you to understand both how data is preserved
- 20:52Speaker 2: and how it can be weaponized.
- 20:53Speaker 1: So what does this all mean?
- 20:54Speaker 2: Well, we covered a lot of ground today, we did.
- 20:56Speaker 1: We talked heavily about the absolute mathematical certainty of the
- 21:00Speaker 1: MDFI hash. We established that changing one single comma triggers
- 21:04Speaker 1: the avalanche effect, rendering the thirty two character fingerprint entirely unrecognizable.
- 21:10Speaker 2: It unequivocally proves authenticity.
- 21:12Speaker 1: But here is a final lingering thought for you to
- 21:14Speaker 1: explore on your own. Imagine how incredibly difficult it is
- 21:18Speaker 1: for forensic investigators to track down a piece of advanced
- 21:21Speaker 1: polymorphic malware.
- 21:22Speaker 2: Oh, polymorphic malware. That's a nightmare, right.
- 21:25Speaker 1: This is malicious software that is intentionally programmed to slightly
- 21:29Speaker 1: rewrite its own code, change one digital comma every single
- 21:33Speaker 1: time it jumps to a new computer.
- 21:35Speaker 2: To constantly alter its own hash.
- 21:37Speaker 1: Exactly how do investigators catch a digital criminal whose weapon
- 21:41Speaker 1: is mathematically designed to never leave the exact same fingerprint
- 21:45Speaker 1: twice something Tom all over until next time