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

[bug] 64ビットシステム上で32ビットバイナリを使うと分かりにくいエラーで失敗する #478

Closed YamatoSecurity closed 2 years ago

YamatoSecurity commented 2 years ago

Describe the bug 64ビットシステム上で32ビットバイナリを実行すると、No evtx foundAn error occurred while trying to read input.という不思議なエラーメッセージが出力され、解析が失敗します。 例えば、hayabusa-1.1.0-windows-x86.exe -lを実行すると、No evtx foundというエラーが返ってきます。

Step to Reproduce hayabusa-1.1.0-windows-x86.exe -lhayabusa-1.1.0-windows-x86.exe -f c:\Windows\System32\winevt\Logs\System.evtx

Expected behavior 勉強会で64x端末で間違えてhayabusa-1.1.0-windows-x86.exeを使っていた人が何名か居て、変なエラーが出ていたので、困っていました。 可能であれば、64システムでhayabusa-1.1.0-windows-x86.exeを実行すると、「Please run the x64 binary on 64-bit systems.」というエラーメッセージを表示してあげた方が良さそうです。

Screenshots

Screen Shot 2022-04-03 at 6 13 34 Screen Shot 2022-04-03 at 6 24 57

Environment (please complete the following information):

hitenkoku commented 2 years ago

本件、ファイル名と実行端末のアーキテクチャの組み合わせが一致しない場合にエラー表示を出して返すようにします。 (exeファイルのアーキテクチャを判定する方法がファイル名のみしかなさそうなので)