• Stars
    star
    459
  • Rank 94,776 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Aftermath is a free macOS IR framework

  

About

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 -o or --output option, or by default, it is written to the /tmp directory.

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.

Build

To build Aftermath locally, clone it from the repository

git clone https://github.com/jamf/aftermath.git

cd into the Aftermath directory

cd <path_to_aftermath_directory>

Build using Xcode

xcodebuild -scheme "aftermath"

cd into the Release folder

cd build/Release

Run aftermath

sudo ./aftermath

Usage

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

sudo ./aftermath

To specify certain options

sudo ./aftermath [option1] [option2]

Examples

sudo ./aftermath -o /Users/user/Desktop --deep
sudo ./aftermath --analyze <path_to_collection_zip>

External Unified Log Predicates

As of v1.2.0, users have the ability to pass Aftermath a text file of unified log predicates using the --logs or -l arguments. The file being passed to Aftermath is required to be a text file and each predicate needs to be newline-separated. In addition, each line item will be a dictionary object. The key in the dictionary will whatever the user desires to call this predicate. For example, if you want to see all login events, we will create a predicate and title it login_events.

login_events: processImagePath contains "loginwindow" and eventMessage contains "com.apple.sessionDidLogin
tcc: process == "tccd"

Releases

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]

Uninstall

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.

Help Menu

--analyze -> analyze the results of the Aftermath results
     usage: --analyze <path_to_aftermath_collection_file>
--collect-dirs -> specify locations of (space-separated) directories to dump those raw files
    usage: --collect-dirs <path_to_dir> <path_to_another_dir>
--deep or -d -> perform a deep scan of the file system for modified and accessed timestamped metadata
    WARNING: This will be a time-intensive, memory-consuming scan.
--logs -> specify an external text file with unified log predicates (as dictionary objects) to parse
    usage: --logs /Users/<USER>/Desktop/myPredicates.txt
-o or --output -> specify an output location for Aftermath collection results (defaults to /tmp)
     usage: -o Users/user/Desktop
