Execute Invoke-command on Remote Host

 Original Source: [Sigma source]
Title: Execute Invoke-command on Remote Host
Status: test
Description:Adversaries may use Valid Accounts to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user.
References:
  -https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1021.006/T1021.006.md#atomic-test-2---invoke-command
  -https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-7.4
Author: frack113
Date: 2022-01-07
modified:None
Tags:
  • -'attack.lateral-movement'
  • -'attack.t1021.006'
Logsource:
  • product: windows
  • category: ps_script
  • definition: Requirements: Script Block Logging must be enabled
Detection:
  selection_cmdlet:
    ScriptBlockText|contains|all:
      -'invoke-command '
      -' -ComputerName '

  condition:selection_cmdlet
Falsepositives:
  -Legitimate script
Level: medium