PowerShell enables reversible encryption for an AD account
AN1621 bundles a Group Policy edit, "suspicious PowerShell commands modifying AD user properties," and the resulting account-property change into one multi-event correlation lib/sigma cannot express. This rule takes the middle piece on its own: PowerShell Script Block Logging (EventID 4104) capturing a call to `Set-ADUser` — the ActiveDirectory module's documented cmdlet for the per-account `AllowReversiblePasswordEncryption` property — together with the literal property name and an explicit `$true` value. That property name is this rule's own choice, not MITRE's `SuspiciousCmdletList` populated with a value, but it is the only PowerShell-native path to the exact property this technique describes: the AD attribute backing `AllowReversiblePasswordEncryption` is a UserAccountControl bit (ENCRYPTED_TEXT_PWD_ALLOWED), and `Set-ADUser` is the documented way to set it without hand-editing UAC bits directly. Requiring `$true` in the same block (rather than the cmdlet and property name alone) is a deliberate narrowing beyond what MITRE's knob asks for: it excludes a script that sets the property to `$false` — reverting or auditing the setting, not enabling it — at the cost of also missing `-AllowReversiblePasswordEncryption:$True` written with a different value token a future script might construct dynamically (a variable holding the boolean rather than the literal). MITRE's other two sources are not attempted. Security 4739 ("Domain Policy was changed") is the closest event for the domain-wide GPO form of this setting, but the specific flag this technique cares about (DOMAIN_PASSWORD_STORE_CLEARTEXT) is one bit inside the combined `PasswordProperties` bitmask on that event, and lib/sigma's allowed modifiers — contains, startswith, endswith, re, all, windash — have no bitwise-AND equivalent, so no honest selector on that field can isolate this flag from the other nine unrelated password/lockout properties the same event reports; matching bare `EventID: 4739` would fire on any domain password-policy edit at all, which is not what this analytic asks for. Sysmon EventID 1 process_creation is not attempted either: a GUI edit through Group Policy Management or Active Directory Users and Computers leaves no command line carrying the property name at all, so the only reliable command-line-visible expression of this technique is the PowerShell cmdlet already covered here. Prerequisite: Script Block Logging is off in a default install and in the MS/CIS baselines; without it the PowerShell channel carries no ScriptBlockText and this rule returns nothing. UNVERIFIED AS AUTHORED — derived from MITRE ATT&CK DET0589, not hand-written and not tested by its author. Any lab result is on this rule's own page.Full descriptionShow less
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 "Set-ADUser") and ScriptBlockText contains "AllowReversiblePasswordEncryption") and ScriptBlockText contains "$true")
Splunk · SPL
Run this as a search.
index=* (((EventID="4104" AND ScriptBlockText="*Set-ADUser*") AND ScriptBlockText="*AllowReversiblePasswordEncryption*") AND ScriptBlockText="*$true*")Elastic · ES|QL
Run this as a search.
FROM logs-*| WHERE (((event.code == 4104 AND TO_LOWER(powershell.file.script_block_text) LIKE "*set-aduser*") AND TO_LOWER(powershell.file.script_block_text) LIKE "*allowreversiblepasswordencryption*") AND TO_LOWER(powershell.file.script_block_text) LIKE "*$true*")
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="7"> <!-- 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)Set-ADUser</field> <field name="ScriptBlockText" type="pcre2">(?i)AllowReversiblePasswordEncryption</field> <field name="ScriptBlockText" type="pcre2">(?i)\$true</field> <description>PowerShell enables reversible encryption for an AD account</description> <mitre> <id>T1556.005</id> </mitre> </rule></group>
Verdicts · reactions · comments
Community
Verdicts from engineers who actually deployed it, and the conversation around it.
Nobody has run this in a real environment and said what happened.
Verdicts from engineers who deployed it
0 castNo 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.