Detection Packs

Use Packs to group detections and enable updates via the Panther Console

Overview

Detection Packs (also called, simply, Packs) are used to logically group Panther-managed detections, as well as enable detection updates in the Panther Console. Packs are defined in the panther-labs/panther-analysis open-source repository.

A single Pack can group any number of Detections, Queries, Global Helpers, Data Models, and Lookup Tables. Panther Universal Detections, for example, groups all rules that rely on Data Models and all of their dependencies.

Detection Packs are versioned, and Panther periodically releases new versions with updates to core detection logic for the detections contained within. When an update for a Pack is available, an UPDATE AVAILABLE label will be displayed on the Pack's tile on the Pack list page in your Panther Console (under Build > Packs).

Detections that are part of an enabled Detection Pack will be labeled as MANAGED, and detections that are not part of a Detection Pack will be labeled as UNMANAGED.

Note: Managing Detections via the Panther Console is not recommended if you are already using a Git-Based workflow to manage and upload detections with Panther Analysis Tool. Managing detections via both methods simultaneously may result in unexpected behavior.

You can use the Developer Workflow setting to disable the ability to turn on packs in the UI.

Panther-managed Detection Packs

Panther provides several Detection Packs by default. There are Packs that group all of the Panther-managed detections related to a particular log source, as well as Detection Packs that are grouped on a particular focus (e.g., generic rules that leverage unified data models or a core set of detections for AWS.) Some popular examples include:

Display Name

Description

This pack groups the standard rules that leverage unified data models

Group of the most critical and high value detections pertinent to the AWS environment

Group of all Panther created detections for Okta

How to use Detection Packs

Viewing Detection Packs

You can view a list of Panther-provided Detection Packs in your Panther Console under Build > Packs.

Click on a Pack to view its details, including a description, the enabled status, the currently enabled version, and which detections are in the pack.

Enabling and disabling Detection Packs

Packs can be enabled or disabled in your Panther Console. When you enable a Pack, each of the detections contained in that Pack is enabled. You can disable one or more detections within an enabled Pack (on a one-by-one basis) without having to disable the entire Pack.

If a Pack is disabled, but detections contained within it are enabled, those detections will function normally (i.e., they will not be affected by their Pack being disabled).

When you update a Pack that has disabled detections, the detections will be updated but they will remain disabled.

To enable or disable a Pack:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Locate the Pack you want to enable or disable.

  3. On the right-hand side of that Pack's tile, toggle the Enabled slider on or off.

The Enabled slider also appears on Pack detail pages:

Update or roll back Detection Pack

New updates to Detection Packs are periodically released to the panther-analysis repository. These updates are automatically detected by Panther, and the pack overview page will show an Update Available flag next to relevant packs.

To update pack detections:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Locate the Pack you want to update.

  3. Within the Pack's tile, in the Version dropdown, select a version number.

  4. Click Update Pack.

To revert to a previous Pack version:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Locate the Pack you want to revert.

  3. Within the Pack's tile, in the Version dropdown, select a version number.

  4. Click Revert Pack.

Managing Detections with Packs

Editing Managed Detections

After a Pack has been enabled, there are a subset of fields that you can manually edit in the Panther Console:

  • Enabled / Disabled

  • Severity

  • Deduplication Period

  • Events Threshold

  • Destination Overrides

  • Runbook

Any changes made to these fields in the Panther Console will be preserved when the pack is updated or reverted to a different version. All other fields will be greyed out in the Panther Console, and the "Functions and Tests" editor will be read-only.

Note: For enabled Packs, the above fields can only be edited manually in the Panther Console. Editing these fields in the Detection .yml files will not override these values.

You can make changes to the editable fields in the Panther Console:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Click the name of the Pack that contains the detection you want to edit, then click the name of the detection.

  3. Make any desired changes to the detection.

    • Fields that are not editable will be greyed out.

  4. Click Update in the upper right corner of the page to save your changes.