--pretty -> colorize Terminal output
--cleanup -> remove Aftermath folders from default locations ("/tmp", "/var/folders/zz/) 

Contributors

  • Stuart Ashenbrenner
  • Jaron Bradley
  • Maggie Zirnhelt
  • Matt Benyo
  • Ferdous Saljooki

Thank You

This project leverages the open source TrueTree project, written and licensed by Jaron Bradley.

More Repositories

1

PPPC-Utility

Privacy Preferences Policy Control (PPPC) Utility
Swift
732
star
2

CVE-2020-0796-RCE-POC

CVE-2020-0796 Remote Code Execution POC
Python
520
star
3

DEPNotify-Starter

Bash script to start DEPNotify and run policies during enrollment with Jamf Pro
Shell
363
star
4

NetSUS

NetBoot and Software Update Server
PHP
305
star
5

MakeMeAnAdmin

Provides temporary admin access for a standard user via Jamf Self Service
Shell
254
star
6

CVE-2020-0796-LPE-POC

CVE-2020-0796 Local Privilege Escalation POC
Python
243
star
7

FreeTheSandbox_LPE_POC_13.7

Jailbreak for iOS 13.7 and earlier
C
223
star
8

Jamf-Nation-Scripts

Scripts Migrated from Jamf Nation
Shell
183
star
9

jamfprotect

A repository for open-source resources created for use with or alongside Jamf Protect.
Shell
176
star
10

CVE-2020-1206-POC

CVE-2020-1206 Uninitialized Kernel Memory Read POC
C#
146
star
11

FileVault2_Scripts

Scripts and Extension Attributes for use with FileVault 2 on Mountain Lion
Shell
145
star
12

JamfMigrator

A tool to migrate data granularly between Jamf Pro servers
Swift
137
star
13

mut

Swift
133
star
14

JAWA

Jamf Automation and Webhook Assistant
HTML
128
star
15

CIS-for-macOS-Catalina-CP

CIS Benchmarks for macOS Catalina
Shell
122
star
16

Notifier

Swift project which can post macOS alert or banner notifications on 10.15+ clients
Swift
118
star
17

zecops_public

Objective-C
114
star
18

API_Scripts

Scripts that make use of the JAMF Software Server API
Shell
114
star
19

Jamf-Nation-Extension-Attributes

Shell
112
star
20

JamfPrivacyPreferencePolicyControlProfiles

Shell
109
star
21

CIS-for-macOS-Sierra

Shell
105
star
22

ReEnroller

Migrate macOS devices from one Jamf Server to another.
Swift
101
star
23

jamJAR

jamJAR: Jamf, AutoPKG & Munki combined by dataJAR
Python
99
star
24

jamfStatus

Menu app to monitor JamfCloud status
Swift
98
star
25

Jamf-Environment-Test

Admin Utility for testing an environments network for success with Apple Devices
Shell
96
star
26

jamfconnect

A repository for Jamf Connect scripts, configuration profile templates,EAs and more!
Shell
88
star
27

jamfpro

JamfPro Docker image
Shell
70
star
28

regatta

Regatta is a distributed key-value store. It is Kubernetes friendly with emphasis on high read throughput and low operational cost.
Go
64
star
29

NoMAD-2

A complete ground-up rewrite of NoMAD utilizing the same AD Auth Framework found in NoMAD Login.
Swift
63
star
30

NoMADLogin-AD

Login to an AD user account without binding your Mac to AD.
Swift
50
star
31

SMBGhost-SMBleed-scanner

SMBGhost (CVE-2020-0796) and SMBleed (CVE-2020-1206) Scanner
Python
47
star
32

DEPNotify

Swift
43
star
33

2016_JNUC_Security_Reporting_Compliance

Repo for code used in all presentation slides from the 2016 JNUC Presentation "Digging into Security, Compliance, and Reporting"
Shell
42
star
34

Provisioning-Workflows

Provisioning Workflows for a Post-Imaging World
Shell
41
star
35

Classic-API-Postman-Collection

41
star
36

CIS-for-macOS-High-Sierra-CP

Shell
40
star
37

JamfSync

Jamf Sync utility for synchronizing between Jamf Pro distribution points and/or file folders
Swift
38
star
38

ManagedAppConfigLib

Makes Managed AppConfig on iOS, tvOS, and macOS easier to work with.
Swift
36
star
39

jamf-laps-public

A GUI app for retrieving Jamf Pro LAPS ("Local Administrator Password Solution") credentials
Swift
36
star
40

Jamf-Connect-Resources

A repository for Jamf Connect scripts, configuration profile templates, and legacy content.
Shell
36
star
41

NoMAD

Get all of AD, with none of the bind!
Swift
30
star
42

JamfProvisioner

An Automated Erase/Install Workflow for macOS and Jamf Pro
Shell
30
star
43

powerbi

Jamf PowerBi Integration
28
star
44

jamf-printer-manager

macOS app to upload printer configurations to Jamf Pro
Swift
28
star
45

Subprocess

Swift library for macOS providing interfaces for both synchronous and asynchronous process execution
Swift
27
star
46

CIS-for-macOS-Sierra-CP

CIS for macOS 10.12 remediated with script and configuration profiles
Shell
26
star
47

Mac-Asset-Tag

A script that generates a GUI to accept a user input asset tag for the Mac.
Python
26
star
48

ol

Misc Jamf-related Projects
PowerShell
25
star
49

Scripting-101-Webinar

Resources for the "Scripting 101 for Apple Admins" webinar - June 2019
Shell
25
star
50

AppConfig-Generator

Java
24
star
51

Jamf-Pro-Object-LookUp

Script to query Jamf Pro and find what an Object is associated with
Shell
23
star
52

STIG-macOS-10_14

STIG for macOS Mojave - audit and remediation with scripts and Configuration Profiles
Shell
20
star
53

Munki-Catalog-Browser

Munki Catalog Browser is an app which allows for easy browsing of items in your devices Munki catalogs as well as exporting to CSV
Swift
20
star
54

homebrew-tap

Ruby
19
star
55

CIS-for-macOS-High-Sierra

Shell
17
star
56

JamfConnectUninstall

Shell
16
star
57

NoMAD-ADAuth

Swift
14
star
58

CertificateSDK

Get Certificates From Jamf Pro Into Your iOS Apps
Objective-C
13
star
59

Jamf-Switcher

Jamf Switcher is an app which points either Jamf Pro applications or your browser to a particular Jamf deployment and is configured by Self Service Bookmarks
Swift
13
star
60

jamf_connectwise

An integration between Connectwise and Jamf Pro
Python
12
star
61

SmashingJamfProDashboards

Example jobs, dashboard and YAML file for use with Jamf Pro and Smashing
Ruby
11
star
62

AppConfigSpecCreator

Tool for Generation of Managed App Config Spec Files
JavaScript
10
star
63

authchanger

Utility for making changes to the macOS authorization database to easily allow for changing loginwindow mechanisms.
Swift
9
star
64

rendr

A project scaffolding tool
Rust
8
star
65

Jamf-Connect-Configurations-Templates

8
star
66

JSS-LDAP-Sync

Sync department and building objects in the JSS with LDAP records
PowerShell
7
star
67

TableauIntegrations

JavaScript
7
star
68

groupsync

Sync LDAP groups with GitHub teams (and possibly more in the future).
Go
7
star
69

JamfSupport

Shell
7
star
70

Classic-API-Swagger-Specification

7
star
71

JamfProtect-PPPC-Profile

A PPPC configuration profile to allow full disk and accessibility permissions for computers with the Jamf Protect agent.
6
star
72

anti-phishing-extension

Augment the web with indicators that help detect phishing attempts
JavaScript
6
star
73

regatta-go

Regatta client for Go language
Go
5
star
74

JamfProFlow

Database application for managing configuration sets and change-managed workflows in Jamf Pro
Roff
5
star
75

SplunkBase

Jamf's Published Splunk Base Integration
Python
5
star
76

GDPRAutomationTool

Python
5
star
77

kinobi-title-editor

Shell
4
star
78

Haversack

A Swift library for keychain access on Apple devices
Swift
4
star
79

gitlab_license_exporter

Gitlab License Information exporter
Go
3
star
80

testrail-reporting

Easily send results of your tests to Test Rail.
Groovy
3
star
81

TELUGU_CVE-2018-4124_POC

Objective-C
3
star
82

billboard

Swift
2
star
83

regatta-helm

Helm Chart for the distributed key-value store Regatta.
Smarty
2
star
84

JamfProFlow-Sets

Configs for Jamf Pro
2
star
85

RADAR_API_Postman_Collection

2
star
86

kyverno-test-util

Python
2
star
87

homebrew-internal-tap

Homebrew Internal Tap
Ruby
1
star
88

rendr-sample-blueprint-go-microservice

Shell
1
star
89

aurorasnapshot

Aurora Cluster snapshot handler (Allows to create and delete Aurora DB Snapshots based in tags)
Python
1
star
90

regatta-java

This repository hosts the code of Regatta client for JVM languages.
Java
1
star
91

ms-security-copilot-plugin

Basic Jamf Pro OpenAPI spec for use with Microsoft Security CoPilot plugin
1
star