logpoint/pySigma-backend-logpoint

GitHub: logpoint/pySigma-backend-logpoint

将 Sigma 通用检测规则转换为 Logpoint SIEM 查询语法的 pySigma 后端插件,支持 Windows、Azure 和 M365 日志源。

Stars: 12 | Forks: 5

# pySigma Logpoint Backend ![Tests](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/e6b2599136223139.svg) ![Coverage Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/logpoint/pySigma-backend-logpoint/main/coverage-badge.json) ![Status](https://img.shields.io/badge/Status-pre--release-orange) ## 概述 这是 pySigma 的 Logpoint backend。它提供了包含 `Logpoint` 类的 `sigma.backends.logpoint` 包。 此外,它包含处理 pipeline `sigma.pipelines.logpoint`,用于执行字段映射和错误处理。 `sigma.pipelines.logpoint 模块` 包含以下处理 pipeline: * `logpoint_windows`:此 pipeline 旨在将 Sigma 规则转换为专为 Logpoint 使用的 Windows 事件日志格式定制的查询。 * `logpoint_azure`:此 pipeline 旨在将 Sigma 规则转换为专为 Logpoint 使用的 Azure 事件日志格式定制的查询。 * `logpoint_o365`:此 pipeline 旨在将 Sigma 规则转换为专为 Logpoint 使用的 Office 365 事件日志格式定制的查询。 * `logpoint_defer_contains`:此 pipeline 将 Sigma `contains` 关键字延迟到 eval 表达式中。当由于大量通配符搜索导致默认查询无法获取事件并导致搜索超时时,此功能非常有用。此可选 pipeline 可以与其他 logpoint pipeline 结合使用。 ## 规则支持 Logpoint backend 支持以下日志源/规则类型: - **Windows Sysmon** - **Windows** - **Azure** - **M365** ## 使用示例 ### SigConverter (Sigma 规则转换器) 1. 访问 sigconverter 网站:[sigconverter.io](https://sigconverter.io/) 2. 选择 `logpoint` backend。 3. 选择所需的 logpoint 相关 pipeline。 4. 将 Sigma 规则复制到 rule.yml 中。 5. 查询结果显示在 query 中。 ### Sigma CLI #### 前置条件 1. 要使用 Sigma CLI(Sigma 规则转换器)及其底层库,请确保已安装 Python 3.10 或更高版本。 2. 安装依赖项 **pysigma**。 ``` pip3 install pysigma ``` 3. 安装 **sigma-cli**,用于 Sigma 规则转换的命令行工具 ``` pip3 install sigma-cli ``` 4. 安装 Sigma CLI 后,你需要添加 **Logpoint backend 插件**。选择以下方法之一: ``` sigma plugin install logpoint ``` **或者** ``` pip3 install pysigma-backend-logpoint ``` #### 转换 Sigma 规则 软件包成功安装后,你可以使用以下命令将 Sigma 规则转换为 Logpoint 查询。例如,要转换 [可疑进程伪装为 SvcHost.EXE](https://github.com/SigmaHQ/sigma/blob/598d29f811c1859ba18e05b8c419cc94410c9a55/rules/windows/process_creation/proc_creation_win_svchost_masqueraded_execution.yml) ``` sigma convert -t logpoint -p logpoint_windows rules/windows/process_creation/proc_creation_win_svchost_masqueraded_execution.yml ``` **输出** ``` ╭─ubuntu@ubuntu ╰─$ sigma convert -t logpoint -p logpoint_windows rules/windows/process_creation/proc_creation_win_svchost_masqueraded_execution.yml Parsing Sigma rules [####################################] 100% label="Create" label="Process" "process"="*\svchost.exe" - ("process" IN ["C:\Windows\System32\svchost.exe", "C:\Windows\SysWOW64\svchost.exe"] OR file="svchost.exe") ``` ## 限制与约束 此 backend 处于初期阶段,这意味着来自不常见日志类型的查询转换可能存在问题,并且尚不支持转换 Sigma 涵盖的所有日志源。尝试转换此类规则类型可能会导致错误。 此 backend 目前由 Logpoint 维护,感谢以下个人的贡献: * [Swachchhanda Shrawan Poudel](https://github.com/swachchhanda000/) * [Surya Majhi](https://github.com/suryamajhi) ## 报告问题 如果你遇到任何问题,请随时[打开一个新 issue](https://github.com/logpoint/pySigma-backend-logpoint/issues/new)。
标签:AMSI绕过, Azure, Logpoint, Office 365, pySigma, Python, Sysmon, 二进制发布, 后端, 威胁检测, 安全信息与事件管理, 安全运营, 开源工具, 扫描框架, 搜索引擎爬取, 无后门, 查询语言, 网络安全, 规则转换, 逆向工具, 隐私保护