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

-Q --quiet-errors 'Quiet errors mode. Do not display errors or save error logs'というオプションでエラーメッセージを出力・保存しないようにする #309

Closed hitenkoku closed 2 years ago

hitenkoku commented 2 years ago

もし可能であれば、毎回デフォルトでエラーファイルが作成されると、テストする時にファイルが大量に作成されて、ずっと消すのは手間がかかるので、-Q --quiet-errors 'Quiet errors mode. Do not display errors or save error logs'というオプションでエラーメッセージを出力・保存しないようにできたらお願いしたいです。(大変でしたら無視してください)

Originally posted by @YamatoSecurity in https://github.com/Yamato-Security/hayabusa/issues/301#issuecomment-997286181

hitenkoku commented 2 years ago

エラーが出ていたため一旦revert。

hitenkoku commented 2 years ago

-Qで指定された時の出力する判定文のboolが逆だったため修正したら以下の通り正常に動作数ることを確認した

PS >.\hayabusa.exe -d .\rules\

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

[ERROR] No .evtx files were found. PS >.\hayabusa.exe -d .\rules\ -Q

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