diff --git a/CHANGELOG-Japanese.md b/CHANGELOG-Japanese.md index 3fca0768..12546b8d 100644 --- a/CHANGELOG-Japanese.md +++ b/CHANGELOG-Japanese.md @@ -1,10 +1,10 @@ # 変更点 -## v1.3.0 [2022/06/04] +## v1.3.0 [2022/06/06] **新機能:** -- 検知されたイベントが5つ以上の時、イベント頻度のタイムラインを作成するようにした。 (#533) (@hitenkoku) +- `--visualize-timeline`オプションで検知されたイベントが5つ以上の時、イベント頻度のタイムラインを作成するようにした。 (#533, #566) (@hitenkoku) - `--all-tags`オプションでルールにある全てのtagsを、outputで指定したcsvのMitreAttackの列に出力するようにした。 (#525) (@hitenkoku) - `-R` / `--display-record-id` オプションの追加。evtx file内のレコードを特定するレコードID``が出力できるようになった。 (#548) (@hitenkoku) - レベルごとの検知数が最も多い日を表示するようにした。 (#550) (@hitenkoku) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e4b2f34..7b7a6021 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # Changes -## v1.3.0 [2022/06/04] +## v1.3.0 [2022/06/06] **New Features:** -- Added Event Frequency Timeline feature to visualize the number of events. (Note: There needs to be more than 5 events.) (#533)(@hitenkoku) +- Added `-V / --visualize-timeline` option: Event Frequency Timeline feature to visualize the number of events. (Note: There needs to be more than 5 events and you need to use a terminal like Windows Terminal, iTerm2, etc... for it to properly render.) (#533, #566) (@hitenkoku) - Display all the `tags` defined in a rule to the `MitreAttack` column when saving to CSV file with the `--all-tags` option. (#525) (@hitenkoku) - Added the `-R / --display-record-id` option: Display the event record ID (``). (#548) (@hitenkoku) - Display dates with most detections. (#550) (@hitenkoku) diff --git a/README-Japanese.md b/README-Japanese.md index 6ff4b3bd..6395da26 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -31,14 +31,14 @@ Hayabusaは、日本の[Yamato Security](https://yamatosecurity.connpass.com/) - [スレット(脅威)ハンティング](#スレット脅威ハンティング) - [フォレンジックタイムラインの高速生成](#フォレンジックタイムラインの高速生成) - [スクリーンショット](#スクリーンショット) - - [起動画面:](#起動画面) - - [ターミナル出力画面:](#ターミナル出力画面) - - [イベント頻度タイムライン出力画面:](#イベント頻度タイムライン出力画面) - - [結果サマリ画面:](#結果サマリ画面) - - [Excelでの解析:](#excelでの解析) - - [Timeline Explorerでの解析:](#timeline-explorerでの解析) - - [Criticalアラートのフィルタリングとコンピュータごとのグルーピング:](#criticalアラートのフィルタリングとコンピュータごとのグルーピング) - - [Elastic Stackダッシュボードでの解析:](#elastic-stackダッシュボードでの解析) + - [起動画面](#起動画面) + - [ターミナル出力画面](#ターミナル出力画面) + - [イベント頻度タイムライン出力画面 (`-V`オプション)](#イベント頻度タイムライン出力画面--vオプション) + - [結果サマリ画面](#結果サマリ画面) + - [Excelでの解析](#excelでの解析) + - [Timeline Explorerでの解析](#timeline-explorerでの解析) + - [Criticalアラートのフィルタリングとコンピュータごとのグルーピング](#criticalアラートのフィルタリングとコンピュータごとのグルーピング) + - [Elastic Stackダッシュボードでの解析](#elastic-stackダッシュボードでの解析) - [タイムラインのサンプル結果](#タイムラインのサンプル結果) - [特徴&機能](#特徴機能) - [予定されている機能](#予定されている機能) @@ -100,36 +100,36 @@ Windowsのイベントログは、 # スクリーンショット -## 起動画面: +## 起動画面 ![Hayabusa 起動画面](/screenshots/Hayabusa-Startup.png) -## ターミナル出力画面: +## ターミナル出力画面 ![Hayabusa ターミナル出力画面](/screenshots/Hayabusa-Results.png) -## イベント頻度タイムライン出力画面: +## イベント頻度タイムライン出力画面 (`-V`オプション) ![Hayabusa イベント頻度タイムライン出力画面](/screenshots/HayabusaEventFrequencyTimeline.png) -## 結果サマリ画面: +## 結果サマリ画面 ![Hayabusa 結果サマリ画面](/screenshots/HayabusaResultsSummary.png) -## Excelでの解析: +## Excelでの解析 ![Hayabusa Excelでの解析](/screenshots/ExcelScreenshot.png) -## Timeline Explorerでの解析: +## Timeline Explorerでの解析 ![Hayabusa Timeline Explorerでの解析](screenshots/TimelineExplorer-ColoredTimeline.png) -## Criticalアラートのフィルタリングとコンピュータごとのグルーピング: +## Criticalアラートのフィルタリングとコンピュータごとのグルーピング ![Timeline ExplorerでCriticalアラートのフィルタリングとコンピュータグルーピング](screenshots/TimelineExplorer-CriticalAlerts-ComputerGrouping.png) -## Elastic Stackダッシュボードでの解析: +## Elastic Stackダッシュボードでの解析 ![Elastic Stack Dashboard 1](doc/ElasticStackImport/17-HayabusaDashboard-1.png) @@ -331,6 +331,7 @@ USAGE: --all-tags '出力したCSVファイルにルール内のタグ情報を全て出力する。' -R, --display-record-id 'EventRecordIDを出力する。' -v, --verbose '詳細な情報を出力する。' + -V, --visualize-timeline 'イベント頻度タイムラインを出力する。' -D, --enable-deprecated-rules 'Deprecatedルールを有効にする。' -n, --enable-noisy-rules 'Noisyルールを有効にする。' -u, --update-rules 'rulesフォルダをhayabusa-rulesのgithubリポジトリの最新版に更新する。' @@ -575,8 +576,8 @@ Hayabusaの結果は`level`毎に文字色が変わります。 ## イベント頻度タイムライン -検知したイベントの数が5以上の時、頻度のタイムライン(スパークライン)を画面に出力します。 -マーカーの数は最大10個です。 +`--visualize-timeline`オプションを使うことで、検知したイベントの数が5以上の時、頻度のタイムライン(スパークライン)を画面に出力します。 +マーカーの数は最大10個です。デフォルトのCommand PromptとPowerShell Promptでは文字化けされるので、Windows TerminalやiTerm2等のターミナルをご利用ください。 ## 最多検知日の出力 diff --git a/README.md b/README.md index 636c923c..1cae6011 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Hayabusa is a **Windows event log fast forensics timeline generator** and **thre - [Screenshots](#screenshots) - [Startup](#startup) - [Terminal Output](#terminal-output) - - [Time Fequency Timeline](#time-fequency-timeline) + - [Event Fequency Timeline (`-V` option)](#event-fequency-timeline--v-option) - [Results Summary](#results-summary) - [Analysis in Excel](#analysis-in-excel) - [Analysis in Timeline Explorer](#analysis-in-timeline-explorer) @@ -104,7 +104,7 @@ Hayabusa is not intended to be a replacement for tools like [Evtx Explorer](http ![Hayabusa terminal output](/screenshots/Hayabusa-Results.png) -## Time Fequency Timeline +## Event Fequency Timeline (`-V` option) ![Hayabusa Event Frequency Timeline](/screenshots/HayabusaEventFrequencyTimeline.png) @@ -329,6 +329,7 @@ USAGE: --all-tags 'Output all tags when saving to a CSV file.' -R, --display-record-id 'Display EventRecordID.' -v, --verbose 'Output verbose information.' + -V, --visualize-timeline 'Output event frequency timeline.' -D, --enable-deprecated-rules 'Enable rules marked as deprecated.' -n, --enable-noisy-rules 'Enable rules marked as noisy.' -u, --update-rules 'Update to the latest rules in the hayabusa-rules github repository.' @@ -573,8 +574,8 @@ If you want to disable color output, you can use `--no-color` option. ## Event Fequency Timeline -The Event Frequency Timeline feature displays a sparkline frequency timeline of detected events. -Note: There needs to be more than 5 events. +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 diff --git a/rules b/rules index 902c59e3..e8e335e5 160000 --- a/rules +++ b/rules @@ -1 +1 @@ -Subproject commit 902c59e3c557617df1c7bac777db3d72e98a1a00 +Subproject commit e8e335e58d561e1622b5337bfecec62ae3b74750 diff --git a/src/afterfact.rs b/src/afterfact.rs index 719c9734..5f7dff25 100644 --- a/src/afterfact.rs +++ b/src/afterfact.rs @@ -128,7 +128,6 @@ fn _print_timeline_hist(timestamps: Vec, length: usize, side_margin_size: u let title = "Event Frequency Timeline"; let header_row_space = (length - title.len()) / 2; - println!(); writeln!(wtr, "{}{}", " ".repeat(header_row_space), title).ok(); println!(); @@ -354,9 +353,17 @@ fn emit_csv( Some((Width(w), _)) => w as usize, None => 100, }; - - _print_timeline_hist(timestamps, terminal_width, 3); println!(); + + if configs::CONFIG + .read() + .unwrap() + .args + .is_present("visualize-timeline") + { + _print_timeline_hist(timestamps, terminal_width, 3); + println!(); + } let reducted_record_cnt: u128 = all_record_cnt - detected_record_idset.len() as u128; let reducted_percent = if all_record_cnt == 0 { 0 as f64 diff --git a/src/detections/configs.rs b/src/detections/configs.rs index 9c2ac8e0..e886a566 100644 --- a/src/detections/configs.rs +++ b/src/detections/configs.rs @@ -78,6 +78,7 @@ fn build_app<'a>() -> ArgMatches<'a> { --all-tags 'Output all tags when saving to a CSV file.' -R, --display-record-id 'Display EventRecordID.' -v, --verbose 'Output verbose information.' + -V, --visualize-timeline 'Output event frequency timeline.' -D, --enable-deprecated-rules 'Enable rules marked as deprecated.' -n, --enable-noisy-rules 'Enable rules marked as noisy.' -u, --update-rules 'Update to the latest rules in the hayabusa-rules github repository.'