# C:\windows\SysWOW64\drivers\wmiex.exe ###### tags: `MAIR` 32-bitの場合`C:\windows\system32\wmiex.exe`。元のファイル名は`C:\windows\temp\ttt.exe` ## 基本情報 ### ハッシュ値 ``` $ pehash wmiex.exe.malware file filepath: wmiex.exe.malware md5: a4b7940b3d6b03269194f728610784d6 sha1: 173b8e4e8963fc32dd8b18631c79cf95470e8c97 sha256: b771267551961ce840a1fbcd65e8f5ecd0a21350387f35bbcd4c24125ec04530 ssdeep: 1536:/rlmHLrCFLF+PU6r3OGoU/OlWCDK74jPtAh:TarCFLF+PUekWo+4jPtu imphash: ae49485f5d13329b38ca137dbe85a8a8 ``` ### PEヘッダ ``` $ readpe --header optional wmiex.exe.malware Optional/Image header Magic number: 0x10b (PE32) Linker major version: 6 Linker minor version: 0 Size of .text section: 0 Size of .data section: 0x11400 Size of .bss section: 0x1800 Entrypoint: 0xc3ce Address of .text section: 0x1000 Address of .data section: 0x1000 ImageBase: 0x400000 Alignment of sections: 0x1000 Alignment factor: 0x200 Major version of required OS: 4 Minor version of required OS: 0 Major version of image: 0 Minor version of image: 0 Major version of subsystem: 4 Minor version of subsystem: 0 Size of image: 0x16000 Size of headers: 0x400 Checksum: 0x1c1d3 Subsystem required: 0x2 (IMAGE_SUBSYSTEM_WINDOWS_GUI) DLL characteristics: 0 DLL characteristics names Size of stack to reserve: 0x100000 Size of stack to commit: 0x1000 Size of heap space to reserve: 0x100000 Size of heap space to commit: 0x1000 ``` ## 静的解析結果 関数名は適宜付けたものなので適当です。IDBを見てください。 ### 主要処理 こっちにもget_cpu_bitとかsvchost, taskmgrと同じような関数が登録されてる。 #### WinMain - run_initial_commandsを実行 #### MainThread WebServersという名前でサービスを登録&起動。 基本svchostと同じコード。 #### ServiceMain ServiceMainThreadの作成。 #### ServiceMainThread #### run_initial_commands 自身のファイル名に`wmiex.exe`が含まれていなければ以下の処理を実行 - `cmd /c taskkill /f /im wmiex.exe`を実行 - moveコマンドで`C:\Windows\SysWOW64\drivers\wmiex.exe`に移動 - サービスをスタートしてスケジューラに登録。`cmd /c start /b sc start Schedule&ping localhost&sc query Schedule|findstr RUNNING&&(schtasks /delete /TN %s /f&schtasks /create /ru system /sc MINUTE /mo 50 /ST 07:00:00 /TN %s /tr "cmd.exe /c %s"&schtasks /run /TN %s)` - レジストリの自動起動にパスを登録(HKLM, HKCUともに)