diff --git a/README-English.md b/README-English.md index 8b87b625..9aa89302 100644 --- a/README-English.md +++ b/README-English.md @@ -220,7 +220,7 @@ When Hayabusa output is being displayed to the screen (the default), it will dis * `Event ID`: This comes from the `` field in the event log. * `Level`: This comes from the `level` field in the YML detection rule. (`informational`, `low`, `medium`, `high`, `critical`) By default, all level alerts will be displayed but you can set the minimum level with `-m`. For example, you can set `-m high`) in order to only scan for and display high and critical alerts. * `Title`: This comes from the `title` field in the YML detection rule. -* `Details`: This comes from the `output` field in the YML detection rule, however, only Hayabusa rules have this field. This field gives extra information about the alert or event and can extract useful data from the `` portion of the log. For example, usernames, command line information, process information, etc... +* `Details`: This comes from the `details` field in the YML detection rule, however, only Hayabusa rules have this field. This field gives extra information about the alert or event and can extract useful data from the `` portion of the log. For example, usernames, command line information, process information, etc... When saving to a CSV file an additional two fields will be added: * `Rule Path`: The path to the detection rule that generated the alert or event. @@ -254,7 +254,7 @@ Please check out the current rules to use as a template in creating new ones or ## Hayabusa v.s. converted Sigma rules Sigma rules need to first be converted to hayabusa rule format explained [here](https://github.com/Yamato-Security/hayabusa/blob/main/tools/sigmac/README-English.md). Hayabusa rules are designed solely for Windows event log analysis and have the following benefits: -1. An extra `output` field to display additional information taken from only the useful fields in the log. +1. An extra `details` field to display additional information taken from only the useful fields in the log. 2. They are all tested against sample logs and are known to work. > Some sigma rules may not work as intended due to bugs in the conversion process, unsupported features, or differences in implementation (such as in regular expressions). diff --git a/README-Japanese.md b/README-Japanese.md index f93e6b6f..14604f49 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -221,7 +221,7 @@ Hayabusaの出力を画面に表示しているとき(デフォルト)は、 * `Event ID`: イベントログの``フィールドから来ています。 * `Level`: YML検知ルールの`level`フィールドから来ています。(例:`informational`, `low`, `medium`, `high`, `critical`) デフォルトでは、すべてのレベルのアラートとイベントが出力されますが、`-m`オプションで最低のレベルを指定することができます。例えば`-m high`オプションを付けると、`high`と`critical`アラートしか出力されません。 * `Title`: YML検知ルールの`title`フィールドから来ています。 -* `Details`: YML検知ルールの`output`フィールドから来ていますが、このフィールドはHayabusaルールにしかありません。このフィールドはアラートとイベントに関する追加情報を提供し、ログの``部分から有用なデータを抽出することができます。 +* `Details`: YML検知ルールの`details`フィールドから来ていますが、このフィールドはHayabusaルールにしかありません。このフィールドはアラートとイベントに関する追加情報を提供し、ログの``部分から有用なデータを抽出することができます。 CSVファイルとして保存する場合、以下の2つのフィールドが追加されます: * `Rule Path`: アラートまたはイベントを生成した検知ルールへのパス。 @@ -256,7 +256,7 @@ Hayabusaルールのディレクトリ構造は、3つのディレクトリに ## Hayabusa v.s. 変換されたSigmaルール Sigmaルールは、最初にHayabusaルール形式に変換する必要があります。変換のやり方は[ここ](https://github.com/Yamato-Security/Hayabusa/blob/main/tools/Sigmac/README-Japanese.md)で説明されています。Hayabusaルールは、Windowsのイベントログ解析専用に設計されており、以下のような利点があります: -1. ログの有用なフィールドのみから抽出された追加情報を表示するための `output` フィールドを追加しています。 +1. ログの有用なフィールドのみから抽出された追加情報を表示するための `details`フィールドを追加しています。 2. Hayabusaルールはすべてサンプルログに対してテストされ、検知することが確認されています。 > 変換処理のバグ、サポートされていない機能、実装の違い(正規表現など)により、一部のSigmaルールは意図したとおりに動作しない可能性があります。 diff --git a/doc/AboutRuleCreation-English.md b/doc/AboutRuleCreation-English.md index 234e819f..7b1c97d3 100644 --- a/doc/AboutRuleCreation-English.md +++ b/doc/AboutRuleCreation-English.md @@ -1,4 +1,4 @@ -# Rule files +## About rule files Hayabusa detection rules are written in [YAML](https://en.wikipedia.org/wiki/YAML) format. It can express complex detection rules by combining not only simple string matching but also regular expressions, `AND`, `OR`, and other conditions. In this section, we will explain how to write hayabusa detection rules. @@ -15,8 +15,8 @@ modified: 2021/11/26 #Alert section title: User added to local Administrators group title_jp: ユーザがローカル管理者グループに追加された -output: 'User: %MemberName% : SID: %MemberSid% : Group: %TargetUserName%' -output_jp: 'ユーザ: %MemberName% : SID: %MemberSid% : グループ名: %TargetUserName%' +details: 'User: %SubjectUserName% : Group: %TargetUserName% : LogonID: %SubjectLogonId%' +details_jp: 'ユーザ: %SubjectUserName% : グループ名: %TargetUserName% : ログオンID: %SubjectLogonId%' description: A user was added to the local Administrators group. description_jp: ユーザがローカル管理者グループに追加された。 @@ -51,8 +51,8 @@ ruletype: Hayabusa > ## Alert section * **title [required]**: Rule file title. This will also be the name of the alert that gets displayed so the briefer the better. (Should not be longer than 85 characters.) * **title_jp** [optional]: The title in Japanese. -* output [optional]: The details of the alert that gets displayed. Please output any fields in the Windows event log that are useful for analysis. Fields are seperated by `" : "` (two spaces on both sides). Field placeholders are enclosed with a `%` (Example: `%MemberName%`) and need to be defined in `config\eventkey_alias.txt`. (Explained below.) -* **output_jp** [optional]: The output message in Japanese. +* details [optional]: The details of the alert that gets displayed. Please output any fields in the Windows event log that are useful for analysis. Fields are seperated by `" : "` (two spaces on both sides). Field placeholders are enclosed with a `%` (Example: `%MemberName%`) and need to be defined in `config\eventkey_alias.txt`. (Explained below.) +* **details_jp** [optional]: The details message in Japanese. * **description** [optional]: A description of the rule. This does not get displayed so you can make this long and detailed. * **description_jp** [optional]: The description in Japanese. @@ -163,7 +163,7 @@ detection: ``` #### Caution: Undefined Eventkey Aliases -Not all eventkey aliases are defined in `config\eventkey_alias.txt`. If you are not getting the correct data in the `output`(Alert details) message, and instead are getting results like `%EventID%` or if the selection in your detection logic is not working properly, then you need to update `config\eventkey_alias.txt` with a new alias. +Not all eventkey aliases are defined in `config\eventkey_alias.txt`. If you are not getting the correct data in the `details`(Alert details) message, and instead are getting results like `%EventID%` or if the selection in your detection logic is not working properly, then you need to update `config\eventkey_alias.txt` with a new alias. ### How to use XML attributes in conditions XML elements may have attributes set by adding a space to the element. For example, `Name` in `Provider Name` below is an XML attribute of the `Provider` element. diff --git a/doc/AboutRuleCreation-Japanese.md b/doc/AboutRuleCreation-Japanese.md index 81a151c8..c04743b9 100644 --- a/doc/AboutRuleCreation-Japanese.md +++ b/doc/AboutRuleCreation-Japanese.md @@ -1,9 +1,9 @@ -# ルールファイル +# ルールファイルについて Hayabusaの検知ルールは、[YAML](https://en.wikipedia.org/wiki/YAML) 形式で記述されています。 単純な文字列のマッチングだけでなく、正規表現や`AND`、`OR`などの条件を組み合わせて複雑な検知ルールを表現することができます。 本節では、Hayabusaの検知ルールの書き方について説明します。 -# ルールファイル形式 +## ルールファイル形式 記述例: ```yaml @@ -15,8 +15,8 @@ modified: 2021/11/26 #Alert section title: User added to local Administrators group title_jp: ユーザがローカル管理者グループに追加された -output: 'User: %MemberName% : SID: %MemberSid% : Group: %TargetUserName%' -output_jp: 'ユーザ: %MemberName% : SID: %MemberSid% : グループ名: %TargetUserName%' +details: 'User: %SubjectUserName% : Group: %TargetUserName% : LogonID: %SubjectLogonId%' +details_jp: 'ユーザ: %SubjectUserName% : グループ名: %TargetUserName% : ログオンID: %SubjectLogonId%' description: A user was added to the local Administrators group. description_jp: ユーザがローカル管理者グループに追加された。 @@ -51,8 +51,8 @@ ruletype: Hayabusa > ## アラートセクション * **title [必須]**: ルールファイルのタイトル。これは表示されるアラートの名前にもなるので、簡潔であるほどよいです。(85文字以下でなければなりません。) * **title_jp** [オプション]: 日本語のタイトルです。 -* output [オプション]: 表示されるアラートの詳細です。Windowsイベントログの中で解析に有効なフィールドがあれば出力してください。フィールドは `" : "` で区切られます(両側ともスペース2つ)。フィールドのプレースホルダは `%` で囲まれ (例: `%MemberName%`) 、`config_eventkey_alias.txt` で定義する必要があります。(以下で説明します) -* **output_jp** [オプション]: 日本語の出力メッセージ。 +* details [オプション]: 表示されるアラートの詳細です。Windowsイベントログの中で解析に有効なフィールドがあれば出力してください。フィールドは `" : "` で区切られます(両側ともスペース2つ)。フィールドのプレースホルダは `%` で囲まれ (例: `%MemberName%`) 、`config_eventkey_alias.txt` で定義する必要があります。(以下で説明します) +* **details_jp** [オプション]: 日本語の出力メッセージ。 * **description** [オプション]: ルールの説明。これは表示されないので、長く詳細に記述することができます。 * **description_jp** [オプション]: 日本語の説明文です。 @@ -170,7 +170,7 @@ detection: ``` #### 注意: 未定義のイベントキーエイリアスについて -すべてのイベントキーエイリアスが `config\eventkey_alias.txt`で定義されているわけではありません。`output`(アラートの詳細)メッセージで正しいデータを取得しておらず、代わりに`%EventID%`のような結果を取得している場合、または検知ロジックの選択が正しく機能していない場合は、新しいエイリアスを使用して `config\eventkey_alias.txt`を更新する必要があります。 +すべてのイベントキーエイリアスが `config\eventkey_alias.txt`で定義されているわけではありません。`details`(アラートの詳細)メッセージで正しいデータを取得しておらず、代わりに`%EventID%`のような結果を取得している場合、または検知ロジックの選択が正しく機能していない場合は、新しいエイリアスを使用して `config\eventkey_alias.txt`を更新する必要があります。 ### 条件におけるXML属性の使用方法 XML要素には、スペースを入れることで属性を設定することができます。例えば、以下の `Provider Name` の `Name` は `Provider` 要素のXML属性です。