New

The executive guide to generative AI

Read more

Remote File Download via PowerShell

edit

Identifies powershell.exe being used to download an executable file from an untrusted remote destination.

Rule type: eql

Rule indices:

  • winlogbeat-*
  • logs-endpoint.events.*
  • logs-windows.*

Severity: medium

Risk score: 47

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Command and Control

Version: 3 (version history)

Added (Elastic Stack release): 7.11.0

Last modified (Elastic Stack release): 7.16.0

Rule authors: Elastic

Rule license: Elastic License v2

Rule query

edit
sequence by host.id, process.entity_id with maxspan=30s [network
where process.name : ("powershell.exe", "pwsh.exe",
"powershell_ise.exe") and network.protocol == "dns" and not
dns.question.name : ("localhost", "*.microsoft.com",
"*.azureedge.net", "*.powershellgallery.com", "*.windowsupdate.com",
"metadata.google.internal") and not user.domain : "NT AUTHORITY"]
[file where process.name : "powershell.exe" and event.type ==
"creation" and file.extension : ("exe", "dll", "ps1", "bat") and
not file.name : "__PSScriptPolicy*.ps1"]

Threat mapping

edit

Framework: MITRE ATT&CKTM

Rule version history

edit
Version 3 (7.16.0 release)
  • Updated query, changed from:

    sequence by host.id, process.entity_id with maxspan=30s [network
    where process.name : "powershell.exe" and network.protocol == "dns"
    and not dns.question.name : ("localhost", "*.microsoft.com",
    "*.azureedge.net", "*.powershellgallery.com", "*.windowsupdate.com",
    "metadata.google.internal") and not user.domain : "NT AUTHORITY"]
    [file where process.name : "powershell.exe" and event.type ==
    "creation" and file.extension : ("exe", "dll", "ps1", "bat") and
    not file.name : "__PSScriptPolicy*.ps1"]
Version 2 (7.12.0 release)
  • Formatting only
Was this helpful?
Feedback