Yamato-Security / hayabusa

Hayabusa (隼) is a sigma-based threat hunting and fast forensics timeline generator for Windows event logs.
GNU Affero General Public License v3.0
2.26k stars 200 forks source link

developの出力に変な空行がある #444

Closed kazuminn closed 2 years ago

kazuminn commented 2 years ago

最新developのAnalyzing event files: 1のあとにかなり空行がある。これは変だと思います。 イースター表示がある場所な気がする。

適宜、詰めましょう。

windows 11


██╗  ██╗ █████╗ ██╗   ██╗ █████╗ ██████╗ ██╗   ██╗███████╗ █████╗
██║  ██║██╔══██╗╚██╗ ██╔╝██╔══██╗██╔══██╗██║   ██║██╔════╝██╔══██╗
███████║███████║ ╚████╔╝ ███████║██████╔╝██║   ██║███████╗███████║
██╔══██║██╔══██║  ╚██╔╝  ██╔══██║██╔══██╗██║   ██║╚════██║██╔══██║
██║  ██║██║  ██║   ██║   ██║  ██║██████╔╝╚██████╔╝███████║██║  ██║
╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═════╝  ╚═════╝ ╚══════╝╚═╝  ╚═╝
   by Yamato Security

Analyzing event files: 1

Sigma rules: 904
Other rules: 22
SIGMA rules: 22
Hayabusa rules: 18
Ignored rules: 9
Rule parsing errors: 7
Total enabled detection rules: 966

1 / 1 [======================================================================================================] 100.00 % 
Timestamp|Computer|EventID|Level|RuleTitle|Details
2021-11-18 16:42:34.415 +09:00 | PC-01.cybercat.local | 12 | medium | test |
2021-11-18 16:42:34.415 +09:00 | PC-01.cybercat.local | 12 | medium | test |
2021-11-18 16:42:34.416 +09:00 | PC-01.cybercat.local | 12 | medium | test |
2021-11-18 16:42:34.416 +09:00 | PC-01.cybercat.local | 12 | medium | test |
2021-11-18 16:42:54.822 +09:00 | PC-01.cybercat.local | 1 | medium | test |
2021-11-18 16:42:54.822 +09:00 | PC-01.cybercat.local | 1 | medium | test |
2021-11-18 16:42:55.711 +09:00 | PC-01.cybercat.local | 7 | medium | test |
2021-11-18 16:42:55.711 +09:00 | PC-01.cybercat.local | 7 | medium | test |
2021-11-18 16:43:04.979 +09:00 | PC-01.cybercat.local | 11 | medium | test |
2021-11-18 16:43:04.979 +09:00 | PC-01.cybercat.local | 11 | medium | test |
2021-11-18 16:43:22.487 +09:00 | PC-01.cybercat.local | 11 | medium | test |
2021-11-18 16:43:22.487 +09:00 | PC-01.cybercat.local | 11 | medium | test |
2021-11-18 16:43:22.705 +09:00 | PC-01.cybercat.local | 23 | medium | test |
2021-11-18 16:43:22.705 +09:00 | PC-01.cybercat.local | 23 | medium | test |

Total detections: 14
Total critical detections: 0
Total high detections: 0
Total medium detections: 14
Total low detections: 0
Total informational detections: 0
Total undefined detections: 0
Unique detections: 2
Unique critical detections: 0
hitenkoku commented 2 years ago

本件はイースター表示は関係ないです(イースター表示はAnalyzing event filesの前)

hitenkoku commented 2 years ago

原因がわかったので対応します。原因はhayabusa-rulesにconfigファイルを移動させた際にtools/sigmacのルールを除外させるためにテスト用のルールIDを固定して、読み込ませないように設定していましたが、ルールIDのフォーマットを間違えたことが原因でした。

YamatoSecurity commented 2 years ago

同じsigmacツールの移動の影響だと思いますが、以下のバグも発生しています:

  1. テストファイルのOther rulesSIGMA rulesがカウントされています。これらのテストルールを無視したいです。

    Screen Shot 2022-03-08 at 17 05 39
  2. 以下のエラーが発生しています:

    Screen Shot 2022-03-08 at 17 06 18

ルールIDを000000に設定するだけでは対応が難しそうのであれば、hayabusa側で./rules/toolsフォルダを無視するように修正して、v1.1.1をリリースしますか?

YamatoSecurity commented 2 years ago

https://github.com/Yamato-Security/hayabusa-rules/pull/23 を検証しました。 1.1.1をリリースしなくても、上記のPRで全部直ります!

hitenkoku commented 2 years ago

ご確認ありがとうございます!hayabusa-rulesの方はマージをさせていただきました。 submodule側の指し先も変更するプルリクエストを出させていただきます

YamatoSecurity commented 2 years ago

ありがとうございます! これでdevelopブランチは大丈夫そうですが、mainブランチのrules submoduleも更新する必要がありますよね?

hitenkoku commented 2 years ago

そうですね。そちらも急ぎ対応します。