Skip to content

Siemphony is in beta and still being built. How a rule earns its badge.

Siemphony’s repertoire

PowerShell script block suppresses errors around a download or exec cmdlet

AN0182 describes PowerShell invoked with parameters that suppress errors or interrupts so a command keeps running through failures that would otherwise stop it. `-ErrorAction SilentlyContinue` alone is far too common to gate on — it is defensive-programming boilerplate in a huge share of legitimate scripts — so this rule requires it to appear in the same script block as one of MITRE's `MonitoredCmdlets` examples (`Invoke-Expression`, `Invoke-WebRequest`) plus the other primitives that make up the same download-and-run pattern (`Invoke-RestMethod`, `Net.WebClient`, `DownloadString`, `Start-BitsTransfer`). The idea is that an adversary chaining a retrieval or execution step behind silenced errors is trying to keep a cradle running past a blocked request or a killed connection, which is a narrower claim than "a script suppressed an error somewhere." This rule does not attempt AN0182's `ErrorActionThreshold` knob — a frequency count across a time window is not expressible against a single event in lib/sigma — so it fires on the first block that matches rather than a repeated pattern. PowerShell Script Block Logging is off by default and is not enabled by the Microsoft or CIS baselines, so without the *Turn on PowerShell Script Block Logging* policy this rule returns zero rows because the host is blind, not because nothing happened. The brief's other Windows leg (Sysmon EventID 1 `process_creation`) is not combined here: it carries `CommandLine` but not the full script text, so it cannot see an `-ErrorAction` flag set inside a script rather than on the command line, and AN0181/AN0183's Linux `nohup`/macOS `disown` legs are a different logsource entirely and are not covered by this rule. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0067, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full description

The detection

The 4 SIEM queries below are previews produced by Siemphony’s own translator, not pySigma, and none has been executed against a real backend — review before you deploy.

detection.yml

title: PowerShell script block suppresses errors around a download or exec cmdletid: 1230755c-8a57-4cb4-ab5a-45fc3b10d70cstatus: experimentaldescription: |  AN0182 describes PowerShell invoked with parameters that suppress errors or  interrupts so a command keeps running through failures that would otherwise  stop it. `-ErrorAction SilentlyContinue` alone is far too common to gate on —  it is defensive-programming boilerplate in a huge share of legitimate  scripts — so this rule requires it to appear in the same script block as one  of MITRE's `MonitoredCmdlets` examples (`Invoke-Expression`,  `Invoke-WebRequest`) plus the other primitives that make up the same  download-and-run pattern (`Invoke-RestMethod`, `Net.WebClient`,  `DownloadString`, `Start-BitsTransfer`). The idea is that an adversary  chaining a retrieval or execution step behind silenced errors is trying to  keep a cradle running past a blocked request or a killed connection, which  is a narrower claim than "a script suppressed an error somewhere." This  rule does not attempt AN0182's `ErrorActionThreshold` knob — a frequency  count across a time window is not expressible against a single event in  lib/sigma — so it fires on the first block that matches rather than a  repeated pattern. PowerShell Script Block Logging is off by default and is  not enabled by the Microsoft or CIS baselines, so without the *Turn on  PowerShell Script Block Logging* policy this rule returns zero rows because  the host is blind, not because nothing happened. The brief's other Windows  leg (Sysmon EventID 1 `process_creation`) is not combined here: it carries  `CommandLine` but not the full script text, so it cannot see an  `-ErrorAction` flag set inside a script rather than on the command line, and  AN0181/AN0183's Linux `nohup`/macOS `disown` legs are a different logsource  entirely and are not covered by this rule.  UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0067, not hand-written and not tested by its author. Any lab result is on this rule's own page.references:  - https://attack.mitre.org/techniques/T1564/011  - https://attack.mitre.org/detectionstrategies/DET0067author: Siemphony pipeline (machine-derived from MITRE ATT&CK v19.2)date: 2026-08-16tags:  - attack.defense-evasion  - attack.t1564.011logsource:  product: windows  service: powershelldetection:  selection_eventid:    EventID: 4104  selection_suppress:    ScriptBlockText|contains:      - '-ErrorAction SilentlyContinue'      - '-ErrorAction Ignore'      - '-EA SilentlyContinue'      - '-EA Ignore'  selection_cmdlet:    ScriptBlockText|contains:      - 'Invoke-Expression'      - 'Invoke-WebRequest'      - 'Invoke-RestMethod'      - 'Net.WebClient'      - 'DownloadString'      - 'Start-BitsTransfer'  condition: selection_eventid and selection_suppress and selection_cmdletfalsepositives:  - "Deployment and installer scripts that probe for an optional module, proxy or update endpoint with Invoke-WebRequest -ErrorAction SilentlyContinue and fall back silently when it is unreachable, which is a standard pattern in provisioning tooling and CI/CD runbooks."  - "Configuration-management agents (DSC, Chef, Puppet, Ansible's PowerShell modules) that wrap idempotent download-and-apply steps in SilentlyContinue so a re-run does not fail on a resource that already exists or a mirror that is temporarily down."  - "Administrator-authored monitoring or health-check scripts that call Invoke-RestMethod against an internal API with suppressed errors so a single unreachable endpoint does not abort a larger scheduled task."  - "Documentation, help text and code samples logged verbatim by 4104: a runbook or module comment that discusses this exact combination of flag and cmdlet, without executing either, produces an identical script block."level: low

