Karib0u/rustinel-rules
GitHub: Karib0u/rustinel-rules
Rustinel 端点检测引擎的官方精选检测规则仓库,提供开箱即用的 Sigma、YARA 和 IOC 规则包,支持多平台分级检测。
Stars: 16 | Forks: 3
rustinel-rules
Rustinel 端点检测引擎官方精选检测内容。
开箱即用的 Sigma · YARA · IOC 包 —— 无需额外配置,无需转换步骤。
Rustinel 引擎 ·
文档 ·
规则包目录 ·
下载规则包
这是 Rustinel 的**可信、版本化且经过 CI 测试**的检测内容仓库。
```
rustinel → the engine that collects telemetry and evaluates rules
rustinel-rules → the Sigma / YARA / IOC packs it loads (this repo)
```
每条检测在 `rules/` 中只存在**一次**,拥有一个稳定的 `id`,并通过该 id 从 **packs** 中引用。CI 会验证每一项更改,并构建扁平的压缩包以及引擎可直接加载的 `index.json` 目录。
## 在 60 秒内加载规则包
**1. 下载**适用于您的操作系统的规则包以及 [最新发布版本](https://github.com/Karib0u/rustinel-rules/releases/latest) 中的 `index.json`,并解压:
```
unzip windows-essential-0.2.0.zip
```
**2. 将** `config.toml` 指向已解压的规则包 —— 规则包文件夹*即是* Rustinel 加载的目录:
```
[scanner]
sigma_rules_path = "windows-essential/rules/sigma"
yara_rules_path = "windows-essential/rules/yara"
[ioc]
hashes_path = "windows-essential/rules/ioc/hashes.txt"
ips_path = "windows-essential/rules/ioc/ips.txt"
domains_path = "windows-essential/rules/ioc/domains.txt"
paths_regex_path = "windows-essential/rules/ioc/paths_regex.txt"
```
**3. 确认其是否生效。** Essential 规则包附带了 **EICAR** 测试 IOC 集合 —— 将标准的 EICAR 测试文件放入磁盘中,Rustinel 就会在 `logs/alerts.json.
` 中触发 IOC 警报。
## 规则包
更高层级会 `extend`(继承)下一层级,因此规则绝不会重复:
```
Essential ⊂ Advanced ⊂ Hunting
```
| 规则包 | 级别 | 默认启用 | 描述 |
| --------------------- | --------- | :-----: | -------------------------------------------------------------------- |
| **Windows Essential** | essential | ✅ | 低噪、高置信度的 Windows 检测。安全的默认设置。 |
| **Windows Advanced** | advanced | ❌ | Essential + 更广泛的生产环境检测。可能会出现更多误报 (FPs)。 |
| **Windows Hunting** | hunting | ❌ | Advanced + 面向分析师的广泛/高噪狩猎内容。 |
| **Linux Essential** | essential | ✅ | 低噪、高置信度的 Linux 检测。安全的默认设置。 |
| **Linux Advanced** | advanced | ❌ | Essential + 更广泛的 Linux 检测(持久化、执行)。 |
| **macOS Essential** | essential | ❌ | _实验性功能。_ Keychain 窃取、Gatekeeper 绕过、挖矿木马。 |
| **macOS Advanced** | advanced | ❌ | _实验性功能。_ Essential + 启动项持久化、恶意下载器、执行。 |
完整目录及各规则包的规则清单:**[docs/packs.md](docs/packs.md)**。
## 版本控制与兼容性
`rustinel-rules` 的版本控制**独立**于引擎 —— 检测内容的演进速度更快。每个规则包清单都声明了其所需的引擎版本:
```
pack_schema_version: 1
requires_rustinel: ">=1.0.2"
```
发布产物提供压缩包、`index.json`、兼容性元数据,以及每个产物的 `sha256` 校验值。
## 开发
使用指定的工具链 ([uv](https://docs.astral.sh/uv/)) 在本地构建并验证规则包:
```
uv sync # install pinned tooling
uv run python tools/validate.py # Detection as Code: must pass
uv run python tools/build_packs.py # build dist// + zips + index.json
uv run python tools/build_catalog.py # build the website catalog (dist/catalog.json)
```
```
rustinel-rules/
├── rules/ # Canonical source — each artifact exists ONCE
│ ├── sigma// # Sigma rules (.yml)
│ ├── yara// # YARA rules (.yar)
│ └── ioc// # Typed IOC sets (hashes / ips / domains / paths_regex)
├── packs/ # Pack manifests — reference artifacts by id, never copy
├── schemas/ # JSON Schema for pack.yml and IOC sets (v1)
├── tools/ # Build + validation tooling
└── dist/ # Build output (gitignored): packs + zips + index.json
```
新的检测应基于 TTP/Atomic,映射到 ATT&CK,并与 Rustinel 遥测兼容。请从 **[docs/authoring.md](docs/authoring.md)** 和 **[CONTRIBUTING.md](CONTRIBUTING.md)** 开始阅读。
## 指导原则
- 从小处着手 —— 少数经过验证的检测胜过大量嘈杂的检测。
- 保持 Essential 严格且低误报;不设置嘈杂的默认值。
- 每条规则只存在一次;规则包通过 id 引用它。
- 保持 Rustinel 开箱即用的可用性,并通过 CI 展示质量。
- 优先选择基于 TTP / 遥测的精选规则;使用 CTI 来**排定优先级**,而不是盲目批量导入。
## 文档
| 文档 | 包含内容 |
| --- | ------------- |
| **[docs/index.md](docs/index.md)** | 文档导航 / 从这里开始 |
| **[docs/usage.md](docs/usage.md)** | 安装规则包及 `config.toml` 参考 |
| **[docs/packs.md](docs/packs.md)** | 规则包目录及完整规则清单 |
| **[docs/rustinel-support.md](docs/rustinel-support.md)** | Rustinel 支持的功能:遥测、字段、Sigma 操作符、YARA、IOC |
| **[docs/authoring.md](docs/authoring.md)** | 编写能在 Rustinel 上加载并触发的规则 |
| **[docs/repository.md](docs/repository.md)** | 产物模型、规则包及构建 pipeline |
| **[docs/detection-as-code.md](docs/detection-as-code.md)** | CI 检查与动态测试策略 |
## 许可证
参见 [LICENSE](LICENSE)。标签:AMSI绕过, IOC, Python安全, YARA, 云资产可视化, 威胁情报, 威胁检测, 开发者工具, 端点检测与响应, 脱壳工具, 逆向工具