A pySigma backend for converting Sigma rules into Tanium Signals query syntax.
This package provides:
- Backend:
sigma.backends.signalswithSignalsBackend - Pipeline:
sigma.pipelines.signalswithsignals_pipeline - Output formats:
default(plain Signals query output)json(query plus Sigma metadata in JSON, includingmitreAttack.technique_ids)
The backend is designed for Sigma rule conversion with field normalisation that maps common Windows/Sysmon-style fields to Signals fields.
- Supports common Sigma condition patterns (
AND,OR, list values, regex, CIDR expansion) - Includes correlation query templates (event count, value count, temporal, temporal ordered)
- Provides category-specific field mappings through a dedicated processing pipeline
- Works in Python workflows and can be used with
sigma-cliwhere backend discovery is configured
Install dependencies (example with pip):
pip install pysigmaThen install this backend from source:
git clone https://github.com/wayne-csrs/pySigma-backend-signals.git
cd pySigma-backend-signals
pip install .from sigma.collection import SigmaCollection
from sigma.backends.signals import SignalsBackend
rule = SigmaCollection.from_yaml(
"""
title: Suspicious CommandLine
status: test
logsource:
category: process_creation
product: windows
detection:
sel:
CommandLine|contains: mimikatz
condition: sel
"""
)
backend = SignalsBackend()
queries = backend.convert(rule)
print(queries[0])If your sigma-cli environment is set up to discover installed backends, you can run:
sigma convert -t signals -p signals path/to/rule.ymlFor JSON output:
sigma convert -t signals -p signals -f json path/to/rule.ymlThe built-in signals_pipeline applies:
- Generic mappings for user/logon-related fields
- Category-aware mappings for:
- Windows:
process_creation,image_load,file_event,network_connection,registry_event,registry_set - Linux:
process_creation,network_connection,file_create - macOS:
process_creation,file_create
- Windows:
Examples of normalised fields include:
Image->process.pathCommandLine->process.command_lineTargetFilename->file.pathSourceIp->network.source.ipRegistryValueData->registry.value.data
Contributions are welcome, especially for:
- Additional field mappings
- More rule category coverage
- Backend behavior tests and correlation test coverage
Please open an issue or submit a pull request.
Licensed under LGPL-3.0-only. See LICENSE.