CHFI Computer Forensics Fundamentals and Process Practice Question
During a forensic examination, an analyst uses the command 'dcfldd if=/dev/sda of=image.dd hash=sha256 hashlog=hash.txt'. What is the primary purpose of including 'hash=sha256' in this command?
⚠ Common exam trap
Many candidates confuse hashing with encryption or compression, assuming that `hash=sha256` might secure or shrink the output, when in fact it only generates a fixed-length digest for integrity verification.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
To compute a SHA-256 hash of the input drive and log it to a file for integrity verification
The `hash=sha256` parameter in `dcfldd` instructs the tool to compute a SHA-256 hash of the input device (`/dev/sda`) during the acquisition process. This hash is then logged to the file specified by `hashlog=hash.txt`, providing a verifiable integrity check that the forensic image matches the original source. This is a standard forensic practice to ensure the image has not been altered or corrupted.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
To split the image into multiple files named with SHA-256 checksums
Why it's wrong here
dcfldd's `hash=sha256` parameter computes and logs a cryptographic message digest of the raw data stream as it is copied; it does not alter the output file. Splitting an image into multiple segments is handled by the `split=` and `splitformat=` parameters, so this option confuses hash generation with file segmentation. No per-segment SHA-256 filenames are produced by the `hash` directive.
- ✓
To compute a SHA-256 hash of the input drive and log it to a file for integrity verification
Why this is correct
dcfldd computes a SHA-256 hash of the acquired data stream in real time while performing the forensic bit-for-bit image copy, and the `hashlog=` option records that digest to a text file for later verification. This is an integrity control that proves the image matches the source drive at the moment of acquisition. Once the hash is recorded, an examiner can rerun SHA-256 on the image file and compare the outputs to ensure the exhibit has not been modified, which is a core requirement in forensic soundness.
- ✗
To encrypt the output image file using SHA-256
Why it's wrong here
SHA-256 is a one-way cryptographic hash function, not an encryption algorithm, so it cannot be used to encrypt an image or render data confidential. Encrypting an output image would require a symmetric cipher such as AES or a tool like `openssl enc`; the `hash=sha256` option in dcfldd only generates a fixed-size digest for integrity checking. Confusing hashing with encryption is a common error because both are cryptographic operations, but hashing is non-reversible and does not protect the contents from being read.
- ✗
To compress the image using SHA-256 compression algorithm
Why it's wrong here
SHA-256 is not a compression algorithm and performs no reduction in data size; it produces a fixed 256-bit digest regardless of input length. Compression algorithms like gzip or lzma work by finding redundancies in the data stream and encoding them more compactly, which SHA-256 does not do. Using `hash=sha256` in dcfldd simply computes an integrity value, leaving the output image as a full, uncompressed bit-for-bit copy of the original drive.
Go deeper
Related to this question
Learn chapter
Overview of Computer Forensics and Investigation Process
Key term
EnCase Forensic
EnCase Forensic is a digital forensics software suite used by investigators to acquire, analyze, and report on data from computers and mobile devices in a legally admissible way.
Key term
Evidence Admissibility
Evidence admissibility is the legal and technical standard that determines whether digital evidence can be used in a court of law.
About these practice questions
This CHFI question is part of Courseiva's 205-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CHFI practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CHFI exam.