Documentation & Tools →
Sign In
In this section

Setting Up a macOS Forensics Environment: Host, Case Structure, Toolstack

Module 0

You have the method, the toolstack, and the handling discipline. What is left is the environment that lets you use them: the analysis host, a case structure that keeps evidence straight, and the tools installed and verified. None of it is heavy, but the choices here decide whether your native verification works and whether your evidence stays clean.

Scenario

The NE-VANCE-MBP collection lands in your inbox as a single archive. Before you double-click anything, stop. Open it carelessly on the subject's own machine, or mount it read-write on yours, and you change the very timestamps the case depends on. The half hour you spend now on a clean host, a locked evidence directory, and verified tools is what keeps every finding that follows defensible.

Estimated time: 20 minutes.

Choose an analysis host

A Mac is the ideal analysis host, and the reason traces straight back to 0.3. The native commands that serve as your ground truth, log, codesign, spctl, sfltool, only run on macOS. If your arbiter for a disputed finding is the native tool, you need a Mac to run it on. Analyzing macOS evidence entirely from a Linux box means giving up the one source that settles disagreements.

That does not mean you need a Mac for everything. The cross-platform tools, mac_apt, iLEAPP, and APOLLO among them, are Python and run on Linux or Windows, so you can do broad processing off-Mac and pull the results back. A common setup is a Mac for analysis and native verification, with a separate Linux machine for bulk processing when you have a lot of images to grind through.

If a dedicated Mac is not available, a macOS virtual machine works for analysis and for running the native commands, within the licensing terms for virtualizing macOS. Match the VM's macOS version to the evidence where you can, since 0.5 made the case that the release determines what a parser reads correctly. Most of the toolstack runs the same on Apple Silicon and Intel hosts, so either works as an analysis machine.

You may also have a commercial forensic suite, and several handle macOS images well. Use it where it helps, but do not let it become the only thing between you and the evidence. The reason to build an open-source, native-tool-backed environment is the one from 0.3: you can verify what these tools claim, and when a case turns on a single record you can drop to the native command and confirm it. A suite you cannot question is a liability in the cases that matter most.

Keep the analysis host separate from the machine under investigation. You analyze a copy of the evidence on your own controlled system, not by poking around on the subject Mac beyond the initial live collection. Doing analysis on the machine you are investigating contaminates it, and is one of the fastest ways to make findings indefensible.

Build a case structure

Before you touch evidence, build a directory structure that keeps the original, your working copies, and your output separate. The discipline from 0.5 depends on it: you never analyze the original, so the layout has to make the original obvious and hard to touch by accident.

# Build the case tree; keep the original apart from anything you touch
% mkdir -p ~/cases/NE-VANCE-MBP/{evidence,working,output,notes}
% chmod -R a-w ~/cases/NE-VANCE-MBP/evidence   # lock the original read-only
% ls ~/cases/NE-VANCE-MBP
evidence	notes	output	working

The notes directory is where the contemporaneous record from 0.5 lives. Keep your command log and chain of custody there from the first action, not as something you write up at the end. A case folder that shows the original locked down, the working copies separate, and a running log of what you did is itself part of what makes the work defensible.

When you mount an image or open a collection, you do it from the working copy and read-only. macOS will touch a volume the moment it mounts, updating access times and writing metadata, so a read-only working copy keeps that activity off anything you will later cite. The original stays locked in the evidence directory the whole time, its intake hash intact.

Install and verify the native toolchain

The native tools ship with macOS, so on a Mac there is nothing to install. What you do instead is confirm they are present and on your path, which on a Mac they will be, and on a non-Mac host they will not, a quick reminder of why the analysis host matters.

# Confirm the native ground-truth tools are present and on PATH
% for t in log plutil mdls mdfind codesign spctl sfltool; do command -v "$t"; done
/usr/bin/log
/usr/bin/plutil
/usr/bin/mdls
/usr/bin/mdfind
/usr/bin/codesign
/usr/sbin/spctl
/usr/bin/sfltool
# Record the OS build you are analyzing; the version decides how artifacts parse
% sw_vers
ProductName:    macOS
ProductVersion: 26.0.1
BuildVersion:   25A362

Running sw_vers on the analysis host, and reading the build from the evidence itself once you are into the case, is the version check 0.2 and 0.5 both insisted on. Note it in your case notes at the start, because every version-sensitive call you make later refers back to it.

Each of those native tools earns its place in a later module. log reads Unified Logging, plutil opens the property lists that hold configuration and persistence, mdls and mdfind query Spotlight metadata including where a file came from, codesign and spctl answer whether the system trusted a binary, and sfltool dumps the Background Task Management database. Confirming they are present now means the tools you will lean on are ready when a module reaches for them.

Install the analysis tools

The Python tools install into a virtual environment so their dependencies do not collide with each other or with the system Python. Create the environment once per case or once per workstation, then add each tool. The exact repository sources are listed in the References module, so you are installing from the authoritative location rather than a copy of unknown provenance.

# Isolate tool dependencies in a virtual environment
% python3 -m venv ~/macforensics/venv
% source ~/macforensics/venv/bin/activate
# Clone each tool from its project repo (URLs in the References module), then install
% git clone <project-repo> ~/macforensics/mac_apt
% pip install -r ~/macforensics/mac_apt/requirements.txt

Pin the tool versions you used in your case notes. Reproducibility is part of defensibility: if a finding has to be re-checked months later, the reviewer needs to run the same tool version against the same evidence and get the same result. A finding produced by a tool version you cannot identify is harder to stand behind than one you can reproduce on demand.

Tools that parse a moving target need updating. Apple changes formats yearly and the open-source projects chase those changes, so a parser that was current last year may need a pull before it reads a Tahoe store correctly. Update before a case, not during one, and record the version you ran. This is the practical face of the version discipline from 0.2 and 0.5: a tool is only as current as its last update against the release you are examining.

Keep the evidence clean

The setup is only useful if it protects the evidence. The rule is simple and absolute: hash the original on intake, lock it read-only, and do all analysis on copies. Anything that mounts or parses evidence works against the working copy, never the original, so that the hash you recorded at intake still matches at the end.

This is not bureaucracy. The single most common way a junior examiner damages a case is analyzing the original directly, mounting it read-write, and changing the very timestamps the investigation depends on. The structure here makes that mistake hard to commit: if the only writable thing in your case folder is a copy, you cannot accidentally alter the evidence that has to hold up.

✓ Verify

Run: shasum -a 256 evidence/collection.zip

Expected: the hash matches the value you recorded at intake, before and after every analysis session.

If not: the original was modified. Stop, determine what touched it, and fall back to a fresh copy from the locked intake. A mismatch on the original is a custody failure you must resolve before any finding stands.

With the host chosen, the case structure built, the tools installed and verified, and the evidence locked and hashed, you are ready to work real macOS evidence, with the handling discipline from 0.5 running underneath everything you do.

Next: the module summary consolidates Module 0, and then Module 1 begins the investigation proper with the macOS security model and the threat landscape it is built against.