Book Image

Python Digital Forensics Cookbook

By : Chapin Bryce, Preston Miller
Book Image

Python Digital Forensics Cookbook

By: Chapin Bryce, Preston Miller

Overview of this book

Technology plays an increasingly large role in our daily lives and shows no sign of stopping. Now, more than ever, it is paramount that an investigator develops programming expertise to deal with increasingly large datasets. By leveraging the Python recipes explored throughout this book, we make the complex simple, quickly extracting relevant information from large datasets. You will explore, develop, and deploy Python code and libraries to provide meaningful results that can be immediately applied to your investigations. Throughout the Python Digital Forensics Cookbook, recipes include topics such as working with forensic evidence containers, parsing mobile and desktop operating system artifacts, extracting embedded metadata from documents and executables, and identifying indicators of compromise. You will also learn to integrate scripts with Application Program Interfaces (APIs) such as VirusTotal and PassiveTotal, and tools such as Axiom, Cellebrite, and EnCase. By the end of the book, you will have a sound understanding of Python and how you can use it to process artifacts in your investigations.
Table of Contents (11 chapters)

Opening acquisitions

Recipe Difficulty: Medium

Python Version: 2.7

Operating System: Linux

With pyewf and pytsk3 comes a whole new set of tools and operations we must first learn. In this recipe, we will start with the basics: opening an evidence container. This recipe supports raw and E01 images. Note that unlike our previous scripts, these recipes will use Python 2.X due to some bugs found while working with the Python 3.X version of these libraries. That said, the main logic would not differ between the two versions and could easily be ported. Before we learn to open the container, we need to set up our environment. We will explore this in the next section.

Getting started

Excluding a few scripts, we have been OS agnostic...