
PowerShellベースの脅威ハンティングツール。Windowsイベントログを分析し、資格情報攻撃、難読化されたコマンド、サービス操作、Mimikatzの使用などの悪意あるアクティビティを検出します。
DeepBlueCLI - Windowsイベントログを介した脅威ハンティングのためのPowerShellモジュール
Eric Conrad, Backshore Communications, LLC
deepblue at backshore dot net
Twitter: @eric_conrad
サンプルのEVTXファイルは.\evtxディレクトリにあります
注: DeepBlueCLIをダウンロード後にウイルス対策ソフトが反応する場合、それはおそらく.\evtxディレクトリ内のEVTXファイル(悪意のある攻撃のコマンドラインログなどを含む)に反応しているためです。EVTXファイルは無害です。ウイルス対策ソフトでDeepBlueCLIディレクトリを無視するよう設定する必要があるかもしれません。
.\DeepBlue.ps1 <イベントログ名> <evtxファイル名>
実行ポリシーが無効になっているというエラーが表示される場合は、Set-ExecutionPolicy Readmeを参照してください。
.\DeepBlue.ps1
または:
.\DeepBlue.ps1 -log security
.\DeepBlue.ps1 -log system
.\DeepBlue.ps1 .\evtx\new-user-security.evtx
これらのログを構成する方法については、以下のログ設定セクションを参照してください。
lsadump::sam...その他
DeepBlueCLIはPowerShellオブジェクトとして出力し、JSON、HTML、CSVなど様々な出力方法とタイプを可能にします。
例:
Windowsコマンドライン監査を有効にする: https://support.microsoft.com/en-us/kb/3004375
ログオン失敗の監査が必要: https://technet.microsoft.com/en-us/library/cc976395.aspx
DeepBlueCLIはモジュールログ記録 (PowerShellイベント4103) とスクリプトブロックログ記録 (4104) を使用します。文字起こしは使用しません。
参照: https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html
Windows 7からWindows 8.1でPowerShellのコマンドライン(スクリプトブロックだけでなく)を取得するには、\Windows\System32\WindowsPowerShell\v1.0\profile.ps1に以下を追加します。
$LogCommandHealthEvent = $true
$LogCommandLifecycleEvent = $true
詳細は以下を参照してください:
謝辞: @heinzarelli および @HackerHurricane
SysinternalsからSysmonをインストール: https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
DeepBlueとDeepBlueHashは現在、Sysmonイベント1、6、7を使用しています。
SHA256ハッシュを記録してください。他の形式でも問題ありませんが、DeepBlueHashはSHA256を使用します。
| イベント | コマンド |
|---|
| イベントログ操作 | .\DeepBlue.ps1 .\evtx\disablestop-eventlog.evtx |
| Metasploit ネイティブターゲット (セキュリティ) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-security.evtx |
| Metasploit ネイティブターゲット (システム) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-native-target-system.evtx |
| Metasploit PowerShellターゲット (セキュリティ) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-security.evtx |
| Metasploit PowerShellターゲット (システム) | .\DeepBlue.ps1 .\evtx\metasploit-psexec-powershell-target-system.evtx |
Mimikatz lsadump::sam | .\DeepBlue.ps1 .\evtx\mimikatz-privesc-hashdump.evtx |
| 新規ユーザー作成 | .\DeepBlue.ps1 .\evtx\new-user-security.evtx |
| 難読化 (エンコーディング) | .\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-encoding-menu.evtx |
| 難読化 (文字列) | .\DeepBlue.ps1 .\evtx\Powershell-Invoke-Obfuscation-string-menu.evtx |
| パスワード推測 | .\DeepBlue.ps1 .\evtx\smb-password-guessing-security.evtx |
| パスワードスプレー | .\DeepBlue.ps1 .\evtx\password-spray.evtx |
| PowerSploit (セキュリティ) | .\DeepBlue.ps1 .\evtx\powersploit-security.evtx |
| PowerSploit (システム) | .\DeepBlue.ps1 .\evtx\powersploit-system.evtx |
| PSAttack | .\DeepBlue.ps1 .\evtx\psattack-security.evtx |
| 管理者グループへのユーザー追加 | .\DeepBlue.ps1 .\evtx\new-user-security.evtx |
| 出力タイプ | 構文 |
|---|
| CSV | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Csv |
| 書式一覧 (デフォルト) | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | Format-List |
| 書式テーブル | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | Format-Table |
| GridView | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | Out-GridView |
| HTML | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Html |
| JSON | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Json |
| XML | .\DeepBlue.ps1 .\evtx\psattack-security.evtx | ConvertTo-Xml |