Powershell XML Execute Command

 Original Source: [Sigma source]
Title: Powershell XML Execute Command
Status: test
Description:Adversaries may abuse PowerShell commands and scripts for execution. PowerShell is a powerful interactive command-line interface and scripting environment included in the Windows operating system. (Citation: TechNet PowerShell) Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code
References:
  -https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1059.001/T1059.001.md#atomic-test-8---powershell-xml-requests
Author: frack113
Date: 2022-01-19
modified:2023-01-19
Tags:
  • -'attack.execution'
  • -'attack.t1059.001'
Logsource:
  • product: windows
  • category: ps_script
  • definition: Requirements: Script Block Logging must be enabled
Detection:
  selection_xml:
    ScriptBlockText|contains|all:
      -'New-Object'
      -'System.Xml.XmlDocument'
      -'.Load'

  selection_exec:
    ScriptBlockText|contains:
      -'IEX '
      -'Invoke-Expression '
      -'Invoke-Command '
      -'ICM -'

  condition:all of selection_*
Falsepositives:
  -Legitimate administrative script
Level: medium