This is the CortexXDR backend for pySigma. It provides the package sigma.backends.cortexxdr with the CortexXDRBackend class.
Further, it contains the following processing pipelines in sigma.pipelines.cortexxdr for field renames and error handling. This pipeline is automatically applied to SigmaRule and SigmaCollection objects passed to the CortexXDR class.
It supports the following output formats:
- default: plain CortexXDR XQL queries
- json: JSON-formatted CortexXDR XQL queries
This backend is currently maintained by:
Please note that this pipeline is not compatible with pySigma v1.0.0+ at this time.
This can be installed via pip from PyPI or using pySigma's plugin functionality
pip install pysigma-backend-cortexxdrfrom sigma.plugins import SigmaPluginDirectory
plugins = SigmaPluginDirectory.default_plugin_directory()
plugins.get_plugin_by_id("cortexxdr").install()sigma convert -t cortexxdr proc_creation_win_java_keytool_susp_child_process.ymlfrom sigma.backends.cortexxdr import CortexXDRBackend
from sigma.rule import SigmaRule
rule = SigmaRule.from_yaml("""
title: Invoke-Mimikatz CommandLine
status: test
logsource:
category: process_creation
product: windows
detection:
sel:
CommandLine|contains: Invoke-Mimikatz
condition: sel""")
backend = CortexXDRBackend()
print(backend.convert_rule(rule)[0])- Backend uses XQL syntax
- Pipeline uses XQL field names
- Pipeline supports
linux,windows, andmacosproduct types - Pipeline supports the following category types for field mappings
process_creationfile_eventfile_changefile_renamefile_deleteimage_loadregistry_addregistry_deleteregistry_eventregistry_setnetwork_connectionfirewall
- Pipeline supports the following fields:
CommandLineCompanyCurrentDirectoryDestinationHostnameDestinationIpDestinationPortDetailsImageImageLoadedIntegrityLevelParentCommandLineParentImageParentIntegrityLevelParentProcessIdParentUserProcessIdProductProtocolSourceFilenameSourceHostnameSourceImageSourceIpSourcePortTargetFilenameTargetObjectUserdst_ipdst_portmd5sha256src_ipsrc_port
- Any unsupported fields or categories will throw errors