Splunk Security Content
repository·develop·Indexed 23 days ago
https://github.com/splunk/security_contentA repository of Analytic Stories, security guides, and detections mapped to frameworks such as MITRE ATT&CK, the Lockheed Martin Cyber Kill Chain, and CIS Controls. It provides Splunk searches, machine learning algorithms, and playbooks for threat detection and response. The repository includes tools like contentctl-ng for building and validating content, and supports the Splunk ES Content Update service for Splunk Enterprise Security version 4.5 or greater.
What's inside Splunk Security Content
- Splunk ES Content Update is a subscription service that provides pre-packaged Security Content specifically designed for use with Splunk Enterprise Security. It delivers regular updates to help security practitioners address time-sensitive threats and customer problems more efficiently.
Understand the Splunk Security Content directory structure
developThe repository is organized into several functional parts:
baselines/: Searches executed before a detection to collect baseline system data.data_sources/: Definitions of data sources, required TAs/Apps, and available fields.deployments/: Configuration for schedules and alert actions.detections/: The core collection of detection searches.lookups/: Implementation of Splunk lookups (e.g., static lists like ransomware extensions).macros/: Implementation of Splunk search macros for common patterns.playbooks/: Incident Response Playbooks/Workflows for specific threats.stories/: Analytic Stories (Use Cases) that group multiple detections together.
Scaffold new content using VS Code Snippets
developThe repository includes VS Code snippets located in
.vscode/escu_6.code-snippetsto help you quickly scaffold new content files.Steps to use:
- Create a new
.ymlfile in the appropriate directory (e.g.,detections/,macros/,stories/). - Type one of the following prefixes and press
Tabto expand the template:detection_escu6macro_escu6data_source_escu6story_escu6lookup_csv_escu6lookup_kvstore_escu6dashboard_escu6baseline_escu6
- Fill in the required fields. You can remove optional fields that are not relevant to your specific content piece.
- Create a new
Set up the Splunk Security Content development environment
developTo validate, build, and test content like the Splunk Threat Research team, follow these steps to set up your local environment:
- Clone the repository:
git clone https://github.com/splunk/security_content.git cd security_content - Create and activate a virtual environment:
python3.11 -m venv .venv source .venv/bin/activate - Install required tools:
contentctl-ng: The core tool for building, testing, and packaging content.pre-commit: Used to validate and apply proper formatting.
pip install contentctl-ng pip install pre-commit pre-commit installgit clone https://github.com/splunk/security_content.git cd security_content python3.11 -m venv .venv source .venv/bin/activate pip install contentctl-ng- Clone the repository:
Get Splunk Security Content
developYou can access the latest Splunk Security Content through several methods:
- Website: Use research.splunk.com to discover and access content.
- Splunk Enterprise Security (ES): If you are an ES user, content is delivered directly via ESCU.
- ESCU App: Manually download the latest release (
DA-ESS-ContentUpdate.spl) from Splunkbase or the GitHub release page.
Requirements for Splunk ES Content Update
developTo use the Splunk ES Content Update service, you must have Splunk Enterprise Security version 4.5 or greater installed.Reference the JSON Schemas for content validation
developThe project uses JSON schemas located in the
/schemas/folder to define the structure, required fields, and data types for YML files. Use these schemas to ensure your content is valid.Available Schemas:
detection:schemas/EventBasedDetection.schema.jsonstories:schemas/Story.schema.jsonmacros:schemas/FileBackedMacro.schema.jsonlookups:schemas/CsvLookup.schema.jsonbaseline:schemas/Baseline.schema.jsonplaybook:schemas/Playbook.schema.jsondata_source:schemas/DataSource.schema.json
Validate and build content with contentctl-ng
developUse the
contentctl-ng buildcommand to ensure your YML files adhere to defined specifications. This command validates:- Required fields
- Correct data types
- Overall consistency
This process helps maintain the integrity and quality of the security content before distribution.
contentctl-ng build