Cloning and editing a managed detection

If a rule or policy included in a Detection Pack does not fit your needs, you can clone it and then customize the cloned copy:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Click the name Pack that contains the detection you want to edit, then click the name of the detection.

  3. Follow the How to clone a Panther-managed detection instructions on Using Panther-managed Detections.

Pack Sources (Legacy)

Custom Pack Sources is a legacy feature that is no longer supported for new customers. If you wish to use custom detections created and edited outside of the Panther Console, see the Panther Developer Workflows Overview to understand supported workflows.

Pack Sources provide a way to configure custom GitHub sources for Detection Packs. Once a Pack Source is configured, Panther will check the source repository for new tagged releases every 24 hours. In order for Panther to find your custom Pack(s) from your Pack Source, you must:

  • Ensure that your release is finalized, and not in a draft state

  • Ensure that your release is named according to SemVer format, and the tag of the release must be the same as the name of the release

  • Ensure that the artifact of the release is named panther-analysis-all.zip (and a corresponding panther-analysis-all.sig if you are signing your release)

  • Ensure that your panther-analysis-all.zip contains at least one Pack Manifest file (see section on Pack manifests below for more information)

You can use the panther_analysis_tool (PAT) to generate the required release assets, as well as publish a draft release (see Creating a GitHub Release - Panther Analysis Tool for additional details.) You can manage custom packs using the same functionality as Panther-provided packs.

Pack source fields are described in the following table.

Field Name

Required

Description

Expected Value

Owner

Yes

The owner/organization of the target repository

String

Repository

Yes

The name of the repository

String

kmsKey

No

The ARN for a sign/verify kms key to validate release signatures

String

AccessToken

No

Personal Access Token used to access a private repository

String

Pack manifests

Packs are defined by creating Pack manifest YAML files, which contain metadata about your Pack (such as its name, description, and the detections/files that are included in your Pack).

Your panther-analysis-all.zip release artifact can contain many different Pack manifests along with other files from your repository such as detections, global helpers, data models, etc. If you add your GitHub repository as a Pack Source in the Panther Console, then each of these Pack manifest files will show up as a Pack in the Panther Console that can be separately enabled/disabled.

The following table is a reference of the different keys that are valid in your Pack manifest. You can find additional examples of the Pack Manifests that Panther uses in our Panther-provided Packs on Github.

Field NameRequiredDescriptionExpected Value

AnalysisType

true

Indicates the analysis type this file is

pack

PackID

true

The unique ID of this pack

String

Description

false

Extra information about this Pack that will be displayed in the Panther Console

String

PackDefinition

true

A mapping with a single field called IDs which is a list of strings. Each string in the IDs list should be a unique ID of a file that is included in this Pack

{ IDs: [string] }

DisplayName

true

The user-friendly title that will be displayed for this Pack in the Panther Console

String

Accessing private repositories

In order for Panther to have access to poll a private repository, you must configure the Pack Source with a personal access token. See the GitHub documentation for further details on creating a token.

A personal access token will grant access to all the repositories where the account owner has access. We recommend creating a "machine user" that you can add as an outside collaborator to the repository containing the detection packs. This way, the access token can be scoped for a particular use and repository.

Release signatures

Panther-managed Packs are signed using an asymmetric AWS KMS key. Prior to importing any detections from the Panther pack source, it will validate the signature using the release asset panther-analysis.sig. This ensures that any detections being imported have not been tampered or modified. If you would like to use similar functionality, create a sign/verify KMS key and modify the policy to allow Panther to run kms:Verify using that key.

In this example entry to add to the key policy, the account ID should be replaced with the account ID where Panther is running:

{
    "Sid": "Enable KMS Verify",
    "Effect": "Allow",
    "Principal": {
        "AWS": "arn:aws:iam::{accountid}:root"
    },
    "Action": "kms:Verify",
    "Resource": "*"
}

Managing Pack Sources

