SOC Prime Bias: Critical

25 Mar 2026 18:21

T1547.003 Time Providers in MITRE ATT&CK Explained

Author Photo
Ruslan Mikhalov Chief of Threat Research at SOC Prime linkedin icon Follow
T1547.003 Time Providers in MITRE ATT&CK Explained
shield icon

Detection stack

  • AIDR
  • Alert
  • ETL
  • Query

Summary

The article explains how attackers can establish persistence on Windows by abusing the W32Time service. By registering a malicious DLL as a time provider through a registry change, the payload is automatically loaded whenever the service starts. This method hides malicious execution behind a legitimate Windows component, helping the attacker blend persistence activity into normal system behavior.

Investigation

The report does not focus on a specific malware sample or intrusion campaign. Instead, it walks through the technical process an attacker could use to alter the W32Time service registry settings and force the loading of a rogue DLL. It also highlights the relevant command syntax and the registry path required to implement the abuse.

Mitigation

Organizations should use Group Policy to protect the W32Time service files and related registry keys from unauthorized modification. Registry write access should be limited to trusted administrators, and defenders should monitor changes to the TimeProviders subkey. File integrity checks for W32Time DLLs and strict least-privilege controls for the Local Service account can further reduce risk.

Response

Detection teams should alert on the creation or modification of subkeys beneath the W32Time\TimeProviders registry path. Registry values referencing unfamiliar DLLs should be investigated immediately. These signals should be correlated with process activity involving w32tm.exe loading a non-standard DLL, along with any related persistence behavior.

Attack Flow

We are still updating this part. Sign up to get notified

Notify Me

Simulation Execution

Prerequisite: The Telemetry & Baseline Pre‑flight Check must have passed.

  • Attack Narrative & Commands:
    An adversary with local admin rights wants persistence that survives system reboots and is hard to detect. They choose to abuse the Windows Time Service (W32Time) by registering a malicious DLL as a time provider. This technique leverages the legitimate reg.exe utility (living‑off‑the‑land) to modify the registry key HKLMSystemCurrentControlSetServicesW32TimeTimeProviders<CustomProvider>. Once the service loads the DLL at boot, the attacker gains code execution with SYSTEM privileges.

  • Regression Test Script:

    # -------------------------------------------------
    #   Register malicious DLL as a W32Time Time Provider
    # -------------------------------------------------
    $providerName = "MaliciousTimeProvider"
    $dllPath      = "C:TempevilTime.dll"
    
    # 1. Create a dummy malicious DLL placeholder (for test only)
    New-Item -Path $dllPath -ItemType File -Force | Out-Null
    
    # 2. Add the time provider registry key
    $regPath = "HKLMSystemCurrentControlSetServicesW32TimeTimeProviders$providerName"
    reg add "HKLMSystemCurrentControlSetServicesW32TimeTimeProviders$providerName" /v "Dll" /t REG_SZ /d $dllPath /f
    
    # 3. Enable the provider (value Enabled = 1)
    reg add "HKLMSystemCurrentControlSetServicesW32TimeTimeProviders$providerName" /v "Enabled" /t REG_DWORD /d 1 /f
    
    Write-Host "Malicious time provider registered. Check SIEM for detection."
  • Cleanup Commands:

    # -------------------------------------------------
    #   Remove malicious time provider registration
    # -------------------------------------------------
    $providerName = "MaliciousTimeProvider"
    $regPath = "HKLMSystemCurrentControlSetServicesW32TimeTimeProviders$providerName"
    
    # Delete the provider key recursively
    reg delete "HKLMSystemCurrentControlSetServicesW32TimeTimeProviders$providerName" /f
    
    # Remove the dummy DLL file
    Remove-Item "C:TempevilTime.dll" -Force -ErrorAction SilentlyContinue
    
    Write-Host "Cleanup complete."