T1546.001 Change Default File Association
Sub-technique of: T1546
High-Level Description
Adversaries may establish persistence by executing malicious content triggered by a file type association. When a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access or by administrators using the built-in assoc utility. Applications can modify the file association for a given file extension to call an arbitrary program when a file with the given extension is opened.
System file associations are listed under HKEY_CLASSES_ROOT.[extension], for example HKEY_CLASSES_ROOT.txt. The entries point to a handler for that extension located at HKEY_CLASSES_ROOT\[handler]. The various commands are then listed as subkeys underneath the shell key at HKEY_CLASSES_ROOT\[handler]\shell\[action]\command. For example:
- HKEY_CLASSES_ROOT\txtfile\shell\open\command
- HKEY_CLASSES_ROOT\txtfile\shell\print\command
- HKEY_CLASSES_ROOT\txtfile\shell\printto\command
The values of the keys listed are commands that are executed when the handler opens the file extension. Adversaries can modify these values to continually execute arbitrary commands.
Kill Chain Phase
- Privilege Escalation (TA0004)
- Persistence (TA0003)
Platforms: Windows
What to Check
- Identify if Change Default File Association technique is applicable to target environment
- Check Windows systems for indicators of Change Default File Association
- Assess detection coverage (1 detection strategies)
How to Test
Atomic Red Team Tests
The following tests are from Atomic Red Team and provide actionable ways to test this technique:
Atomic Test 1: Change Default File Association
Change Default File Association From cmd.exe of hta to notepad.
Upon successful execution, cmd.exe will change the file association of .hta to notepad.exe.
Supported Platforms: windows Elevation Required: Yes
assoc #{extension_to_change}=#{target_extension_handler}
Manual Testing
If Atomic Red Team tests are not applicable, manually verify the technique by:
Identify Attack Surface: Determine if the target environment is susceptible to Change Default File Association by examining the target platforms (Windows).
Assess Existing Defenses: Review whether mitigations for T1546.001 are in place. If defenses are absent or misconfigured, this technique may be exploitable.
Execute Test: Use tools and methods described in the MITRE ATT&CK page and external references below.
Remediation Guide
No specific mitigations documented for this technique.
Detection
Detect Default File Association Hijack via Registry & Execution Correlation on Windows
Risk Assessment
| Finding | Severity | Impact |
|---|---|---|
| Change Default File Association technique applicable | Low | Privilege Escalation |
CWE Categories
| CWE ID | Title |
|---|---|
| CWE-269 | Improper Privilege Management |