Latest / CyberCode Academy / Course 36 - Windows Forensics and Tools | Episode 3: Mastering dd.exe for Drives and Memory
Transcript
- 0:00Speaker 1: Welcome to the deep dive. So today we are plunging
- 0:02Speaker 1: into a really fascinating utility called dd dot XE.
- 0:09Speaker 2: Yeah, often just known as data.
- 0:10Speaker 1: Dumber, right, data Dumber, and it's this remarkably powerful tool
- 0:15Speaker 1: that's used well everywhere in the tech and digital forensics world.
- 0:19Speaker 2: Oh absolutely. It is the gold standard for exact bit
- 0:22Speaker 2: by bit data copying and drive imaging.
- 0:24Speaker 1: And our mission today is to step directly into the
- 0:27Speaker 1: shoes of a digital forensic investigator. We want to unpack
- 0:31Speaker 1: exactly what DAD is. You know, how it processes data
- 0:34Speaker 1: under the hood at the absolute lowest hardware level.
- 0:37Speaker 2: Yeah, we're going to look at how you can practically
- 0:38Speaker 2: use it to perfectly clone USB drives, rip optical media,
- 0:42Speaker 2: and even attempt to capture the volatile memory of a
- 0:46Speaker 2: live computer system.
- 0:47Speaker 1: Which is wild. And to really grasp what we're doing here,
- 0:50Speaker 1: you have to imagine trying to take a perfect bite
- 0:53Speaker 1: for byte snapshot of a high speed passenger train moving
- 0:56Speaker 1: it full throttle. Oh I love that analogy, right, because
- 0:59Speaker 1: you can't stop the train, you can't ask the passengers
- 1:01Speaker 1: to freeze, and your camera lens can only capture one
- 1:03Speaker 1: tiny square inch of the metal at a time.
- 1:05Speaker 2: Yeah, that is exactly what digital forensics looks like in practice,
- 1:08Speaker 2: and today you were going to learn how the pros
- 1:11Speaker 2: actually managed to pull it off.
- 1:12Speaker 1: Okay, let's unpack this because before we capture that moving train,
- 1:16Speaker 1: we really need to understand the camera we're using.
- 1:18Speaker 2: Right, definitely, I mean we have to look at how
- 1:21Speaker 2: this command line tool, which was originally built in the
- 1:23Speaker 2: nineteen seventies for Unix, has somehow remained this absolute powerhouse
- 1:28Speaker 2: for forensic copying even on modern Windows environments.
- 1:31Speaker 1: Crazy, but at its absolute core, d D really just
- 1:35Speaker 1: does one thing, and it does it relentlessly. It copies
- 1:39Speaker 1: data from a standard input which the command syntax refers
- 1:42Speaker 1: to as if so IF for input file, and it
- 1:46Speaker 1: moves it to a standard output referred to as of
- 1:48Speaker 1: for output file, and it executes this whole process one
- 1:52Speaker 1: specific block at a time.
- 1:54Speaker 2: What's fascinating here is the underlying mechanics of how DD
- 1:57Speaker 2: processes those data blocks because you actually dicked the rules
- 2:00Speaker 2: of engagement using a command parameter called BS, which stands
- 2:03Speaker 2: for block size, so.
- 2:04Speaker 1: You tell it how much to grab it once exactly.
- 2:07Speaker 2: By default, if you don't specify a block size in
- 2:10Speaker 2: your command, DD just assumes a default of five hundred
- 2:13Speaker 2: and twelve bytes. So you will reach out to the
- 2:15Speaker 2: input drive, scoop up five hundred and twelve bytes of data,
- 2:19Speaker 2: walk over to your output file, drop those bytes off,
- 2:22Speaker 2: and go back for the next scoop.
- 2:23Speaker 1: Which I mean that feels very safe and methodical. It
- 2:26Speaker 1: is safe. Yeah, but if you are copying a modern
- 2:30Speaker 1: multi terabyte hard drive, moving five hundred and twelve bytes
- 2:33Speaker 1: at a time is like trying to empty an Olympic
- 2:35Speaker 1: swimming pool with a teaspoon. It's going to take an eternity.
- 2:39Speaker 2: Oh, an absolute eternity, because every single one of those
- 2:41Speaker 2: microscopic trips requires the computer CPU to actively interrogate the
- 2:46Speaker 2: storage hardware. That creates massive processing overhead.
- 2:49Speaker 1: Right, So to avoid that bottleneck, investigators will speed things
- 2:53Speaker 1: up by increasing the block size.
- 2:54Speaker 2: Yeah, you might jump it up to a whole megabyte
- 2:56Speaker 2: at a time, but there's a very real physical danger
- 3:00Speaker 2: in doing this. You have to be incredibly careful not
- 3:02Speaker 2: to make the block size too large.
- 3:04Speaker 1: Because the computer has to like actually hold that data
- 3:06Speaker 1: somewhere while it's moving it from point A to point B.
- 3:08Speaker 2: Right exactly, That DDD uses the system's active RAM as
- 3:11Speaker 2: a temporary staging brand. Oh I see.
- 3:14Speaker 1: So if you tell DD to grab two gigabytes of
- 3:16Speaker 1: data in a single block, your Windows operating system will
- 3:20Speaker 1: try to allocate two gigabytes of contiguous.
- 3:23Speaker 2: Memory and if it can't find it.
- 3:25Speaker 1: If it cannot find that contiguous space, the operating system
- 3:28Speaker 1: will literally run out of available memory trying to hold
- 3:31Speaker 1: that massive chunk. The entire DD process will just instantly crash.
- 3:36Speaker 2: Wow. Okay, so what's the sweet spot then?
- 3:38Speaker 1: In professional practice, one megabyte, which is usually written in
- 3:41Speaker 1: the command line, simply is one M that's considered a
- 3:44Speaker 1: very safe, highly efficient upper limit for the block size
- 3:47Speaker 1: in almost all standard scenarios.
- 3:50Speaker 2: Got it. And when you are typing out these parameters,
- 3:53Speaker 2: DD uses some very specific shorthand suffixes that you absolutely
- 3:56Speaker 2: need to know.
- 3:57Speaker 1: Yeah, the syntax can be a bit cryptic if you
- 3:59Speaker 1: aren't used to it.
- 4:00Speaker 2: Right. So, if you append a W to a number,
- 4:02Speaker 2: D D reads that as words, which in this technical
- 4:04Speaker 2: context means exactly two bytes.
- 4:06Speaker 1: Yea.
- 4:07Speaker 2: A B stands for standard blocks, which we just set
- 4:09Speaker 2: as five hundred and twelve bytes, and K stands for
- 4:12Speaker 2: kilo represent one hundred and twenty four bytes. And to
- 4:15Speaker 2: really put into perspective just how much manipulating that block
- 4:19Speaker 2: size impacts your overall copying speed. Let's look at a
- 4:23Speaker 2: historical example using an old school floppy disc.
- 4:26Speaker 1: Okay, let's hear it.
- 4:27Speaker 2: So, a standard floppy disc holds roughly fourteen hundred and
- 4:30Speaker 2: forty kilobytes of data. If you tell DD to copy
- 4:34Speaker 2: that disc using a block size of one K, and
- 4:36Speaker 2: you tell it to count fourteen forty of those blocks,
- 4:39Speaker 2: it is going to make fourteen forty separate individual trips
- 4:42Speaker 2: to read and write that data.
- 4:44Speaker 1: That is fourteen hundred and forty trips with our little
- 4:47Speaker 1: digital Ta spook.
- 4:47Speaker 2: Yeah, the overhead is brutal. But if you alter the
- 4:50Speaker 2: command to a block size of a fourteen forty K and
- 4:53Speaker 2: set the count to just one, DD asks the hardware
- 4:56Speaker 2: for the entire contents of the disc in a single
- 4:59Speaker 2: massive sweep.
- 5:00Speaker 1: Oh, it's so much more efficient. It is.
- 5:01Speaker 2: In fact, that first method, the fourteen forty separate trips,
- 5:04Speaker 2: actually takes almost twice as long as the second method.
- 5:07Speaker 2: Minimizing the back and forth communication between the software and
- 5:10Speaker 2: the physical drive controller is the absolute key to speed, and.
- 5:14Speaker 1: That hardware communication matters for other types of media too,
- 5:16Speaker 1: doesn't it Like if you were dealing with a CD
- 5:19Speaker 1: or a DVD. The physical disc is manufactured completely differently
- 5:22Speaker 1: than a hard.
- 5:23Speaker 2: Drive, Oh totally different. It is burned with an optical laser,
- 5:26Speaker 2: creating tiny pits and lands on the disc right, and.
- 5:29Speaker 1: The physical sector size on those is strictly two kilobytes.
- 5:33Speaker 1: So if you try to use a block size in
- 5:35Speaker 1: DD that isn't a mathematically clean multiple of two K,
- 5:39Speaker 1: the read process will hit the physical boundaries of the
- 5:42Speaker 1: optical sectors unevenly.
- 5:44Speaker 2: Yeah, it simply won't work.
- 5:45Speaker 1: The drive will err out because you're basically asking the
- 5:49Speaker 1: hardware to split an atom it cannot split exactly.
- 5:52Speaker 2: DD is intimately tied to the harsh physical realities of
- 5:56Speaker 2: the hardware it's interacting with. It does not abstract those
- 5:59Speaker 2: details away like say Windows Explorer does.
- 6:02Speaker 1: Yeah. Now, reading data linearly, straight from the absolute beginning
- 6:05Speaker 1: to the end, that's a great baseline. But what if
- 6:08Speaker 1: you are an investigator and you know for a fact
- 6:10Speaker 1: the evidence you need is buried halfway through a drive.
- 6:13Speaker 2: You don't want to copy the whole thing, right.
- 6:14Speaker 1: You don't want to spend three days copying a terabyte
- 6:17Speaker 1: of irrelevant data just to get to the good stuff,
- 6:19Speaker 1: we need a way to jump around, and this.
- 6:21Speaker 2: Is where DD's powerful navigation commands come into play, specifically
- 6:26Speaker 2: the Skip and seek parameters. These commands allow you to
- 6:30Speaker 2: surgically jump over vast amounts of data without wasting the
- 6:34Speaker 2: processing power to actually read it.
- 6:36Speaker 1: There's a really great visual mnemonic to remember the difference
- 6:39Speaker 1: between these two, because they sound incredibly similar.
- 6:41Speaker 2: They do.
- 6:42Speaker 1: Yeah, So, the skip command tells DD to jump over
- 6:45Speaker 1: a certain physical distance on the input file before it
- 6:48Speaker 1: even starts reading. Think of skipping rope. You're jumping into
- 6:51Speaker 1: the data source.
- 6:52Speaker 2: That visual makes it very easy to retain. Conversely, the
- 6:55Speaker 2: sikh command tells DD to jump over a certain distance
- 6:59Speaker 2: on the output file before it starts writing.
- 7:01Speaker 1: Okay, so if skip is for the input, seek is
- 7:03Speaker 1: for the output.
- 7:04Speaker 2: Precisely, if you had an existing output file on your
- 7:07Speaker 2: hard drive and you wanted to append new evidence data,
- 7:10Speaker 2: specifically starting say one gigabyte deep, into that existing file,
- 7:15Speaker 2: you'd use seek to jump the cursor ahead before laying
- 7:18Speaker 2: down the new tracks.
- 7:19Speaker 1: It gives you pinpoint surgical control. But with that kind
- 7:22Speaker 1: of low level power comes the potential for things to
- 7:25Speaker 1: go wildly wrong.
- 7:26Speaker 2: Oh, Yeah, very wrong.
- 7:27Speaker 1: Especially when dealing with modern cheap removable media. And this
- 7:31Speaker 1: brings us to what might be the most crucial parameter
- 7:34Speaker 1: in the entire DD toolkit, which is the size command.
- 7:37Speaker 2: Yeah, this is a big one. Traditionally, on Unix systems,
- 7:40Speaker 2: DETY was designed to just keep reading the input drive
- 7:43Speaker 2: until it hit the physical end of the metal.
- 7:45Speaker 1: It just reads until there's no more to read.
- 7:47Speaker 2: Right, the drive controller would send back a standard end
- 7:49Speaker 2: of file hardware signal and DD would politely stop and
- 7:53Speaker 2: close the file.
- 7:54Speaker 1: Which is very polite and expected. But today investigators are
- 7:58Speaker 1: running this tool on Windows and they're often dealing with cheap,
- 8:02Speaker 1: mass produced USB thumb drives found at a crime scene.
- 8:05Speaker 2: And that is exactly where the polite Unix behavior completely
- 8:08Speaker 2: breaks down. Because many modern USB flash memory controllers are
- 8:12Speaker 2: built as cheaply as possible, they do not handle operating
- 8:16Speaker 2: system requests pass their true physical limits gracefully at all.
- 8:19Speaker 2: If d D blindly reaches the end of the data
- 8:22Speaker 2: and simply asks the USB controller for the next block,
- 8:25Speaker 2: the cheap microchip doesn't know how to handle the.
- 8:27Speaker 1: Out of bounds request, So what happens.
- 8:29Speaker 2: It will often straight up crash, freezing the device entirely,
- 8:34Speaker 2: and the stakes.
- 8:34Speaker 1: There are terrifying for anyone doing real forensics. If you
- 8:40Speaker 1: are an investigator and you crash as suspects flash drive
- 8:43Speaker 1: during the imaging process, you haven't just wasted your afternoon.
- 8:47Speaker 2: No, you've ruined the case exactly.
- 8:49Speaker 1: You may have just physically corrupted the only copy of
- 8:51Speaker 1: the primary evidence. The defense attorney's going to have a
- 8:54Speaker 1: field day and your case might get thrown out entirely.
- 8:57Speaker 2: You destroy the integrity of your evidence, and on a
- 9:00Speaker 2: it can actually get worse than a crash.
- 9:01Speaker 1: Wait, worse than a crash.
- 9:03Speaker 2: Yeah, some of these cheap USB drives won't freeze. They
- 9:06Speaker 2: will just endlessly return fake data. The controller gets confused
- 9:10Speaker 2: by the out of bounds request and starts returning an
- 9:12Speaker 2: infinite loop of zeros without ever sending an error code.
- 9:15Speaker 2: Oh wow, So DD will happily sit there for days
- 9:18Speaker 2: writing gigabytes and gigabytes of fake, empty nothingness to your
- 9:22Speaker 2: hard drive until your server literally runs out of storage space.
- 9:26Speaker 1: That is exactly why the size parameter is vital. When
- 9:29Speaker 1: you append size to your command, it forces DD to
- 9:33Speaker 1: actively interrogate the Windows operating system to figure out the
- 9:36Speaker 1: exact true physical limit of the flash memory before it
- 9:40Speaker 1: ever starts copying.
- 9:41Speaker 2: Right, it builds a safety wall so it never reads
- 9:43Speaker 2: past that breaking point. It acts as a mandatory safeguard
- 9:46Speaker 2: for modern hardware.
- 9:47Speaker 1: Okay, so that covers static data. A USB stick sitting
- 9:51Speaker 1: on a desk is a static object. Yeah, But what
- 9:54Speaker 1: happens when we turn our attention back to that high
- 9:56Speaker 1: speed train we talked about in the.
- 9:58Speaker 2: Intro, the volatile memory?
- 9:59Speaker 1: Yeah, yes, here's where it gets really interesting. What happens
- 10:03Speaker 1: when you want to use DD on the RAM of
- 10:05Speaker 1: a live running computer system.
- 10:08Speaker 2: It truly is the holy grail of digital forensics, because
- 10:11Speaker 2: when a computer is powered on, the RAM holds the
- 10:13Speaker 2: absolute ground truth of what is happening right at that
- 10:16Speaker 2: exact millisecond.
- 10:17Speaker 1: Everything is in there.
- 10:18Speaker 2: Everything you have, the system processes that are actively running,
- 10:21Speaker 2: the files that are currently unencrypted and open, live network
- 10:24Speaker 2: connections communicating with the outside world, and even plaintechts log
- 10:28Speaker 2: in passwords just sitting there in memory.
- 10:30Speaker 1: And the overarching goal is to capture all of that
- 10:34Speaker 1: without disrupting the target system. Because if you suspect a
- 10:38Speaker 1: company server has been compromised by a hacker, you can't
- 10:41Speaker 1: just pull the power plug to preserve it.
- 10:43Speaker 2: No, absolutely not.
- 10:45Speaker 1: If you cut the power, all that violayl memory disappears
- 10:48Speaker 1: into the ether instantly. It requires constant electricity to exist.
- 10:51Speaker 1: You have to capture it live, and DD actually has
- 10:54Speaker 1: a massive advantage in this specific scenario.
- 10:56Speaker 2: It does because the program is so incredibly tiny, just
- 11:00Speaker 2: few kilobytes. You can run it straight from an investigator's
- 11:02Speaker 2: sum drive. Right.
- 11:03Speaker 1: You don't have to install bulky forensic software exactly.
- 11:06Speaker 2: You don't have to inject specialized kernel mode drivers onto
- 11:09Speaker 2: the compromised machine, which could accidentally overwrite the exact malware
- 11:13Speaker 2: evidence you are trying to find.
- 11:15Speaker 1: If we connect this to the bigger picture, using DD
- 11:18Speaker 1: to dump RAM is an elegant, low impact solution. It
- 11:22Speaker 1: creates a very simple raw output format where the byte
- 11:25Speaker 1: offset in your new file perfectly matches the physical memory
- 11:29Speaker 1: address on the actual ramstick.
- 11:31Speaker 2: However, there is a fundamental compromise happening during this process.
- 11:36Speaker 2: You do not get a crystal clear photograph of the system.
- 11:39Speaker 2: You get a blurred image.
- 11:41Speaker 1: Wait, I need to push back on that concept for
- 11:43Speaker 1: a second. We are talking about digital data ones and
- 11:46Speaker 1: zeros on a silicon chip. How can digital data possibly
- 11:50Speaker 1: be blurred? It's either a one or a zero.
- 11:53Speaker 2: Right, it is blurred by the relentless passage of time.
- 11:57Speaker 2: Think back to your moving train analogy. The operating does
- 12:00Speaker 2: not pause while dd is copying the ramh Okay, the
- 12:04Speaker 2: computer is still doing thousands of background tasks, updating clocks,
- 12:08Speaker 2: receiving network packets, moving background data. DDE starts at memory
- 12:12Speaker 2: address zero and begins its sequential copy. By the time
- 12:15Speaker 2: it gets halfway through the RAM module, which might take
- 12:17Speaker 2: a full minute, the data at the end of the
- 12:19Speaker 2: RAM has completely changed from what it was when DEDE
- 12:22Speaker 2: first started.
- 12:22Speaker 1: That makes total sense. It is exactly like taking a
- 12:25Speaker 1: panoramic photo on your smartphone while a dog runs through
- 12:28Speaker 1: the frame.
- 12:28Speaker 2: Yes, perfect example.
- 12:29Speaker 1: The dog shows up stretched out into a weird blur
- 12:33Speaker 1: or sliced in half because it moved while the camera
- 12:36Speaker 1: software was slowly scanning from left to right. The data
- 12:39Speaker 1: dd captures at the end of the memory dump isn't
- 12:43Speaker 1: from the exact same moment in time as the data
- 12:45Speaker 1: at the very beginning exactly.
- 12:47Speaker 2: It is a smear of data stretched across the time
- 12:49Speaker 2: it took to complete the copy and building on that.
- 12:52Speaker 2: There are other heavy limitations to this technique because it
- 12:56Speaker 2: is a raw, one to one physical copy. The resulting
- 12:59Speaker 2: file will be the exact same size as the machine's RAM.
- 13:02Speaker 1: Right, So if the server has sixty four gigabytes of memory,
- 13:05Speaker 1: you are generating a sixty four gigabyte file.
- 13:07Speaker 2: Right, regardless of whether that RAM was full or mostly empty. Furthermore,
- 13:12Speaker 2: the standard Microsoft kernel debugger tools cannot natively read this
- 13:15Speaker 2: raw DD format. Oh really yeah, DD doesn't include the
- 13:19Speaker 2: crash dumpheaters that Microsoft tools look for. It requires highly
- 13:22Speaker 2: specialized conversion to make it readable, and of course you
- 13:25Speaker 2: absolutely must have full administrator privileges to even attempt this,
- 13:29Speaker 2: as the Windows operating system heavily protects access to physical memory.
- 13:33Speaker 1: And even if you jump through all those hoops and
- 13:35Speaker 1: secure the dump, there aren't many publicly available, easy to
- 13:38Speaker 1: use tools to just double click it and read it
- 13:41Speaker 1: like a word document. It takes highly specialized analysis using
- 13:45Speaker 1: a hex editor or custom scripts.
- 13:47Speaker 2: It's very manual.
- 13:48Speaker 1: But wait, there's a massive catch to everything we just
- 13:51Speaker 1: discussed about dumping RAM with DD, isn't there?
- 13:53Speaker 2: There is a huge catch. While the theory is incredibly
- 13:56Speaker 2: vital to understand for any forensic student, this specific method
- 14:00Speaker 2: of using a user level application like DD to dump
- 14:03Speaker 2: physical memory is almost completely blocked in modern.
- 14:06Speaker 1: System Wow, completely blocked.
- 14:08Speaker 2: Yeah, starting with Windows XP sixty four bit, Windows Server
- 14:12Speaker 2: two thousand and three Service Pack one, and Windows Vista.
- 14:15Speaker 2: Microsoft just slam the door shut. They completely blocked user
- 14:19Speaker 2: mode access to the physical memory object for vital security reasons,
- 14:22Speaker 2: which makes sense.
- 14:23Speaker 1: I mean, if DD could easily read the RAM, so
- 14:25Speaker 1: it could a piece of malware looking to steal your
- 14:27Speaker 1: banking passwords exactly.
- 14:29Speaker 2: So it's a legacy concept.
- 14:30Speaker 1: But it is a foundational one. Understanding exactly why DD
- 14:34Speaker 1: worked and the security implications of why it was ultimately
- 14:38Speaker 1: blocked highlights exactly why forensic investigators today have to use
- 14:42Speaker 1: modern commercial kernel level tools.
- 14:45Speaker 2: Right, tools like the Forensic Toolkit often known as FTK,
- 14:48Speaker 2: or specialized utilities like dump it. Those tools had to
- 14:51Speaker 2: evolve to bypass the operating system security roadblocks that stopped
- 14:56Speaker 2: DD in its tracks.
- 14:57Speaker 1: You have to understand the history and the architecture of
- 14:59Speaker 1: the battlefield to truly understand why the modern weapons are
- 15:02Speaker 1: built the way they are.
- 15:04Speaker 2: Spot on.
- 15:04Speaker 1: Okay, so understand the theory, the hardware limitations, and the
- 15:07Speaker 1: history is great, but I want to know what this
- 15:10Speaker 1: actually looks like in practice. Let's walk through a virtual app.
- 15:13Speaker 1: Let's translate this abstract command line interface into a vivid
- 15:17Speaker 1: mental picture of how you would execute this step by
- 15:20Speaker 1: step to perfectly clone a suspect's USB drive.
- 15:23Speaker 2: All right, let's set this in. First, you need to
- 15:25Speaker 2: acquire the tool.
- 15:26Speaker 1: Right, you open a web browser and head to Chrisicom
- 15:28Speaker 1: dot net slash dad. That is the primary trusted site
- 15:32Speaker 1: for the Windows port of this tool. You download the
- 15:35Speaker 1: latest stable version, let's say version zero point five. It's
- 15:38Speaker 1: a tiny zip file. You unzip it, and let's say
- 15:41Speaker 1: you extract the actual dd dot XC file into a
- 15:44Speaker 1: folder called temp on your d drive.
- 15:46Speaker 2: Next, you open the Windows command prompt, you know, the
- 15:48Speaker 2: famous black box with the blinking white cursor. You just
- 15:51Speaker 2: type cmd into your start menu to launch it.
- 15:54Speaker 1: But here is where I always get tripped up. The
- 15:56Speaker 1: command prompt opens and it's pointing at my user folder
- 15:59Speaker 1: on the sea like c colon, backslash users, backslash host.
- 16:04Speaker 1: But we just dumped the tool on the D drive.
- 16:06Speaker 1: How do I force the command prompt to look at
- 16:08Speaker 1: the temp folder?
- 16:09Speaker 2: Ah? So we use the CD command, which stands for
- 16:11Speaker 2: change directory. First, you typed colin and hit enter to
- 16:15Speaker 2: switch the prompts focus to the D drive entirely. Okay,
- 16:18Speaker 2: then you type cd tempt to enter our specific folder.
- 16:21Speaker 2: Now the blinking cursor is sitting right next to your
- 16:23Speaker 2: DD dot x tw ready to execute it.
- 16:25Speaker 1: Perfect. But before we plug our evidence in, we need
- 16:28Speaker 1: to map the system. We need to know what the
- 16:30Speaker 1: computer currently sees so we can spot the difference later.
- 16:33Speaker 1: So you type D D dot XE dash dash list
- 16:37Speaker 1: and head enter.
- 16:38Speaker 2: Right, and the black screen floods with white text. It
- 16:41Speaker 2: lists every piece of storage hardware connected to the motherboard.
- 16:44Speaker 2: You see hidden recovery partitions, unique volume IDs, and the
- 16:48Speaker 2: laudical drive letters assigned to them, like your C drive
- 16:51Speaker 2: and your D drive.
- 16:51Speaker 1: Okay, so now you plug in the suspects the USB
- 16:54Speaker 1: stick you want to clone. You run DD dot xx
- 16:57Speaker 1: dash dash list one more time.
- 16:59Speaker 2: And you scam the text looking for the change. Let's
- 17:01Speaker 2: say a brand new block of text pops up at
- 17:03Speaker 2: the bottom and Windows has assigned this new device the
- 17:06Speaker 2: letter H. Now we know exactly what our input target is.
- 17:09Speaker 2: It's time for the magic incantation, the actual DD command
- 17:13Speaker 2: to create the image hip Kitmy. You type D D
- 17:16Speaker 2: D dot x space if equals backslashbackslash, dot, backslash h colan.
- 17:22Speaker 1: Wait pause, right there, what are those backslashes in the
- 17:24Speaker 1: dot That doesn't look like a normal Windows folder path
- 17:27Speaker 1: at all.
- 17:27Speaker 2: That is a crucial distinction. If you just typed h
- 17:30Speaker 2: colon backslash, you're asking the Windows filesystem to give you
- 17:34Speaker 2: the logical files the word documents in JPEGs. By typing backslash, backslash, dot,
- 17:40Speaker 2: backslash h colon, you are telling DD to bypass the
- 17:44Speaker 2: Windows filesystem entirely and look directly at the raw physical
- 17:48Speaker 2: silicon of device H, which.
- 17:50Speaker 1: Is how we capture the hidden and deleted data. Amazing exactly.
- 17:54Speaker 1: And the adda space and you type of equals d
- 17:56Speaker 1: colon backslash temp backslash sb two dot mmg. That is
- 18:00Speaker 1: our output file. We are explicitly telling DD to create
- 18:03Speaker 1: a brand new file gold ehb two dot mmg right
- 18:06Speaker 1: next to where we are currently working in the tem folder.
- 18:08Speaker 2: But we are not done. Remember the catastrophic USB crash
- 18:12Speaker 2: issue we discussed earlier.
- 18:13Speaker 1: Oh right, the chief controllers, Yes.
- 18:15Speaker 2: We must add a space and type the word size.
- 18:18Speaker 2: This safely interrogates the USB sticks controller chip. So we
- 18:21Speaker 2: don't accidentally read past its physical breaking point.
- 18:23Speaker 1: Got it, And finally you add one more word progress,
- 18:26Speaker 1: You hit.
- 18:27Speaker 2: Enter, and this is what goes to work. I should
- 18:29Speaker 2: point out that the progress parameter is actually a non
- 18:31Speaker 2: standard enhancement specifically added to this Windows version of dd
- 18:35Speaker 2: Oh really yeah, The original Unix version from the seventies
- 18:38Speaker 2: was notoriously terrifyingly silent. You type your command, hit enter,
- 18:43Speaker 2: and just stare at a blank, blinking cursor for three hours,
- 18:47Speaker 2: agonizing over whether it was actually working or if the
- 18:49Speaker 2: system had completely frozen, which is.
- 18:51Speaker 1: A nightmare when you were dealing with critical legal evidence.
- 18:55Speaker 1: The progress command changes the game. It gives you a
- 18:57Speaker 1: visual heartbeat on the screen, updating continue lead to show
- 19:00Speaker 1: you exactly how many blocks have been copied and how
- 19:03Speaker 1: fast data is moving.
- 19:04Speaker 2: And the beautiful thing is that architecture of that command
- 19:07Speaker 2: translates seamlessly to other media. If you wanted to rip
- 19:10Speaker 2: a flawless isoimage from a CD or DVD, the syntax
- 19:14Speaker 2: is almost identical.
- 19:15Speaker 1: Right if your earlier dash dash list command showed your
- 19:18Speaker 1: CD ROM drives assigned the letter E. Your input file
- 19:21Speaker 1: is simply if equals backslash, backslash, dot backslash e colon
- 19:26Speaker 1: your output file is whatever you want to name the
- 19:27Speaker 1: dot ISO.
- 19:28Speaker 2: Though it is worth noting you do not need to
- 19:30Speaker 2: use the size command when ripping an optical CD. Discs
- 19:33Speaker 2: have a hard, clearly defined physical structure and a definitive
- 19:38Speaker 2: endpoint that the hardware can natively understand without needing DD
- 19:41Speaker 2: to pre interrogate the limits.
- 19:43Speaker 1: Makes sense, So the progress bar finally hits one hundred percent,
- 19:46Speaker 1: it finishes, and you have your new dot MMG or
- 19:49Speaker 1: dot isofile sitting there in your temp folder.
- 19:52Speaker 2: This raises an important question, though you run the command,
- 19:55Speaker 2: but how does a forensic investigator actually know the imaging
- 19:59Speaker 2: was successful in a legal environment. You absolutely cannot just
- 20:02Speaker 2: assume it worked because the progress bar finished.
- 20:04Speaker 1: Have you prove it?
- 20:06Speaker 2: The final mandatory verification step in forensic methodology is mathematically
- 20:11Speaker 2: checking the physical size of the newly created image file
- 20:14Speaker 2: against the reported physical capacity of the original hardware drive.
- 20:17Speaker 2: Oh I see yeah. If your original suspect USB stick
- 20:21Speaker 2: was physically capable of holding exactly one billion, twenty four
- 20:24Speaker 2: million bytes, your output image file sitting on your d
- 20:27Speaker 2: drive must be exactly one billion, twenty four million bytes,
- 20:30Speaker 2: not one single byte more, not one single byte less.
- 20:33Speaker 1: And if they match.
- 20:34Speaker 2: If those numbers match perfectly, you know definitively that you
- 20:38Speaker 2: have a flawless one to one physical clone.
- 20:41Speaker 1: So what does this all mean for you listening? It
- 20:44Speaker 1: means that DD is fundamentally architecturally different from right clicking
- 20:48Speaker 1: and copying a folder on your desktop. It does not
- 20:51Speaker 1: care about your vacation photos, your tax documents, or your
- 20:55Speaker 1: neatly organized file systems.
- 20:56Speaker 2: Not at all.
- 20:57Speaker 1: It is entirely blind to the human concept of files.
- 21:01Speaker 1: It only sees raw physical data blocks on a piece
- 21:04Speaker 1: of silicon or spinning metal, and it ruthlessly duplicates them
- 21:08Speaker 1: bit by bit from one location to another. It creates
- 21:11Speaker 1: a flawless, low level clone of a device's entire physical structure.
- 21:15Speaker 2: It is the absolute bedrock of digital evidence preservation because
- 21:19Speaker 2: it operates at that sub file level. It captures everything,
- 21:22Speaker 2: whether the operating system recognizes it or not.
- 21:24Speaker 1: And to reinforce everything we have explored today for our
- 21:27Speaker 1: tech curious listeners out there, let's do a quick review
- 21:30Speaker 1: question based on today's deep dive.
- 21:31Speaker 2: All right, let's hear it.
- 21:32Speaker 1: If you are using DD and you know there is
- 21:34Speaker 1: a physically damaged sector at the very beginning of the drive.
- 21:37Speaker 1: You're trying to read and you need to jump over
- 21:39Speaker 1: a certain amount of data in the input file before
- 21:42Speaker 1: you start copying to avoid that damage. Which command you use?
- 21:46Speaker 1: Skip or seek?
- 21:47Speaker 2: Hmmm? Take a second to think about the mnemonic.
- 21:49Speaker 1: Remember the visual analogy. You are jumping into the data source.
- 21:53Speaker 1: You use a skipping rope. The skip command jumps over
- 21:56Speaker 1: the input file. Seek is strictly for jumping ahead on
- 21:59Speaker 1: the output.
- 22:00Speaker 2: Those differences is all about precision control.
- 22:02Speaker 1: Absolutely. Now I want to leave you with a lingering
- 22:05Speaker 1: mystery to ponder as we wrap up. We just established
- 22:07Speaker 1: that DD creates a bite for bite physical clone of
- 22:10Speaker 1: a drive, capturing every single sector, regardless of whether it
- 22:15Speaker 1: is being actively used by a visible file. So what
- 22:19Speaker 1: happens to all the so called empty space?
- 22:22Speaker 2: That is where the real magic of forensic imaging begins.
- 22:25Speaker 1: Think about all the deleted files you thought were gone forever.
- 22:28Speaker 1: Think about the hidden data fragments lurking in the supposedly
- 22:32Speaker 1: blank empty sectors of that perfectly cloned image. When you
- 22:36Speaker 1: delete a file, Windows usually just removes the invisible pointer.
- 22:41Speaker 1: The actual data itself is still sitting right there on
- 22:44Speaker 1: the physical block and.
- 22:45Speaker 2: DD copies that too.
- 22:46Speaker 1: Exactly, all those ghosts of past activity are sitting right
- 22:50Speaker 1: there in your shiny new image file, just waiting for
- 22:53Speaker 1: an investigator to pull out a hex editor and look
- 22:55Speaker 1: a little closer at the empty spaces between the train cars.
- 22:58Speaker 2: The data rarely just vanished. It simply waits to be
- 23:01Speaker 2: found by someone who knows how to look so true.
- 23:04Speaker 1: Thank you for joining us on this deep dive into
- 23:06Speaker 1: the architecture of the perfect digital clone. Keep exploring, keep questioning,
- 23:10Speaker 1: and we will catch you on the next one.