0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windowsの隠し技術:ADS(Alternate Data Streams)解説

0
Last updated at Posted at 2026-03-20

はじめに

WindowsのNTFSファイルシステムには、あまり知られていない機能があります。

それが:

ADS(Alternate Data Streams)

一見ただのファイルに見えて、実は裏に“別のデータ”を隠せるという仕組みです。


ADSとは何か?

ADS(Alternate Data Streams)とは:

1つのファイルに複数のデータストリームを持たせる仕組み


イメージ

test.txt
 ├─ 通常データ(見える)
 └─ hidden.txt(見えない)

基本操作(ハンズオン)

① ファイル作成

echo hello > test.txt

② ADSにデータを隠す

echo secret > test.txt:hidden.txt
  • エクスプローラでは見えない
  • ファイルサイズも変わらない(これが怖い)

③ 中身を確認

more < test.txt:hidden.txt

④ 削除

del test.txt:hidden.txt

攻撃者の使い方(重要)

ADSは“地味だけど強い”ステルステクニック。


1. マルウェア隠蔽

type malware.exe > report.txt:malware.exe

見た目:

report.txt

実態:

report.txt:malware.exe(隠しペイロード)

2. 実行(トリッキー)

wmic process call create "cmd /c start report.txt:malware.exe"

3. 永続化と組み合わせ

よくある組み合わせ:

手法 内容
Registry Run 起動時にADS実行
Scheduled Task 定期的にADS実行
WMI Event イベントトリガーで実行

実体はADS → 検知回避しやすい


攻撃チェーン例

[侵入]
   ↓
[malware.exe を ADS に隠す]
   ↓
[レジストリに登録]
   ↓
[ログイン時に実行]
   ↓
[永続化成功]

ファイルスキャンでは見逃されやすい


防御・検知方法

ここが一番重要。


方法①:dir /r

dir /r

ADSを一覧表示できる


方法②:PowerShell

Get-Item test.txt -Stream *

方法③:Sysinternals

  • streams.exe

方法④:EDR / AV

  • 最近は検知されるケースも増えている
  • ただし「完全ではない」

注意点

  • NTFS限定(FAT32では不可)
  • GUIでは見えない
  • ログに残りにくいケースあり

ADSのメリット・デメリット

メリット(攻撃者視点)

  • ステルス性が高い
  • ファイルサイズが変わらない
  • 単純なスキャン回避

デメリット

  • 実行がやや面倒
  • dir /r でバレる
  • 最新EDRには弱い

現場的なリアル

正直に言うと:

「めちゃくちゃ高度」ではない
でも「雑な環境にはめちゃ刺さる」

特に:

  • ログ監視してない
  • PowerShell監査してない
  • EDRが弱い

こういう環境だと普通に残れる


まとめ

項目 内容
正体 NTFSの隠しデータ機能
特徴 ステルス性
攻撃用途 マルウェア隠蔽・永続化
防御 dir /r / PowerShell

ADSは「地味だけど実用的」なテクニック。

最新の派手な攻撃よりも、こういう“見落とされる機能”の方が
実際の侵入テストでは効くことも多いです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?