T1556.005 Splunk · SPL

Detect Reversible Encryption in Splunk

Adversaries may enable the AllowReversiblePasswordEncryption property on Active Directory user accounts to gain access to plaintext credentials. When enabled, Active Directory stores user passwords in a reversibly encrypted form (G$RADIUSCHAP in userParameters) rather than as one-way hashes. An adversary with SYSTEM access can decrypt these passwords using four components from AD user structures and LSA secrets. Adversaries can set this via PowerShell (Set-ADUser -AllowReversiblePasswordEncryption $true), Local Group Policy, or Fine-Grained Password Policy (FGPP) if Domain Functional Level is Windows Server 2008+.

MITRE ATT&CK

Tactic
Credential Access Defense Evasion Persistence
Technique
T1556 Modify Authentication Process
Sub-technique
T1556.005 Reversible Encryption
Canonical reference
https://attack.mitre.org/techniques/T1556/005/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="WinEventLog:Security" EventCode=4738
| rex field=_raw "(?i)AllowReversiblePasswordEncryption\s*:\s*(?<ReversibleEnabled>\S+)"
| rex field=_raw "\%\%(?<UAC_Flag>2054|2056)"
| where isnotnull(ReversibleEnabled) OR isnotnull(UAC_Flag)
| eval ReversibleSet=if(isnotnull(UAC_Flag) AND UAC_Flag="2054", "ENABLED", "CHECK")
| table _time, host, Target_Account_Name, Target_Domain, Subject_Account_Name, Subject_Domain, ReversibleSet, UAC_Flag
| sort - _time
| append
  [search index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
   (Image="*\\powershell.exe" OR Image="*\\pwsh.exe")
   (CommandLine="*AllowReversiblePasswordEncryption*" OR CommandLine="*ENCRYPTED_TEXT_PASSWORD_ALLOWED*")
   (CommandLine="*true*" OR CommandLine="*\$true*" OR CommandLine="*1*")
  | table _time, host, Image, CommandLine, User]
high severity high confidence

Detects reversible password encryption enablement using Windows Security Event ID 4738 (User Account Changed) with UserAccountControl flag %%2054 (ENCRYPTED_TEXT_PASSWORD_ALLOWED), and Sysmon Event ID 1 for PowerShell commands setting AllowReversiblePasswordEncryption to true.

Data Sources

User Account: User Account ModificationWindows Security Event LogSysmon Event ID 4738Sysmon Event ID 1

Required Sourcetypes

WinEventLog:SecurityXmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Documented RADIUS/CHAP service accounts where reversible encryption is a known requirement
  • Domain administration tools that enumerate UAC flags as part of routine auditing
  • Identity governance tools scanning for accounts with insecure settings
  • PowerShell scripts auditing for accounts with reversible encryption already enabled (read-only operations)
Download portable Sigma rule (.yml)

Other platforms for T1556.005


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Enable Reversible Password Encryption on a Test Account

    Expected signal: Security Event ID 4738: User Account Changed for testuser_atomic, with UserAccountControl value showing ENCRYPTED_TEXT_PASSWORD_ALLOWED. PowerShell ScriptBlock Log Event ID 4104 with the Set-ADUser command. Sysmon Event ID 1 for powershell.exe with AllowReversiblePasswordEncryption in CommandLine.

  2. Test 2Audit Accounts with Reversible Encryption Enabled

    Expected signal: PowerShell ScriptBlock Log Event ID 4104 with the Get-ADUser filter query. Active Directory query events. Security Event ID 4662 for directory object access on enumerated user objects.

  3. Test 3Set Reversible Encryption via Fine-Grained Password Policy

    Expected signal: Security Event ID 4738/5136 (DS Object Modified): Fine-Grained Password Policy object creation with msDS-PasswordReversibleEncryptionEnabled attribute set. PowerShell ScriptBlock Log Event ID 4104 with New-ADFineGrainedPasswordPolicy.

Unlock Pro Content

Get the full detection package for T1556.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections