Trusted Design

T1042 - Change Default File 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 (Citation: Microsoft Change Default Programs) (Citation: Microsoft File Handlers) or by administrators using the built-in assoc utility. (Citation: Microsoft Assoc Oct 2017) 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. (Citation: TrendMicro TROJ-FAKEAV OCT 2012)

管理者によるコメント

T1042は、特定の拡張子(例:.txt.pdf)のファイルを開いたときに起動するデフォルトのプログラムをマルウェアに書き換えることで、「永続化(Persistence)」を実現します。

1. 概要

この手法で攻撃者は、「ユーザーが日常的にファイルを開く操作をトリガーにした、マルウェアの自動再実行」を実現します。

何を実現できるのか

2. 攻撃の流れ

攻撃者は、レジストリ(通常はユーザー権限、またはシステム全体に適用する場合は管理者権限)を操作して設定を書き換えます。

  1. ターゲット拡張子の選定:
    ユーザーが業務で頻繁に開く拡張子(例:.txt)を選びます。

  2. レジストリの改ざん:
    Windowsレジストリの以下のいずれかのキーを書き換えます。

    • HKEY_CURRENT_USER\Software\Classes\(ユーザー個別)
    • HKEY_LOCAL_MACHINE\Software\Classes\(システム全体)
    • 例えば、.txt に紐づく txtfile\shell\open\command の値を、正規の notepad.exe から「マルウェアのパス(またはマルウェアを経由してメモ帳を開くコマンド)」に変更します。
  3. ユーザー操作の待機:
    ユーザーがデスクトップやフォルダ内にあるテキストファイルをダブルクリックするのを待ちます。

  4. 実行:
    OSは関連付けに従ってマルウェアを起動します。攻撃者はユーザーに不審がられないよう、バックグラウンドでマルウェアを動かしつつ、フォアグラウンドでは本来のファイルを正規のアプリで開いて見せかけます。

3. 防御・対策

「関連付け変更の固定化」と「レジストリ監視」が有効です。

4. 重要ポイント

5. 関連する主なCWE

6. 関連する代表的なCVE/事例

特定のソフトウェア脆弱性(CVE)を突くというよりは、OSのデザイン(仕様)を悪用するテクニックですが、以下のような攻撃で組み合わせて使われます。

調査のアドバイス

Windows 10/11では、ファイル関連付けが改ざんされると、OSが「アプリの既定値がリセットされました」という通知を出す仕組みが標準実装されています。社内でこの通知が多発している端末がある場合、T1042(T1546.001)の攻撃を受けている可能性があるため、該当レジストリの確認を推奨します。

分析

この攻撃手法を利用する脅威アクター

この攻撃手法を利用する脅威アクターは登録されていません。

関連する CVE

攻撃手法 – 脅威アクター Graph


← Technique一覧に戻る ← Tactics一覧に戻る