Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added update command #391 #392

Merged
merged 26 commits into from
Feb 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
76a7884
add git2 crate #391
hitenkoku Feb 3, 2022
35a6a85
added Update option #391
hitenkoku Feb 3, 2022
7355291
Merge branch 'develop' into feature/added_update_command#391
hitenkoku Feb 3, 2022
7b8d60f
updated readme #391
hitenkoku Feb 3, 2022
563e740
fixed cargo.lock
hitenkoku Feb 3, 2022
052ad22
fixed option if-statement #391
hitenkoku Feb 3, 2022
70771a5
changed utc short option and rule-update short option #391
hitenkoku Feb 4, 2022
f9d0917
updated readme
hitenkoku Feb 4, 2022
d46f26f
updated readme
hitenkoku Feb 4, 2022
c4d34e5
fixed -u long option & version number update #391
hitenkoku Feb 4, 2022
2922ae9
added fast-forwarding rules repository #391
hitenkoku Feb 13, 2022
cb9b1f9
Merge branch 'develop' into feature/added_update_command#391
hitenkoku Feb 13, 2022
52afbe8
updated command line option #391
hitenkoku Feb 13, 2022
fcf43fa
moved output logo prev update rule
hitenkoku Feb 13, 2022
e4cb853
Merge branch 'develop' into feature/added_update_command#391
hitenkoku Feb 16, 2022
088d770
fixed readme #391
hitenkoku Feb 16, 2022
f0e638b
removed recursive option in readme
hitenkoku Feb 16, 2022
4657c35
English message update.
YamatoSecurity Feb 19, 2022
45a5234
cargo fmt
hitenkoku Feb 20, 2022
755e672
Added update command#391 submodule ver (#401)
hitenkoku Feb 24, 2022
0710c38
Merge branch 'develop' into feature/added_update_command#391
hitenkoku Feb 25, 2022
fdcf9c6
added caution case of update failed in readme #391
hitenkoku Feb 25, 2022
2955f01
fixed document
hitenkoku Feb 25, 2022
3a4f37b
added output error in case of loaded rule count is 0 #391 #392
hitenkoku Feb 25, 2022
43442d6
--update-rules typo
YamatoSecurity Feb 25, 2022
5457aea
removed unused library call
hitenkoku Feb 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "rules"]
path = rules
url = git@github.com:Yamato-Security/hayabusa-rules.git
url = https://github.com/Yamato-Security/hayabusa-rules.git
156 changes: 104 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pbr = "*"
hashbrown = "0.12.*"
colored = "2.*"
hex = "0.4.*"
git2="0.13"

[target.'cfg(windows)'.dependencies]
is_elevated = "0.1.2"
Expand Down
14 changes: 8 additions & 6 deletions README-Japanese.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ Hayabusaの[Releases](https://github.com/Yamato-Security/hayabusa/releases)か
git clone https://github.com/Yamato-Security/hayabusa.git --recursive
```

`--recursive` をつけ忘れた場合、サブモジュールとして管理されている `rules/` 内のファイルが取得できません。
以下のコマンドでサブモジュールを取得してください。
--recursive をつけ忘れた場合、サブモジュールとして管理されている rules/ 内のファイルが取得できません。
Hayabusaでは検知ルールを`rules/`フォルダの取得はコンパイル後に以下のコマンドでルールの最新版を取得することができます。
rulesフォルダ配下でファイルを削除や更新をしていた場合は更新されないのでその場合はrulesフォルダを他の名前にリネームしたうえで以下のコマンドを打ってください。

```bash
git submodule update --init
.\hayabusa.exe -u
```

# ソースコードからのコンパイル(任意)
Expand Down Expand Up @@ -199,13 +200,14 @@ USAGE:
-v --verbose 'Output verbose information.'
-D --enable-deprecated-rules 'Enable sigma rules marked as deprecated.'
-n --enable-noisy-rules 'Enable rules marked as noisy.'
-u --update-rules 'Clone latest hayabusa-rule'
-m --min-level=[LEVEL] 'Minimum level for rules. (default: informational)'
-l --live-analysis 'Analyze to WINDIR\System32\winevt\Logs (Windows Only. Need Administrator privileges.)'
--start-timeline=[STARTTIMELINE] 'Start time of the event to load from event file. (example: '2018/11/28 12:00:00 +09:00')'
--end-timeline=[ENDTIMELINE] 'End time of the event to load from event file. (example: '2018/11/28 12:00:00 +09:00')'
--rfc-2822 'Output date and time in RFC 2822 format. (example: Mon, 07 Aug 2006 12:34:56 -0600)'
--rfc-3339 'Output date and time in RFC 3339 format. (example: 2006-08-07T12:34:56.485214 -06:00)'
-u --utc 'Output time in UTC format. (default: local time)'
-U --utc 'Output time in UTC format. (default: local time)'
-t --thread-number=[NUMBER] 'Thread number. (default: optimal number for performance.)'
-s --statistics 'Prints statistics of event IDs.'
-q --quiet 'Quiet mode. Do not display the launch banner.'
Expand All @@ -226,7 +228,8 @@ FLAGS:
--rfc-3339 Output date and time in RFC 3339 format. (example: 2006-08-07T12:34:56.485214
-06:00)
-s, --statistics Prints statistics of event IDs.
-u, --utc Output time in UTC format. (default: local time)
-u, --update-rules Clone latest hayabusa-rule
-U, --utc Output time in UTC format. (default: local time)
-V, --version Prints version information
-v, --verbose Output verbose information.

Expand All @@ -241,7 +244,6 @@ OPTIONS:
--start-timeline <STARTTIMELINE> Start time of the event to load from event file. (example: '2018/11/28
12:00:00 +09:00')
-t, --thread-number <NUMBER> Thread number. (default: optimal number for performance.)

```

## 使用例
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,14 @@ You can also `git clone` the repository with the following command and compile b
git clone https://github.com/Yamato-Security/hayabusa.git --recursive
```

If you forget to use `--recursive` option, `rules/` files which managed in submodule did not cloned.
Use following command to import submodules.
If you forget to use --recursive option, rules/ files which managed in submodule did not cloned.
You can get latest Hayabusa rules with the execute following command.

When you modified or erased in rules/ , update is failed.
In this case, you can get latest Hayabusa if you renamed rules folder and execute following command.

```bash
git submodule update --init
.\hayabusa.exe -u
```

# Compiling from source (Optional)
Expand Down
Loading