[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AEV55C9PRXK5R8BPJ8V6M7":3,"skill-same:01M6AEV55C9PRXK5R8BPJ8V6M7":148},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":79,"commitSha":80,"skillDirectory":81,"forksCount":82,"repositoryHtmlUrl":83,"repositoryHomepageUrl":84,"ownerHtmlUrl":85,"ownerBlogUrl":86,"ownerDescription":87,"updatedAt":88,"install":89,"resources":102},"01M6AEV55C9PRXK5R8BPJ8V6M7","hunting-for-dcom-lateral-movement","DCOM 横向移动威胁狩猎","Hunt for DCOM-based lateral movement (MITRE ATT&CK T1021.003) by detecting abuse of MMC20.Application, ShellBrowserWindow, and ShellWindows COM objects via Sysmon Event ID 1\u002F3 correlation, WMI event analysis, and RPC endpoint mapper traffic on port 135. Use when investigating suspicious mmc.exe\u002Fdllhost.exe child processes, building T1021.003 detections, or auditing DCOM exposure during purple-team exercises.","通过 Sysmon 事件 ID 1\u002F3 关联分析、WMI 事件分析和端口 135 上的 RPC 端点映射器流量，检测 MMC20.Application、ShellBrowserWindow 和 ShellWindows COM 对象的滥用，以搜寻基于 DCOM 的横向移动（MITRE ATT&CK T1021.003）。适用于调查可疑的 mmc.exe\u002Fdllhost.exe 子进程、构建 T1021.003 检测规则，或在紫队演练期间审计 DCOM 暴露情况。","mukul975\u002FAnthropic-Cybersecurity-Skills","mukul975","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42860185?v=4","01M6ADEQR8T5M4EEG6C67BQCWF","Mahipal","01M6ADJPMYWG1E5GM1FWBE3128",36146,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-for-dcom-lateral-movement\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"hunting for dcom lateral movement","endpoint","COM-objects","ShellBrowserWindow","ShellWindows","MMC20","T1021.003","DCOM","wmi","ATT&CK","suspicious","lateral-movement","purple-team","correlation","sysmon","network","threat-hunting","server","rpc","cybersecurity","2026-11-10 10:12:30",false,"---\nname: hunting-for-dcom-lateral-movement\ndescription: 'Hunt for DCOM-based lateral movement (MITRE ATT&CK T1021.003) by detecting\n  abuse of MMC20.Application, ShellBrowserWindow, and ShellWindows COM objects via\n  Sysmon Event ID 1\u002F3 correlation, WMI event analysis, and RPC endpoint mapper traffic\n  on port 135. Use when investigating suspicious mmc.exe\u002Fdllhost.exe child processes,\n  building T1021.003 detections, or auditing DCOM exposure during purple-team exercises.\n\n  '\ndomain: cybersecurity\nsubdomain: threat-hunting\ntags:\n- threat-hunting\n- DCOM\n- lateral-movement\n- T1021.003\n- Sysmon\n- MMC20\n- ShellWindows\n- ShellBrowserWindow\n- COM-objects\n- WMI\n- RPC\nversion: '1.0'\nauthor: mukul975\nlicense: Apache-2.0\nd3fend_techniques:\n- Application Protocol Command Analysis\n- Network Isolation\n- Network Traffic Analysis\n- Client-server Payload Profiling\n- Network Traffic Community Deviation\nnist_csf:\n- DE.CM-01\n- DE.AE-02\n- DE.AE-07\n- ID.RA-05\nmitre_attack:\n- T1046\n- T1057\n- T1082\n- T1083\n- T1021\n---\n\n# Hunting for DCOM Lateral Movement\n\n> **Authorized Testing Disclaimer**: The offensive techniques and attack simulations described in this skill are intended exclusively for authorized penetration testing, red team engagements, purple team exercises, and security research conducted with explicit written permission from the system owner. Unauthorized use of these techniques against systems you do not own or have permission to test is illegal and unethical. Always operate within the scope of your engagement and comply with applicable laws and regulations.\n\n## Overview\n\nDistributed Component Object Model (DCOM) enables remote execution of COM objects across a network using RPC. Adversaries abuse specific DCOM objects -- MMC20.Application (CLSID {49B2791A-B1AE-4C90-9B8E-E860BA07F889}), ShellBrowserWindow (CLSID {C08AFD90-F2A1-11D1-8455-00A0C91F3880}), and ShellWindows (CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39}) -- to execute commands on remote hosts without dropping files, making this a stealthy lateral movement technique mapped to MITRE ATT&CK T1021.003. This skill provides detection strategies using Sysmon telemetry, Windows Security Event correlation, network monitoring, and SIEM detection rules to identify DCOM abuse in enterprise environments.\n\n## When to Use\n\n- Proactively hunting for lateral movement in Active Directory environments where DCOM is enabled\n- Investigating alerts for suspicious mmc.exe, dllhost.exe, or explorer.exe child process creation on servers\n- Building detection rules for MITRE ATT&CK T1021.003 (Remote Services: Distributed Component Object Model)\n- Correlating Sysmon Event ID 1 (Process Create) and Event ID 3 (Network Connection) to trace DCOM-based command execution chains\n- Auditing DCOM exposure across the domain to reduce lateral movement attack surface\n- During purple team exercises validating detection coverage for DCOM-based techniques\n\n**Do not use** as a replacement for EDR-based lateral movement detection, without Sysmon or equivalent process telemetry deployed on endpoints, or in isolation without correlating network-level and host-level indicators.\n\n## Prerequisites\n\n- Sysmon deployed on endpoints with configuration capturing Event ID 1 (Process Create), Event ID 3 (Network Connection), Event ID 7 (Image Loaded), and Event ID 10 (Process Access)\n- Windows Security Event Logs forwarded to SIEM (Event IDs 4624, 4672, 4688)\n- SIEM platform (Splunk, Elastic, Microsoft Sentinel) with correlation capability\n- Network monitoring for RPC traffic (TCP 135 and dynamic high ports 49152-65535)\n- Baseline inventory of legitimate DCOM usage in the environment\n- Understanding of MITRE ATT&CK Lateral Movement tactic (TA0008) and T1021.003\n\n## Workflow\n\n### Step 1: Understand DCOM Lateral Movement Attack Vectors\n\nDCOM lateral movement exploits three primary COM objects. Each has distinct forensic artifacts.\n\n**MMC20.Application** -- The attacker instantiates the MMC snap-in remotely and calls `ExecuteShellCommand` to run arbitrary commands on the target. This spawns mmc.exe as a child of svchost.exe (DcomLaunch service) on the target.\n\n**ShellBrowserWindow** -- Uses the `Document.Application.ShellExecute` method to execute commands through an existing explorer.exe process. Unlike MMC20, this does not create a new process for the COM server itself, making it stealthier.\n\n**ShellWindows** -- Similar to ShellBrowserWindow, it activates within an existing explorer.exe instance and executes child processes from explorer.exe. The absence of a new COM server process makes it harder to detect without proper telemetry.\n\n```powershell\n# ATTACK SIMULATION (authorized testing only)\n# These commands demonstrate what adversaries execute -- use only in lab environments\n\n# MMC20.Application lateral movement\n# $dcom = [System.Activator]::CreateInstance(\n#     [Type]::GetTypeFromProgID(\"MMC20.Application\", \"TARGET_IP\"))\n# $dcom.Document.ActiveView.ExecuteShellCommand(\n#     \"cmd.exe\", $null, \"\u002Fc whoami > C:\\temp\\output.txt\", \"7\")\n\n# ShellWindows lateral movement\n# $dcom = [System.Activator]::CreateInstance(\n#     [Type]::GetTypeFromCLSID(\n#         [guid]\"9BA05972-F6A8-11CF-A442-00A0C90A8F39\", \"TARGET_IP\"))\n# $dcom.item().Document.Application.ShellExecute(\n#     \"cmd.exe\", \"\u002Fc calc.exe\", \"C:\\windows\\system32\", $null, 0)\n\n# ShellBrowserWindow lateral movement\n# $dcom = [System.Activator]::CreateInstance(\n#     [Type]::GetTypeFromCLSID(\n#         [guid]\"C08AFD90-F2A1-11D1-8455-00A0C91F3880\", \"TARGET_IP\"))\n# $dcom.Document.Application.ShellExecute(\n#     \"cmd.exe\", \"\u002Fc net user\", \"C:\\windows\\system32\", $null, 0)\n```\n\n### Step 2: Configure Sysmon for DCOM Detection\n\n```xml\n\u003C!-- Sysmon configuration excerpt for DCOM lateral movement detection -->\n\u003C!-- Add these rules to your existing Sysmon config -->\n\n\u003CSysmon schemaversion=\"4.90\">\n  \u003CEventFiltering>\n\n    \u003C!-- Event ID 1: Process Creation - Detect DCOM-spawned processes -->\n    \u003CRuleGroup name=\"DCOM_ProcessCreate\" groupRelation=\"or\">\n      \u003CProcessCreate onmatch=\"include\">\n        \u003C!-- MMC20.Application: mmc.exe spawning child processes -->\n        \u003CParentImage condition=\"end with\">mmc.exe\u003C\u002FParentImage>\n        \u003C!-- DcomLaunch service spawning COM servers -->\n        \u003CParentCommandLine condition=\"contains\">DcomLaunch\u003C\u002FParentCommandLine>\n        \u003C!-- dllhost.exe spawning suspicious children -->\n        \u003CParentImage condition=\"end with\">dllhost.exe\u003C\u002FParentImage>\n        \u003C!-- explorer.exe spawning cmd\u002Fpowershell (ShellWindows\u002FShellBrowserWindow) -->\n        \u003CRule groupRelation=\"and\">\n          \u003CParentImage condition=\"end with\">explorer.exe\u003C\u002FParentImage>\n          \u003CImage condition=\"end with\">cmd.exe\u003C\u002FImage>\n        \u003C\u002FRule>\n        \u003CRule groupRelation=\"and\">\n          \u003CParentImage condition=\"end with\">explorer.exe\u003C\u002FParentImage>\n          \u003CImage condition=\"end with\">powershell.exe\u003C\u002FImage>\n        \u003C\u002FRule>\n      \u003C\u002FProcessCreate>\n    \u003C\u002FRuleGroup>\n\n    \u003C!-- Event ID 3: Network Connection - Track DCOM RPC connections -->\n    \u003CRuleGroup name=\"DCOM_NetworkConnect\" groupRelation=\"or\">\n      \u003CNetworkConnect onmatch=\"include\">\n        \u003C!-- RPC Endpoint Mapper -->\n        \u003CDestinationPort condition=\"is\">135\u003C\u002FDestinationPort>\n        \u003C!-- DCOM processes making network connections -->\n        \u003CImage condition=\"end with\">mmc.exe\u003C\u002FImage>\n        \u003CImage condition=\"end with\">dllhost.exe\u003C\u002FImage>\n        \u003C!-- svchost.exe DcomLaunch connections -->\n        \u003CRule groupRelation=\"and\">\n          \u003CImage condition=\"end with\">svchost.exe\u003C\u002FImage>\n          \u003CDestinationPort condition=\"more than\">49151\u003C\u002FDestinationPort>\n        \u003C\u002FRule>\n      \u003C\u002FNetworkConnect>\n    \u003C\u002FRuleGroup>\n\n    \u003C!-- Event ID 7: Image Loaded - DCOM-related DLLs -->\n    \u003CRuleGroup name=\"DCOM_ImageLoaded\" groupRelation=\"or\">\n      \u003CImageLoad onmatch=\"include\">\n        \u003CImageLoaded condition=\"end with\">comsvcs.dll\u003C\u002FImageLoaded>\n        \u003CImageLoaded condition=\"end with\">ole32.dll\u003C\u002FImageLoaded>\n        \u003CImageLoaded condition=\"end with\">rpcrt4.dll\u003C\u002FImageLoaded>\n      \u003C\u002FImageLoad>\n    \u003C\u002FRuleGroup>\n\n  \u003C\u002FEventFiltering>\n\u003C\u002FSysmon>\n```\n\n```bash\n# Deploy or update Sysmon configuration\n# sysmon64.exe -c dcom-detection-sysmon.xml\n\n# Verify Sysmon is capturing DCOM events\n# PowerShell: Get-WinEvent -LogName \"Microsoft-Windows-Sysmon\u002FOperational\" -MaxEvents 10 |\n#   Where-Object { $_.Id -in @(1,3) } | Format-Table TimeCreated, Id, Message -Wrap\n```\n\n### Step 3: Build SIEM Detection Rules for DCOM Object Abuse\n\n```yaml\n# Sigma Rule: MMC20.Application DCOM Lateral Movement\ntitle: DCOM Lateral Movement via MMC20.Application\nid: 8a3b5f2e-c1d4-4a9f-b237-1e6f8d2c3a4b\nstatus: stable\ndescription: >\n  Detects remote instantiation of MMC20.Application DCOM object by monitoring\n  for mmc.exe spawned by svchost.exe DcomLaunch service with subsequent child\n  process creation, indicating T1021.003 lateral movement.\nreferences:\n    - https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1021\u002F003\u002F\n    - https:\u002F\u002Fwww.cybereason.com\u002Fblog\u002Fdcom-lateral-movement-techniques\n    - https:\u002F\u002Fwww.mdsec.co.uk\u002F2020\u002F09\u002Fi-like-to-move-it-windows-lateral-movement-part-2-dcom\u002F\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_parent:\n        ParentImage|endswith: '\\mmc.exe'\n    selection_child:\n        Image|endswith:\n            - '\\cmd.exe'\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n            - '\\wscript.exe'\n            - '\\cscript.exe'\n            - '\\mshta.exe'\n            - '\\rundll32.exe'\n            - '\\regsvr32.exe'\n    filter_legitimate:\n        ParentCommandLine|contains:\n            - 'devmgmt.msc'\n            - 'diskmgmt.msc'\n            - 'services.msc'\n            - 'compmgmt.msc'\n    condition: selection_parent and selection_child and not filter_legitimate\nlevel: high\ntags:\n    - attack.lateral_movement\n    - attack.t1021.003\nfalsepositives:\n    - Legitimate remote MMC administration by authorized IT staff\n    - SCCM or other management tools using DCOM for remote management\n```\n\n```yaml\n# Sigma Rule: ShellWindows\u002FShellBrowserWindow DCOM Lateral Movement\ntitle: DCOM Lateral Movement via ShellWindows or ShellBrowserWindow\nid: 2f7c9d1e-a8b3-4c5f-9012-3e4d5f6a7b8c\nstatus: stable\ndescription: >\n  Detects DCOM lateral movement using ShellWindows (CLSID 9BA05972) or\n  ShellBrowserWindow (CLSID C08AFD90) by monitoring for explorer.exe spawning\n  cmd.exe or powershell.exe on systems where no user is interactively logged on,\n  or where the network logon (Type 3) precedes the process creation.\nreferences:\n    - https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1021\u002F003\u002F\n    - https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Fsecurity\u002F8.19\u002Fincoming-dcom-lateral-movement-with-shellbrowserwindow-or-shellwindows.html\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection:\n        ParentImage|endswith: '\\explorer.exe'\n        Image|endswith:\n            - '\\cmd.exe'\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n            - '\\mshta.exe'\n            - '\\wscript.exe'\n            - '\\cscript.exe'\n    filter_interactive:\n        LogonId: '0x3e7'\n    condition: selection and not filter_interactive\nlevel: medium\ntags:\n    - attack.lateral_movement\n    - attack.t1021.003\nfalsepositives:\n    - Users launching command prompts from Explorer context menus\n    - Software installers launching child processes from explorer.exe\n```\n\n```yaml\n# Sigma Rule: Sysmon Network Connection to RPC Endpoint Mapper from DCOM Process\ntitle: DCOM Process Inbound RPC Connection Followed by Process Creation\nid: 4d9e2f1a-b3c5-4a7f-8901-2c3d4e5f6a7b\nstatus: experimental\ndescription: >\n  Correlates Sysmon Event ID 3 (Network Connection) on port 135 with\n  subsequent Event ID 1 (Process Create) from DCOM parent processes\n  (mmc.exe, dllhost.exe, explorer.exe) within a short time window.\nlogsource:\n    product: windows\n    service: sysmon\ndetection:\n    network_connection:\n        EventID: 3\n        DestinationPort: 135\n        Initiated: 'false'\n    process_creation:\n        EventID: 1\n        ParentImage|endswith:\n            - '\\mmc.exe'\n            - '\\dllhost.exe'\n            - '\\svchost.exe'\n    timeframe: 30s\n    condition: network_connection | near process_creation\nlevel: high\ntags:\n    - attack.lateral_movement\n    - attack.t1021.003\n```\n\n### Step 4: Deploy Splunk and KQL Detection Queries\n\n```spl\n# Splunk: Detect MMC20.Application DCOM Lateral Movement\n# Correlates network logon (4624 Type 3) with mmc.exe process creation\n\nindex=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\nEventCode=1 ParentImage=\"*\\\\mmc.exe\"\n(Image=\"*\\\\cmd.exe\" OR Image=\"*\\\\powershell.exe\" OR Image=\"*\\\\pwsh.exe\"\n OR Image=\"*\\\\wscript.exe\" OR Image=\"*\\\\cscript.exe\" OR Image=\"*\\\\mshta.exe\")\n| eval target_host=ComputerName\n| join target_host type=inner\n    [search index=wineventlog EventCode=4624 LogonType=3\n    | where AuthenticationPackageName=\"NTLM\" OR AuthenticationPackageName=\"Kerberos\"\n    | eval target_host=ComputerName\n    | rename IpAddress as source_ip, TargetUserName as logon_user\n    | fields target_host source_ip logon_user _time]\n| where abs(_time - relative_time(now(), \"-5m\")) \u003C 300\n| table _time target_host Image ParentImage CommandLine source_ip logon_user\n| sort -_time\n```\n\n```spl\n# Splunk: Detect ShellWindows\u002FShellBrowserWindow DCOM Lateral Movement\n# Identifies explorer.exe spawning suspicious child processes on servers\n\nindex=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\nEventCode=1 ParentImage=\"*\\\\explorer.exe\"\n(Image=\"*\\\\cmd.exe\" OR Image=\"*\\\\powershell.exe\" OR Image=\"*\\\\pwsh.exe\")\n| eval target_host=ComputerName\n| join target_host type=inner\n    [search index=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n     EventCode=3 DestinationPort=135 Initiated=\"false\"\n    | eval target_host=ComputerName\n    | rename SourceIp as dcom_source_ip\n    | fields target_host dcom_source_ip _time]\n| where abs(_time - relative_time(now(), \"-2m\")) \u003C 120\n| stats count values(Image) as child_processes values(CommandLine) as commands\n    by target_host dcom_source_ip\n| where count > 0\n| table target_host dcom_source_ip child_processes commands count\n```\n\n```spl\n# Splunk: DCOM RPC Endpoint Mapper Connection Anomaly\n# Identifies hosts receiving unusual volumes of inbound RPC connections\n\nindex=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\nEventCode=3 DestinationPort=135 Initiated=\"false\"\n| stats dc(SourceIp) as unique_sources count by ComputerName\n| where unique_sources > 3 OR count > 10\n| sort -unique_sources\n| table ComputerName unique_sources count\n```\n\n```kql\n-- Microsoft Sentinel KQL: DCOM Lateral Movement via MMC20.Application\n\nlet dcom_network = SysmonEvent\n| where EventID == 3\n| where DestinationPort == 135\n| where InitiatedConnection == false\n| project NetworkTime=TimeGenerated, TargetComputer=Computer,\n    SourceIP=SourceIp, DestPort=DestinationPort;\n\nlet dcom_process = SysmonEvent\n| where EventID == 1\n| where ParentImage endswith \"\\\\mmc.exe\"\n    or ParentImage endswith \"\\\\dllhost.exe\"\n| where Image endswith \"\\\\cmd.exe\"\n    or Image endswith \"\\\\powershell.exe\"\n    or Image endswith \"\\\\pwsh.exe\"\n    or Image endswith \"\\\\wscript.exe\"\n    or Image endswith \"\\\\mshta.exe\"\n| project ProcessTime=TimeGenerated, TargetComputer=Computer,\n    ParentImage, Image, CommandLine, User;\n\ndcom_network\n| join kind=inner (dcom_process) on TargetComputer\n| where abs(datetime_diff('second', NetworkTime, ProcessTime)) \u003C 60\n| project NetworkTime, ProcessTime, TargetComputer, SourceIP,\n    ParentImage, Image, CommandLine, User\n| sort by NetworkTime desc\n```\n\n```kql\n-- Microsoft Sentinel KQL: ShellWindows DCOM Lateral Movement\n\nSecurityEvent\n| where EventID == 4624 and LogonType == 3\n| where AuthenticationPackageName in (\"NTLM\", \"Kerberos\")\n| project LogonTime=TimeGenerated, TargetComputer=Computer,\n    SourceIP=IpAddress, LogonUser=TargetUserName\n| join kind=inner (\n    SysmonEvent\n    | where EventID == 1\n    | where ParentImage endswith \"\\\\explorer.exe\"\n    | where Image endswith \"\\\\cmd.exe\"\n        or Image endswith \"\\\\powershell.exe\"\n        or Image endswith \"\\\\pwsh.exe\"\n    | project ProcessTime=TimeGenerated, TargetComputer=Computer,\n        Image, CommandLine, User\n) on TargetComputer\n| where ProcessTime between (LogonTime .. (LogonTime + 2m))\n| project LogonTime, ProcessTime, TargetComputer, SourceIP,\n    LogonUser, Image, CommandLine\n| sort by LogonTime desc\n```\n\n### Step 5: WMI Event Correlation for DCOM Activity\n\n```spl\n# Splunk: Correlate WMI events with DCOM lateral movement\n# WMI-Activity operational log captures DCOM-triggered WMI calls\n\nindex=wineventlog source=\"WinEventLog:Microsoft-Windows-WMI-Activity\u002FOperational\"\n| where EventCode IN (5857, 5858, 5859, 5860, 5861)\n| eval event_type=case(\n    EventCode=5857, \"WMI Provider Loaded\",\n    EventCode=5858, \"WMI Query Error\",\n    EventCode=5859, \"WMI Provider Event\",\n    EventCode=5860, \"WMI Temporary Event Registration\",\n    EventCode=5861, \"WMI Permanent Event Registration\")\n| stats count values(event_type) as wmi_events by ComputerName\n| where count > 5\n| table ComputerName wmi_events count\n```\n\n```powershell\n# PowerShell: Query WMI operational log for DCOM-related activity\n# Run on target systems during investigation\n\nGet-WinEvent -LogName \"Microsoft-Windows-WMI-Activity\u002FOperational\" -MaxEvents 500 |\n    Where-Object {\n        $_.Id -in @(5857, 5858, 5860, 5861) -and\n        $_.Message -match \"DCOM|MMC20|ShellWindows|ShellBrowserWindow\"\n    } |\n    Select-Object TimeCreated, Id,\n        @{N='Detail'; E={$_.Message.Substring(0, [Math]::Min(200, $_.Message.Length))}} |\n    Format-Table -AutoSize\n\n# Query Sysmon for DCOM parent-child process chains\nGet-WinEvent -LogName \"Microsoft-Windows-Sysmon\u002FOperational\" -FilterXPath @\"\n*[System[(EventID=1)]] and\n*[EventData[\n    (Data[@Name='ParentImage'] and\n     (contains(Data[@Name='ParentImage'],'mmc.exe') or\n      contains(Data[@Name='ParentImage'],'dllhost.exe')))\n]]\n\"@ -MaxEvents 100 |\n    Select-Object TimeCreated,\n        @{N='ParentImage'; E={$_.Properties[20].Value}},\n        @{N='Image'; E={$_.Properties[4].Value}},\n        @{N='CommandLine'; E={$_.Properties[10].Value}},\n        @{N='User'; E={$_.Properties[12].Value}} |\n    Format-Table -AutoSize\n```\n\n### Step 6: Network-Level DCOM Detection with Zeek\n\n```bash\n# Zeek script for detecting DCOM lateral movement at the network level\n# Monitors RPC Endpoint Mapper (port 135) and subsequent high-port connections\n\ncat > \u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Fcustom-detections\u002Fdcom-lateral-movement.zeek \u003C\u003C 'ZEEKEOF'\n@load base\u002Fframeworks\u002Fnotice\n@load base\u002Fframeworks\u002Fsumstats\n@load base\u002Fprotocols\u002Fdce-rpc\n\nmodule DCOMLateralMovement;\n\nexport {\n    redef enum Notice::Type += {\n        DCOM_Lateral_Movement_Suspected,\n        DCOM_RPC_Scan\n    };\n\n    # Threshold for unique targets receiving RPC connections from single source\n    const rpc_target_threshold: count = 3 &redef;\n    const rpc_time_window: interval = 10min &redef;\n}\n\nevent zeek_init()\n{\n    local r1 = SumStats::Reducer(\n        $stream=\"dcom.rpc_targets\",\n        $apply=set(SumStats::UNIQUE)\n    );\n\n    SumStats::create([\n        $name=\"detect-dcom-lateral\",\n        $epoch=rpc_time_window,\n        $reducers=set(r1),\n        $threshold_val(key: SumStats::Key, result: SumStats::Result) = {\n            return result[\"dcom.rpc_targets\"]$unique + 0.0;\n        },\n        $threshold=rpc_target_threshold + 0.0,\n        $threshold_crossed(key: SumStats::Key, result: SumStats::Result) = {\n            NOTICE([\n                $note=DCOM_RPC_Scan,\n                $msg=fmt(\"Host %s connected to %d hosts on RPC\u002F135 in %s - possible DCOM lateral movement\",\n                         key$str, result[\"dcom.rpc_targets\"]$unique, rpc_time_window),\n                $identifier=key$str\n            ]);\n        }\n    ]);\n}\n\nevent connection_state_remove(c: connection)\n{\n    if ( c$id$resp_p == 135\u002Ftcp && c$id$resp_h in Site::local_nets )\n    {\n        SumStats::observe(\"dcom.rpc_targets\",\n            [$str=cat(c$id$orig_h)],\n            [$str=cat(c$id$resp_h)]\n        );\n    }\n}\nZEEKEOF\n\n# Monitor DCE-RPC operations related to DCOM objects\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fdce_rpc.log | \\\n  zeek-cut ts id.orig_h id.resp_h endpoint operation | \\\n  grep -iE \"IDispatch|IRemoteActivation|IRemUnknown|IObjectExporter\" | \\\n  sort -t$'\\t' -k2 | uniq -c | sort -rn\n\n# Track RPC endpoint mapper connections between internal hosts\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fconn.log | \\\n  zeek-cut ts id.orig_h id.resp_h id.resp_p duration | \\\n  awk '$4 == 135' | \\\n  awk '{print $2, \"->\", $3}' | sort | uniq -c | sort -rn | head -20\n```\n\n### Step 7: DCOM Attack Surface Audit and Hardening\n\n```powershell\n# Audit DCOM configuration across the domain\n# Enumerate remotely accessible DCOM objects\n\n# List DCOM applications registered on local system\nGet-CimInstance -ClassName Win32_DCOMApplication |\n    Select-Object AppID, Name |\n    Sort-Object Name |\n    Format-Table -AutoSize\n\n# Check DCOM launch permissions for high-risk objects\n$clsids = @{\n    \"MMC20.Application\"    = \"{49B2791A-B1AE-4C90-9B8E-E860BA07F889}\"\n    \"ShellWindows\"         = \"{9BA05972-F6A8-11CF-A442-00A0C90A8F39}\"\n    \"ShellBrowserWindow\"   = \"{C08AFD90-F2A1-11D1-8455-00A0C91F3880}\"\n    \"Excel.Application\"    = \"{00024500-0000-0000-C000-000000000046}\"\n    \"Outlook.Application\"  = \"{0006F03A-0000-0000-C000-000000000046}\"\n}\n\nforeach ($name in $clsids.Keys) {\n    $clsid = $clsids[$name]\n    $regPath = \"HKLM:\\SOFTWARE\\Classes\\CLSID\\$clsid\"\n    if (Test-Path $regPath) {\n        $launchPermission = (Get-ItemProperty -Path \"$regPath\" -Name \"LaunchPermission\" -ErrorAction SilentlyContinue)\n        Write-Host \"[*] $name ($clsid): $(if ($launchPermission) { 'Custom permissions set' } else { 'DEFAULT permissions (potentially exploitable)' })\"\n    } else {\n        Write-Host \"[-] $name ($clsid): Not found on this system\"\n    }\n}\n\n# Check if DCOM is enabled (should be restricted on servers that don't need it)\n$dcomEnabled = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Ole\" -Name \"EnableDCOM\").EnableDCOM\nWrite-Host \"`n[*] DCOM Enabled: $dcomEnabled\"\n\n# Check remote launch and activation permissions\n$remoteLaunch = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Ole\" -Name \"DefaultLaunchPermission\" -ErrorAction SilentlyContinue)\nWrite-Host \"[*] Default Launch Permission: $(if ($remoteLaunch) { 'Custom' } else { 'System Default' })\"\n```\n\n```powershell\n# Hardening: Restrict DCOM remote access via Group Policy\n# These settings should be applied via GPO in production\n\n# Disable DCOM on systems that do not require it\n# Computer Configuration > Administrative Templates > System > Distributed COM >\n#   Application Compatibility > Enable Distributed COM on this computer = Disabled\n\n# Restrict DCOM launch permissions via registry\n# Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Ole\" -Name \"EnableDCOM\" -Value \"N\"\n\n# Block RPC\u002FDCOM at the host firewall for non-admin traffic\n# New-NetFirewallRule -DisplayName \"Block Inbound DCOM\u002FRPC\" `\n#     -Direction Inbound -LocalPort 135 -Protocol TCP `\n#     -Action Block -RemoteAddress \"Any\" `\n#     -Group \"DCOM Hardening\"\n#\n# New-NetFirewallRule -DisplayName \"Allow DCOM from Admin Subnets\" `\n#     -Direction Inbound -LocalPort 135 -Protocol TCP `\n#     -Action Allow -RemoteAddress \"10.10.0.0\u002F24\" `\n#     -Group \"DCOM Hardening\"\n\n# Windows Firewall: Restrict dynamic RPC port range\n# netsh int ipv4 set dynamicport tcp start=49152 num=1024\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **DCOM (T1021.003)** | Distributed Component Object Model -- extends COM to allow remote object instantiation and method invocation over RPC, abused for lateral movement |\n| **MMC20.Application** | COM object (CLSID {49B2791A-B1AE-4C90-9B8E-E860BA07F889}) controlling MMC snap-ins; `ExecuteShellCommand` method enables remote command execution |\n| **ShellWindows** | COM object (CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39}) that activates within an existing explorer.exe process, executing commands without creating a new COM server process |\n| **ShellBrowserWindow** | COM object (CLSID {C08AFD90-F2A1-11D1-8455-00A0C91F3880}) similar to ShellWindows, uses `Document.Application.ShellExecute` for stealthy command execution |\n| **RPC Endpoint Mapper** | Service on TCP port 135 that maps RPC interfaces to dynamic ports; all DCOM communication begins with an endpoint mapper query |\n| **Sysmon Event ID 1** | Process Create event capturing parent-child process relationships, command lines, and user context -- critical for identifying DCOM-spawned processes |\n| **Sysmon Event ID 3** | Network Connection event capturing source\u002Fdestination IPs and ports -- used to correlate RPC connections with subsequent process creation |\n| **DcomLaunch** | Windows service (svchost.exe -k DcomLaunch) that manages DCOM server process activation; parent process of COM servers spawned via remote DCOM calls |\n| **WMI-Activity ETW** | Event Tracing for Windows provider that logs WMI method calls, instance creations, and queries -- provides visibility into DCOM-triggered WMI operations |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Sysmon** | Endpoint telemetry for process creation (EID 1), network connections (EID 3), and image loads (EID 7) essential for DCOM detection |\n| **Splunk \u002F Elastic SIEM** | Log aggregation and correlation platform for DCOM detection rules and threat hunting queries |\n| **Microsoft Sentinel** | Cloud SIEM with built-in KQL queries and analytics rules for DCOM lateral movement detection |\n| **Sigma** | Vendor-agnostic detection rule format for portable DCOM detection rules |\n| **Zeek** | Network security monitor for DCE-RPC protocol analysis and RPC endpoint mapper traffic monitoring |\n| **Atomic Red Team** | MITRE ATT&CK test framework with T1021.003 atomics for validating DCOM detection coverage |\n| **Impacket (dcomexec.py)** | Python-based DCOM execution tool used by attackers and red teamers for testing DCOM lateral movement |\n| **CIMSession \u002F PowerShell** | Native Windows tooling for DCOM object instantiation used in both legitimate administration and attacks |\n\n## Common Scenarios\n\n### Scenario 1: MMC20.Application Lateral Movement to File Server\n\n**Context**: A SOC analyst receives an alert for mmc.exe spawning cmd.exe on a file server (10.10.20.50) at 03:22 UTC. No administrator activity is scheduled at this time.\n\n**Approach**:\n1. Query Sysmon Event ID 1 on 10.10.20.50: confirm mmc.exe (parent: svchost.exe -k DcomLaunch) spawned cmd.exe with command line `\u002Fc net user \u002Fdomain > C:\\temp\\users.txt`\n2. Query Sysmon Event ID 3 on 10.10.20.50: identify inbound TCP connection on port 135 from 10.10.5.30 at 03:22:01, followed by a high-port connection at 03:22:02\n3. Correlate Event ID 4624 on 10.10.20.50: find LogonType 3 from 10.10.5.30 at 03:22:00 with admin credentials\n4. Investigate 10.10.5.30: check for compromise indicators -- find Mimikatz artifacts in memory, evidence of credential dumping at 03:15\n5. Trace the attack chain: initial phishing compromise at 02:45, credential theft at 03:15, DCOM lateral movement at 03:22\n6. Contain: isolate 10.10.5.30 and 10.10.20.50, force password reset for compromised admin account, block inbound RPC from non-admin subnets\n\n**Pitfalls**:\n- Dismissing mmc.exe activity as legitimate MMC administration without checking the parent process and command line\n- Not correlating the network logon (4624) with the process creation to identify the true source host\n- Failing to investigate the source host for initial compromise indicators\n\n### Scenario 2: ShellWindows Stealthy Lateral Movement\n\n**Context**: During a threat hunt, an analyst queries for explorer.exe spawning cmd.exe on domain controllers and finds several instances on DC01 with no interactive logon sessions.\n\n**Approach**:\n1. Verify no interactive sessions: query Event ID 4624 LogonType 2 or 10 on DC01 -- none found during the time window\n2. Query Sysmon Event ID 1: explorer.exe spawning cmd.exe with encoded PowerShell commands at 14:05, 14:12, and 14:18\n3. Decode the PowerShell: reveals reconnaissance commands (Get-ADUser, Get-ADGroup, Get-ADComputer)\n4. Query Sysmon Event ID 3: inbound RPC connections from 10.10.3.15 preceding each process creation\n5. Identify the ShellWindows pattern: no new mmc.exe or dllhost.exe process created -- commands execute through existing explorer.exe, consistent with ShellWindows\u002FShellBrowserWindow DCOM abuse\n6. Investigate 10.10.3.15: compromised workstation with Cobalt Strike beacon artifacts\n\n**Pitfalls**:\n- Missing the attack because ShellWindows does not create a separate COM server process -- requires monitoring explorer.exe child processes\n- Not having Sysmon Event ID 3 configured to capture network connections from explorer.exe\n- Filtering out explorer.exe as a legitimate parent process without considering the server context\n\n## Output Format\n\n```\nHunt ID: TH-DCOM-[DATE]-[SEQ]\nAlert Severity: High\nMITRE Technique: T1021.003 (Remote Services: DCOM)\n\nSource Host: [IP\u002FHostname of attacker's machine]\nTarget Host: [IP\u002FHostname where DCOM executed]\nDCOM Object: [MMC20.Application | ShellWindows | ShellBrowserWindow]\nCLSID: [COM object class identifier]\n\nProcess Chain:\n  Parent: [svchost.exe -k DcomLaunch | explorer.exe | mmc.exe]\n  Child:  [cmd.exe | powershell.exe | ...]\n  Command Line: [Full command executed]\n\nNetwork Indicators:\n  RPC Connection: [Source IP]:port -> [Target IP]:135 at [timestamp]\n  DCOM Port: [Source IP]:port -> [Target IP]:[high-port] at [timestamp]\n\nAuthentication Context:\n  Event 4624: LogonType 3 from [Source IP] at [timestamp]\n  Account: [Domain\\Username]\n  Logon ID: [Logon session identifier]\n\nRisk Assessment: [Critical\u002FHigh\u002FMedium]\nRecommended Action: [Isolate, investigate source, reset credentials, restrict DCOM]\n```\n","# Hunting for DCOM Lateral Movement\n\n> **Authorized Testing Disclaimer**: The offensive techniques and attack simulations described in this skill are intended exclusively for authorized penetration testing, red team engagements, purple team exercises, and security research conducted with explicit written permission from the system owner. Unauthorized use of these techniques against systems you do not own or have permission to test is illegal and unethical. Always operate within the scope of your engagement and comply with applicable laws and regulations.\n\n## Overview\n\nDistributed Component Object Model (DCOM) enables remote execution of COM objects across a network using RPC. Adversaries abuse specific DCOM objects -- MMC20.Application (CLSID {49B2791A-B1AE-4C90-9B8E-E860BA07F889}), ShellBrowserWindow (CLSID {C08AFD90-F2A1-11D1-8455-00A0C91F3880}), and ShellWindows (CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39}) -- to execute commands on remote hosts without dropping files, making this a stealthy lateral movement technique mapped to MITRE ATT&CK T1021.003. This skill provides detection strategies using Sysmon telemetry, Windows Security Event correlation, network monitoring, and SIEM detection rules to identify DCOM abuse in enterprise environments.\n\n## When to Use\n\n- Proactively hunting for lateral movement in Active Directory environments where DCOM is enabled\n- Investigating alerts for suspicious mmc.exe, dllhost.exe, or explorer.exe child process creation on servers\n- Building detection rules for MITRE ATT&CK T1021.003 (Remote Services: Distributed Component Object Model)\n- Correlating Sysmon Event ID 1 (Process Create) and Event ID 3 (Network Connection) to trace DCOM-based command execution chains\n- Auditing DCOM exposure across the domain to reduce lateral movement attack surface\n- During purple team exercises validating detection coverage for DCOM-based techniques\n\n**Do not use** as a replacement for EDR-based lateral movement detection, without Sysmon or equivalent process telemetry deployed on endpoints, or in isolation without correlating network-level and host-level indicators.\n\n## Prerequisites\n\n- Sysmon deployed on endpoints with configuration capturing Event ID 1 (Process Create), Event ID 3 (Network Connection), Event ID 7 (Image Loaded), and Event ID 10 (Process Access)\n- Windows Security Event Logs forwarded to SIEM (Event IDs 4624, 4672, 4688)\n- SIEM platform (Splunk, Elastic, Microsoft Sentinel) with correlation capability\n- Network monitoring for RPC traffic (TCP 135 and dynamic high ports 49152-65535)\n- Baseline inventory of legitimate DCOM usage in the environment\n- Understanding of MITRE ATT&CK Lateral Movement tactic (TA0008) and T1021.003\n\n## Workflow\n\n### Step 1: Understand DCOM Lateral Movement Attack Vectors\n\nDCOM lateral movement exploits three primary COM objects. Each has distinct forensic artifacts.\n\n**MMC20.Application** -- The attacker instantiates the MMC snap-in remotely and calls `ExecuteShellCommand` to run arbitrary commands on the target. This spawns mmc.exe as a child of svchost.exe (DcomLaunch service) on the target.\n\n**ShellBrowserWindow** -- Uses the `Document.Application.ShellExecute` method to execute commands through an existing explorer.exe process. Unlike MMC20, this does not create a new process for the COM server itself, making it stealthier.\n\n**ShellWindows** -- Similar to ShellBrowserWindow, it activates within an existing explorer.exe instance and executes child processes from explorer.exe. The absence of a new COM server process makes it harder to detect without proper telemetry.\n\n```powershell\n# ATTACK SIMULATION (authorized testing only)\n# These commands demonstrate what adversaries execute -- use only in lab environments\n\n# MMC20.Application lateral movement\n# $dcom = [System.Activator]::CreateInstance(\n#     [Type]::GetTypeFromProgID(\"MMC20.Application\", \"TARGET_IP\"))\n# $dcom.Document.ActiveView.ExecuteShellCommand(\n#     \"cmd.exe\", $null, \"\u002Fc whoami > C:\\temp\\output.txt\", \"7\")\n\n# ShellWindows lateral movement\n# $dcom = [System.Activator]::CreateInstance(\n#     [Type]::GetTypeFromCLSID(\n#         [guid]\"9BA05972-F6A8-11CF-A442-00A0C90A8F39\", \"TARGET_IP\"))\n# $dcom.item().Document.Application.ShellExecute(\n#     \"cmd.exe\", \"\u002Fc calc.exe\", \"C:\\windows\\system32\", $null, 0)\n\n# ShellBrowserWindow lateral movement\n# $dcom = [System.Activator]::CreateInstance(\n#     [Type]::GetTypeFromCLSID(\n#         [guid]\"C08AFD90-F2A1-11D1-8455-00A0C91F3880\", \"TARGET_IP\"))\n# $dcom.Document.Application.ShellExecute(\n#     \"cmd.exe\", \"\u002Fc net user\", \"C:\\windows\\system32\", $null, 0)\n```\n\n### Step 2: Configure Sysmon for DCOM Detection\n\n```xml\n\u003C!-- Sysmon configuration excerpt for DCOM lateral movement detection -->\n\u003C!-- Add these rules to your existing Sysmon config -->\n\n\u003CSysmon schemaversion=\"4.90\">\n  \u003CEventFiltering>\n\n    \u003C!-- Event ID 1: Process Creation - Detect DCOM-spawned processes -->\n    \u003CRuleGroup name=\"DCOM_ProcessCreate\" groupRelation=\"or\">\n      \u003CProcessCreate onmatch=\"include\">\n        \u003C!-- MMC20.Application: mmc.exe spawning child processes -->\n        \u003CParentImage condition=\"end with\">mmc.exe\u003C\u002FParentImage>\n        \u003C!-- DcomLaunch service spawning COM servers -->\n        \u003CParentCommandLine condition=\"contains\">DcomLaunch\u003C\u002FParentCommandLine>\n        \u003C!-- dllhost.exe spawning suspicious children -->\n        \u003CParentImage condition=\"end with\">dllhost.exe\u003C\u002FParentImage>\n        \u003C!-- explorer.exe spawning cmd\u002Fpowershell (ShellWindows\u002FShellBrowserWindow) -->\n        \u003CRule groupRelation=\"and\">\n          \u003CParentImage condition=\"end with\">explorer.exe\u003C\u002FParentImage>\n          \u003CImage condition=\"end with\">cmd.exe\u003C\u002FImage>\n        \u003C\u002FRule>\n        \u003CRule groupRelation=\"and\">\n          \u003CParentImage condition=\"end with\">explorer.exe\u003C\u002FParentImage>\n          \u003CImage condition=\"end with\">powershell.exe\u003C\u002FImage>\n        \u003C\u002FRule>\n      \u003C\u002FProcessCreate>\n    \u003C\u002FRuleGroup>\n\n    \u003C!-- Event ID 3: Network Connection - Track DCOM RPC connections -->\n    \u003CRuleGroup name=\"DCOM_NetworkConnect\" groupRelation=\"or\">\n      \u003CNetworkConnect onmatch=\"include\">\n        \u003C!-- RPC Endpoint Mapper -->\n        \u003CDestinationPort condition=\"is\">135\u003C\u002FDestinationPort>\n        \u003C!-- DCOM processes making network connections -->\n        \u003CImage condition=\"end with\">mmc.exe\u003C\u002FImage>\n        \u003CImage condition=\"end with\">dllhost.exe\u003C\u002FImage>\n        \u003C!-- svchost.exe DcomLaunch connections -->\n        \u003CRule groupRelation=\"and\">\n          \u003CImage condition=\"end with\">svchost.exe\u003C\u002FImage>\n          \u003CDestinationPort condition=\"more than\">49151\u003C\u002FDestinationPort>\n        \u003C\u002FRule>\n      \u003C\u002FNetworkConnect>\n    \u003C\u002FRuleGroup>\n\n    \u003C!-- Event ID 7: Image Loaded - DCOM-related DLLs -->\n    \u003CRuleGroup name=\"DCOM_ImageLoaded\" groupRelation=\"or\">\n      \u003CImageLoad onmatch=\"include\">\n        \u003CImageLoaded condition=\"end with\">comsvcs.dll\u003C\u002FImageLoaded>\n        \u003CImageLoaded condition=\"end with\">ole32.dll\u003C\u002FImageLoaded>\n        \u003CImageLoaded condition=\"end with\">rpcrt4.dll\u003C\u002FImageLoaded>\n      \u003C\u002FImageLoad>\n    \u003C\u002FRuleGroup>\n\n  \u003C\u002FEventFiltering>\n\u003C\u002FSysmon>\n```\n\n```bash\n# Deploy or update Sysmon configuration\n# sysmon64.exe -c dcom-detection-sysmon.xml\n\n# Verify Sysmon is capturing DCOM events\n# PowerShell: Get-WinEvent -LogName \"Microsoft-Windows-Sysmon\u002FOperational\" -MaxEvents 10 |\n#   Where-Object { $_.Id -in @(1,3) } | Format-Table TimeCreated, Id, Message -Wrap\n```\n\n### Step 3: Build SIEM Detection Rules for DCOM Object Abuse\n\n```yaml\n# Sigma Rule: MMC20.Application DCOM Lateral Movement\ntitle: DCOM Lateral Movement via MMC20.Application\nid: 8a3b5f2e-c1d4-4a9f-b237-1e6f8d2c3a4b\nstatus: stable\ndescription: >\n  Detects remote instantiation of MMC20.Application DCOM object by monitoring\n  for mmc.exe spawned by svchost.exe DcomLaunch service with subsequent child\n  process creation, indicating T1021.003 lateral movement.\nreferences:\n    - https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1021\u002F003\u002F\n    - https:\u002F\u002Fwww.cybereason.com\u002Fblog\u002Fdcom-lateral-movement-techniques\n    - https:\u002F\u002Fwww.mdsec.co.uk\u002F2020\u002F09\u002Fi-like-to-move-it-windows-lateral-movement-part-2-dcom\u002F\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_parent:\n        ParentImage|endswith: '\\mmc.exe'\n    selection_child:\n        Image|endswith:\n            - '\\cmd.exe'\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n            - '\\wscript.exe'\n            - '\\cscript.exe'\n            - '\\mshta.exe'\n            - '\\rundll32.exe'\n            - '\\regsvr32.exe'\n    filter_legitimate:\n        ParentCommandLine|contains:\n            - 'devmgmt.msc'\n            - 'diskmgmt.msc'\n            - 'services.msc'\n            - 'compmgmt.msc'\n    condition: selection_parent and selection_child and not filter_legitimate\nlevel: high\ntags:\n    - attack.lateral_movement\n    - attack.t1021.003\nfalsepositives:\n    - Legitimate remote MMC administration by authorized IT staff\n    - SCCM or other management tools using DCOM for remote management\n```\n\n```yaml\n# Sigma Rule: ShellWindows\u002FShellBrowserWindow DCOM Lateral Movement\ntitle: DCOM Lateral Movement via ShellWindows or ShellBrowserWindow\nid: 2f7c9d1e-a8b3-4c5f-9012-3e4d5f6a7b8c\nstatus: stable\ndescription: >\n  Detects DCOM lateral movement using ShellWindows (CLSID 9BA05972) or\n  ShellBrowserWindow (CLSID C08AFD90) by monitoring for explorer.exe spawning\n  cmd.exe or powershell.exe on systems where no user is interactively logged on,\n  or where the network logon (Type 3) precedes the process creation.\nreferences:\n    - https:\u002F\u002Fattack.mitre.org\u002Ftechniques\u002FT1021\u002F003\u002F\n    - https:\u002F\u002Fwww.elastic.co\u002Fguide\u002Fen\u002Fsecurity\u002F8.19\u002Fincoming-dcom-lateral-movement-with-shellbrowserwindow-or-shellwindows.html\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection:\n        ParentImage|endswith: '\\explorer.exe'\n        Image|endswith:\n            - '\\cmd.exe'\n            - '\\powershell.exe'\n            - '\\pwsh.exe'\n            - '\\mshta.exe'\n            - '\\wscript.exe'\n            - '\\cscript.exe'\n    filter_interactive:\n        LogonId: '0x3e7'\n    condition: selection and not filter_interactive\nlevel: medium\ntags:\n    - attack.lateral_movement\n    - attack.t1021.003\nfalsepositives:\n    - Users launching command prompts from Explorer context menus\n    - Software installers launching child processes from explorer.exe\n```\n\n```yaml\n# Sigma Rule: Sysmon Network Connection to RPC Endpoint Mapper from DCOM Process\ntitle: DCOM Process Inbound RPC Connection Followed by Process Creation\nid: 4d9e2f1a-b3c5-4a7f-8901-2c3d4e5f6a7b\nstatus: experimental\ndescription: >\n  Correlates Sysmon Event ID 3 (Network Connection) on port 135 with\n  subsequent Event ID 1 (Process Create) from DCOM parent processes\n  (mmc.exe, dllhost.exe, explorer.exe) within a short time window.\nlogsource:\n    product: windows\n    service: sysmon\ndetection:\n    network_connection:\n        EventID: 3\n        DestinationPort: 135\n        Initiated: 'false'\n    process_creation:\n        EventID: 1\n        ParentImage|endswith:\n            - '\\mmc.exe'\n            - '\\dllhost.exe'\n            - '\\svchost.exe'\n    timeframe: 30s\n    condition: network_connection | near process_creation\nlevel: high\ntags:\n    - attack.lateral_movement\n    - attack.t1021.003\n```\n\n### Step 4: Deploy Splunk and KQL Detection Queries\n\n```spl\n# Splunk: Detect MMC20.Application DCOM Lateral Movement\n# Correlates network logon (4624 Type 3) with mmc.exe process creation\n\nindex=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\nEventCode=1 ParentImage=\"*\\\\mmc.exe\"\n(Image=\"*\\\\cmd.exe\" OR Image=\"*\\\\powershell.exe\" OR Image=\"*\\\\pwsh.exe\"\n OR Image=\"*\\\\wscript.exe\" OR Image=\"*\\\\cscript.exe\" OR Image=\"*\\\\mshta.exe\")\n| eval target_host=ComputerName\n| join target_host type=inner\n    [search index=wineventlog EventCode=4624 LogonType=3\n    | where AuthenticationPackageName=\"NTLM\" OR AuthenticationPackageName=\"Kerberos\"\n    | eval target_host=ComputerName\n    | rename IpAddress as source_ip, TargetUserName as logon_user\n    | fields target_host source_ip logon_user _time]\n| where abs(_time - relative_time(now(), \"-5m\")) \u003C 300\n| table _time target_host Image ParentImage CommandLine source_ip logon_user\n| sort -_time\n```\n\n```spl\n# Splunk: Detect ShellWindows\u002FShellBrowserWindow DCOM Lateral Movement\n# Identifies explorer.exe spawning suspicious child processes on servers\n\nindex=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\nEventCode=1 ParentImage=\"*\\\\explorer.exe\"\n(Image=\"*\\\\cmd.exe\" OR Image=\"*\\\\powershell.exe\" OR Image=\"*\\\\pwsh.exe\")\n| eval target_host=ComputerName\n| join target_host type=inner\n    [search index=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\n     EventCode=3 DestinationPort=135 Initiated=\"false\"\n    | eval target_host=ComputerName\n    | rename SourceIp as dcom_source_ip\n    | fields target_host dcom_source_ip _time]\n| where abs(_time - relative_time(now(), \"-2m\")) \u003C 120\n| stats count values(Image) as child_processes values(CommandLine) as commands\n    by target_host dcom_source_ip\n| where count > 0\n| table target_host dcom_source_ip child_processes commands count\n```\n\n```spl\n# Splunk: DCOM RPC Endpoint Mapper Connection Anomaly\n# Identifies hosts receiving unusual volumes of inbound RPC connections\n\nindex=wineventlog sourcetype=\"XmlWinEventLog:Microsoft-Windows-Sysmon\u002FOperational\"\nEventCode=3 DestinationPort=135 Initiated=\"false\"\n| stats dc(SourceIp) as unique_sources count by ComputerName\n| where unique_sources > 3 OR count > 10\n| sort -unique_sources\n| table ComputerName unique_sources count\n```\n\n```kql\n-- Microsoft Sentinel KQL: DCOM Lateral Movement via MMC20.Application\n\nlet dcom_network = SysmonEvent\n| where EventID == 3\n| where DestinationPort == 135\n| where InitiatedConnection == false\n| project NetworkTime=TimeGenerated, TargetComputer=Computer,\n    SourceIP=SourceIp, DestPort=DestinationPort;\n\nlet dcom_process = SysmonEvent\n| where EventID == 1\n| where ParentImage endswith \"\\\\mmc.exe\"\n    or ParentImage endswith \"\\\\dllhost.exe\"\n| where Image endswith \"\\\\cmd.exe\"\n    or Image endswith \"\\\\powershell.exe\"\n    or Image endswith \"\\\\pwsh.exe\"\n    or Image endswith \"\\\\wscript.exe\"\n    or Image endswith \"\\\\mshta.exe\"\n| project ProcessTime=TimeGenerated, TargetComputer=Computer,\n    ParentImage, Image, CommandLine, User;\n\ndcom_network\n| join kind=inner (dcom_process) on TargetComputer\n| where abs(datetime_diff('second', NetworkTime, ProcessTime)) \u003C 60\n| project NetworkTime, ProcessTime, TargetComputer, SourceIP,\n    ParentImage, Image, CommandLine, User\n| sort by NetworkTime desc\n```\n\n```kql\n-- Microsoft Sentinel KQL: ShellWindows DCOM Lateral Movement\n\nSecurityEvent\n| where EventID == 4624 and LogonType == 3\n| where AuthenticationPackageName in (\"NTLM\", \"Kerberos\")\n| project LogonTime=TimeGenerated, TargetComputer=Computer,\n    SourceIP=IpAddress, LogonUser=TargetUserName\n| join kind=inner (\n    SysmonEvent\n    | where EventID == 1\n    | where ParentImage endswith \"\\\\explorer.exe\"\n    | where Image endswith \"\\\\cmd.exe\"\n        or Image endswith \"\\\\powershell.exe\"\n        or Image endswith \"\\\\pwsh.exe\"\n    | project ProcessTime=TimeGenerated, TargetComputer=Computer,\n        Image, CommandLine, User\n) on TargetComputer\n| where ProcessTime between (LogonTime .. (LogonTime + 2m))\n| project LogonTime, ProcessTime, TargetComputer, SourceIP,\n    LogonUser, Image, CommandLine\n| sort by LogonTime desc\n```\n\n### Step 5: WMI Event Correlation for DCOM Activity\n\n```spl\n# Splunk: Correlate WMI events with DCOM lateral movement\n# WMI-Activity operational log captures DCOM-triggered WMI calls\n\nindex=wineventlog source=\"WinEventLog:Microsoft-Windows-WMI-Activity\u002FOperational\"\n| where EventCode IN (5857, 5858, 5859, 5860, 5861)\n| eval event_type=case(\n    EventCode=5857, \"WMI Provider Loaded\",\n    EventCode=5858, \"WMI Query Error\",\n    EventCode=5859, \"WMI Provider Event\",\n    EventCode=5860, \"WMI Temporary Event Registration\",\n    EventCode=5861, \"WMI Permanent Event Registration\")\n| stats count values(event_type) as wmi_events by ComputerName\n| where count > 5\n| table ComputerName wmi_events count\n```\n\n```powershell\n# PowerShell: Query WMI operational log for DCOM-related activity\n# Run on target systems during investigation\n\nGet-WinEvent -LogName \"Microsoft-Windows-WMI-Activity\u002FOperational\" -MaxEvents 500 |\n    Where-Object {\n        $_.Id -in @(5857, 5858, 5860, 5861) -and\n        $_.Message -match \"DCOM|MMC20|ShellWindows|ShellBrowserWindow\"\n    } |\n    Select-Object TimeCreated, Id,\n        @{N='Detail'; E={$_.Message.Substring(0, [Math]::Min(200, $_.Message.Length))}} |\n    Format-Table -AutoSize\n\n# Query Sysmon for DCOM parent-child process chains\nGet-WinEvent -LogName \"Microsoft-Windows-Sysmon\u002FOperational\" -FilterXPath @\"\n*[System[(EventID=1)]] and\n*[EventData[\n    (Data[@Name='ParentImage'] and\n     (contains(Data[@Name='ParentImage'],'mmc.exe') or\n      contains(Data[@Name='ParentImage'],'dllhost.exe')))\n]]\n\"@ -MaxEvents 100 |\n    Select-Object TimeCreated,\n        @{N='ParentImage'; E={$_.Properties[20].Value}},\n        @{N='Image'; E={$_.Properties[4].Value}},\n        @{N='CommandLine'; E={$_.Properties[10].Value}},\n        @{N='User'; E={$_.Properties[12].Value}} |\n    Format-Table -AutoSize\n```\n\n### Step 6: Network-Level DCOM Detection with Zeek\n\n```bash\n# Zeek script for detecting DCOM lateral movement at the network level\n# Monitors RPC Endpoint Mapper (port 135) and subsequent high-port connections\n\ncat > \u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fsite\u002Fcustom-detections\u002Fdcom-lateral-movement.zeek \u003C\u003C 'ZEEKEOF'\n@load base\u002Fframeworks\u002Fnotice\n@load base\u002Fframeworks\u002Fsumstats\n@load base\u002Fprotocols\u002Fdce-rpc\n\nmodule DCOMLateralMovement;\n\nexport {\n    redef enum Notice::Type += {\n        DCOM_Lateral_Movement_Suspected,\n        DCOM_RPC_Scan\n    };\n\n    # Threshold for unique targets receiving RPC connections from single source\n    const rpc_target_threshold: count = 3 &redef;\n    const rpc_time_window: interval = 10min &redef;\n}\n\nevent zeek_init()\n{\n    local r1 = SumStats::Reducer(\n        $stream=\"dcom.rpc_targets\",\n        $apply=set(SumStats::UNIQUE)\n    );\n\n    SumStats::create([\n        $name=\"detect-dcom-lateral\",\n        $epoch=rpc_time_window,\n        $reducers=set(r1),\n        $threshold_val(key: SumStats::Key, result: SumStats::Result) = {\n            return result[\"dcom.rpc_targets\"]$unique + 0.0;\n        },\n        $threshold=rpc_target_threshold + 0.0,\n        $threshold_crossed(key: SumStats::Key, result: SumStats::Result) = {\n            NOTICE([\n                $note=DCOM_RPC_Scan,\n                $msg=fmt(\"Host %s connected to %d hosts on RPC\u002F135 in %s - possible DCOM lateral movement\",\n                         key$str, result[\"dcom.rpc_targets\"]$unique, rpc_time_window),\n                $identifier=key$str\n            ]);\n        }\n    ]);\n}\n\nevent connection_state_remove(c: connection)\n{\n    if ( c$id$resp_p == 135\u002Ftcp && c$id$resp_h in Site::local_nets )\n    {\n        SumStats::observe(\"dcom.rpc_targets\",\n            [$str=cat(c$id$orig_h)],\n            [$str=cat(c$id$resp_h)]\n        );\n    }\n}\nZEEKEOF\n\n# Monitor DCE-RPC operations related to DCOM objects\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fdce_rpc.log | \\\n  zeek-cut ts id.orig_h id.resp_h endpoint operation | \\\n  grep -iE \"IDispatch|IRemoteActivation|IRemUnknown|IObjectExporter\" | \\\n  sort -t$'\\t' -k2 | uniq -c | sort -rn\n\n# Track RPC endpoint mapper connections between internal hosts\ncat \u002Fopt\u002Fzeek\u002Flogs\u002Fcurrent\u002Fconn.log | \\\n  zeek-cut ts id.orig_h id.resp_h id.resp_p duration | \\\n  awk '$4 == 135' | \\\n  awk '{print $2, \"->\", $3}' | sort | uniq -c | sort -rn | head -20\n```\n\n### Step 7: DCOM Attack Surface Audit and Hardening\n\n```powershell\n# Audit DCOM configuration across the domain\n# Enumerate remotely accessible DCOM objects\n\n# List DCOM applications registered on local system\nGet-CimInstance -ClassName Win32_DCOMApplication |\n    Select-Object AppID, Name |\n    Sort-Object Name |\n    Format-Table -AutoSize\n\n# Check DCOM launch permissions for high-risk objects\n$clsids = @{\n    \"MMC20.Application\"    = \"{49B2791A-B1AE-4C90-9B8E-E860BA07F889}\"\n    \"ShellWindows\"         = \"{9BA05972-F6A8-11CF-A442-00A0C90A8F39}\"\n    \"ShellBrowserWindow\"   = \"{C08AFD90-F2A1-11D1-8455-00A0C91F3880}\"\n    \"Excel.Application\"    = \"{00024500-0000-0000-C000-000000000046}\"\n    \"Outlook.Application\"  = \"{0006F03A-0000-0000-C000-000000000046}\"\n}\n\nforeach ($name in $clsids.Keys) {\n    $clsid = $clsids[$name]\n    $regPath = \"HKLM:\\SOFTWARE\\Classes\\CLSID\\$clsid\"\n    if (Test-Path $regPath) {\n        $launchPermission = (Get-ItemProperty -Path \"$regPath\" -Name \"LaunchPermission\" -ErrorAction SilentlyContinue)\n        Write-Host \"[*] $name ($clsid): $(if ($launchPermission) { 'Custom permissions set' } else { 'DEFAULT permissions (potentially exploitable)' })\"\n    } else {\n        Write-Host \"[-] $name ($clsid): Not found on this system\"\n    }\n}\n\n# Check if DCOM is enabled (should be restricted on servers that don't need it)\n$dcomEnabled = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Ole\" -Name \"EnableDCOM\").EnableDCOM\nWrite-Host \"`n[*] DCOM Enabled: $dcomEnabled\"\n\n# Check remote launch and activation permissions\n$remoteLaunch = (Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Ole\" -Name \"DefaultLaunchPermission\" -ErrorAction SilentlyContinue)\nWrite-Host \"[*] Default Launch Permission: $(if ($remoteLaunch) { 'Custom' } else { 'System Default' })\"\n```\n\n```powershell\n# Hardening: Restrict DCOM remote access via Group Policy\n# These settings should be applied via GPO in production\n\n# Disable DCOM on systems that do not require it\n# Computer Configuration > Administrative Templates > System > Distributed COM >\n#   Application Compatibility > Enable Distributed COM on this computer = Disabled\n\n# Restrict DCOM launch permissions via registry\n# Set-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Ole\" -Name \"EnableDCOM\" -Value \"N\"\n\n# Block RPC\u002FDCOM at the host firewall for non-admin traffic\n# New-NetFirewallRule -DisplayName \"Block Inbound DCOM\u002FRPC\" `\n#     -Direction Inbound -LocalPort 135 -Protocol TCP `\n#     -Action Block -RemoteAddress \"Any\" `\n#     -Group \"DCOM Hardening\"\n#\n# New-NetFirewallRule -DisplayName \"Allow DCOM from Admin Subnets\" `\n#     -Direction Inbound -LocalPort 135 -Protocol TCP `\n#     -Action Allow -RemoteAddress \"10.10.0.0\u002F24\" `\n#     -Group \"DCOM Hardening\"\n\n# Windows Firewall: Restrict dynamic RPC port range\n# netsh int ipv4 set dynamicport tcp start=49152 num=1024\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **DCOM (T1021.003)** | Distributed Component Object Model -- extends COM to allow remote object instantiation and method invocation over RPC, abused for lateral movement |\n| **MMC20.Application** | COM object (CLSID {49B2791A-B1AE-4C90-9B8E-E860BA07F889}) controlling MMC snap-ins; `ExecuteShellCommand` method enables remote command execution |\n| **ShellWindows** | COM object (CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39}) that activates within an existing explorer.exe process, executing commands without creating a new COM server process |\n| **ShellBrowserWindow** | COM object (CLSID {C08AFD90-F2A1-11D1-8455-00A0C91F3880}) similar to ShellWindows, uses `Document.Application.ShellExecute` for stealthy command execution |\n| **RPC Endpoint Mapper** | Service on TCP port 135 that maps RPC interfaces to dynamic ports; all DCOM communication begins with an endpoint mapper query |\n| **Sysmon Event ID 1** | Process Create event capturing parent-child process relationships, command lines, and user context -- critical for identifying DCOM-spawned processes |\n| **Sysmon Event ID 3** | Network Connection event capturing source\u002Fdestination IPs and ports -- used to correlate RPC connections with subsequent process creation |\n| **DcomLaunch** | Windows service (svchost.exe -k DcomLaunch) that manages DCOM server process activation; parent process of COM servers spawned via remote DCOM calls |\n| **WMI-Activity ETW** | Event Tracing for Windows provider that logs WMI method calls, instance creations, and queries -- provides visibility into DCOM-triggered WMI operations |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Sysmon** | Endpoint telemetry for process creation (EID 1), network connections (EID 3), and image loads (EID 7) essential for DCOM detection |\n| **Splunk \u002F Elastic SIEM** | Log aggregation and correlation platform for DCOM detection rules and threat hunting queries |\n| **Microsoft Sentinel** | Cloud SIEM with built-in KQL queries and analytics rules for DCOM lateral movement detection |\n| **Sigma** | Vendor-agnostic detection rule format for portable DCOM detection rules |\n| **Zeek** | Network security monitor for DCE-RPC protocol analysis and RPC endpoint mapper traffic monitoring |\n| **Atomic Red Team** | MITRE ATT&CK test framework with T1021.003 atomics for validating DCOM detection coverage |\n| **Impacket (dcomexec.py)** | Python-based DCOM execution tool used by attackers and red teamers for testing DCOM lateral movement |\n| **CIMSession \u002F PowerShell** | Native Windows tooling for DCOM object instantiation used in both legitimate administration and attacks |\n\n## Common Scenarios\n\n### Scenario 1: MMC20.Application Lateral Movement to File Server\n\n**Context**: A SOC analyst receives an alert for mmc.exe spawning cmd.exe on a file server (10.10.20.50) at 03:22 UTC. No administrator activity is scheduled at this time.\n\n**Approach**:\n1. Query Sysmon Event ID 1 on 10.10.20.50: confirm mmc.exe (parent: svchost.exe -k DcomLaunch) spawned cmd.exe with command line `\u002Fc net user \u002Fdomain > C:\\temp\\users.txt`\n2. Query Sysmon Event ID 3 on 10.10.20.50: identify inbound TCP connection on port 135 from 10.10.5.30 at 03:22:01, followed by a high-port connection at 03:22:02\n3. Correlate Event ID 4624 on 10.10.20.50: find LogonType 3 from 10.10.5.30 at 03:22:00 with admin credentials\n4. Investigate 10.10.5.30: check for compromise indicators -- find Mimikatz artifacts in memory, evidence of credential dumping at 03:15\n5. Trace the attack chain: initial phishing compromise at 02:45, credential theft at 03:15, DCOM lateral movement at 03:22\n6. Contain: isolate 10.10.5.30 and 10.10.20.50, force password reset for compromised admin account, block inbound RPC from non-admin subnets\n\n**Pitfalls**:\n- Dismissing mmc.exe activity as legitimate MMC administration without checking the parent process and command line\n- Not correlating the network logon (4624) with the process creation to identify the true source host\n- Failing to investigate the source host for initial compromise indicators\n\n### Scenario 2: ShellWindows Stealthy Lateral Movement\n\n**Context**: During a threat hunt, an analyst queries for explorer.exe spawning cmd.exe on domain controllers and finds several instances on DC01 with no interactive logon sessions.\n\n**Approach**:\n1. Verify no interactive sessions: query Event ID 4624 LogonType 2 or 10 on DC01 -- none found during the time window\n2. Query Sysmon Event ID 1: explorer.exe spawning cmd.exe with encoded PowerShell commands at 14:05, 14:12, and 14:18\n3. Decode the PowerShell: reveals reconnaissance commands (Get-ADUser, Get-ADGroup, Get-ADComputer)\n4. Query Sysmon Event ID 3: inbound RPC connections from 10.10.3.15 preceding each process creation\n5. Identify the ShellWindows pattern: no new mmc.exe or dllhost.exe process created -- commands execute through existing explorer.exe, consistent with ShellWindows\u002FShellBrowserWindow DCOM abuse\n6. Investigate 10.10.3.15: compromised workstation with Cobalt Strike beacon artifacts\n\n**Pitfalls**:\n- Missing the attack because ShellWindows does not create a separate COM server process -- requires monitoring explorer.exe child processes\n- Not having Sysmon Event ID 3 configured to capture network connections from explorer.exe\n- Filtering out explorer.exe as a legitimate parent process without considering the server context\n\n## Output Format\n\n```\nHunt ID: TH-DCOM-[DATE]-[SEQ]\nAlert Severity: High\nMITRE Technique: T1021.003 (Remote Services: DCOM)\n\nSource Host: [IP\u002FHostname of attacker's machine]\nTarget Host: [IP\u002FHostname where DCOM executed]\nDCOM Object: [MMC20.Application | ShellWindows | ShellBrowserWindow]\nCLSID: [COM object class identifier]\n\nProcess Chain:\n  Parent: [svchost.exe -k DcomLaunch | explorer.exe | mmc.exe]\n  Child:  [cmd.exe | powershell.exe | ...]\n  Command Line: [Full command executed]\n\nNetwork Indicators:\n  RPC Connection: [Source IP]:port -> [Target IP]:135 at [timestamp]\n  DCOM Port: [Source IP]:port -> [Target IP]:[high-port] at [timestamp]\n\nAuthentication Context:\n  Event 4624: LogonType 3 from [Source IP] at [timestamp]\n  Account: [Domain\\Username]\n  Logon ID: [Logon session identifier]\n\nRisk Assessment: [Critical\u002FHigh\u002FMedium]\nRecommended Action: [Isolate, investigate source, reset credentials, restrict DCOM]\n```\n",{"name":5,"tags":56,"author":10,"domain":50,"license":16,"version":60,"nist_csf":61,"subdomain":47,"description":66,"mitre_attack":67,"d3fend_techniques":73},[47,38,42,37,57,36,35,34,33,58,59],"Sysmon","WMI","RPC","1.0",[62,63,64,65],"DE.CM-01","DE.AE-02","DE.AE-07","ID.RA-05","Hunt for DCOM-based lateral movement (MITRE ATT&CK T1021.003) by detecting abuse of MMC20.Application, ShellBrowserWindow, and ShellWindows COM objects via Sysmon Event ID 1\u002F3 correlation, WMI event analysis, and RPC endpoint mapper traffic on port 135. Use when investigating suspicious mmc.exe\u002Fdllhost.exe child processes, building T1021.003 detections, or auditing DCOM exposure during purple-team exercises.\n",[68,69,70,71,72],"T1046","T1057","T1082","T1083","T1021",[74,75,76,77,78],"Application Protocol Command Analysis","Network Isolation","Network Traffic Analysis","Client-server Payload Profiling","Network Traffic Community Deviation","main","54a798831d2266a3ca61ce68a7acb80b81160d57","skills\u002Fhunting-for-dcom-lateral-movement",4425,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","https:\u002F\u002Fmahipal.engineer\u002FAnthropic-Cybersecurity-Skills\u002F","https:\u002F\u002Fgithub.com\u002Fmukul975","Mahipal.engineer","🔐 Cybersecurity | 💻 Dev | 📷 Street Photographer\r\n🎓 MSc | 📚 Research & AI Security","2026-08-31 12:32:44",{"source":9,"skillName":5,"commands":90,"prompt":100,"zipAvailable":101},[91,94,97],{"tool":92,"command":93},"npx","npx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill hunting-for-dcom-lateral-movement",{"tool":95,"command":96},"bunx","bunx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill hunting-for-dcom-lateral-movement",{"tool":98,"command":99},"pnpm","pnpm dlx skills add mukul975\u002FAnthropic-Cybersecurity-Skills --skill hunting-for-dcom-lateral-movement","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-for-dcom-lateral-movement\u002FSKILL.md",true,[103,108,114,118,122,126,132,136,140,144],{"path":104,"resourceType":104,"resourceTypeDesc":105,"sizeBytes":106,"sourceHtmlUrl":107},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-for-dcom-lateral-movement\u002FLICENSE",{"path":109,"resourceType":110,"resourceTypeDesc":111,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fapi-reference.md","REFERENCE","参考文档",5744,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-for-dcom-lateral-movement\u002Freferences\u002Fapi-reference.md",{"path":115,"resourceType":110,"resourceTypeDesc":111,"sizeBytes":116,"sourceHtmlUrl":117},"references\u002Fdatasets.md",8792,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpytdc\u002Freferences\u002Fdatasets.md",{"path":119,"resourceType":110,"resourceTypeDesc":111,"sizeBytes":120,"sourceHtmlUrl":121},"references\u002Foracles.md",10051,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpytdc\u002Freferences\u002Foracles.md",{"path":123,"resourceType":110,"resourceTypeDesc":111,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Futilities.md",16045,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpytdc\u002Freferences\u002Futilities.md",{"path":127,"resourceType":128,"resourceTypeDesc":129,"sizeBytes":130,"sourceHtmlUrl":131},"scripts\u002Fagent.py","SCRIPT","脚本",14078,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-for-dcom-lateral-movement\u002Fscripts\u002Fagent.py",{"path":133,"resourceType":128,"resourceTypeDesc":129,"sizeBytes":134,"sourceHtmlUrl":135},"scripts\u002Fbenchmark_evaluation.py",9238,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpytdc\u002Fscripts\u002Fbenchmark_evaluation.py",{"path":137,"resourceType":128,"resourceTypeDesc":129,"sizeBytes":138,"sourceHtmlUrl":139},"scripts\u002Fdetect_dcom_lateral_movement.py",18920,"https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fhunting-for-dcom-lateral-movement\u002Fscripts\u002Fdetect_dcom_lateral_movement.py",{"path":141,"resourceType":128,"resourceTypeDesc":129,"sizeBytes":142,"sourceHtmlUrl":143},"scripts\u002Fload_and_split_data.py",6350,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpytdc\u002Fscripts\u002Fload_and_split_data.py",{"path":145,"resourceType":128,"resourceTypeDesc":129,"sizeBytes":146,"sourceHtmlUrl":147},"scripts\u002Fmolecular_generation.py",11335,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fscientific\u002Fpytdc\u002Fscripts\u002Fmolecular_generation.py",[149,181,210,242,273,305],{"skillNo":150,"name":151,"nameZh":152,"description":153,"descriptionZh":154,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":155,"categories":156,"keywords":161,"publishedAt":51},"01M6AGDM3HJXTKXX15ZZ0ZVCJ3","verifying-build-provenance-with-slsa-sigstore","SLSA 构建来源验证","Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI\u002FCD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during incident response or admission control.","使用 Sigstore 的 cosign（verify、verify-attestation、verify-blob-attestation）和 slsa-verifier（verify-artifact）验证工件签名和 SLSA 来源（provenance），强制校验 keyless OIDC 构建者身份和源仓库是否符合 SLSA Build 级别。适用于 CI\u002FCD 中部署工件前、消费第三方证明时、建立 SLSA Build L3 管道，或在事件响应或准入控制期间确认来源的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fverifying-build-provenance-with-slsa-sigstore\u002FSKILL.md",[157,158],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":159,"categoryName":160,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C32Q37WAMK06SGMFC02VFP","软件供应链安全",[162,163,164,165,166,50,167,168,169,170,171,172,173,174,175,176,177,178,179,180],"sigstore","provenance","slsa","verifying build provenance with slsa sigstore","security","incident response","identity","pr","code","artifacts","ci","supply-chain","pipeline","supply-chain-security","t1195","attestation","code-signing","cosign","keyless",{"skillNo":182,"name":183,"nameZh":184,"description":185,"descriptionZh":186,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":187,"categories":188,"keywords":193,"publishedAt":51},"01M6AGDGBPWYVZ2F11GFKJ4HZ9","validating-tpm-measured-boot-attestation","TPM 测量启动验证","Verifies TPM 2.0 measured-boot integrity and remote attestation with tpm2-tools -- reading PCRs (tpm2_pcrread), replaying the boot event log, generating and checking signed quotes (tpm2_quote\u002Ftpm2_checkquote), and sealing secrets to a PCR policy. Use to confirm a system booted trusted firmware\u002Fkernel for Zero Trust device posture, detect boot-chain tampering via PCR drift, or build a golden-value baseline for fleet attestation.","使用 tpm2-tools 验证 TPM 2.0 测量启动（measured boot）的完整性和远程证明：读取 PCR（tpm2_pcrread）、重放启动事件日志、生成并检查签名报价（tpm2_quote\u002Ftpm2_checkquote），以及将机密封印（seal）到 PCR 策略。适用于确认系统已启动可信固件\u002F内核以实现零信任（Zero Trust）设备状态、通过 PCR 漂移检测启动链篡改，或构建黄金值基线用于机群（fleet）证明。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-tpm-measured-boot-attestation\u002FSKILL.md",[189,190],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":191,"categoryName":192,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C89JJEXGGRGHS6XVXDA46K","终端安全加固",[194,177,195,196,166,197,50,169,198,199,200,201,202,203,204,205,206,207,208,209],"boot","TPM","validating tpm measured boot attestation","policy","verification","ZeRO","firmware","Tools","measured-boot","PCR","integrity","secrets","remote-attestation","tpm2-tools","integrity-verification","trusted-computing",{"skillNo":211,"name":212,"nameZh":213,"description":214,"descriptionZh":215,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":216,"categories":217,"keywords":224,"publishedAt":51},"01M6AGDCW0Y4FXZ3362GT1941M","validating-backup-integrity-for-recovery","备份完整性验证","Validates backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to confirm backups are reliable for disaster recovery and ransomware response. Use before relying on backups for recovery, when building post-backup validation pipelines, auditing backup infrastructure for compliance, or checking immutable\u002Fair-gapped backups for silent corruption or tampering.","通过加密哈希验证、自动化恢复测试、损坏检测和可恢复性检查来验证备份完整性，确认备份对于灾难恢复和勒索软件响应是可靠的。适用于在依赖备份进行恢复之前、构建备份后验证管道、审计备份基础设施以满足合规要求，或检查不可变\u002Fair-gapped（气隙）备份是否存在静默损坏或篡改的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[218,221],{"categoryNo":219,"categoryName":220,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师",{"categoryNo":222,"categoryName":223,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSSTY86MWS6W5GDQWB1ADQ","备份与灾难恢复",[204,225,226,227,228,50,229,230,198,231,232,233,234,235,236,237,238,239,240,241],"backup","recovery","validating backup integrity for recovery","testing","infrastructure","validation","compliance","hash-verification","incident-response","ransomware","cryptocurrency","detection","t1078","t1490","immutable","disaster-recovery","restore-testing",{"skillNo":243,"name":244,"nameZh":245,"description":246,"descriptionZh":247,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":248,"categories":249,"keywords":254,"publishedAt":51},"01M6AGD9GBG2KZ336AE763J3WH","triaging-windows-with-kape","KAPE Windows 取证收集","Runs KAPE (Kroll Artifact Parser and Extractor) to collect targeted forensic artifacts (registry hives, $MFT, event logs, prefetch, browser data) via Targets and parse them with Modules wrapping Eric Zimmerman's EZ Tools (PECmd, MFTECmd, RECmd). Use during early incident containment\u002Ftriage when full disk imaging is impractical but a defensible, parseable Windows artifact set is needed quickly, including at-scale remote collection.","运行 KAPE（Kroll Artifact Parser and Extractor），通过 Targets 收集目标取证工件（注册表配置单元、$MFT、事件日志、prefetch、浏览器数据），并使用封装 Eric Zimmerman 的 EZ Tools（PECmd、MFTECmd、RECmd）的 Modules 进行解析。适用于事件遏制\u002F分诊早期阶段——此时完整磁盘镜像不切实际，但需要快速获得可采信、可解析的 Windows 工件集，包括大规模远程收集。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-windows-with-kape\u002FSKILL.md",[250,251],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":252,"categoryName":253,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C9JZH3GWXPJ6CQG5P7J48Y","数字取证与电子证据分析",[255,256,257,50,258,259,260,261,262,263,264,265,266,267,268,269,201,270,271,272],"windows","kape","triaging windows with kape","registry","browser","logs","windows-forensics","dfir","mft","mftecmd","data","prefetch","eric-zimmerman","digital-forensics","SET","collection","pecmd","artifact-collection",{"skillNo":274,"name":275,"nameZh":276,"description":277,"descriptionZh":278,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":279,"categories":280,"keywords":285,"publishedAt":51},"01M6AGD5PW5J4EVZM958WD74ZQ","triaging-vulnerabilities-with-ssvc-framework","SSVC 漏洞优先级分诊","Triages and prioritizes vulnerabilities with CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree, weighing exploitation status (via the CISA KEV catalog and FIRST EPSS API), technical impact, automatability, and mission prevalence to output Track\u002FTrack*\u002FAttend\u002FAct decisions. Use when prioritizing vulnerability scan results (OpenVAS, Nessus, Qualys) for remediation planning beyond raw CVSS scores.","使用 CISA 的 Stakeholder-Specific Vulnerability Categorization（SSVC，利益相关方特定漏洞分类）决策树对漏洞进行分诊和优先级排序，权衡利用状态（通过 CISA KEV 目录和 FIRST EPSS API）、技术影响、自动化程度和任务普遍性，输出 Track\u002FTrack*\u002FAttend\u002FAct 决策。适用于对漏洞扫描结果（OpenVAS、Nessus、Qualys）进行优先级排序以制定修复计划，而不局限于原始 CVSS 分数的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[281,284],{"categoryNo":282,"categoryName":283,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQV98CYQ7TEW2D1MRQ00TE","安全公告与漏洞管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[286,287,288,50,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304],"vulnerabilities","framework","triaging vulnerabilities with ssvc framework","status","planning","CISA","vulnerability-management","risk-management","nessus","qualys","openvas","cvss","remediation","risk","vulnerability","api","prioritization","ssvc","decision-tree",{"skillNo":306,"name":307,"nameZh":308,"description":309,"descriptionZh":310,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":311,"categories":312,"keywords":315,"publishedAt":51},"01M6AGD24TTQQM4CXG69E3B9TJ","triaging-security-incident","安全事件初步分诊","Performs initial triage of security incidents using the NIST SP 800-61r3 and SANS PICERL frameworks, classifying incident type, assigning priority by business impact, and routing to the appropriate response team. Use when a SIEM\u002FEDR alert needs human classification, concurrent alerts must be prioritized, or a user report or threat-intel IOC match requires initial incident categorization.","使用 NIST SP 800-61r3 和 SANS PICERL 框架对安全事件进行初步分诊，分类事件类型、按业务影响分配优先级，并路由到相应的响应团队。适用于 SIEM\u002FEDR 告警需要人工分类、并发告警必须确定优先级，或用户报告或威胁情报 IOC 匹配需要初步事件分类的场景。","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\u002Fblob\u002Fmain\u002Fskills\u002Ftriaging-security-incident\u002FSKILL.md",[313,314],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[166,316,50,317,318,319,320,321,322,323,324,237,325,238,326,327,328,329,330,331],"triaging security incident","siem","file","ioc","soc","NIST-800-61","NIST","severity","edr","execution","analysis","classification","severity-classification","incident-triage","SANS-PICERL","SOC-operations"]