Aftermath is a Swift-based, open-source incident response framework.
Aftermath can be leveraged by defenders in order to collect and subsequently analyze the data from the compromised host. Aftermath can be deployed from an MDM (ideally), but it can also run independently from the infected user’s command line.
Aftermath first runs a series of modules for collection. The output of this will either be written to the location of your choice, via the
--output option, or by default, it is written to the
Once collection is complete, the final zip/archive file can be pulled from the end user’s disk. This file can then be analyzed using the
--analyze argument pointed at the archive file. The results of this will be written to the
/tmp directory. The administrator can then unzip that analysis directory and see a parsed view of the locally collected databases, a timeline of files with the file creation, last accessed, and last modified dates (if they’re available), and a storyline which includes the file metadata, database changes, and browser information to potentially track down the infection vector.
To build Aftermath locally, clone it from the repository
git clone https://github.com/jamf/aftermath.git
cd into the Aftermath directory
Build using Xcode
cd into the Release folder
Aftermath needs to be root, as well as have full disk access (FDA) in order to run. FDA can be granted to the Terminal application in which it is running.
The default usage of Aftermath runs
To specify certain options
sudo ./aftermath [option1] [option2]
sudo ./aftermath -o /Users/user/Desktop --deep
sudo ./aftermath --analyze <path_to_collection_zip>
There is an Aftermath.pkg available under Releases. This pkg is signed and notarized. It will install the aftermath binary at
/usr/local/bin/. This would be the ideal way to deploy via MDM. Since this is installed in
bin, you can then run aftermath like
sudo aftermath [option1] [option2]
To uninstall the aftermath binary, run the
AftermathUninstaller.pkg from the Releases. This will uninstall the binary and also run
aftermath --cleanup to remove aftermath directories. If any aftermath directories reside elsewhere, from using the
--output command, it is the responsibility of the user/admin to remove said directories.