Sentinel · KQL

Run this as a search.

Event| where ((EventID == 4104 and (ScriptBlockText contains "-ErrorAction SilentlyContinue" or ScriptBlockText contains "-ErrorAction Ignore" or ScriptBlockText contains "-EA SilentlyContinue" or ScriptBlockText contains "-EA Ignore")) and (ScriptBlockText contains "Invoke-Expression" or ScriptBlockText contains "Invoke-WebRequest" or ScriptBlockText contains "Invoke-RestMethod" or ScriptBlockText contains "Net.WebClient" or ScriptBlockText contains "DownloadString" or ScriptBlockText contains "Start-BitsTransfer"))

Splunk · SPL

Run this as a search.

index=* ((EventID="4104" AND (ScriptBlockText="*-ErrorAction SilentlyContinue*" OR ScriptBlockText="*-ErrorAction Ignore*" OR ScriptBlockText="*-EA SilentlyContinue*" OR ScriptBlockText="*-EA Ignore*")) AND (ScriptBlockText="*Invoke-Expression*" OR ScriptBlockText="*Invoke-WebRequest*" OR ScriptBlockText="*Invoke-RestMethod*" OR ScriptBlockText="*Net.WebClient*" OR ScriptBlockText="*DownloadString*" OR ScriptBlockText="*Start-BitsTransfer*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((event.code == 4104 AND (TO_LOWER(powershell.file.script_block_text) LIKE "*-erroraction silentlycontinue*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-erroraction ignore*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-ea silentlycontinue*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-ea ignore*")) AND (TO_LOWER(powershell.file.script_block_text) LIKE "*invoke-expression*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*invoke-webrequest*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*invoke-restmethod*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*net.webclient*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*downloadstring*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*start-bitstransfer*"))

Wazuh · XML rule

Deploy to your manager — this is a rule, not a search.

<group name="sigma,windows,">  <!-- Rule ids must be unique on your manager; 100000+ is the user range. -->  <rule id="100000" level="5">    <!-- Set <if_sid> to the decoder/base rule for windows so this only evaluates relevant events. -->    <field name="EventID" type="pcre2">(?i)^4104$</field>    <field name="ScriptBlockText" type="pcre2">(?i)(-ErrorAction SilentlyContinue|-ErrorAction Ignore|-EA SilentlyContinue|-EA Ignore)</field>    <field name="ScriptBlockText" type="pcre2">(?i)(Invoke-Expression|Invoke-WebRequest|Invoke-RestMethod|Net\.WebClient|DownloadString|Start-BitsTransfer)</field>    <description>PowerShell script block suppresses errors around a download or exec cmdlet</description>    <mitre>      <id>T1564.011</id>    </mitre>  </rule></group>

Verdicts · reactions · comments

Community

Verdicts from engineers who actually deployed it, and the conversation around it.

Log in to react
Not yet reported on

Nobody has run this in a real environment and said what happened.

Verdicts from engineers who deployed it

0 cast

No verdicts reported yet. The first one is worth more than the tenth — say what you ran it against.

Log in to report a verdict.

Log in to join the discussion.

No comments yet. Someone who deploys this will have something to say about it.