detecting intrusions on windows operating systems by monitoring system services

25
1 Detecting Intrusions on Windows Operating Systems by Monitoring System Services 米米米米米 米米 米米 2005 米 2 米 8 米

Upload: caron

Post on 04-Jan-2016

36 views

Category:

Documents


2 download

DESCRIPTION

Detecting Intrusions on Windows Operating Systems by Monitoring System Services. 米澤研究室 島本 大輔 2005 年 2 月 8 日. 現在のセキュリティ事情. インターネットの成長による attack による 危険性の増大 ウィルス、不正侵入、スパイウェア、など ⇒ Intrusion Detection System ( IDS )の重要性. Intrusion Detection System(IDS). 侵入検知システム - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

1

Detecting Intrusions on Windows Operating Systems by Monitoring System Services

米澤研究室島本 大輔2005 年 2 月 8 日

Page 2: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

2

現在のセキュリティ事情 インターネットの成長による attack によ

る危険性の増大 ウィルス、不正侵入、スパイウェア、など

⇒ Intrusion Detection System( IDS )の重要性

Page 3: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

3

Intrusion Detection System(IDS)

侵入検知システム Signature based = 既存のデータベースと

の パターンマッチ アンチウィルスソフト、など

Anomaly based = 通常と異なる、異常な動作を検知

Page 4: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

4

既存の IDS

既存の Windows 用 IDS Signature based が主流

=新種への対応が困難

Linux 、 UNIX における IDS の研究 新種への対応を含めた先進的な研究が多数

Page 5: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

5

Linux 、 UNIX における IDS

プロセスの様々な情報を監視 [Forrest 96] の System Call の監視 [Feng 03] のスタックの監視 [Sekar 01] のプログラムカウンタの監視

これらの Windows への応用が少ない ブラックボックスな OS 公式に提供されているモジュールでは

不十分

Page 6: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

6

モチベーション 『 Linux 、 UNIX における先進的な

IDS の研究を Windows へ応用したい』

Windows における System Call などの情報を使って異常を検出

Page 7: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

7

研究内容 Windows 用先進的な IDS への第一歩

Windows 版 System Call であるSystem Service を Intercept

System Service のパターンを調査

Page 8: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

8

System Service Windows の根本的な機能を提供

ファイル操作、レジストリ操作、プロセス操作、など

例: NtWriteFile ― ファイルへの書き込みはすべてこれを利用

UNIX 系 OS の System Call に対応

Page 9: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

9

System Service の動作

NtOpenFile XXXXXX

NtDeleteFile

:

System Service のコード

アプリケーション

Kernel

Mode

User

Mode

アドレスを引く

Page 10: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

10

System Service の Interception

主に 2 通りの手法が存在1. System Service のアドレステーブル

( System Service Descriptor Table )を書換 System Call Table の書き換えと同等

2. Kernel mode へスイッチする瞬間にIntercept Windows 2000 以前ではソフトウェア割り込

み Windows XP 以降は SYSENTER 命令

Page 11: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

11

System Service の Interception

NtOpenFile XXXXXX

NtDeleteFile

:

System Service のコード

アプリケーション

Kernel

Mode

User

Mode

アドレスを引く

1 番の手法

アドレスを書換

2 番の手法

スイッチした後のJUMP 先を変更

Page 12: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

12

System Service の Interception 2 番の SYSENTER 命令を利用した

Interception を採用 既存研究が少数 監視する System Service の追加・削除が容易 一箇所において監視可能

※SYSENTER 命令 Fast System Call ・・・ System Call への遷移を

1 命令で完了

Page 13: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

13

System Service の Interception

NtOpenFile XXXXXX

NtDeleteFile

:

System Service のコード

アプリケーション

Kernel

Mode

User

Mode

アドレスを引く

挿入したコード

SYSENTER

Page 14: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

14

実装内容 Interception はデバイスドライバとして

動作 記録の出力のために別途、 User Mode

プログラムを開発 System Service の記録を出力 検出もこのプログラムで行う予定

Page 15: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

15

System Service のパターンの取得 取得方法

VMWare 上でウィルスと今回のプログラムを実行

様々なウィルスのパターンを取得 WORM_MUMU.B, WORM_NETSKY.Z,

WORM_BEGLE.AT, WORM_SASSER.B など 今後、より多くのパターンの調査が必要

Page 16: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

16

出力の例( WORM_MUMU.B )0112 0112 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00740074 0074 0074 0074 0074 0074 0074 0074 0074 0074 00b7

0112 = NtWriteFile, 0074 = NtOpenFile, 00b7 = NtReadFile

Page 17: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

17

まとめ モチベーション

Windows における先進的な IDS の実装 今回の研究内容

Interception の手法を調査・実装 ウィルスなどのパターンを取得

今後の予定 IDS への拡張

Page 18: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

18

以上です。ご清聴ありがとうございました。

Page 19: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

19

Page 20: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

20

概要 背景 関連研究 研究内容 実験内容 まとめ

Page 21: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

21

SYSENTER で Interception

次の IP を自分のコードへ変更 WRMSR 命令で変更 自分のコードが終了後に本当のコードへ

Jump⇒ 引き続き元の動作を実行

Page 22: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

22

SYSENTER

Fast System Call System Call をするために必要な権限の移行

に特化した命令 セグメントセレクタ、インストラクションポイン

タ (IP) 、スタックポインタを 1 命令であらかじめ設定された値に変更

Page 23: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

23

コード例 sti

mov ecx, 176h

rdmsr

mov SYSENTER_EIP_MSR_H, edx

mov SYSENTER_EIP_MSR_L, eax

cli

mov ecx, 176h

xor edx, edx

mov eax, stub

wrmsr

sti

jmp endasm

stub:

pushad

cmp eax, 30h /* CreateProcess の Service ID */

je log

normal:

popad

jmp [SYSENTER_EIP_MSR_L]

log:

jmp normal

endasm:

ここにコードを追加する

ことにより拡張可能

Page 24: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

24

実験 ウィルスに感染した状態でログを収集

1. VMWare 上でウィルスを実行2.     〃    監視プログラムを実行3. ログを抽出

Page 25: Detecting Intrusions on Windows Operating Systems by Monitoring System Services

25

これからの予定 パターンの収集

ウィルスのパターン 侵入のパターン 通常の操作によるパターン

パターンを実装し、 IDS を完成させる