T1546.001
Change Default File Association
Adversaries may establish persistence by changing the default file association for a file extension. When a file is opened, the default program associated with the file extension is executed. Adversaries can exploit this by modifying the registry key that defines the default handler for a given file extension (e.g., .txt, .js, .hta) to point to a malicious executable, causing their payload to execute whenever a user opens a file with that extension.
Microsoft Sentinel / Defender
kusto
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has_any (
"SOFTWARE\\Classes\\",
"HKEY_CLASSES_ROOT\\"
)
| where RegistryKey matches regex @"\\shell\\open\\command"
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| where RegistryValueData !has_any (
"C:\\Windows\\system32\\",
"C:\\Program Files\\",
"C:\\Program Files (x86)\\"
)
| extend Extension = extract(@"Classes\\(\.\w+)\\", 1, RegistryKey)
| extend SuspiciousHandler = RegistryValueData has_any (
"powershell", "cmd.exe", "wscript", "cscript", "mshta",
"rundll32", "regsvr32", "certutil", "bitsadmin", "AppData", "Temp", "ProgramData"
)
| project Timestamp, DeviceName, AccountName, ActionType, RegistryKey,
RegistryValueName, RegistryValueData, Extension, SuspiciousHandler,
InitiatingProcessFileName, InitiatingProcessCommandLine
| sort by Timestamp desc medium severity
medium confidence
Data Sources
Windows Registry: Registry Key Modification Microsoft Defender for Endpoint
Required Tables
DeviceRegistryEvents
False Positives
- Software installations that legitimately register file handlers (e.g., installing a new browser changes .html, .htm associations)
- Development tools registering custom file extensions for project files (Visual Studio, JetBrains IDEs)
- PDF readers, media players, and archiving utilities that change handler associations during install or on first run
- Group Policy-driven file association changes pushed by IT during software deployments
Last updated: 2026-04-20 Research depth: deep
References (5)
- https://attack.mitre.org/techniques/T1546/001/
- https://docs.microsoft.com/en-us/windows/win32/shell/fa-intro
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.001/T1546.001.md
- https://pentestlab.blog/2020/01/13/persistence-change-default-file-association/
- https://www.hexacorn.com/blog/2018/03/15/beyond-good-ol-run-key-part-75/
Unlock Pro Content
Get the full detection package for T1546.001 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance
Related Detections
Parent Technique
T1546Event Triggered ExecutionRelated Sub-techniques
T1546.002ScreensaverT1546.003Windows Management Instrumentation Event SubscriptionT1546.004Unix Shell Configuration ModificationT1546.005TrapT1546.006LC_LOAD_DYLIB AdditionT1546.007Netsh Helper DLLT1546.008Accessibility FeaturesT1546.009AppCert DLLsT1546.010AppInit DLLsT1546.011Application ShimmingT1546.012Image File Execution Options InjectionT1546.013PowerShell ProfileT1546.014EmondT1546.015Component Object Model HijackingT1546.016Installer PackagesT1546.017Udev RulesT1546.018Python Startup Hooks