Updating Apfell

How to update Apfell to a new version

There are two scenarios to updating Apfell: updates within the minor version and updates to the minor or major version.

Updating within the minor version

This is when you're on version 1.2 for example and want to pull in new updates (but not a new minor version like 1.3 or 1.4). In this case, the database schema should not have changed.

  1. Pull in the latest code for your version (if you're still on the current version, this should be as easy as a git pull)

  2. Restart Apfell to pull in the latest code changes into the docker containers with sudo ./start_apfell.sh

Updating minor or major versions

This is when you're on version 1.2 for example and want to upgrade to version 1.3 or 2.1 for example. In this case, the database schema has changed. In order to upgrade, you'll end up losing all of the information in your database, so make sure you export any payload types, browser scripts, command or create transform modifications, and c2 profiles before continuing! Also make sure you export any artifacts or reports you need up to this point.

  1. Stop Apfell, then reset the database with sudo ./reset_postgres_database.sh

  2. Pull in the version you want to upgrade to (if you're wanting to upgrade to the latest, it's as easy as git pull)

  3. Restart Apfell to pull in the latest code changes into the docker containers with sudo ./start_apfell.sh

A note about updating

Always make sure that you check your apfell-docker/app/__init__.py file before starting Apfell again to make sure you didn't overwrite any changes you made (such as ssl keys, whitelisted IP addresses, etc)