CWE一覧に戻る
CWE-1386

Windows ジャンクション/マウントポイントでの安全でない操作

Insecure Operation on Windows Junction / Mount Point
脆弱性 作成中
JA

この製品はファイルまたはディレクトリを開きますが、その名前がジャンクションまたはマウントポイントに関連付けられ、意図した制御範囲外の宛先に移動することを正しく防止できません。

実行されるアクションによっては
実行されるアクションによっては
攻撃者は、製品に読み取り、書き込み、削除、その他の操作をさせることができます、
書き込み、削除、またはその他の操作を
を実行させることができます。

Windows では、NTFS5 でリパース・ポイントと呼ばれるファイル・システム・オブジェクトを使用できます。
システム・オブジェクトを許可しています。
アプリケーションは
ディレクトリから別のディレクトリへのハードリンクを作成できる。
ジャンクションポイントと呼ばれる。また
ディレクトリからドライブレターへのマッピングを作成することもできます、
マウントポイントと呼ばれる。あるファイルが特権プログラム
特権プログラムによって使用されるが
へのハードリンクで置き換えることができる、
AUTOEXEC.BATなど)へのハード・リンクに置き換えることができる場合、攻撃者は特権を奪うことができる。
特権を使うことができる。プロセスがファイルを開くと
プロセスがファイルを開くと、攻撃者はその
プロセスでファイルを開くと、攻撃者はその
プロセスがファイルを開くと、攻撃者はそのプロセスの特権になりすます。
プログラムが正確にデータを処理できないようにする。
データを正確に処理することができなくなります。また
レジストリと
セマフォを指すこともできる。

EN

The product opens a file or directory, but it does not properly prevent the name from being associated with a junction or mount point to a destination that is outside of the intended control sphere.

Depending on the intended action
being performed, this could allow an
attacker to cause the product to read,
write, delete, or otherwise operate on
unauthorized files.

In Windows, NTFS5 allows for file
system objects called reparse points.
Applications can create a hard link from one
directory to another directory, called a
junction point. They can also create a
mapping from a directory to a drive letter,
called a mount point. If a file is used by a
privileged program, but it can be replaced
with a hard link to a sensitive file (e.g.,
AUTOEXEC.BAT), an attacker could excalate
privileges. When the process opens the file,
the attacker can assume the privileges of
that process, tricking the privileged
process to read, modify, or delete the
sensitive file, preventing the program from
accurately processing data. Note that one
can also point to registries and
semaphores.

Scope: Confidentiality / Impact: Read Files or Directories
Scope: Integrity / Impact: Modify Files or Directories
Scope: Availability / Impact: Modify Files or Directories
When designing software that will have different rights than the executer, the software should check that files that it is interacting with are not improper hard links or mount points. One way to do this in Windows is to use the functionality embedded in the following command: "dir /al /s /b" or, in PowerShell, use LinkType as a filter. In addition, some software uses authentication via signing to ensure that the file is the correct one to use. Make checks atomic with the file action, otherwise a TOCTOU weakness (CWE-367) can be introduced.
MITRE公式ページ — CWE-1386