Powershell executed script from suspicious location


Description

Powershell executed script from suspicious location

Query · wazuh

field win.eventdata.commandLine="(?i)[c-z]:\\\\(Windows\\\\Temp|Users)\\.+\.(bat|cmd|lnk|pif|vbs|vbe|js|wsh|ps1)"

Fires when

Wazuh evaluates a chain top-down. Every rule above this one must match on the same event before this rule is tested at all.

  1. field win.eventdata.commandLine="(?i)\.(bat|cmd|lnk|pif|vbs|vbe|js|wsh|ps1)" AND field win.eventdata.originalFileName="(?i)powershell\.exe$"
  2. 92029 Powershell executed script from suspicious location refinement level 6 this rule
    field win.eventdata.commandLine="(?i)[c-z]:\\\\(Windows\\\\Temp|Users)\\.+\.(bat|cmd|lnk|pif|vbs|vbe|js|wsh|ps1)"

Rule dependencies

Depends on

Raw source Powershell executed script from suspicious location · Wazuh XML
Esc
Published by Wazuh Core Ruleset ↗, licensed under GPLv2 ↗. Reproduced here unmodified.
<rule id="92029" level="6">
    <if_sid>92028</if_sid>
    <field name="win.eventdata.commandLine" type="pcre2">(?i)[c-z]:\\\\(Windows\\\\Temp|Users)\\.+\.(bat|cmd|lnk|pif|vbs|vbe|js|wsh|ps1)</field>
    <options>no_full_log</options>
    <description>Powershell executed script from suspicious location</description>
    <mitre>
      <id>T1059.001</id>
    </mitre>
  </rule>

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.