PowerShell MsXml2.XmlHttp COM Object Instantiation
Alerts on PowerShell creating an MsXml2.XmlHttp COM object through New-Object -ComObject.
- Product
- windows
- Category
- ps_script
- Author
- frack113, MatilJ (SigmaHQ), DRL 1.1
- Published
- 2022-01-19
- Updated
- 2026-07-31
ATT&CK techniques
ExecutionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags PowerShell script content that creates a COM object using MsXml2.XmlHttp via New-Object -ComObject. Adversaries commonly use this pattern to programmatically make requests and execute subsequent logic within a PowerShell script. It relies on telemetry that captures PowerShell script block text, including Script Block Logging, to match the specific string combination in the script content.
Reporting behind it
- github.comhttps://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.001/T1059.001.md#atomic-test-7---powershell-msxml-com-object---with-prompt
- learn.microsoft.comhttps://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms766431(v=vs.85)
- trendmicro.comhttps://www.trendmicro.com/en_id/research/22/e/uncovering-a-kingminer-botnet-attack-using-trend-micro-managed-x.html
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_msxml_com.yml
Changelog
v2- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: PowerShell MsXml2.XmlHttp COM Object Instantiation
id: b55e56e4-fd36-461c-beb2-d1bb210852a0
status: test
description: This rule flags PowerShell script content that creates a COM object using MsXml2.XmlHttp via New-Object -ComObject. Adversaries commonly use this pattern to programmatically make requests and execute subsequent logic within a PowerShell script. It relies on telemetry that captures PowerShell script block text, including Script Block Logging, to match the specific string combination in the script content.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.001/T1059.001.md#atomic-test-7---powershell-msxml-com-object---with-prompt
- https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms766431(v=vs.85)
- https://www.trendmicro.com/en_id/research/22/e/uncovering-a-kingminer-botnet-attack-using-trend-micro-managed-x.html
- https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_msxml_com.yml
author: frack113, MatilJ, Huntrule Team
date: 2022-01-19
modified: 2022-05-19
tags:
- attack.execution
- attack.t1059.001
logsource:
product: windows
category: ps_script
definition: "Requirements: Script Block Logging must be enabled"
detection:
selection:
ScriptBlockText|contains|all:
- New-Object
- -ComObject
- MsXml2.
- XmlHttp
condition: selection
falsepositives:
- Legitimate administrative script
level: medium
license: DRL-1.1
related:
- id: 78aa1347-1517-4454-9982-b338d6df8343
type: derived