From b4e34f8d31511796baa7706ae655ee8ac0382b37 Mon Sep 17 00:00:00 2001 From: James Takai / hach1yon <32596618+hach1yon@users.noreply.github.com> Date: Sat, 25 Dec 2021 10:17:42 +0900 Subject: [PATCH 1/3] update readme --- README-English.md | 13 +++++-------- README-Japanese.md | 13 +++++-------- logs/DO_NOT_DELETE_THIS | 1 + 3 files changed, 11 insertions(+), 16 deletions(-) create mode 100644 logs/DO_NOT_DELETE_THIS diff --git a/README-English.md b/README-English.md index 215ff84e..f4bc9615 100644 --- a/README-English.md +++ b/README-English.md @@ -80,7 +80,10 @@ git clone https://github.com/Yamato-Security/hayabusa.git You can also manually download and extract Hayabusa from [https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa). -After that, you need to download a pre-compiled binary for the Windows, Linux or macOS at the [Releases](https://github.com/Yamato-Security/hayabusa/releases) page and save it to the `hayabusa` root folder. +After that, you need to download a pre-compiled binary for Windows or macOS at the [Releases](https://github.com/Yamato-Security/hayabusa/releases) page and save it to the `hayabusa\bin` folder. + +There are two different versions of the evtx library being used when compiled: `0.6.7` and `0.7.2`. +The `0.7.2` version should work but we have only tested it with `0.6.7` so please use that version if you experience any problems with `0.7.2`. # Compiling from source (Optional) If you have rust installed, you can compile from source with the following command: @@ -110,13 +113,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git > Note: You need to run the binary from the Hayabusa root directory. # Usage -You need to run the binary from the Hayabusa root directory. -There are different binary versions in `.\bin` compiled for different operating systems and architectures. -Also, there are two different versions of the evtx library being used when compiled: `0.6.7` and `0.7.2`. -The `0.7.2` version should work but we have only tested it with `0.6.7` so please use that if you experience any problems with `0.7.2`. -Please replace `hayabusa.exe` in the examples below with the appropriate Hayabusa binary filename. - -> Note: You need to run the Hayabusa binary from the Hayabusa root directory. +> Note: You need to run the Hayabusa binary from the Hayabusa root directory. Example: `.\bin\hayabusa.exe` ## Command line options ```bash diff --git a/README-Japanese.md b/README-Japanese.md index cd0bfc0e..cc215ca5 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -81,7 +81,10 @@ git clone https://github.com/Yamato-Security/hayabusa.git または、手動で[https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa)からHayabusaをダウンロードすることもできます。 -その後、Windows、Linux、macOS用のコンパイル済みバイナリを[Releases](https://github.com/Yamato-Security/Hayabusa/releases)からダウンロードして、`hayabusa`のディレクトリに置く必要があります。 +その後、Windows、macOS用のコンパイル済みバイナリを[Releases](https://github.com/Yamato-Security/Hayabusa/releases)からダウンロードして、`hayabusa\bin`のディレクトリに置く必要があります。 + +evtxライブラリのバージョン(`0.6.7`と`0.7.2`)毎に、コンパイルされたバイナリが用意されています。 +`0.7.2`バージョンでも動作するはずですが、`0.6.7`でしかテストしていませんので、`0.7.2`で問題が発生した場合はそちらをご利用ください。 # ソースコードからのコンパイル(任意) rustがインストールされている場合、以下のコマンドでソースコードからコンパイルすることができます: @@ -111,13 +114,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git > ※ 以下の例でHayabusaを試したい方は、上記コマンドをhayabusaのルートフォルダから実行してください。 # 使用方法 -Hayabusaはルートディレクトリでバイナリを実行する必要があります。 -.\bin` には、OSやアーキテクチャごとにコンパイルされたバイナリが用意されています。 -また、evtxライブラリのバージョン(`0.6.7`と`0.7.2`)毎に、コンパイルされたバイナリが用意されています。 -`0.7.2`バージョンでも動作するはずですが、`0.6.7`でしかテストしていませんので、`0.7.2`で問題が発生した場合はそちらをご利用ください。 -以下の例の `hayabusa.exe` は、適切なHayabusaのバイナリファイル名に置き換えてください。 - -> 注意: Hayabusaのルートディレクトリから、バイナリを実行する必要があります。 +> 注意: Hayabusaのルートディレクトリから、バイナリを実行する必要があります。例:`.\bin\hayabusa.exe` ## コマンドラインオプション ```bash diff --git a/logs/DO_NOT_DELETE_THIS b/logs/DO_NOT_DELETE_THIS new file mode 100644 index 00000000..e10b6e56 --- /dev/null +++ b/logs/DO_NOT_DELETE_THIS @@ -0,0 +1 @@ +Don't delete this file. \ No newline at end of file From 182c1f1dfd0ab6812194b108f1d6d6dd096d7c2e Mon Sep 17 00:00:00 2001 From: James Takai / hach1yon <32596618+hach1yon@users.noreply.github.com> Date: Sat, 25 Dec 2021 10:29:52 +0900 Subject: [PATCH 2/3] change readme --- README-English.md | 34 ++++++++++++++++------------------ README-Japanese.md | 32 +++++++++++++++----------------- logs/.gitignore | 2 ++ logs/DO_NOT_DELETE_THIS | 1 - 4 files changed, 33 insertions(+), 36 deletions(-) create mode 100644 logs/.gitignore delete mode 100644 logs/DO_NOT_DELETE_THIS diff --git a/README-English.md b/README-English.md index f4bc9615..af2df0ed 100644 --- a/README-English.md +++ b/README-English.md @@ -72,16 +72,14 @@ You can check out sample CSV and manually edited XLSX timeline results [here](ht * JSON support for sending alerts to Elastic Stack/Splunk, etc... # Downloads -You can `git clone` the repository with the following command: +You can download latests Hayabusa from Release. + +You can also `git clone` the repository with the following command and compile binary from source code.: ```bash git clone https://github.com/Yamato-Security/hayabusa.git ``` -You can also manually download and extract Hayabusa from [https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa). - -After that, you need to download a pre-compiled binary for Windows or macOS at the [Releases](https://github.com/Yamato-Security/hayabusa/releases) page and save it to the `hayabusa\bin` folder. - There are two different versions of the evtx library being used when compiled: `0.6.7` and `0.7.2`. The `0.7.2` version should work but we have only tested it with `0.6.7` so please use that version if you experience any problems with `0.7.2`. @@ -113,7 +111,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git > Note: You need to run the binary from the Hayabusa root directory. # Usage -> Note: You need to run the Hayabusa binary from the Hayabusa root directory. Example: `.\bin\hayabusa.exe` +> Note: You need to run the Hayabusa binary from the Hayabusa root directory. Example: `.\hayabusa.exe` ## Command line options ```bash @@ -141,62 +139,62 @@ USAGE: ## Usage examples * Run hayabusa against one Windows event log file: ```bash -.\bin\hayabusa.exe -f eventlog.evtx +.\hayabusa.exe -f eventlog.evtx ``` * Run hayabusa against the sample-evtx directory with multiple Windows event log files: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx +.\hayabusa.exe -d .\hayabusa-sample-evtx ``` * Export to a single CSV file for further analysis with excel or timeline explorer: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -o results.csv ``` * Only run hayabusa rules (the default is to run all the rules in `-r .\rules`): ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv +.\hayabusa.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 -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv ``` * Only run hayabusa rules for sysmon logs: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv ``` * Only run sigma rules: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv +.\hayabusa.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 `.\config\noisy-rules.txt`): ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx --enable-noisy-rules --enable-deprecated-rules -o results.csv +.\hayabusa.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 -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default\events\Security\Logons -u -o results.csv +.\hayabusa.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 -.\bin\hayabusa.exe -d C:\Windows\System32\winevt\Logs -m low +.\hayabusa.exe -d C:\Windows\System32\winevt\Logs -m low ``` * Get event ID statistics: ```bash -.\bin\hayabusa.exe -f Security.evtx -s +.\hayabusa.exe -f Security.evtx -s ``` * Print verbose information (useful for determining which files take long to process, parsing errors, etc...): ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -v +.\hayabusa.exe -d .\hayabusa-sample-evtx -v ``` * Verbose output example: diff --git a/README-Japanese.md b/README-Japanese.md index cc215ca5..71be58c6 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -73,16 +73,14 @@ CSVと手動で編集したXLSXのタイムライン結果のサンプルは[こ * JSONへの出力→Elastic Stack/Splunkへのインポート # ダウンロード -以下の`git clone`コマンドでレポジトリをダウンロードできます: +Hayabusaは[https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa)のReleaseから最新版をダウンロードできます。 + +または、以下の`git clone`コマンドでレポジトリをダウンロードし、ソースコードからコンパイルして使用することも可能です。 ```bash git clone https://github.com/Yamato-Security/hayabusa.git ``` -または、手動で[https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa)からHayabusaをダウンロードすることもできます。 - -その後、Windows、macOS用のコンパイル済みバイナリを[Releases](https://github.com/Yamato-Security/Hayabusa/releases)からダウンロードして、`hayabusa\bin`のディレクトリに置く必要があります。 - evtxライブラリのバージョン(`0.6.7`と`0.7.2`)毎に、コンパイルされたバイナリが用意されています。 `0.7.2`バージョンでも動作するはずですが、`0.6.7`でしかテストしていませんので、`0.7.2`で問題が発生した場合はそちらをご利用ください。 @@ -142,62 +140,62 @@ USAGE: ## 使用例 * 1 つのWindowsイベントログファイルに対してHayabusaを実行します: ```bash -.\bin\hayabusa.exe -f eventlog.evtx +.\hayabusa.exe -f eventlog.evtx ``` * 複数のWindowsイベントログファイルのあるsample-evtxディレクトリに対して、Hayabusaを実行します: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx +.\hayabusa.exe -d .\hayabusa-sample-evtx ``` * 1 つのCSVファイルにエクスポートして、EXCELやTimeline Explorerでさらに分析することができます: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -o results.csv ``` * Hayabusaルールのみを実行します(デフォルトでは `-r .\rules` にあるすべてのルールが利用されます): ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa -o results.csv ``` * Windowsでデフォルトで有効になっているログに対してのみ、Hayabusaルールを実行します: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\default -o results.csv ``` * Sysmonログに対してのみHayabusaルールを実行します: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\hayabusa\sysmon -o results.csv ``` * Sigmaルールのみを実行します: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r .\rules\sigma -o results.csv ``` * 廃棄(deprecated)されたルール(`status`が`deprecated`になっているルール)とノイジールール(`.\config\noisy-rules.txt`にルールIDが書かれているルール)を有効にします: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx --enable-deprecated-rules --enable-noisy-rules -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx --enable-deprecated-rules --enable-noisy-rules -o results.csv ``` * ログオン情報を分析するルールのみを実行し、UTCタイムゾーンで出力します: ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -r ./rules/Hayabusa/default/events/Security/Logons -u -o results.csv +.\hayabusa.exe -d .\hayabusa-sample-evtx -r ./rules/Hayabusa/default/events/Security/Logons -u -o results.csv ``` * 起動中のWindows端末上で実行し(Administrator権限が必要)、アラート(悪意のある可能性のある動作)のみを検知します: ```bash -.\bin\hayabusa.exe -d C:\Windows\System32\winevt\Logs -m low +.\hayabusa.exe -d C:\Windows\System32\winevt\Logs -m low ``` * イベントIDの統計情報を取得します: ```bash -.\bin\hayabusa.exe -f Security.evtx -s +.\hayabusa.exe -f Security.evtx -s ``` * 詳細なメッセージを出力します(処理に時間がかかるファイル、パースエラー等を特定するのに便利): ```bash -.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -v +.\hayabusa.exe -d .\hayabusa-sample-evtx -v ``` * Verbose出力の例: diff --git a/logs/.gitignore b/logs/.gitignore new file mode 100644 index 00000000..a3a0c8b5 --- /dev/null +++ b/logs/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore \ No newline at end of file diff --git a/logs/DO_NOT_DELETE_THIS b/logs/DO_NOT_DELETE_THIS deleted file mode 100644 index e10b6e56..00000000 --- a/logs/DO_NOT_DELETE_THIS +++ /dev/null @@ -1 +0,0 @@ -Don't delete this file. \ No newline at end of file From edd37039dee31b0b9cfe8d70f646d17817388a77 Mon Sep 17 00:00:00 2001 From: Tanaka Zakku <71482215+YamatoSecurity@users.noreply.github.com> Date: Sat, 25 Dec 2021 10:36:41 +0900 Subject: [PATCH 3/3] readme fix --- README-English.md | 2 +- README-Japanese.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README-English.md b/README-English.md index af2df0ed..8c896674 100644 --- a/README-English.md +++ b/README-English.md @@ -72,7 +72,7 @@ You can check out sample CSV and manually edited XLSX timeline results [here](ht * JSON support for sending alerts to Elastic Stack/Splunk, etc... # Downloads -You can download latests Hayabusa from Release. +You can download the latest Hayabusa version from the [Releases](https://github.com/Yamato-Security/hayabusa/releases) page. You can also `git clone` the repository with the following command and compile binary from source code.: diff --git a/README-Japanese.md b/README-Japanese.md index 71be58c6..2fc9b10e 100644 --- a/README-Japanese.md +++ b/README-Japanese.md @@ -73,7 +73,7 @@ CSVと手動で編集したXLSXのタイムライン結果のサンプルは[こ * JSONへの出力→Elastic Stack/Splunkへのインポート # ダウンロード -Hayabusaは[https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa)のReleaseから最新版をダウンロードできます。 +Hayabusaの[Releases](https://github.com/Yamato-Security/hayabusa/releases)から最新版をダウンロードできます。 または、以下の`git clone`コマンドでレポジトリをダウンロードし、ソースコードからコンパイルして使用することも可能です。 @@ -112,7 +112,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git > ※ 以下の例でHayabusaを試したい方は、上記コマンドをhayabusaのルートフォルダから実行してください。 # 使用方法 -> 注意: Hayabusaのルートディレクトリから、バイナリを実行する必要があります。例:`.\bin\hayabusa.exe` +> 注意: Hayabusaのルートディレクトリから、バイナリを実行する必要があります。例:`.\hayabusa.exe` ## コマンドラインオプション ```bash