Skip to content

Siemphony is in beta and still being built. What ships today, and what does not.

Siemphony’s repertoire

Windows Defender exclusion configured via PowerShell preference cmdlet

Siemphony@siemphonylowT1679unverified
AN2030 offers four log sources — PowerShell script block logging, Security 4688 process creation, and two variants of a file-modification leg (Security 4663 and 4670/4656) — and only the PowerShell leg can carry a genuinely distinguishing signal. `Add-MpPreference` and `Set-MpPreference` are the cmdlets that write Defender's exclusion list, and their `-Exclusion*` parameters are exactly MITRE's `ExclusionTargetList` knob turned into arguments a script would actually pass; this rule matches the cmdlet name together with one of those parameter names in the same script block. Security 4688's `CommandLine` would see the same string only when the cmdlet reaches a new process on a single line — a `-Command` one-liner or a saved script — but an operator who pastes the cmdlet directly at an interactive PowerShell prompt never spawns a new process, so 4688 misses exactly the case a defender would expect script-block logging to catch, and this rule uses 4104 instead. 4104 is off by default — it requires the "Turn on PowerShell Script Block Logging" Group Policy (or the equivalent `HKLM\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging` registry key) enabled on the host first; without it this rule sees nothing, which reads as quiet rather than the blind spot it actually is. The two file-modification legs are declined outright: 4663/4670/4656 are the object- access events for the File System object type (see AUTHORING.md's note on 4657 vs 4663), and the change `Add-MpPreference` actually makes lands in the registry, under `HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions\`, which is a 4657 event this brief does not offer — so neither file-modification leg can see a registry-based exclusion at all. AN2030's other described behaviour, enumerating file names and critical extensions for exclusion targeting, has no cmdlet-level signature distinct from ordinary file enumeration and is not attempted here. This rule sees only exclusions set through these two cmdlets — direct registry writes via `reg add`, `regedit`, or a `New-Item` under the Exclusions key bypass it entirely, as does any third-party AV or backup product's own exclusion mechanism, since MpPreference is Defender-specific. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0897, 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

Sentinel · KQL

Run this as a search.

Event| where ((EventID == 4104 and (ScriptBlockText contains "Add-MpPreference" or ScriptBlockText contains "Set-MpPreference")) and (ScriptBlockText contains "-ExclusionPath" or ScriptBlockText contains "-ExclusionExtension" or ScriptBlockText contains "-ExclusionProcess" or ScriptBlockText contains "-ExclusionIpAddress"))

Splunk · SPL

Run this as a search.

index=* ((EventID="4104" AND (ScriptBlockText="*Add-MpPreference*" OR ScriptBlockText="*Set-MpPreference*")) AND (ScriptBlockText="*-ExclusionPath*" OR ScriptBlockText="*-ExclusionExtension*" OR ScriptBlockText="*-ExclusionProcess*" OR ScriptBlockText="*-ExclusionIpAddress*"))

Elastic · ES|QL

Run this as a search.

FROM logs-*| WHERE ((event.code == 4104 AND (TO_LOWER(powershell.file.script_block_text) LIKE "*add-mppreference*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*set-mppreference*")) AND (TO_LOWER(powershell.file.script_block_text) LIKE "*-exclusionpath*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-exclusionextension*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-exclusionprocess*" OR TO_LOWER(powershell.file.script_block_text) LIKE "*-exclusionipaddress*"))

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)(Add-MpPreference|Set-MpPreference)</field>    <field name="ScriptBlockText" type="pcre2">(?i)(-ExclusionPath|-ExclusionExtension|-ExclusionProcess|-ExclusionIpAddress)</field>    <description>Windows Defender exclusion configured via PowerShell preference cmdlet</description>    <mitre>      <id>T1679</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.