updated readme #165

This commit is contained in:
DastInDark
2022-07-24 22:16:49 +09:00
parent fad5b9718c
commit e5f50896c7
2 changed files with 67 additions and 10 deletions

View File

@@ -60,6 +60,7 @@ Hayabusaは、日本の[Yamato Security](https://yamatosecurity.connpass.com/)
- [ログオン情報の要約](#ログオン情報の要約)
- [サンプルevtxファイルでHayabusaをテストする](#サンプルevtxファイルでhayabusaをテストする)
- [Hayabusaの出力](#hayabusaの出力)
- [プロファイルによる出力のカスタマイズ](#プロファイルによる出力のカスタマイズ)
- [Levelの省略](#levelの省略)
- [MITRE ATT&CK戦術の省略](#mitre-attck戦術の省略)
- [Channel情報の省略](#channel情報の省略)
@@ -498,7 +499,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git
# Hayabusaの出力
Hayabusaの結果を標準出力に表示しているときデフォルトは、以下の情報を表示ます:
Hayabusaの結果を標準出力に表示しているときデフォルトは、以下の情報を表示することができます:
* `Timestamp`: デフォルトでは`YYYY-MM-DD HH:mm:ss.sss +hh:mm`形式になっています。イベントログの`<Event><System><TimeCreated SystemTime>`フィールドから来ています。デフォルトのタイムゾーンはローカルのタイムゾーンになりますが、`--utc` オプションで UTC に変更することができます。
* `Computer`: イベントログの`<Event><System><Computer>`フィールドから来ています。
@@ -508,14 +509,41 @@ Hayabusaの結果を標準出力に表示しているときデフォルト
* `Title`: YML検知ルールの`title`フィールドから来ています。
* `RecordID`: イベントレコードIDです。`<Event><System><EventRecordID>`フィールドから来ています。`-R`もしくは`--hide-record-id`オプションを付けると表示されません。
* `Details`: YML検知ルールの`details`フィールドから来ていますが、このフィールドはHayabusaルールにしかありません。このフィールドはアラートとイベントに関する追加情報を提供し、ログのフィールドから有用なデータを抽出することができます。イベントキーのマッピングが間違っている場合、もしくはフィールドが存在しない場合で抽出ができなかった箇所は`n/a` (not available)と記載されます。YML検知ルールに`details`フィールドが存在しない時のdetailsのメッセージを`./rules/config/default_details.txt`で設定できます。`default_details.txt`では`Provider Name``EventID``details`の組み合わせで設定することができます。default_details.txt`やYML検知ルールに対応するルールが記載されていない場合はすべてのフィールド情報を出力します。
CSVファイルとして保存する場合、以下の列が追加されます:
* `MitreAttack`: MITRE ATT&CKの戦術。
* `RuleFile`: アラートまたはイベントを生成した検知ルールのファイル名。
* `EvtxFile`: アラートまたはイベントを起こしたevtxファイルへのパス。
* `RecordInformation`: すべてのフィールド情報。
`-F`もしくは`--full-data`オプションを指定した場合、全てのフィールド情報が`RecordInformation`カラムにで出力されます。
## プロファイルによる出力のカスタマイズ
Hayabusaの出力内容はconfig/profiles.txtとconfig/default_profile.txtを変更することでカスタマイズできます。カスタマイズではHayabusaの出力で用いられている内容を以下のエイリアスで呼び出すことができます。
もし、config/profiles.txtに書いてるプロファイルを用いたい場合は-p/--profileオプションを利用してください。
default_profiles.txtをprofile.txtに書かれているプロファイルで上書きしたい場合は--set-default-profileオプションを利用してください。
|エイリアス名|Haysbusaの出力にある情報|
|:---|:---|
|%Timestamp% | `Timestamp` |
|%Computer% | `Computer` |
|%Channel% | `Channel` |
|%Level% | `Level` |
|%EventID% | `EventID` |
|%MitreAttack% | `MitreAttack` |
|%RecordID% | `RecordID` |
|%RuleTitle% | `Title` |
|%Details% | `Details` |
|%RecordInformation% | `RecordInformation` |
|%RuleFile% | `RuleFile` |
|%EvtxFile% | `EvtxFile` |
profiles.txtへの記載例:
```yaml
(profilename):
(column name): '%Timestamp%'
(column name2): '%Computer%'
(column name3): '%Channel%'
```
## Levelの省略

View File

@@ -59,6 +59,7 @@ Hayabusa is a **Windows event log fast forensics timeline generator** and **thre
- [Logon Summary Generator](#logon-summary-generator)
- [Testing Hayabusa on Sample Evtx Files](#testing-hayabusa-on-sample-evtx-files)
- [Hayabusa Output](#hayabusa-output)
- [Output customize by profile](#output-customize-by-profile)
- [Level Abbrevations](#level-abbrevations)
- [MITRE ATT&CK Tactics Abbreviations](#mitre-attck-tactics-abbreviations)
- [Channel Abbreviations](#channel-abbreviations)
@@ -495,7 +496,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git
# Hayabusa Output
When hayabusa output is being displayed to the screen (the default), it will display the following information:
When hayabusa output is being displayed to the screen (the default), it can display the following information:
* `Timestamp`: Default is `YYYY-MM-DD HH:mm:ss.sss +hh:mm` format. This comes from the `<Event><System><TimeCreated SystemTime>` field in the event log. The default timezone will be the local timezone but you can change the timezone to UTC with the `--utc` option.
* `Computer`: This comes from the `<Event><System><Computer>` field in the event log.
@@ -505,14 +506,42 @@ When hayabusa output is being displayed to the screen (the default), it will dis
* `RecordID`: This comes from the `<Event><System><EventRecordID>` field in the event log. You can hidde this output with the `-R` or `--hide-record-id` option.
* `Title`: This comes from the `title` field in the YML detection rule.
* `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 fields in event logs. For example, usernames, command line information, process information, etc... When a placeholder points to a field that does not exist or there is an incorrect alias mapping, it will be outputted as `n/a` (not available). If the `details` field is not specified (i.e. sigma rules), default `details` messages to extract fields defined in `./rules/config/default_details.txt` will be outputted. You can add more default `details` messages by adding the `Provider Name`, `EventID` and `details` message you want to output in `default_details.txt`. When no `details` field is defined in a rule nor in `default_details.txt`, all fields will be outputted to the `details` column.
The following additional columns will be added to the output when saving to a CSV file:
* `MitreAttack`: MITRE ATT&CK tactics.
* `RuleFile`: The filename of the detection rule that generated the alert or event.
* `EvtxFile`: The path to the evtx file that caused the alert or event.
* `RecordInformation`: All field information.
## Output customize by profile
You can customize the output by modifiy `config/profiles.txt` and `config/default_profile.txt`.
You can be setting following alias.
If you want to use profile in `config/profiles.txt` , you use `-p/-profile` option.
Please use `--set-default-profile` option when you want to overwrite `default_profiles.txt` by profile in `config/profiles.txt`.
|alias name| Hayabusa output information|
|:---|:---|
|%Timestamp% | `Timestamp` |
|%Computer% | `Computer` |
|%Channel% | `Channel` |
|%Level% | `Level` |
|%EventID% | `EventID` |
|%MitreAttack% | `MitreAttack` |
|%RecordID% | `RecordID` |
|%RuleTitle% | `Title` |
|%Details% | `Details` |
|%RecordInformation% | `RecordInformation` |
|%RuleFile% | `RuleFile` |
|%EvtxFile% | `EvtxFile` |
e.g. profile customize
```yaml
(profilename):
(column name): '%Timestamp%'
(column name2): '%Computer%'
(column name3): '%Channel%'
```
If you add the `-F` or `--full-data` option, a `RecordInformation` column with all field information will also be added.
## Level Abbrevations