Detections
Use detections to analyze data and trigger alerts on suspicious behavior
Overview
Detections are segments of logic run over real-time or historical log events, to identify suspicious behavior and generate signals, and optionally alerts. Your team can leverage detections-as-code by creating detections in Python, or use Panther's Simple Detections features to collaborate on detection creation and management, no matter your level of technical expertise.
There are four types of detections:
Rules: Detect suspicious activity in security logs in real-time.
In the Console, rules can be created by using the Simple Detection builder, or by writing Python.
In the CLI workflow, rules can be written in Simple Detections YAML or Python.
For more information, see Rules and Scheduled Rules.
Scheduled Rules: Run against results from scheduled queries on your data lake.
In the Console, scheduled rules can be created by writing Python.
In the CLI workflow, scheduled rules can be created by writing Python.
For more information, see Rules and Scheduled Rules.
Correlation rules: Detect when a group or sequence of events has occurred.
In the Console, correlation rules can be created by writing YAML.
In the CLI workflow, correlation rules can be created by writing YAML.
For more information, see Correlation Rules.
Policies: Scan and evaluate cloud infrastructure configurations to identify misconfigurations.
In the Console, policies can be created by writing Python.
In the CLI workflow, policies can be created by writing Python.
For more information, see Policies.
When there's a match on a rule, scheduled rule, or correlation rule, a signal is created—and, if alerting is enabled, a rule match. Policies, on each match, generate a compliance failure.
Rule matches can trigger alerts according to the detection's event threshold and deduplication configurations. Alerts are then routed to destinations based on configurations on the detection and destination. Learn more about the difference between signals, rule matches, and alerts below.
You'll need to decide whether you'd like to manage your detections in the Panther Console or using the CLI workflow. Then you can get started enabling Panther-managed detections, or writing your own.
Getting started with detections
Choose a detection management workflow
You can create and manage Panther detections using one of the following methods:
Panther Console
Construct your own detections in the Console using the Simple Detection builder, or by writing Python.
Enable Panther-managed Python detections (individually, or in Detection Packs) to get started quickly, with no additional configuration necessary.
Write detections locally as either Simple Detections or Python detections.
Learn more about managing Panther detections using a Continuous Integration and Continuous Deployment workflow in our CI/CD Guide.
CLI workflows include using Panther Analysis Tool (PAT), an open source utility for testing, packaging, and deploying Panther detections from source code.
If you use Simple Detections—the set of features that allows users of varying technical skill to create and edit detections—it is possible to use both the Panther Console and the CLI workflow to collaborate on detections, to an extent. Learn more in Simple Detections.
Migrating to a CI/CD workflow
You may want to get started quickly by enabling Panther-managed Detection Packs in the Panther Console, but then later transition to using the CI/CD workflow. (Using both the Console and CI/CD workflows simultaneously is not supported.) To migrate your workflow to CI/CD, follow the instructions on Migrating to a CI/CD Workflow.
Enable or write detections
The quickest way to start detecting threats with Panther is to turn on the already written Panther-managed detections that come with your Panther instance. These built-in rules and policies are applicable to various log sources, and Panther periodically releases improvements to their core detection logic. Panther-managed rules can be customized using Rule Filters, or you can clone them and edit the detection logic of the cloned version to suit your exact needs.
It's also possible to quickly generate rules in Panther by converting Sigma rules.
If you'd rather create your own detections from scratch, learn how on the following pages:
Simple Detections
Simple Detections refers to the set of Panther features that makes it easy for users with all levels of technical skill to create and manage detections in Panther. These features include:
Simple Detection builder: In the Panther Console, you can use the Simple Detection builder to create and edit rules without writing code.
Simple Detections written in the CLI workflow: When you write Simple Detections in the CLI workflow (in YAML), then upload them to Panther, they will be represented in the Panther Console in the Simple Detection builder.
Together, these features allow team members with various levels of YAML experience to understand and collaborate on detections.
If your team uses the CLI workflow to manage detection content, the changes made to detections using the Simple Detection builder in the Console will be overwritten on next upload (except for Inline Filters created in the Console, which will be preserved).
If you create or edit detections using the Simple Detection builder in the Console, copy the resulting YAML representation and include it in your local detections files, in order to prevent the changes from being overwritten on next upload.
Working with your data in detections
Schema definitions
Panther’s Schemas provide helpful information on the types of fields contained within your data, which makes it easier to understand how to interact with your data when writing a Detection.
Schema definitions can be found in:
Panther's documentation
See schemas for each integration within the Supported Logs section of the documentation. Find more information about Custom Log schemas in Custom Logs.
The Panther Console
Log in to the Panther Console and navigate to Data > Schemas.
Pulling samples out of Data Explorer
Data Explorer makes it easier to understand and investigate data, location of data, and data types when writing Python code. It contains all the data Panther parses from your log sources and stores the data in tables.
Explore and find log events by searching the relevant table for the log type you are interested in writing a detection for.
You can preview example table data without writing SQL. To generate a sample SQL query for that log source, click the eye icon next to the table type:
When the query has produced results, you will see the example log events in the Results table. You can download these as a CSV file.
To copy the log event to be used in Unit Tests while writing detections, click View JSON.
Signals vs. rule matches vs. alerts
First, let's examine when signals are generated vs. rule matches. Each time there is a match on a rule, scheduled rule, or correlation rule:
A signal is generated.
This is true regardless of any configuration set on the rule, scheduled rule, or correlation rule.
If the rule, scheduled rule, or correlation rule has alerting enabled (i.e., in the Console, Create Alert is set to
ON
, or in the CLI workflowCreateAlert
is set totrue
[or not set]), a rule match is generated.If alerting is disabled for the detection, rule matches are not created. See these instructions for how to create a rule with alerting disabled.
Only rule matches (not signals) can then produce alerts. Alerts are generated from rule matches according to the event threshold and deduplication configurations on the rule, scheduled rule, or correlation rule.
Each time there is a match on a policy, a compliance failure is created (and not a signal). Policies cannot be configured to disable alerting.
Detection features
Last updated