This hunt targets adversaries leveraging the “Skeleton Key” technique to establish persistent, stealthy access by patching authentication mechanisms across the environment. Proactively hunting for this behavior in Azure Sentinel is critical because it allows the SOC team to identify and remediate unauthorized credential modifications before attackers can leverage them for lateral movement or data exfiltration.
rule skeleton_key_patcher
{
meta:
description = "Skeleton Key Patcher from Dell SecureWorks Report http://goo.gl/aAk3lN"
author = "Dell SecureWorks Counter Threat Unit"
reference = "http://goo.gl/aAk3lN"
date = "2015/01/13"
score = 70
strings:
$target_process = "lsass.exe" wide
$dll1 = "cryptdll.dll"
$dll2 = "samsrv.dll"
$name = "HookDC.dll"
$patched1 = "CDLocateCSystem"
$patched2 = "SamIRetrievePrimaryCredentials"
$patched3 = "SamIRetrieveMultiplePrimaryCredentials"
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 7 string patterns in its detection logic.
Based on the “Skeleton Key” detection logic (which monitors for unauthorized or unexpected modifications to authentication mechanisms, such as adding new user accounts with elevated privileges or modifying existing account attributes), here are 4 specific false positive scenarios in a legitimate enterprise environment:
Scheduled Identity Governance Batch Updates
svc_audit_temp) with the Admin role and modifies group memberships in Active Directory, triggering the Skeleton Key alert due to the creation of high-privilege identities outside standard business hours.svc_audit_* OR svc_governance_*. Additionally, filter events occurring between 02:00 and 04:00 UTC on the first Monday of every quarter.Patch Management Agent Deployment via SCCM/MECM
Install_Security_Patch.ps1) temporarily modifies the Local Security Authority settings and adds a local service account with elevated privileges on endpoint machines to facilitate the installation, mimicking a “Skeleton Key” modification event.ccmexec.exe or Install_Security_Patch.ps1 AND the user context is NT AUTHORITY\SYSTEM. Furthermore, filter for specific Event IDs (e.g., 4720 for account creation) originating from known SCCM distribution point IP ranges.