To add a pack source:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Click the Detection Pack Sources tab.

  3. Click Create New in the upper right.

    • Enter the field names for each input field.

  4. Click Save.

To modify the kmsKey or AccessToken fields for a pack source:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Click the Detection Pack Sources tab.

  3. Click ... next to a Pack Source then click Edit. Click on a Pack Source.

    • Edit the fields on this page.

  4. Click Save.

To delete a pack source:

  1. In the left-hand navigation bar of your Panther Console, click Build > Packs.

  2. Click the Detection Pack Sources tab.

  3. Click ... next to a Pack Source then click Delete.

Deleting a Pack Source will delete the packs originating from it, along with all of the detections in it.

Creating a GitHub release - Panther Analysis Tool

The panther_analysis_tool (PAT) can streamline the process of creating an appropriate Github release, with or without an associated signature file.

To generate the release assets, use the release command.

% panther_analysis_tool release --help
usage: panther_analysis_tool release [-h] [--aws-profile AWS_PROFILE]
                                     [--filter KEY=VALUE [KEY=VALUE ...]]
                                     [--kms-key KMS_KEY]
                                     [--minimum-tests MINIMUM_TESTS]
                                     [--out OUT] [--path PATH] [--skip-tests]

optional arguments:
  -h, --help            show this help message and exit
  --aws-profile AWS_PROFILE
                        The AWS profile to use when updating the AWS Panther
                        deployment.
  --filter KEY=VALUE [KEY=VALUE ...]
  --kms-key KMS_KEY     The key id to use to sign the release asset.
  --minimum-tests MINIMUM_TESTS
                        The minimum number of tests in order for a detection
                        to be considered passing. If a number greater than 1
                        is specified, at least one True and one False test is
                        required.
  --out OUT             The path to store output files.
  --path PATH           The relative path to Panther policies and rules.
  --skip-tests

To automatically create a draft release in your Github repository, first set the GITHUB_TOKEN environment variable to a personal access token with appropriate permissions to access the target repository. Then, use the publish command.

Note: Using the panther_analysis_tool publish command creates a draft release. Before Panther is able to pull in this release artifact, you must go to your Github repository and manually finalize the draft into a release.

% panther_analysis_tool publish --help
usage: panther_analysis_tool publish [-h] [--body BODY]
                                     [--github-branch GITHUB_BRANCH]
                                     [--github-owner GITHUB_OWNER]
                                     [--github-repository GITHUB_REPOSITORY]
                                     --github-tag GITHUB_TAG
                                     [--aws-profile AWS_PROFILE]
                                     [--filter KEY=VALUE [KEY=VALUE ...]]
                                     [--kms-key KMS_KEY]
                                     [--minimum-tests MINIMUM_TESTS]
                                     [--out OUT] [--skip-tests]

optional arguments:
  -h, --help            show this help message and exit
  --body BODY           The text body for the release
  --github-branch GITHUB_BRANCH
                        The branch to base the release on
  --github-owner GITHUB_OWNER
                        The github owner of the repsitory
  --github-repository GITHUB_REPOSITORY
                        The github repsitory name
  --github-tag GITHUB_TAG
                        The tag name for this release
  --aws-profile AWS_PROFILE
                        The AWS profile to use when updating the AWS Panther
                        deployment.
  --filter KEY=VALUE [KEY=VALUE ...]
  --kms-key KMS_KEY     The key id to use to sign the release asset.
  --minimum-tests MINIMUM_TESTS
                        The minimum number of tests in order for a detection
                        to be considered passing. If a number greater than 1
                        is specified, at least one True and one False test is
                        required.
  --out OUT             The path to store output files.
  --skip-tests

The kms-key argument is an optional argument that you can use to generate a signature file. If you want to use this argument, be sure to run panther_analysis_tool using the appropriate aws credentials to call kms:Sign on the specified key.

Last updated

#1924: [don't merge until ~Oct] Notion Logs (Beta)

Change request updated