diff --git a/.gitignore b/.gitignore index eafef81f..eec35107 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ test_* .env /logs -*.csv \ No newline at end of file +*.csv +hayabusa* \ No newline at end of file diff --git a/CHANGELOG-Japanese.md b/CHANGELOG-Japanese.md index 2a995a1e..a4b8ae4e 100644 --- a/CHANGELOG-Japanese.md +++ b/CHANGELOG-Japanese.md @@ -13,6 +13,8 @@ - ルールのアップデート機能のルールパスの出力から./を削除した。 (#642) (@hitenkoku) - MITRE ATT&CK関連のタグとその他タグを出力するための出力用のエイリアスを追加した。 (#637) (@hitenkoku) - 結果概要の数値をカンマをつけて見やすくした。 (#649) (@hitenkoku) +- `-h`オプションでメニューを使いやすいようにグループ化した。 (#651) (@YamatoSecurity and @hitenkoku) +- 結果概要内の検知数にパーセント表示を追加した。 (#658) (@hitenkoku) **バグ修正:** diff --git a/CHANGELOG.md b/CHANGELOG.md index eb0a56a1..683d25d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,9 @@ - Removed ./ from rule path when updating. (#642) (@hitenkoku) - Added new output alias for MITRE ATT&CK tags and other tags. (#637) (@hitenkoku) +- Organized menu when `-h` is used. (#651) (@YamatoSecurity and @hitenkoku) - Added commas to summary numbers to make them easier to read. (#649) (@hitenkoku) +- Added output percentage of detections in Result Summary. (#658) (@hitenkoku) **Bug Fixes:** diff --git a/Cargo.lock b/Cargo.lock index 809de233..e6bcafe3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,6 +28,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7ed72e1635e121ca3e79420540282af22da58be50de153d36f81ddc6b83aa9e" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" version = "0.12.1" @@ -39,9 +48,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c794e162a5eff65c72ef524dfe393eb923c354e350bb78b9c7383df13f3bc142" +checksum = "508b352bb5c066aac251f6daf6b36eccd03e8a88e8081cd44959ea277a3af9a8" [[package]] name = "arrayref" @@ -200,15 +209,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "3f725f340c3854e3cb3ab736dc21f0cca183303acea3b3ffec30f141503ac8eb" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", "num-integer", "num-traits", "serde", "time 0.1.44", + "wasm-bindgen", "winapi", ] @@ -292,6 +303,22 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + [[package]] name = "crc32fast" version = "1.3.2" @@ -793,7 +820,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 1.0.2", + "itoa 1.0.3", ] [[package]] @@ -842,7 +869,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 1.0.2", + "itoa 1.0.3", "pin-project-lite", "tokio", "tower-service", @@ -850,6 +877,19 @@ dependencies = [ "want", ] +[[package]] +name = "iana-time-zone" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9512e544c25736b82aebbd2bf739a47c8a1c935dfcc3a6adcde10e35cd3cd468" +dependencies = [ + "android_system_properties", + "core-foundation", + "js-sys", + "wasm-bindgen", + "winapi", +] + [[package]] name = "idna" version = "0.2.3" @@ -930,9 +970,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" [[package]] name = "jemalloc-sys" @@ -964,6 +1004,15 @@ dependencies = [ "libc", ] +[[package]] +name = "js-sys" +version = "0.3.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "krapslog" version = "0.4.0" @@ -993,9 +1042,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.129" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "64de3cc433455c14174d42e554d4027ee631c4d046d43e3ecc6efc4636cdc7a7" [[package]] name = "libgit2-sys" @@ -1586,18 +1635,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.141" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7af873f2c95b99fcb0bd0fe622a43e29514658873c8ceba88c4cb88833a22500" +checksum = "53e8e5d5b70924f74ff5c6d64d9a5acd91422117c60f48c4e07855238a254553" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.141" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75743a150d003dd863b51dc809bcad0d73f2102c53632f1e954e738192a3413f" +checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" dependencies = [ "proc-macro2", "quote", @@ -1606,11 +1655,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" +checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" dependencies = [ - "itoa 1.0.2", + "itoa 1.0.3", "ryu", "serde", ] @@ -2002,9 +2051,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" +checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" [[package]] name = "unicode-normalization" diff --git a/README-Japanese.md b/README-Japanese.md index c999813d..aa0353bc 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -1,6 +1,6 @@

- Hayabusa Logo + Hayabusa Logo

[English] | [日本語]
@@ -48,27 +48,38 @@ Hayabusaは、日本の[Yamato Security](https://yamatosecurity.connpass.com/) - [32ビットWindowsバイナリのクロスコンパイル](#32ビットwindowsバイナリのクロスコンパイル) - [macOSでのコンパイルの注意点](#macosでのコンパイルの注意点) - [Linuxでのコンパイルの注意点](#linuxでのコンパイルの注意点) + - [LinuxのMUSLバイナリのクロスコンパイル](#linuxのmuslバイナリのクロスコンパイル) + - [Linuxでのコンパイルの注意点](#linuxでのコンパイルの注意点-1) - [Hayabusaの実行](#hayabusaの実行) - [注意: アンチウィルス/EDRの誤検知と遅い初回実行](#注意-アンチウィルスedrの誤検知と遅い初回実行) - [Windows](#windows) - [Linux](#linux) - [macOS](#macos) - [使用方法](#使用方法) + - [主なコマンド](#主なコマンド) - [コマンドラインオプション](#コマンドラインオプション) - [使用例](#使用例) - [ピボットキーワードの作成](#ピボットキーワードの作成) - [ログオン情報の要約](#ログオン情報の要約) - [サンプルevtxファイルでHayabusaをテストする](#サンプルevtxファイルでhayabusaをテストする) - [Hayabusaの出力](#hayabusaの出力) - - [プロファイルによる出力のカスタマイズ](#プロファイルによる出力のカスタマイズ) + - [プロファイル](#プロファイル) + - [1. `minimal`プロファイルの出力](#1-minimalプロファイルの出力) + - [2. `standard`プロファイルの出力](#2-standardプロファイルの出力) + - [3. `verbose`プロファイルの出力](#3-verboseプロファイルの出力) + - [4. `verbose-all-field-info`プロファイルの出力](#4-verbose-all-field-infoプロファイルの出力) + - [5. `verbose-details-and-all-field-info`プロファイルの出力](#5-verbose-details-and-all-field-infoプロファイルの出力) + - [プロファイルの比較](#プロファイルの比較) + - [Profile Field Aliases](#profile-field-aliases) - [Levelの省略](#levelの省略) - [MITRE ATT&CK戦術の省略](#mitre-attck戦術の省略) - [Channel情報の省略](#channel情報の省略) - [プログレスバー](#プログレスバー) - [標準出力へのカラー設定](#標準出力へのカラー設定) - - [イベント頻度タイムライン](#イベント頻度タイムライン) - - [最多検知日の出力](#最多検知日の出力) - - [最多検知端末名の出力](#最多検知端末名の出力) + - [結果のサマリ](#結果のサマリ) + - [イベント頻度タイムライン](#イベント頻度タイムライン) + - [最多検知日の出力](#最多検知日の出力) + - [最多検知端末名の出力](#最多検知端末名の出力) - [Hayabusaルール](#hayabusaルール) - [Hayabusa v.s. 変換されたSigmaルール](#hayabusa-vs-変換されたsigmaルール) - [検知ルールのチューニング](#検知ルールのチューニング) @@ -183,7 +194,7 @@ git clone https://github.com/Yamato-Security/hayabusa.git --recursive `git pull --recurse-submodules`コマンド、もしくは以下のコマンドで`rules`フォルダを同期し、Hayabusaの最新のルールを更新することができます: ```bash -hayabusa-1.4.3-win-x64.exe -u +hayabusa-1.5.0-win-x64.exe -u ``` アップデートが失敗した場合は、`rules`フォルダの名前を変更してから、もう一回アップデートしてみて下さい。 @@ -198,7 +209,6 @@ hayabusa-1.4.3-win-x64.exe -u Rustがインストールされている場合、以下のコマンドでソースコードからコンパイルすることができます: ```bash -cargo clean cargo build --release ``` @@ -254,6 +264,27 @@ Fedora系のディストロ: sudo yum install openssl-devel ``` +## LinuxのMUSLバイナリのクロスコンパイル + +まず、Linux OSでターゲットをインストールします。 + +```bash +rustup install stable-x86_64-unknown-linux-musl +rustup target add x86_64-unknown-linux-musl +``` + +以下のようにコンパイルします: + +``` +cargo build --release --target=x86_64-unknown-linux-musl +``` + +MUSLバイナリは`./target/x86_64-unknown-linux-musl/release/`ディレクトリ配下に作成されます。 +MUSLバイナリはGNUバイナリより約15%遅いです。 + +## Linuxでのコンパイルの注意点 + + # Hayabusaの実行 ## 注意: アンチウィルス/EDRの誤検知と遅い初回実行 @@ -268,20 +299,20 @@ Windows PC起動後の初回実行時に時間がかかる場合があります コマンドプロンプトやWindows Terminalから32ビットもしくは64ビットのWindowsバイナリをHayabusaのルートディレクトリから実行します。 -例: `hayabusa-1.4.3-windows-x64.exe` +例: `hayabusa-1.5.0-windows-x64.exe` ## Linux まず、バイナリに実行権限を与える必要があります。 ```bash -chmod +x ./hayabusa-1.4.3-linux-x64-gnu +chmod +x ./hayabusa-1.5.0-linux-x64-gnu ``` 次に、Hayabusaのルートディレクトリから実行します: ```bash -./hayabusa-1.4.3-linux-x64-gnu +./hayabusa-1.5.0-linux-x64-gnu ``` ## macOS @@ -289,13 +320,13 @@ chmod +x ./hayabusa-1.4.3-linux-x64-gnu まず、ターミナルやiTerm2からバイナリに実行権限を与える必要があります。 ```bash -chmod +x ./hayabusa-1.4.3-mac-intel +chmod +x ./hayabusa-1.5.0-mac-intel ``` 次に、Hayabusaのルートディレクトリから実行してみてください: ```bash -./hayabusa-1.4.3-mac-intel +./hayabusa-1.5.0-mac-intel ``` macOSの最新版では、以下のセキュリティ警告が出る可能性があります: @@ -309,7 +340,7 @@ macOSの環境設定から「セキュリティとプライバシー」を開き その後、ターミナルからもう一回実行してみてください: ```bash -./hayabusa-1.4.3-mac-intel +./hayabusa-1.5.0-mac-intel ``` 以下の警告が出るので、「開く」をクリックしてください。 @@ -319,50 +350,69 @@ macOSの環境設定から「セキュリティとプライバシー」を開き これで実行できるようになります。 # 使用方法 +## 主なコマンド + +* デフォルト: ファストフォレンジックタイムラインの作成。 +* `--level-tuning`: アラート`level`のカスタムチューニング +* `-L, --logon-summary`: ログオンイベントのサマリを出力する。 +* `-P, --pivot-keywords-list`: ピボットする不審なキーワードのリスト作成。 +* `-s, --statistics`: イベントIDに基づくイベントの合計と割合の集計を出力する。 +* `--set-default-profile`: デフォルトプロファイルを変更する。 +* `-u, --update`: GitHubの[hayabusa-rules](https://github.com/Yamato-Security/hayabusa-rules)リポジトリにある最新のルールに同期させる。 ## コマンドラインオプション ``` USAGE: - hayabusa.exe -f file.evtx [OPTIONS] / hayabusa.exe -d evtx-directory [OPTIONS] + hayabusa.exe [OTHER-ACTIONS] [OPTIONS] -OPTIONS: - --European-time ヨーロッパ形式で日付と時刻を出力する (例: 22-02-2022 22:00:00.123 +02:00) - --RFC-2822 RFC 2822形式で日付と時刻を出力する (例: Fri, 22 Feb 2022 22:00:00 -0600) - --RFC-3339 RFC 3339形式で日付と時刻を出力する (例: 2022-02-22 22:00:00.123456-06:00) - --US-military-time 24時間制(ミリタリータイム)のアメリカ形式で日付と時刻を出力する (例: 02-22-2022 22:00:00.123 -06:00) - --US-time アメリカ形式で日付と時刻を出力する (例: 02-22-2022 10:00:00.123 PM -06:00) - -c, --rules-config ルールフォルダのコンフィグディレクトリ (デフォルト: ./rules/config) - --contributors コントリビュータの一覧表示 - -d, --directory .evtxファイルを持つディレクトリのパス - -D, --deep-scan すべてのイベントIDを対象にしたスキャンを行う - --enable-deprecated-rules Deprecatedルールを有効にする - --end-timeline 解析対象とするイベントログの終了時刻 (例: "2022-02-22 23:59:59 +09:00") - --exclude-status ... 読み込み対象外とするルール内でのステータス (ex: experimental) (ex: stable test) - -f, --filepath 1つの.evtxファイルに対して解析を行う - -h, --help ヘルプ情報を表示する - -l, --live-analysis ローカル端末のC:\Windows\System32\winevt\Logsフォルダを解析する - -L, --logon-summary 成功と失敗したログオン情報の要約を出力する - --level-tuning [] ルールlevelのチューニング (デフォルト: ./rules/config/level_tuning.txt) - -m, --min-level 結果出力をするルールの最低レベル (デフォルト: informational) - -n, --enable-noisy-rules Noisyルールを有効にする - --no_color カラー出力を無効にする - -o, --output タイムラインをCSV形式で保存する (例: results.csv) - -p, --pivot-keywords-list ピボットキーワードの一覧作成 - -P, --profile 利用する出力プロファイル名を指定する - -q, --quiet Quietモード: 起動バナーを表示しない - -Q, --quiet-errors Quiet errorsモード: エラーログを保存しない - -r, --rules ルールファイルまたはルールファイルを持つディレクトリ (デフォルト: ./rules) - -s, --statistics イベントIDの統計情報を表示する - --set-default-profile デフォルトの出力コンフィグを設定する - --start-timeline 解析対象とするイベントログの開始時刻 (例: "2020-02-22 00:00:00 +09:00") - -t, --thread-number スレッド数 (デフォルト: パフォーマンスに最適な数値) - --target-file-ext ... evtx以外の拡張子を解析対象に追加する。 (例1: evtx_data 例2:evtx1 evtx2) - -u, --update-rules rulesフォルダをhayabusa-rulesのgithubリポジトリの最新版に更新する - -U, --UTC UTC形式で日付と時刻を出力する (デフォルト: 現地時間) - -v, --verbose 詳細な情報を出力する - -V, --visualize-timeline イベント頻度タイムラインを出力する - --version バージョン情報を表示する +INPUT: + -d, --directory .evtxファイルを持つディレクトリのパス + -f, --file 1つの.evtxファイルに対して解析を行う + -l, --live-analysis ローカル端末のC:\Windows\System32\winevt\Logsフォルダを解析する + +ADVANCED: + -c, --rules-config ルールフォルダのコンフィグディレクトリ (デフォルト: ./rules/config) + -Q, --quiet-errors Quiet errorsモード: エラーログを保存しない + -r, --rules ルールファイルまたはルールファイルを持つディレクトリ (デフォルト: ./rules) + -t, --thread-number スレッド数 (デフォルト: パフォーマンスに最適な数値) + --target-file-ext ... evtx以外の拡張子を解析対象に追加する。 (例1: evtx_data 例2:evtx1 evtx2) + +OUTPUT: + -o, --output タイムラインをCSV形式で保存する (例: results.csv) + -P, --profile 利用する出力プロファイル名を指定する (minimal, standard, verbose, verbose-all-field-info, verbose-details-and-all-field-info) + +DISPLAY-SETTINGS: + --no-color カラー出力を無効にする + -q, --quiet Quietモード: 起動バナーを表示しない + -v, --verbose 詳細な情報を出力する + -V, --visualize-timeline イベント頻度タイムラインを出力する + +FILTERING: + -D, --deep-scan すべてのイベントIDを対象にしたスキャンを行う(遅くなる) + --enable-deprecated-rules Deprecatedルールを有効にする + --exclude-status ... 読み込み対象外とするルール内でのステータス (ex: experimental) (ex: stable test) + -m, --min-level 結果出力をするルールの最低レベル (デフォルト: informational) + -n, --enable-noisy-rules Noisyルールを有効にする + --timeline-end 解析対象とするイベントログの終了時刻 (例: "2022-02-22 23:59:59 +09:00") + --timeline-start 解析対象とするイベントログの開始時刻 (例: "2020-02-22 00:00:00 +09:00") + +OTHER-ACTIONS: + --contributors コントリビュータの一覧表示 + -L, --logon-summary 成功と失敗したログオン情報の要約を出力する + --level-tuning [] ルールlevelのチューニング (デフォルト: ./rules/config/level_tuning.txt) + -p, --pivot-keywords-list ピボットキーワードの一覧作成 + -s, --statistics イベントIDの統計情報を表示する + --set-default-profile デフォルトの出力コンフィグを設定する + -u, --update-rules rulesフォルダをhayabusa-rulesのgithubリポジトリの最新版に更新する + +TIME-FORMAT: + --European-time ヨーロッパ形式で日付と時刻を出力する (例: 22-02-2022 22:00:00.123 +02:00) + --RFC-2822 RFC 2822形式で日付と時刻を出力する (例: Fri, 22 Feb 2022 22:00:00 -0600) + --RFC-3339 RFC 3339形式で日付と時刻を出力する (例: 2022-02-22 22:00:00.123456-06:00) + --US-military-time 24時間制(ミリタリータイム)のアメリカ形式で日付と時刻を出力する (例: 02-22-2022 22:00:00.123 -06:00) + --US-time アメリカ形式で日付と時刻を出力する (例: 02-22-2022 10:00:00.123 PM -06:00) + -U, --UTC UTC形式で日付と時刻を出力する (デフォルト: 現地時間) ``` ## 使用例 @@ -370,79 +420,84 @@ OPTIONS: * 1つのWindowsイベントログファイルに対してHayabusaを実行します: ```bash -hayabusa-1.4.3-win-x64.exe -f eventlog.evtx +hayabusa-1.5.0-win-x64.exe -f eventlog.evtx ``` -* 複数のWindowsイベントログファイルのあるsample-evtxディレクトリに対して、Hayabusaを実行します: +* `verbose`プロファイルで複数のWindowsイベントログファイルのあるsample-evtxディレクトリに対して、Hayabusaを実行します: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -P verbose ``` -* 全てのフィールド情報も含めて1つのCSVファイルにエクスポートして、Excel、Timeline Explorer、Elastic Stack等でさらに分析することができます(注意: `-F`を有効にすると、出力するファイルのサイズがとても大きくなります!): +* 全てのフィールド情報も含めて1つのCSVファイルにエクスポートして、Excel、Timeline Explorer、Elastic Stack等でさらに分析することができます(注意: `verbose-details-and-all-field-info`プロファイルを使すると、出力するファイルのサイズがとても大きくなります!): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -o results.csv -F +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -o results.csv -P `verbose-details-and-all-field-info` ``` -* Hayabusaルールのみを実行します(デフォルトでは `-r .\rules` にあるすべてのルールが利用されます): +* Hayabusaルールのみを実行します(デフォルトでは`-r .\rules`にあるすべてのルールが利用されます): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv ``` * Windowsでデフォルトで有効になっているログに対してのみ、Hayabusaルールを実行します: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv ``` * Sysmonログに対してのみHayabusaルールを実行します: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv ``` * Sigmaルールのみを実行します: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv ``` * 廃棄(deprecated)されたルール(`status`が`deprecated`になっているルール)とノイジールール(`.\rules\config\noisy_rules.txt`にルールIDが書かれているルール)を有効にします: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx --enable-deprecated-rules --enable-noisy-rules -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx --enable-deprecated-rules --enable-noisy-rules -o results.csv ``` * ログオン情報を分析するルールのみを実行し、UTCタイムゾーンで出力します: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default\events\Security\Logons -U -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default\events\Security\Logons -U -o results.csv ``` * 起動中のWindows端末上で実行し(Administrator権限が必要)、アラート(悪意のある可能性のある動作)のみを検知します: ```bash -hayabusa-1.4.3-win-x64.exe -l -m low +hayabusa-1.5.0-win-x64.exe -l -m low ``` * criticalレベルのアラートからピボットキーワードの一覧を作成します(結果は結果毎に`keywords-Ip Address.txt`や`keywords-Users.txt`等に出力されます): ```bash -hayabusa-1.4.3-win-x64.exe -l -m critical -p -o keywords +hayabusa-1.5.0-win-x64.exe -l -m critical -p -o keywords ``` -* イベントIDの統計情報を取得します: +* イベントIDの統計情報を出力します: ```bash -hayabusa-1.4.3-win-x64.exe -f Security.evtx -s +hayabusa-1.5.0-win-x64.exe -f Security.evtx -s +``` +* ログオンサマリを出力します: + +```bash +hayabusa-1.5.0-win-x64.exe -L -f Security.evtx -s ``` * 詳細なメッセージを出力します(処理に時間がかかるファイル、パースエラー等を特定するのに便利): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -v +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -v ``` * Verbose出力の例: @@ -497,56 +552,77 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git ``` # Hayabusaの出力 +## プロファイル -Hayabusaの結果を標準出力に表示しているとき(デフォルト)は、以下の情報を表示することができます: +Hayabusaの`config/profiles.yaml`設定ファイルでは、5つのプロファイルが定義されています: -* `Timestamp`: デフォルトでは`YYYY-MM-DD HH:mm:ss.sss +hh:mm`形式になっています。イベントログの``フィールドから来ています。デフォルトのタイムゾーンはローカルのタイムゾーンになりますが、`--utc` オプションで UTC に変更することができます。 -* `Computer`: イベントログの``フィールドから来ています。 -* `Channel`: ログ名です。イベントログの``フィールドから来ています。 -* `Event ID`: イベントログの``フィールドから来ています。 -* `Level`: YML検知ルールの`level`フィールドから来ています。(例:`informational`, `low`, `medium`, `high`, `critical`) デフォルトでは、すべてのレベルのアラートとイベントが出力されますが、`-m`オプションで最低のレベルを指定することができます。例えば`-m high`オプションを付けると、`high`と`critical`アラートしか出力されません。 -* `Title`: YML検知ルールの`title`フィールドから来ています。 -* `RecordID`: イベントレコード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検知ルールに対応するルールが記載されていない場合はすべてのフィールド情報を出力します。 -* `MitreTactics`: MITRE ATT&CKの戦術。 -* `MitreTags`: MITRE ATT&CKの戦術以外の情報。attack.g(グループ)、attack.t(技術)、attack.s(ソフトウェア)の情報を出力します。 -* `OtherTags`: YML検知ルールの`tags` フィールドから`MitreTactics`, `MitreTags` 以外の月情報を出力します。 -* `RuleFile`: アラートまたはイベントを生成した検知ルールのファイル名。 -* `EvtxFile`: アラートまたはイベントを起こしたevtxファイルへのパス。 -* `RecordInformation`: すべてのフィールド情報。 +1. `minimal` +2. `standard` (デフォルト) +3. `verbose` +4. `verbose-all-field-info` +5. `verbose-details-and-all-field-info` -## プロファイルによる出力のカスタマイズ +このファイルを編集することで、簡単に独自のプロファイルをカスタマイズしたり、追加したりすることができます。 +`--set-default-profile `オプションでデフォルトのプロファイルを変更することもできます。 -Hayabusaの出力内容はconfig/profiles.txtとconfig/default_profile.txtを変更することでカスタマイズできます。カスタマイズではHayabusaの出力で用いられている内容を以下のエイリアスで呼び出すことができます。 -もし、`config/profiles.txt`に書いてるプロファイルを用いたい場合は`-P/--profile`オプションを利用してください。 -default_profiles.txtをprofile.txtに書かれているプロファイルで上書きしたい場合は`--set-default-profile`オプションを利用してください。 +### 1. `minimal`プロファイルの出力 -|エイリアス名|Haysbusaの出力にある情報| -|:---|:---| -|%Timestamp% | `Timestamp` | -|%Computer% | `Computer` | -|%Channel% | `Channel` | -|%Level% | `Level` | -|%EventID% | `EventID` | -|%MitreTactics% | `MitreTactics` | -|%MitreTags% | `MitreTags` | -|%OtherTags% | `OtherTags` | -|%RecordID% | `RecordID` | -|%RuleTitle% | `Title` | -|%Details% | `Details` | -|%RecordInformation% | `RecordInformation` | -|%RuleFile% | `RuleFile` | -|%EvtxFile% | `EvtxFile` | +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%RuleTitle%`, `%Details%` -profiles.txtへの記載例: +### 2. `standard`プロファイルの出力 -```yaml -(profilename): - (column name): '%Timestamp%' - (column name2): '%Computer%' - (column name3): '%Channel%' -``` +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics%`, `%RecordID%`, `%RuleTitle%`, `%Details%` +### 3. `verbose`プロファイルの出力 + +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics`, `%MitreTags%`, `%OtherTags%`, `%RecordID%`, `%RuleTitle%`, `%Details%`, `%RuleFile%`, `%EvtxFile%` + +### 4. `verbose-all-field-info`プロファイルの出力 + +最小限の`details`情報を出力する代わりに、イベントにあるすべての`EventData`フィールド情報が出力されます。 + +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics`, `%MitreTags%`, `%OtherTags%`, `%RecordID%`, `%RuleTitle%`, `%AllFieldInfo%`, `%RuleFile%`, `%EvtxFile%` + +### 5. `verbose-details-and-all-field-info`プロファイルの出力 + +`verbose`プロファイルで出力される情報とイベントにあるすべての`EventData`フィールド情報が出力されます。 +(注意: 出力ファイルサイズは2倍になります!) + +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics`, `%MitreTags%`, `%OtherTags%`, `%RecordID%`, `%RuleTitle%`, `%Details%`, `%RuleFile%`, `%EvtxFile%`, `%AllFieldInfo%` + +### プロファイルの比較 + +以下のベンチマークは、2018年製のマックブックプロ上で7.5GBのEVTXデータに対して実施されました。 + +| プロファイル | 処理時間 | 結果のファイルサイズ | +| :---: | :---: | :---: | +| minimal | 16分18秒 | 690 MB | +| standard | 16分23秒 | 710 MB | +| verbose | 17分 | 990 MB | +| verbose-all-field-info | 16分50秒 | 1.6 GB | +| verbose-details-and-all-field-info | 17分12秒 | 2.1 GB | + +### Profile Field Aliases + +| エイリアス名 | Hayabusaの出力情報 | +| :--- | :--- | +|%Timestamp% | デフォルトでは`YYYY-MM-DD HH:mm:ss.sss +hh:mm`形式になっている。イベントログの``フィールドから来ている。デフォルトのタイムゾーンはローカルのタイムゾーンになるが、`--UTC`オプションでUTCに変更することができる。 | +|%Computer% | イベントログの``フィールド。 | +|%Channel% | ログ名。イベントログの``フィールド。 | +|%EventID% | イベントログの``フィールド。 | +|%Level% | YML検知ルールの`level`フィールド。(例:`informational`、`low`、`medium`、`high`、`critical`) | +|%MitreTactics% | MITRE ATT&CKの[戦術](https://attack.mitre.org/tactics/enterprise/) (例: Initial Access、Lateral Movement等々) | +|%MitreTags% | MITRE ATT&CKの戦術以外の情報。attack.g(グループ)、attack.t(技術)、attack.s(ソフトウェア)の情報を出力する。 | +|%OtherTags% | YML検知ルールの`tags`フィールドから`MitreTactics`、`MitreTags`以外のキーワードを出力する。| +|%RecordID% | ``フィールドのイベントレコードID。 | +|%RuleTitle% | YML検知ルールの`title`フィールド。 | +|%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検知ルールに対応するルールが記載されていない場合はすべてのフィールド情報を出力します。 | +|%AllFieldInfo% | すべてのフィールド情報。 | +|%RuleFile% | アラートまたはイベントを生成した検知ルールのファイル名。 | +|%EvtxFile% | アラートまたはイベントを起こしたevtxファイルへのパス。 | + +これらのエイリアスは、出力プロファイルで使用することができます。また、他の[イベントキーアライズ](https://github.com/Yamato-Security/hayabusa-rules/blob/main/README-Japanese.md#%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%82%AD%E3%83%BC%E3%82%A8%E3%82%A4%E3%83%AA%E3%82%A2%E3%82%B9)を定義し、他のフィールドを出力することもできます。 + ## Levelの省略 簡潔に出力するためにLevelを以下のように省略し出力しています。 @@ -624,16 +700,18 @@ Hayabusaの結果は`level`毎に文字色が変わります。 形式は`level名,(6桁のRGBのカラーhex)`です。 カラー出力をしないようにしたい場合は`--no-color`オプションをご利用ください。 -## イベント頻度タイムライン +## 結果のサマリ + +### イベント頻度タイムライン `-V`または`--visualize-timeline`オプションを使うことで、検知したイベントの数が5以上の時、頻度のタイムライン(スパークライン)を画面に出力します。 マーカーの数は最大10個です。デフォルトのCommand PromptとPowerShell Promptでは文字化けがでるので、Windows TerminalやiTerm2等のターミナルをご利用ください。 -## 最多検知日の出力 +### 最多検知日の出力 各レベルで最も検知された日付を画面に出力します。 -## 最多検知端末名の出力 +### 最多検知端末名の出力 各レベルで多く検知されたユニークなイベントが多い端末名上位5つを画面に出力します。 @@ -691,7 +769,7 @@ Hayabusaルールは、Windowsのイベントログ解析専用に設計され ## 検知レベルのlevelチューニング Hayabusaルール、Sigmaルールはそれぞれの作者が検知した際のリスクレベルを決めています。 -ユーザが独自のリスクレベルに設定するには`./rules/config/level_tuning.txt`に変換情報を書き、`hayabusa-1.4.3-win-x64.exe --level-tuning`を実行することでルールファイルが書き換えられます。 +ユーザが独自のリスクレベルに設定するには`./rules/config/level_tuning.txt`に変換情報を書き、`hayabusa-1.5.0-win-x64.exe --level-tuning`を実行することでルールファイルが書き換えられます。 ルールファイルが直接書き換えられることに注意して使用してください。 `./rules/config/level_tuning.txt`の例: @@ -704,9 +782,8 @@ id,new_level ## イベントIDフィルタリング -バージョン1.4.3以降では、デフォルトでパフォーマンスを上げるために、検知ルールでイベントIDが定義されていないイベントを無視しています。 -デフォルトでは`./rules/config/target_event_IDs.txt`で定義されたIDがスキャンされます。 -If you want to scan all events, please use the `-D, --deep-scan` option. +デフォルトではパフォーマンスを上げるために、検知ルールでイベントIDが定義されていないイベントを無視しています。 +`./rules/config/target_event_IDs.txt`で定義されたIDがスキャンされます。 すべてのイベントをスキャンしたい場合は、`-D, --deep-scan`オプションを使用してください。 # その他のWindowsイベントログ解析ツールおよび関連リソース diff --git a/README.md b/README.md index 01020d74..5a8db360 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- Hayabusa Logo + Hayabusa Logo

[ English ] | [日本語]
@@ -47,27 +47,37 @@ Hayabusa is a **Windows event log fast forensics timeline generator** and **thre - [Cross-compiling 32-bit Windows Binaries](#cross-compiling-32-bit-windows-binaries) - [macOS Compiling Notes](#macos-compiling-notes) - [Linux Compiling Notes](#linux-compiling-notes) + - [Cross-compiling Linux MUSL Binaries](#cross-compiling-linux-musl-binaries) - [Running Hayabusa](#running-hayabusa) - [Caution: Anti-Virus/EDR Warnings and Slow Runtimes](#caution-anti-virusedr-warnings-and-slow-runtimes) - [Windows](#windows) - [Linux](#linux) - [macOS](#macos) - [Usage](#usage) + - [Main commands](#main-commands) - [Command Line Options](#command-line-options) - [Usage Examples](#usage-examples) - [Pivot Keyword Generator](#pivot-keyword-generator) - [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) + - [Profiles](#profiles) + - [1. `minimal` profile output](#1-minimal-profile-output) + - [2. `standard` profile output](#2-standard-profile-output) + - [3. `verbose` profile output](#3-verbose-profile-output) + - [4. `verbose-all-field-info` profile output](#4-verbose-all-field-info-profile-output) + - [5. `verbose-details-and-all-field-info` profile output](#5-verbose-details-and-all-field-info-profile-output) + - [Profile Comparison](#profile-comparison) + - [Profile Field Aliases](#profile-field-aliases) - [Level Abbrevations](#level-abbrevations) - [MITRE ATT&CK Tactics Abbreviations](#mitre-attck-tactics-abbreviations) - [Channel Abbreviations](#channel-abbreviations) - [Progress Bar](#progress-bar) - [Color Output](#color-output) - - [Event Fequency Timeline](#event-fequency-timeline) - - [Dates with most total detections](#dates-with-most-total-detections) - - [Top 5 computers with most unique detections](#top-5-computers-with-most-unique-detections) + - [Results Summary](#results-summary-1) + - [Event Fequency Timeline](#event-fequency-timeline) + - [Dates with most total detections](#dates-with-most-total-detections) + - [Top 5 computers with most unique detections](#top-5-computers-with-most-unique-detections) - [Hayabusa Rules](#hayabusa-rules) - [Hayabusa v.s. Converted Sigma Rules](#hayabusa-vs-converted-sigma-rules) - [Detection Rule Tuning](#detection-rule-tuning) @@ -176,7 +186,7 @@ Note: If you forget to use --recursive option, the `rules` folder, which is mana You can sync the `rules` folder and get latest Hayabusa rules with `git pull --recurse-submodules` or use the following command: ```bash -hayabusa-1.4.3-win-x64.exe -u +hayabusa-1.5.0-win-x64.exe -u ``` If the update fails, you may need to rename the `rules` folder and try again. @@ -191,7 +201,6 @@ If the update fails, you may need to rename the `rules` folder and try again. If you have Rust installed, you can compile from source with the following command: ```bash -cargo clean cargo build --release ``` @@ -250,6 +259,24 @@ Fedora-based distros: sudo yum install openssl-devel ``` +## Cross-compiling Linux MUSL Binaries + +On a Linux OS, first install the target. + +```bash +rustup install stable-x86_64-unknown-linux-musl +rustup target add x86_64-unknown-linux-musl +``` + +Compile with: + +``` +cargo build --release --target=x86_64-unknown-linux-musl +``` + +The MUSL binary will be created in the `./target/x86_64-unknown-linux-musl/release/` directory. +MUSL binaries are are about 15% slower than the GNU binaries. + # Running Hayabusa ## Caution: Anti-Virus/EDR Warnings and Slow Runtimes @@ -264,20 +291,20 @@ You may experience slow runtime especially on the first run after a reboot due t In a Command/PowerShell Prompt or Windows Terminal, just run the appropriate 32-bit or 64-bit Windows binary. -Example: `hayabusa-1.4.3-windows-x64.exe` +Example: `hayabusa-1.5.0-windows-x64.exe` ## Linux You first need to make the binary executable. ```bash -chmod +x ./hayabusa-1.4.3-linux-x64-gnu +chmod +x ./hayabusa-1.5.0-linux-x64-gnu ``` Then run it from the Hayabusa root directory: ```bash -./hayabusa-1.4.3-linux-x64-gnu +./hayabusa-1.5.0-linux-x64-gnu ``` ## macOS @@ -285,13 +312,13 @@ Then run it from the Hayabusa root directory: From Terminal or iTerm2, you first need to make the binary executable. ```bash -chmod +x ./hayabusa-1.4.3-mac-intel +chmod +x ./hayabusa-1.5.0-mac-intel ``` Then, try to run it from the Hayabusa root directory: ```bash -./hayabusa-1.4.3-mac-intel +./hayabusa-1.5.0-mac-intel ``` On the latest version of macOS, you may receive the following security error when you try to run it: @@ -305,7 +332,7 @@ Click "Cancel" and then from System Preferences, open "Security & Privacy" and f After that, try to run it again. ```bash -./hayabusa-1.4.3-mac-intel +./hayabusa-1.5.0-mac-intel ``` The following warning will pop up, so please click "Open". @@ -315,130 +342,155 @@ The following warning will pop up, so please click "Open". You should now be able to run hayabusa. # Usage +## Main commands + +* default: Create a fast forensics timeline. +* `--level-tuning`: Custom tune the alerts' `level`. +* `-L, --logon-summary`: Print a summary of logon events. +* `-P, --pivot-keywords-list`: Print a list of suspicious keywords to pivot on. +* `-s, --statistics`: Print metrics of the count and percentage of events based on Event ID. +* `--set-default-profile`: Change the default profile. +* `-u, --update`: Sync the rules to the latest rules in the [hayabusa-rules](https://github.com/Yamato-Security/hayabusa-rules) GitHub repository. ## Command Line Options ``` USAGE: - hayabusa.exe -f file.evtx [OPTIONS] / hayabusa.exe -d evtx-directory [OPTIONS] + hayabusa.exe [OTHER-ACTIONS] [OPTIONS] -OPTIONS: - --European-time Output timestamp in European time format (ex: 22-02-2022 22:00:00.123 +02:00) - --RFC-2822 Output timestamp in RFC 2822 format (ex: Fri, 22 Feb 2022 22:00:00 -0600) - --RFC-3339 Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00) - --US-military-time Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00) - --US-time Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00) - -c, --rules-config Specify custom rule config folder (default: ./rules/config) - --contributors Print the list of contributors - -d, --directory Directory of multiple .evtx files - -D, --deep-scan Disable event ID filter to scan all events - --enable-deprecated-rules Enable rules marked as deprecated - --end-timeline End time of the event logs to load (ex: "2022-02-22 23:59:59 +09:00") - --exclude-status ... Ignore rules according to status (ex: experimental) (ex: stable test) - -f, --filepath File path to one .evtx file - -h, --help Print help information - -l, --live-analysis Analyze the local C:\Windows\System32\winevt\Logs folder - -L, --logon-summary Print a summary of successful and failed logons - --level-tuning [] Tune alert levels (default: ./rules/config/level_tuning.txt) - -m, --min-level Minimum level for rules (default: informational) - -n, --enable-noisy-rules Enable rules marked as noisy - --no-color Disable color output - -o, --output Save the timeline in CSV format (ex: results.csv) - -p, --pivot-keywords-list Create a list of pivot keywords - -P, --profile Specify output profile - -q, --quiet Quiet mode: do not display the launch banner - -Q, --quiet-errors Quiet errors mode: do not save error logs - -r, --rules Specify a rule directory or file (default: ./rules) - -s, --statistics Print statistics of event IDs - --set-default-profile Set default output profile - --start-timeline Start time of the event logs to load (ex: "2020-02-22 00:00:00 +09:00") - -t, --thread-number Thread number (default: optimal number for performance) - --target-file-ext ... Specify additional target file extensions (ex: evtx_data) (ex: evtx1 evtx2) - -u, --update-rules Update to the latest rules in the hayabusa-rules github repository - -U, --UTC Output time in UTC format (default: local time) - -v, --verbose Output verbose information - -V, --visualize-timeline Output event frequency timeline - --version Print version information +INPUT: + -d, --directory Directory of multiple .evtx files + -f, --file File path to one .evtx file + -l, --live-analysis Analyze the local C:\Windows\System32\winevt\Logs folder + +ADVANCED: + -c, --rules-config Specify custom rule config directory (default: ./rules/config) + -Q, --quiet-errors Quiet errors mode: do not save error logs + -r, --rules Specify a custom rule directory or file (default: ./rules) + -t, --thread-number Thread number (default: optimal number for performance) + --target-file-ext ... Specify additional target file extensions (ex: evtx_data) (ex: evtx1 evtx2) + +OUTPUT: + -o, --output Save the timeline in CSV format (ex: results.csv) + -P, --profile Specify output profile (minimal, standard, verbose, verbose-all-field-info, verbose-details-and-all-field-info) + +DISPLAY-SETTINGS: + --no-color Disable color output + -q, --quiet Quiet mode: do not display the launch banner + -v, --verbose Output verbose information + -V, --visualize-timeline Output event frequency timeline + +FILTERING: + -D, --deep-scan Disable event ID filter to scan all events (slower) + --enable-deprecated-rules Enable rules marked as deprecated + --exclude-status ... Ignore rules according to status (ex: experimental) (ex: stable test) + -m, --min-level Minimum level for rules (default: informational) + -n, --enable-noisy-rules Enable rules marked as noisy + --timeline-end End time of the event logs to load (ex: "2022-02-22 23:59:59 +09:00") + --timeline-start Start time of the event logs to load (ex: "2020-02-22 00:00:00 +09:00") + +OTHER-ACTIONS: + --contributors Print the list of contributors + -L, --logon-summary Print a summary of successful and failed logons + --level-tuning [] Tune alert levels (default: ./rules/config/level_tuning.txt) + -p, --pivot-keywords-list Create a list of pivot keywords + -s, --statistics Print statistics of event IDs + --set-default-profile Set default output profile + -u, --update-rules Update to the latest rules in the hayabusa-rules github repository + +TIME-FORMAT: + --European-time Output timestamp in European time format (ex: 22-02-2022 22:00:00.123 +02:00) + --RFC-2822 Output timestamp in RFC 2822 format (ex: Fri, 22 Feb 2022 22:00:00 -0600) + --RFC-3339 Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00) + --US-military-time Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00) + --US-time Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00) + -U, --UTC Output time in UTC format (default: local time) ``` ## Usage Examples -* Run hayabusa against one Windows event log file: +* Run hayabusa against one Windows event log file with default standard profile: ```bash -hayabusa-1.4.3-win-x64.exe -f eventlog.evtx +hayabusa-1.5.0-win-x64.exe -f eventlog.evtx ``` -* Run hayabusa against the sample-evtx directory with multiple Windows event log files: +* Run hayabusa against the sample-evtx directory with multiple Windows event log files with the verbose profile: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -P verbose ``` -* Export to a single CSV file for further analysis with excel, timeline explorer, elastic stack, etc... and include all field information (Warning: your file output size will become much larger with `-F` enabled!): +* Export to a single CSV file for further analysis with excel, timeline explorer, elastic stack, etc... and include all field information (Warning: your file output size will become much larger with the `verbose-details-and-all-field-info` profile!): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -o results.csv -F +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -o results.csv -F ``` * Only run hayabusa rules (the default is to run all the rules in `-r .\rules`): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv ``` * Only run hayabusa rules for logs that are enabled by default on Windows: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv ``` * Only run hayabusa rules for sysmon logs: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv ``` * Only run sigma rules: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv ``` * Enable deprecated rules (those with `status` marked as `deprecated`) and noisy rules (those whose rule ID is listed in `.\rules\config\noisy_rules.txt`): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx --enable-noisy-rules --enable-deprecated-rules -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx --enable-noisy-rules --enable-deprecated-rules -o results.csv ``` * Only run rules to analyze logons and output in the UTC timezone: ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default\events\Security\Logons -U -o results.csv +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default\events\Security\Logons -U -o results.csv ``` * Run on a live Windows machine (requires Administrator privileges) and only detect alerts (potentially malicious behavior): ```bash -hayabusa-1.4.3-win-x64.exe -l -m low +hayabusa-1.5.0-win-x64.exe -l -m low ``` * Create a list of pivot keywords from critical alerts and save the results. (Results will be saved to `keywords-Ip Addresses.txt`, `keywords-Users.txt`, etc...): ```bash -hayabusa-1.4.3-win-x64.exe -l -m critical -p -o keywords +hayabusa-1.5.0-win-x64.exe -l -m critical -p -o keywords ``` * Print Event ID statistics: ```bash -hayabusa-1.4.3-win-x64.exe -f Security.evtx -s +hayabusa-1.5.0-win-x64.exe -f Security.evtx -s +``` + +* Print logon summary: + +```bash +hayabusa-1.5.0-win-x64.exe -L -f Security.evtx -s ``` * Print verbose information (useful for determining which files take long to process, parsing errors, etc...): ```bash -hayabusa-1.4.3-win-x64.exe -d .\hayabusa-sample-evtx -v +hayabusa-1.5.0-win-x64.exe -d .\hayabusa-sample-evtx -v ``` * Verbose output example: @@ -495,56 +547,75 @@ 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 can display the following information: +## Profiles -* `Timestamp`: Default is `YYYY-MM-DD HH:mm:ss.sss +hh:mm` format. This comes from the `` 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 `` field in the event log. -* `Channel`: The name of log. This comes from the `` field in the event log. -* `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. -* `RecordID`: This comes from the `` field in the event log. -* `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. -* `MitreTactics`: MITRE ATT&CK tactics. -* `MitreTags`: MITRE ATT&CK group, technique, software. -* `OtherTags`: This comes from the `tags` field in YML detection rule which is excluded `MitreTactics` and `MitreTags`. -* `RuleFile`: The filename of the detection rule that generated the alert or event. -* `EvtxFile`: The evtx filename that caused the alert or event. -* `RecordInformation`: All field information. +Hayabusa has 5 pre-defined profiles to use in `config/profiles.yaml`: -## Output customize by profile +1. `minimal` +2. `standard` (default) +3. `verbose` +4. `verbose-all-field-info` +5. `verbose-details-and-all-field-info` -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`. +You can easily customize or add your own profiles by editing this file. +You can also easily change the default profile with `--set-default-profile `. -|alias name| Hayabusa output information| -|:---|:---| -|%Timestamp% | `Timestamp` | -|%Computer% | `Computer` | -|%Channel% | `Channel` | -|%Level% | `Level` | -|%EventID% | `EventID` | -|%MitreTactics% | `MitreTactics` | -|%MitreTags% | `MitreTags` | -|%OtherTags% | `OtherTags` | -|%RecordID% | `RecordID` | -|%RuleTitle% | `Title` | -|%Details% | `Details` | -|%RecordInformation% | `RecordInformation` | -|%RuleFile% | `RuleFile` | -|%EvtxFile% | `EvtxFile` | +### 1. `minimal` profile output -e.g. profile customize +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%RuleTitle%`, `%Details%` -```yaml -(profilename): - (column name): '%Timestamp%' - (column name2): '%Computer%' - (column name3): '%Channel%' -``` +### 2. `standard` profile output +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics%`, `%RecordID%`, `%RuleTitle%`, `%Details%` + +### 3. `verbose` profile output + +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics`, `%MitreTags%`, `%OtherTags%`, `%RecordID%`, `%RuleTitle%`, `%Details%`, `%RuleFile%`, `%EvtxFile%` + +### 4. `verbose-all-field-info` profile output + +Instead of outputting the minimal `details` information, all field information in the `EventData` section will be outputted. + +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics`, `%MitreTags%`, `%OtherTags%`, `%RecordID%`, `%RuleTitle%`, `%AllFieldInfo%`, `%RuleFile%`, `%EvtxFile%` + +### 5. `verbose-details-and-all-field-info` profile output + +`verbose` profile plus all field information. (Warning: this will usually double the output file size!) + +`%Timestamp%`, `%Computer%`, `%Channel%`, `%EventID%`, `%Level%`, `%MitreTactics`, `%MitreTags%`, `%OtherTags%`, `%RecordID%`, `%RuleTitle%`, `%Details%`, `%RuleFile%`, `%EvtxFile%`, `%AllFieldInfo%` + +### Profile Comparison + +The following benchmarks were conducted on a 2018 MBP with 7.5GB of evtx data. + +| Profile | Processing Time | Output Filesize | +| :---: | :---: | :---: | +| minimal | 16 minutes 18 seconds | 690 MB | +| standard | 16 minutes 23 seconds | 710 MB | +| verbose | 17 minutes | 990 MB | +| verbose-all-field-info | 16 minutes 50 seconds | 1.6 GB | +| verbose-details-and-all-field-info | 17 minutes 12 seconds | 2.1 GB | + +### Profile Field Aliases + +| Alias name | Hayabusa output information| +| :--- | :--- | +|%Timestamp% | Default is `YYYY-MM-DD HH:mm:ss.sss +hh:mm` format. `` 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% | The `` field. | +|%Channel% | The name of log. `` field. | +|%EventID% | The `` field. | +|%Level% | The `level` field in the YML detection rule. (`informational`, `low`, `medium`, `high`, `critical`) | +|%MitreTactics% | MITRE ATT&CK [tactics](https://attack.mitre.org/tactics/enterprise/) (Ex: Initial Access, Lateral Movement, etc...). | +|%MitreTags% | MITRE ATT&CK Group ID, Technique ID and Software ID. | +|%OtherTags% | Any keyword in the `tags` field in a YML detection rule which is not included in `MitreTactics` or `MitreTags`. | +|%RecordID% | The Event Record ID from `` field. | +|%RuleTitle% | The `title` field in the YML detection rule. | +|%Details% | 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. | +|%AllFieldInfo% | All field information. | +|%RuleFile% | The filename of the detection rule that generated the alert or event. | +|%EvtxFile% | The evtx filename that caused the alert or event. | + +You can use these aliases in your output profiles, as well as define other [event key alises](https://github.com/Yamato-Security/hayabusa-rules/blob/main/README.md#eventkey-aliases) to output other fields. ## Level Abbrevations @@ -622,16 +693,18 @@ The alerts will be outputted in color based on the alert `level`. You can change the default colors in the config file at `./config/level_color.txt` in the format of `level,(RGB 6-digit ColorHex)`. If you want to disable color output, you can use `--no-color` option. -## Event Fequency Timeline +## Results Summary + +### Event Fequency Timeline If you add `-V` or `--visualize-timeline` option, the Event Frequency Timeline feature displays a sparkline frequency timeline of detected events. Note: There needs to be more than 5 events. Also, the characters will not render correctly on the default Command Prompt or PowerShell Prompt, so please use a terminal like Windows Terminal, iTerm2, etc... -## Dates with most total detections +### Dates with most total detections A summary of the dates with the most total detections categorized by level (`critical`, `high`, etc...). -## Top 5 computers with most unique detections +### Top 5 computers with most unique detections The top 5 computers with the most unique detections categorized by level (`critical`, `high`, etc...). @@ -689,7 +762,7 @@ You can also add a rule ID to `./rules/config/noisy_rules.txt` in order to ignor Hayabusa and Sigma rule authors will determine the risk level of the alert when writing their rules. However, the actual risk level will differ between environments. -You can tune the risk level of the rules by adding them to `./rules/config/level_tuning.txt` and executing `hayabusa-1.4.3-win-x64.exe --level-tuning` which will update the `level` line in the rule file. +You can tune the risk level of the rules by adding them to `./rules/config/level_tuning.txt` and executing `hayabusa-1.5.0-win-x64.exe --level-tuning` which will update the `level` line in the rule file. Please note that the rule file will be updated directly. `./rules/config/level_tuning.txt` sample line: @@ -703,8 +776,8 @@ In this case, the risk level of the rule with an `id` of `00000000-0000-0000-000 ## Event ID Filtering -As of version 1.4.3, by default, events are filtered by ID to improve performance by ignorning events that have no detection rules. -The IDs defined in `./rules/config/target_event_IDs.txt` will be scanned by default. +By default, events are filtered by ID to improve performance by ignorning events that have no detection rules. +The IDs defined in `./rules/config/target_event_IDs.txt` will be scanned. If you want to scan all events, please use the `-D, --deep-scan` option. # Other Windows Event Log Analyzers and Related Resources diff --git a/hayabusa-logo.png b/logo.png similarity index 100% rename from hayabusa-logo.png rename to logo.png diff --git a/src/afterfact.rs b/src/afterfact.rs index 20818919..985ca493 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -457,6 +457,7 @@ fn _print_unique_results( // the order in which are registered and the order of levels to be displayed are reversed counts_by_level.reverse(); + let total_count = counts_by_level.iter().sum::(); // output total results write_color_buffer( &BufferWriter::stdout(ColorChoice::Always), @@ -465,10 +466,7 @@ fn _print_unique_results( "{} {}: {}", head_word, tail_word, - counts_by_level - .iter() - .sum::() - .to_formatted_string(&Locale::en), + total_count.to_formatted_string(&Locale::en), ), true, ) @@ -478,12 +476,18 @@ fn _print_unique_results( if "undefined" == *level_name { continue; } + let percent = if total_count == 0 { + 0 as f64 + } else { + (counts_by_level[i] as f64) / (total_count as f64) * 100.0 + }; let output_raw_str = format!( - "{} {} {}: {}", + "{} {} {}: {} ({:.2}%)", head_word, level_name, tail_word, - counts_by_level[i].to_formatted_string(&Locale::en) + counts_by_level[i].to_formatted_string(&Locale::en), + percent ); write_color_buffer( &BufferWriter::stdout(ColorChoice::Always), diff --git a/src/detections/configs.rs b/src/detections/configs.rs index 738ad430..77a0d4f9 100644 --- a/src/detections/configs.rs +++ b/src/detections/configs.rs @@ -55,70 +55,74 @@ impl Default for ConfigReader<'_> { #[derive(Parser)] #[clap( name = "Hayabusa", - usage = "hayabusa.exe -f file.evtx [OPTIONS] / hayabusa.exe -d evtx-directory [OPTIONS]", + usage = "hayabusa.exe [OTHER-ACTIONS] [OPTIONS]", author = "Yamato Security (https://github.com/Yamato-Security/hayabusa) @SecurityYamato)", + help_template = "\n{name} {version}\n{author}\n\n{usage-heading}\n {usage}\n\n{all-args}\n", version, term_width = 400 )] pub struct Config { /// Directory of multiple .evtx files - #[clap(short = 'd', long, value_name = "DIRECTORY")] + #[clap(help_heading = Some("INPUT"), short = 'd', long, value_name = "DIRECTORY")] pub directory: Option, /// File path to one .evtx file - #[clap(short = 'f', long, value_name = "FILE_PATH")] + #[clap(help_heading = Some("INPUT"), short = 'f', long = "file", value_name = "FILE")] pub filepath: Option, - /// Specify a rule directory or file (default: ./rules) + /// Specify a custom rule directory or file (default: ./rules) #[clap( + help_heading = Some("ADVANCED"), short = 'r', long, default_value = "./rules", hide_default_value = true, - value_name = "RULE_DIRECTORY/RULE_FILE" + value_name = "DIRECTORY/FILE" )] pub rules: PathBuf, - /// Specify custom rule config folder (default: ./rules/config) + /// Specify custom rule config directory (default: ./rules/config) #[clap( + help_heading = Some("ADVANCED"), short = 'c', long = "rules-config", default_value = "./rules/config", hide_default_value = true, - value_name = "RULE_CONFIG_DIRECTORY" + value_name = "DIRECTORY" )] pub config: PathBuf, /// Save the timeline in CSV format (ex: results.csv) - #[clap(short = 'o', long, value_name = "CSV_TIMELINE")] + #[clap(help_heading = Some("OUTPUT"), short = 'o', long, value_name = "FILE")] pub output: Option, /// Output verbose information - #[clap(short = 'v', long)] + #[clap(help_heading = Some("DISPLAY-SETTINGS"), short = 'v', long)] pub verbose: bool, /// Output event frequency timeline - #[clap(short = 'V', long = "visualize-timeline")] + #[clap(help_heading = Some("DISPLAY-SETTINGS"), short = 'V', long = "visualize-timeline")] pub visualize_timeline: bool, /// Enable rules marked as deprecated - #[clap(long = "enable-deprecated-rules")] + #[clap(help_heading = Some("FILTERING"), long = "enable-deprecated-rules")] pub enable_deprecated_rules: bool, /// Disable event ID filter to scan all events - #[clap(short = 'D', long = "deep-scan")] + #[clap(help_heading = Some("FILTERING"), short = 'D', long = "deep-scan")] pub deep_scan: bool, /// Enable rules marked as noisy - #[clap(short = 'n', long = "enable-noisy-rules")] + #[clap(help_heading = Some("FILTERING"), short = 'n', long = "enable-noisy-rules")] pub enable_noisy_rules: bool, /// Update to the latest rules in the hayabusa-rules github repository - #[clap(short = 'u', long = "update-rules")] + #[clap(help_heading = Some("OTHER-ACTIONS"), short = 'u', long = "update-rules")] pub update_rules: bool, /// Minimum level for rules (default: informational) #[clap( + help_heading = Some("FILTERING"), short = 'm', long = "min-level", default_value = "informational", @@ -128,95 +132,96 @@ pub struct Config { pub min_level: String, /// Analyze the local C:\Windows\System32\winevt\Logs folder - #[clap(short = 'l', long = "live-analysis")] + #[clap(help_heading = Some("INPUT"), short = 'l', long = "live-analysis")] pub live_analysis: bool, /// Start time of the event logs to load (ex: "2020-02-22 00:00:00 +09:00") - #[clap(long = "start-timeline", value_name = "START_TIMELINE")] + #[clap(help_heading = Some("FILTERING"), long = "timeline-start", value_name = "DATE")] pub start_timeline: Option, /// End time of the event logs to load (ex: "2022-02-22 23:59:59 +09:00") - #[clap(long = "end-timeline", value_name = "END_TIMELINE")] + #[clap(help_heading = Some("FILTERING"), long = "timeline-end", value_name = "DATE")] pub end_timeline: Option, /// Output timestamp in RFC 2822 format (ex: Fri, 22 Feb 2022 22:00:00 -0600) - #[clap(long = "RFC-2822")] + #[clap(help_heading = Some("TIME-FORMAT"), long = "RFC-2822")] pub rfc_2822: bool, /// Output timestamp in RFC 3339 format (ex: 2022-02-22 22:00:00.123456-06:00) - #[clap(long = "RFC-3339")] + #[clap(help_heading = Some("TIME-FORMAT"), long = "RFC-3339")] pub rfc_3339: bool, /// Output timestamp in US time format (ex: 02-22-2022 10:00:00.123 PM -06:00) - #[clap(long = "US-time")] + #[clap(help_heading = Some("TIME-FORMAT"), long = "US-time")] pub us_time: bool, /// Output timestamp in US military time format (ex: 02-22-2022 22:00:00.123 -06:00) - #[clap(long = "US-military-time")] + #[clap(help_heading = Some("TIME-FORMAT"), long = "US-military-time")] pub us_military_time: bool, /// Output timestamp in European time format (ex: 22-02-2022 22:00:00.123 +02:00) - #[clap(long = "European-time")] + #[clap(help_heading = Some("TIME-FORMAT"), long = "European-time")] pub european_time: bool, /// Output time in UTC format (default: local time) - #[clap(short = 'U', long = "UTC")] + #[clap(help_heading = Some("TIME-FORMAT"), short = 'U', long = "UTC")] pub utc: bool, /// Disable color output - #[clap(long = "no-color")] + #[clap(help_heading = Some("DISPLAY-SETTINGS"), long = "no-color")] pub no_color: bool, /// Thread number (default: optimal number for performance) - #[clap(short, long = "thread-number", value_name = "NUMBER")] + #[clap(help_heading = Some("ADVANCED"), short, long = "thread-number", value_name = "NUMBER")] pub thread_number: Option, /// Print statistics of event IDs - #[clap(short, long)] + #[clap(help_heading = Some("OTHER-ACTIONS"), short, long)] pub statistics: bool, /// Print a summary of successful and failed logons - #[clap(short = 'L', long = "logon-summary")] + #[clap(help_heading = Some("OTHER-ACTIONS"), short = 'L', long = "logon-summary")] pub logon_summary: bool, /// Tune alert levels (default: ./rules/config/level_tuning.txt) #[clap( + help_heading = Some("OTHER-ACTIONS"), long = "level-tuning", hide_default_value = true, - value_name = "LEVEL_TUNING_FILE" + value_name = "FILE" )] pub level_tuning: Option>, /// Quiet mode: do not display the launch banner - #[clap(short, long)] + #[clap(help_heading = Some("DISPLAY-SETTINGS"), short, long)] pub quiet: bool, /// Quiet errors mode: do not save error logs - #[clap(short = 'Q', long = "quiet-errors")] + #[clap(help_heading = Some("ADVANCED"), short = 'Q', long = "quiet-errors")] pub quiet_errors: bool, /// Create a list of pivot keywords - #[clap(short = 'p', long = "pivot-keywords-list")] + #[clap(help_heading = Some("OTHER-ACTIONS"), short = 'p', long = "pivot-keywords-list")] pub pivot_keywords_list: bool, /// Print the list of contributors - #[clap(long)] + #[clap(help_heading = Some("OTHER-ACTIONS"), long)] pub contributors: bool, /// Specify additional target file extensions (ex: evtx_data) (ex: evtx1 evtx2) - #[clap(long = "target-file-ext", multiple_values = true)] + #[clap(help_heading = Some("ADVANCED"), long = "target-file-ext", multiple_values = true)] pub evtx_file_ext: Option>, /// Ignore rules according to status (ex: experimental) (ex: stable test) - #[clap(long = "exclude-status", multiple_values = true)] + #[clap(help_heading = Some("FILTERING"), long = "exclude-status", multiple_values = true, value_name = "STATUS")] pub exclude_status: Option>, - /// Specify output profile - #[clap(short = 'P', long = "profile")] + /// Specify output profile (minimal, standard, verbose, verbose-all-field-info, verbose-details-and-all-field-info) + #[clap(help_heading = Some("OUTPUT"), short = 'P', long = "profile")] pub profile: Option, /// Set default output profile - #[clap(long = "set-default-profile")] + #[clap(help_heading = Some("OTHER-ACTIONS"), long = "set-default-profile", value_name = "PROFILE")] pub set_default_profile: Option, #[clap(short = 'j', long = "json-timeline")]