Merge pull request #350 from Yamato-Security/feature/fix_for_releasev1.0
Feature/fix for releasev1.0
This commit is contained in:
+18
-23
@@ -72,15 +72,16 @@ You can check out sample CSV and manually edited XLSX timeline results [here](ht
|
|||||||
* JSON support for sending alerts to Elastic Stack/Splunk, etc...
|
* JSON support for sending alerts to Elastic Stack/Splunk, etc...
|
||||||
|
|
||||||
# Downloads
|
# Downloads
|
||||||
You can `git clone` the repository with the following command:
|
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.:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Yamato-Security/hayabusa.git
|
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).
|
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`.
|
||||||
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.
|
|
||||||
|
|
||||||
# Compiling from source (Optional)
|
# Compiling from source (Optional)
|
||||||
If you have rust installed, you can compile from source with the following command:
|
If you have rust installed, you can compile from source with the following command:
|
||||||
@@ -110,13 +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.
|
> Note: You need to run the binary from the Hayabusa root directory.
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
You need to run the binary from the Hayabusa root directory.
|
> Note: You need to run the Hayabusa binary from the Hayabusa root directory. Example: `.\hayabusa.exe`
|
||||||
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.
|
|
||||||
|
|
||||||
## Command line options
|
## Command line options
|
||||||
```bash
|
```bash
|
||||||
@@ -144,62 +139,62 @@ USAGE:
|
|||||||
## Usage examples
|
## Usage examples
|
||||||
* Run hayabusa against one Windows event log file:
|
* Run hayabusa against one Windows event log file:
|
||||||
```bash
|
```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:
|
* Run hayabusa against the sample-evtx directory with multiple Windows event log files:
|
||||||
```bash
|
```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:
|
* Export to a single CSV file for further analysis with excel or timeline explorer:
|
||||||
```bash
|
```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`):
|
* Only run hayabusa rules (the default is to run all the rules in `-r .\rules`):
|
||||||
```bash
|
```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:
|
* Only run hayabusa rules for logs that are enabled by default on Windows:
|
||||||
```bash
|
```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:
|
* Only run hayabusa rules for sysmon logs:
|
||||||
```bash
|
```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:
|
* Only run sigma rules:
|
||||||
```bash
|
```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`):
|
* Enable deprecated rules (those with `status` marked as `deprecated`) and noisy rules (those whose rule ID is listed in `.\config\noisy-rules.txt`):
|
||||||
```bash
|
```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:
|
* Only run rules to analyze logons and output in the UTC timezone:
|
||||||
```bash
|
```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):
|
* Run on a live Windows machine (requires Administrator privileges) and only detect alerts (potentially malicious behavior):
|
||||||
```bash
|
```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:
|
* Get event ID statistics:
|
||||||
```bash
|
```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...):
|
* Print verbose information (useful for determining which files take long to process, parsing errors, etc...):
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -v
|
.\hayabusa.exe -d .\hayabusa-sample-evtx -v
|
||||||
```
|
```
|
||||||
|
|
||||||
* Verbose output example:
|
* Verbose output example:
|
||||||
|
|||||||
+18
-23
@@ -73,15 +73,16 @@ CSVと手動で編集したXLSXのタイムライン結果のサンプルは[こ
|
|||||||
* JSONへの出力→Elastic Stack/Splunkへのインポート
|
* JSONへの出力→Elastic Stack/Splunkへのインポート
|
||||||
|
|
||||||
# ダウンロード
|
# ダウンロード
|
||||||
以下の`git clone`コマンドでレポジトリをダウンロードできます:
|
Hayabusaの[Releases](https://github.com/Yamato-Security/hayabusa/releases)から最新版をダウンロードできます。
|
||||||
|
|
||||||
|
または、以下の`git clone`コマンドでレポジトリをダウンロードし、ソースコードからコンパイルして使用することも可能です。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/Yamato-Security/hayabusa.git
|
git clone https://github.com/Yamato-Security/hayabusa.git
|
||||||
```
|
```
|
||||||
|
|
||||||
または、手動で[https://github.com/Yamato-Security/hayabusa](https://github.com/Yamato-Security/hayabusa)からHayabusaをダウンロードすることもできます。
|
evtxライブラリのバージョン(`0.6.7`と`0.7.2`)毎に、コンパイルされたバイナリが用意されています。
|
||||||
|
`0.7.2`バージョンでも動作するはずですが、`0.6.7`でしかテストしていませんので、`0.7.2`で問題が発生した場合はそちらをご利用ください。
|
||||||
その後、Windows、Linux、macOS用のコンパイル済みバイナリを[Releases](https://github.com/Yamato-Security/Hayabusa/releases)からダウンロードして、`hayabusa`のディレクトリに置く必要があります。
|
|
||||||
|
|
||||||
# ソースコードからのコンパイル(任意)
|
# ソースコードからのコンパイル(任意)
|
||||||
rustがインストールされている場合、以下のコマンドでソースコードからコンパイルすることができます:
|
rustがインストールされている場合、以下のコマンドでソースコードからコンパイルすることができます:
|
||||||
@@ -111,13 +112,7 @@ git clone https://github.com/Yamato-Security/hayabusa-sample-evtx.git
|
|||||||
> ※ 以下の例でHayabusaを試したい方は、上記コマンドをhayabusaのルートフォルダから実行してください。
|
> ※ 以下の例でHayabusaを試したい方は、上記コマンドをhayabusaのルートフォルダから実行してください。
|
||||||
|
|
||||||
# 使用方法
|
# 使用方法
|
||||||
Hayabusaはルートディレクトリでバイナリを実行する必要があります。
|
> 注意: Hayabusaのルートディレクトリから、バイナリを実行する必要があります。例:`.\hayabusa.exe`
|
||||||
.\bin` には、OSやアーキテクチャごとにコンパイルされたバイナリが用意されています。
|
|
||||||
また、evtxライブラリのバージョン(`0.6.7`と`0.7.2`)毎に、コンパイルされたバイナリが用意されています。
|
|
||||||
`0.7.2`バージョンでも動作するはずですが、`0.6.7`でしかテストしていませんので、`0.7.2`で問題が発生した場合はそちらをご利用ください。
|
|
||||||
以下の例の `hayabusa.exe` は、適切なHayabusaのバイナリファイル名に置き換えてください。
|
|
||||||
|
|
||||||
> 注意: Hayabusaのルートディレクトリから、バイナリを実行する必要があります。
|
|
||||||
|
|
||||||
## コマンドラインオプション
|
## コマンドラインオプション
|
||||||
```bash
|
```bash
|
||||||
@@ -145,62 +140,62 @@ USAGE:
|
|||||||
## 使用例
|
## 使用例
|
||||||
* 1 つのWindowsイベントログファイルに対してHayabusaを実行します:
|
* 1 つのWindowsイベントログファイルに対してHayabusaを実行します:
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -f eventlog.evtx
|
.\hayabusa.exe -f eventlog.evtx
|
||||||
```
|
```
|
||||||
|
|
||||||
* 複数のWindowsイベントログファイルのあるsample-evtxディレクトリに対して、Hayabusaを実行します:
|
* 複数のWindowsイベントログファイルのあるsample-evtxディレクトリに対して、Hayabusaを実行します:
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -d .\hayabusa-sample-evtx
|
.\hayabusa.exe -d .\hayabusa-sample-evtx
|
||||||
```
|
```
|
||||||
|
|
||||||
* 1 つのCSVファイルにエクスポートして、EXCELやTimeline Explorerでさらに分析することができます:
|
* 1 つのCSVファイルにエクスポートして、EXCELやTimeline Explorerでさらに分析することができます:
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -o results.csv
|
.\hayabusa.exe -d .\hayabusa-sample-evtx -o results.csv
|
||||||
```
|
```
|
||||||
|
|
||||||
* Hayabusaルールのみを実行します(デフォルトでは `-r .\rules` にあるすべてのルールが利用されます):
|
* Hayabusaルールのみを実行します(デフォルトでは `-r .\rules` にあるすべてのルールが利用されます):
|
||||||
```bash
|
```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ルールを実行します:
|
* Windowsでデフォルトで有効になっているログに対してのみ、Hayabusaルールを実行します:
|
||||||
```bash
|
```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ルールを実行します:
|
* Sysmonログに対してのみHayabusaルールを実行します:
|
||||||
```bash
|
```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ルールのみを実行します:
|
* Sigmaルールのみを実行します:
|
||||||
```bash
|
```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が書かれているルール)を有効にします:
|
* 廃棄(deprecated)されたルール(`status`が`deprecated`になっているルール)とノイジールール(`.\config\noisy-rules.txt`にルールIDが書かれているルール)を有効にします:
|
||||||
```bash
|
```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タイムゾーンで出力します:
|
* ログオン情報を分析するルールのみを実行し、UTCタイムゾーンで出力します:
|
||||||
```bash
|
```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権限が必要)、アラート(悪意のある可能性のある動作)のみを検知します:
|
* 起動中のWindows端末上で実行し(Administrator権限が必要)、アラート(悪意のある可能性のある動作)のみを検知します:
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -d C:\Windows\System32\winevt\Logs -m low
|
.\hayabusa.exe -d C:\Windows\System32\winevt\Logs -m low
|
||||||
```
|
```
|
||||||
|
|
||||||
* イベントIDの統計情報を取得します:
|
* イベントIDの統計情報を取得します:
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -f Security.evtx -s
|
.\hayabusa.exe -f Security.evtx -s
|
||||||
```
|
```
|
||||||
|
|
||||||
* 詳細なメッセージを出力します(処理に時間がかかるファイル、パースエラー等を特定するのに便利):
|
* 詳細なメッセージを出力します(処理に時間がかかるファイル、パースエラー等を特定するのに便利):
|
||||||
```bash
|
```bash
|
||||||
.\bin\hayabusa.exe -d .\hayabusa-sample-evtx -v
|
.\hayabusa.exe -d .\hayabusa-sample-evtx -v
|
||||||
```
|
```
|
||||||
|
|
||||||
* Verbose出力の例:
|
* Verbose出力の例:
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
||||||
Reference in New Issue
Block a user