Searching for hashes
Recipe Difficulty: Hard
Python Version: 2.7
Operating System: Linux
In this recipe, we create another triage script, this time focused on identifying files matching provided hash values. This script takes a text file containing MD5
, SHA-1
, or SHA-256
hashes, separated by a newline, and searches for those hashes within the evidence container. With this recipe, we will be able to quickly process evidence files, locate files of interest, and alert the user by printing the file path to the console.
Getting started
Refer to the Getting started section in the Opening Acquisitions recipe for information on the build
environment and setup details for pytsk3
and pyewf
. All other libraries used in this script are present in Python's standard library.
How to do it...
We use the following methodology to accomplish our objective:
- Identify if the evidence container is a
raw
image or anE01
container. - Access the image using
pytsk3
. - Recurse through all directories in each partition.
- Send each...