Windows の遠隔管理ツールについて
0x1 はじめに
Windowsを遠隔管理できるツールについてのメモ
0x2 検証環境
各ツールでプロセス(calc.exe)を実行し, Sysmon +ProcExp を利用してそれぞれの結果を検証することをゴールとする.
前処理(必要に応じて)
- PSVersionを 5.1.14409.1005に変更
- 識別されていないネットワークをプライベートネットワークに変更する.
- グループポリシーを変更(Security Settings -> Network List Manager Policies -> Unidentified NetworkでLocation typeをPrivateに変更)
- FWを無効化
0x3 検証
WMI(Windows Management Instrumentation)
- 実行コマンド
> wmic /node:192.168.56.106 /user:IEUser /password:Passw0rd! process call create calc
- 結果
Integrity Levels(calc.exe) | High |
Session | 0 |
ParentImage | C:\Windows\System32\wbem\WmiPrvSE.exe |
ParentCommandLine | C:\Windows\system32\wbem\wmiprvse.exe -secured -Embedding |
Integrity Levels(WmiPrvSE.exe) | System |
ParentImage(Parent) | C:\Windows\System32\svchost.exe |
ParentCommandLine(Parent) | C:\Windows\system32\svchost.exe -k DcomLaunch |
Integrity Levels(svchost.exe) | System |
WinRM
コマンド
- Win 7(192.168.56.106)
> winrm qc
- Win 8(接続元)
# 追加 > Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.56.106" # 確認 > Get-Item WSMan:\localhost\Client\TrustedHosts WSManConfig: Microsoft.WSMan.Management\WSMan::localhost\Client Type Name SourceOfValue Value ---- ---- ------------- ----- System.String TrustedHosts 192.168.56.106 # 情報収集 > winrm id -r:192.168.56.106 IdentifyResponse ProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd ProductVendor = Microsoft Corporation ProductVersion = OS: 6.1.7601 SP: 1.0 Stack: 3.0 SecurityProfiles SecurityProfileName = http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/spnego-kerberos
WinRS(Windows Remote Shell)
- コマンド
> winrs -r:192.168.56.106 calc
- 結果
Integrity Levels(calc.exe) | High |
Session | 0 |
ParentImage | C:\Windows\System32\cmd.exe |
ParentCommandLine | C:\Windows\system32\cmd.exe /C calc |
Integrity Levels(WmiPrvSE.exe) | High |
ParentImage(Parent) | C:\Windows\System32\winrshost.exe |
ParentCommandLine(Parent) | C:\Windows\system32\WinrsHost.exe -Embedding |
Integrity Levels(winrshost.exe) | High |
ParentImage(PParent) | C:\Windows\System32\svchost.exe |
ParentCommandLine(PParent) | C:\Windows\system32\svchost.exe -k DcomLaunch |
Integrity Levels(svchost.exe) | System |
PsExec
- 実行コマンド
> PsExec.exe \\192.168.56.106 -u IEUser -p Passw0rd! calc
- 結果
Integrity Levels(calc.exe) | High |
Session | 0 |
ParentImage | C:\Windows\PSEXESVC.exe |
ParentCommandLine | C:\Windows\PSEXESVC.exe |
Integrity Levels(PSEXESVC.exe) | System |
ParentImage(Parent) | C:\Windows\System32\services.exe |
ParentCommandLine(Parent) | CC:\Windows\System32\services.exe |
Integrity Levels(services.exe) | System |
0x4 まとめ
- | ParentImage | Integrity Levels(calc.exe) | Session |
---|---|---|---|
WMI | C:\Windows\System32\wbem\WmiPrvSE.exe | High | 0 |
WinRS | C:\Windows\System32\winrshost.exe(cmd.exe) | High | 0 |
PsExec | C:\Windows\PSEXESVC.exe | High | 0 |
0x5 所感
EDR等の監視の参考にでも.