sigmacバックエンドのドキュメンテーション更新
This commit is contained in:
50
tools/sigmac/README-English.md
Normal file
50
tools/sigmac/README-English.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Automatic conversion of Sigma to Hayabusa rules
|
||||
[](https://www.python.org/)
|
||||

|
||||

|
||||

|
||||
|
||||
You can use `hayabusa.py`, a `sigmac` backend, to automatically convert Sigma rules to Hayabusa rules.
|
||||
|
||||
## About Sigma
|
||||
|
||||
[https://github.com/SigmaHQ/sigma](https://github.com/SigmaHQ/sigma)
|
||||
|
||||
## Settings
|
||||
|
||||
hayabusa.py needs `sigmac` from the Sigma repository.
|
||||
Before using hayabusa.py, please clone the Sigma repository.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/SigmaHQ/sigma.git
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Create an environmental variable `$sigma_path` that points to the Sigma repository and register haybausa as a backend for Sigma:
|
||||
|
||||
```sh
|
||||
export sigma_path=/path/to/sigma_repository
|
||||
cp hayabusa.py $sigma_path/tools/sigma/backends
|
||||
```
|
||||
|
||||
### Converting a single rule
|
||||
|
||||
You can convert a single rule with the following syntax:
|
||||
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac <Target Rule> --config <Config File Name> --target hayabusa
|
||||
```
|
||||
|
||||
Example:
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac $sigma_path/rules/windows/create_remote_thread/sysmon_cactustorch.yml --config $sigma_path/tools/config/generic/sysmon.yml --target hayabusa > sysmon_cactustorch.yml
|
||||
```
|
||||
|
||||
### Converting multiple rules
|
||||
|
||||
This example will convert all Sigma rules for Windows event logs to hayabusa rules and save them to the current directory.
|
||||
|
||||
```sh
|
||||
find $sigma_path/rules/windows/* | grep yml | xargs -I{} sh -c 'python $sigma_path/tools/sigmac {} --config $sigma_path/tools/config/generic/sysmon.yml --target hayabusa > "$(basename {})"'
|
||||
```
|
||||
51
tools/sigmac/README-Japanese.md
Normal file
51
tools/sigmac/README-Japanese.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# SIGMAからHayabusaルールへの自動変換
|
||||
[](https://www.python.org/)
|
||||

|
||||

|
||||

|
||||
|
||||
`hayabusa.py` はSigmaルールをHayabusaルールに変換する`sigmac`のバックエンドです。
|
||||
Sigmaの持つ多くの検知ルールをHayabusaのルールセットに追加することでルールを作成する手間を省くことができます。
|
||||
|
||||
## Sigmaについて
|
||||
|
||||
[https://github.com/SigmaHQ/sigma](https://github.com/SigmaHQ/sigma)
|
||||
|
||||
## 環境設定
|
||||
|
||||
hayabusa.pyはSigmaリポジトリの中にある`sigmac`を使います。
|
||||
事前に任意のディレクトリにSigmaリポジトリをcloneしてください。
|
||||
|
||||
```sh
|
||||
git clone https://github.com/SigmaHQ/sigma.git
|
||||
```
|
||||
|
||||
## 使い方
|
||||
|
||||
Sigmaレポジトリのパスが書いてある`$sigma_path`という環境変数を設定して、hayabusaをSigmaのbackendとして登録します:
|
||||
|
||||
```sh
|
||||
export sigma_path=/path/to/sigma_repository
|
||||
cp hayabusa.py $sigma_path/tools/sigma/backends
|
||||
```
|
||||
|
||||
### 単体のルールを変換
|
||||
|
||||
以下のシンタクスで単体のルールを変換できます:
|
||||
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac <変換対象ruleの指定> --config <configの指定> --target hayabusa
|
||||
```
|
||||
|
||||
例:
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac $sigma_path/rules/windows/create_remote_thread/sysmon_cactustorch.yml --config $sigma_path/tools/config/generic/sysmon.yml --target hayabusa > sysmon_cactustorch.yml
|
||||
```
|
||||
|
||||
### 複数のルールを変換
|
||||
|
||||
以下のように、SigmaのすべてのWindowsイベントログルールをhayabusaルールに変換して、カレントディレクトリに保存します:
|
||||
|
||||
```sh
|
||||
find $sigma_path/rules/windows/* | grep yml | xargs -I{} sh -c 'python $sigma_path/tools/sigmac {} --config $sigma_path/tools/config/generic/sysmon.yml --target hayabusa > "$(basename {})"'
|
||||
```
|
||||
@@ -1,50 +0,0 @@
|
||||
# hayabusaGenerator
|
||||
[](https://www.python.org/)
|
||||

|
||||

|
||||

|
||||
|
||||
[Japanese](./README.md)
|
||||
|
||||
`hayabusaGenerater.py` allows to convert SIGMA rules to Hayabusa ruleset.
|
||||
|
||||
## sigma
|
||||
|
||||
[https://github.com/SigmaHQ/sigma](https://github.com/SigmaHQ/sigma)
|
||||
|
||||
## Settings
|
||||
|
||||
hayabusaGenerator needs `sigmac` from the SIGMA repository.
|
||||
Before using hayabusaGenerator, clone the repository.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/SigmaHQ/sigma.git
|
||||
```
|
||||
|
||||
## Quickstart
|
||||
|
||||
Regist haybausa for SIGMA's backend.
|
||||
|
||||
```sh
|
||||
export sigma_path=/path/to/sigma_repository
|
||||
cp hayabusaGenerater.py $sigma_path/tools/sigma/backends
|
||||
```
|
||||
|
||||
### Convert Single Rule
|
||||
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac <Target Rule> --config <config Name> --target hayabusa
|
||||
```
|
||||
|
||||
Sample
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac $sigma/rules/windows/create_remote_thread/sysmon_cactustorch.yml --config $sigma_path/tools/config/generic/sysmon.yml --target hayabusa > sysmon_cactustorch.yml
|
||||
```
|
||||
|
||||
### Convert Multiple Rules
|
||||
|
||||
This is a command sample that creates a rule file from the specified directory in the current directory.
|
||||
|
||||
```sh
|
||||
find $sigma/rules/windows/* | grep yml | xargs -I{} sh -c 'python $sigma/tools/sigmac {} --config $sigma/tools/config/generic/sysmon.yml --target hayabusa > "$(basename {})"'
|
||||
```
|
||||
5
tools/sigmac/README-hayabusa-sigma-backend.md
Normal file
5
tools/sigmac/README-hayabusa-sigma-backend.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Readme for the hayabusa backend for `sigmac`:
|
||||
|
||||
[English](README-English.md)
|
||||
|
||||
[Japanese](README-Japanese.md)
|
||||
@@ -1,51 +0,0 @@
|
||||
# hayabusaGenerator
|
||||
[](https://www.python.org/)
|
||||

|
||||

|
||||

|
||||
|
||||
[English](./README-en.md)
|
||||
|
||||
`hayabusaGenerator.py` はSIGMAルールをHayabusaに対応したルールセットに変更することができます。
|
||||
SIGMAの持つ多くの検知ルールをHayabusaのルールセットに追加することでルールを作成する手間を省くことができます。
|
||||
|
||||
## sigma
|
||||
|
||||
[https://github.com/SigmaHQ/sigma](https://github.com/SigmaHQ/sigma)
|
||||
|
||||
## 環境設定
|
||||
|
||||
hayabusaGeneratorはSIGMAリポジトリの中にある`sigmac`を使います。
|
||||
事前に任意のディレクトリにSIGMAリポジトリをcloneしてください。
|
||||
|
||||
```sh
|
||||
git clone https://github.com/SigmaHQ/sigma.git
|
||||
```
|
||||
|
||||
## 使い方
|
||||
|
||||
hayabusaGenerator.pyをSIGMAのbackendとして登録します。
|
||||
|
||||
```sh
|
||||
export sigma_path=/path/to/sigma_repository
|
||||
cp hayabusaGenerater.py $sigma_path/tools/sigma/backends
|
||||
```
|
||||
|
||||
### 単体のルールを変換
|
||||
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac <変換対象ruleの指定> --config <configの指定> --target hayabusa
|
||||
```
|
||||
|
||||
サンプル
|
||||
```sh
|
||||
python3 $sigma_path/tools/sigmac $sigma/rules/windows/create_remote_thread/sysmon_cactustorch.yml --config $sigma_path/tools/config/generic/sysmon.yml --target hayabusa > sysmon_cactustorch.yml
|
||||
```
|
||||
|
||||
### 複数のルールを変換
|
||||
|
||||
現在のディレクトリ内に指定したディレクトリ内のルールファイルを作成するコマンドサンプルです。
|
||||
|
||||
```sh
|
||||
find $sigma/rules/windows/* | grep yml | xargs -I{} sh -c 'python $sigma/tools/sigmac {} --config $sigma/tools/config/generic/sysmon.yml --target hayabusa > "$(basename {})"'
|
||||
```
|
||||
Reference in New Issue
Block a user