Trusted Design

T1129 - Shared Modules

概要

Adversaries may execute malicious payloads via loading shared modules. Shared modules are executable files that are loaded into processes to provide access to reusable code, such as specific custom functions or invoking OS API functions (i.e., Native API).

Adversaries may use this functionality as a way to execute arbitrary payloads on a victim system. For example, adversaries can modularize functionality of their malware into shared objects that perform various functions such as managing C2 network communications or execution of specific actions on objective.

The Linux & macOS module loader can load and execute shared objects from arbitrary local paths. This functionality resides in dlfcn.h in functions such as dlopen and dlsym. Although macOS can execute .so files, common practice uses .dylib files.(Citation: Apple Dev Dynamic Libraries)(Citation: Linux Shared Libraries)(Citation: RotaJakiro 2021 netlab360 analysis)(Citation: Unit42 OceanLotus 2017)

The Windows module loader can be instructed to load DLLs from arbitrary local paths and arbitrary Universal Naming Convention (UNC) network paths. This functionality resides in NTDLL.dll and is part of the Windows Native API which is called from functions like LoadLibrary at run time.(Citation: Microsoft DLL)

管理者によるコメント

T1129「Shared Modules」(共有モジュール) は、攻撃者がOSの 「共有ライブラリ(WindowsではDLL、Linuxでは.so)」 を読み込む正規のメカニズムを悪用して、悪意のあるコードを実行する手法です。

1. 概要

この手法で攻撃者は、「既存の正規プロセスを利用した、隠密性の高いコード実行」を実現します。

2. 攻撃の流れ

攻撃者は、OSの「ローダー(プログラムを読み込む仕組み)」を騙す形で活動します。

  1. モジュールの配置: 悪意のあるDLLファイルを、ターゲットが読み込みそうな場所(アプリケーションと同じフォルダなど)に配置します。
  2. 読み込みのトリガー:
    • 直接呼び出し: LoadLibrary などのAPIを直接叩いて読み込ませます(T1106 Native APIとの組み合わせ)。
    • サイドローディング: 正規のプログラムが特定のDLLを必要としている隙を突き、同名の悪意あるDLLを優先的に読み込ませます。
  3. コードの実行: DLLがメモリにロードされると、その初期化関数(DllMainなど)が自動的に実行され、攻撃が開始されます。

3. 防御・対策

「どこから何が読み込まれるか」を厳格に管理することが重要です。

4. 重要ポイント

5. 関連する主なCWE

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

実務上のヒント

システム上で「身に覚えのない場所(DownloadsPublic フォルダなど)」からロードされているDLLを発見した場合、それは T1129 を用いた侵害の可能性が高い非常に重要な兆候です。

分析

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

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

関連する CVE

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


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