オンサイトセミナー
豊田孝の「IT談話館」 Windowsメモリダンプ解析を依頼する




 本「IT談話館」一般公開記事は、10年以上の実務経験を持つ上級Windowsエンジニアを想定しています。
 本館は、Windowsカーネル深層を解析し、クラッシュ原因をはじめとするシステム内の「異様な動き」を検出・分析する
超高度な技術と実績を保有しています。


Windows XP/7/8/10のプロセス間親子関係とサンドボックス


 本「IT談話館」の「一般公開記事」は、「Active Memory Dump とカーネルメモリダンプ」の解析結果を基に起草されています。「本館」主筆の「豊田孝」はDKOM(Direct Kernel Object Manipulation)ベースの解析手法の第一人者であり、Windowsカーネル空間の解析分野では世界の先頭を走っています。

 現在、セキュリティー問題を無視することはできません。Microsoft社側の負担だけではなく、同社製品の利用者側の負担も増しています。困ったことではありますが、当面避けられません。セキュリティーの視点から「Windows10ソフトウェアセンサー」を見た場合、本「IT談話館」の確認範囲では、「カーネル層保護ロジック」に加え、次のような保護メカニズム階層が考案・実装されています。下記リンクはすべて本館記事を指しています。
  1. Silo/Server Silo
  2. Job
  3. Session
  4. Protected Process
  5. Mandatory Integrity Control(MIC)
  6. Windows API(+CPU)
  7. CPU
 本稿では、Windows XP/7/8/10それぞれの環境で採取されたカーネルメモリダンプを本「IT談話館」の独自解析コードで解析し、プロセス間の親子関係の変遷を考察しています。解析コードの開発知識の習得には、「時間と予算」の投資が必要です。

 プロセス間の親子関係は、子プロセスは親プロセスのセキュリティー特性を継承したり、サンドボックスの実装手段であり、Windows Vista以降のWindowsシステムでは極めて重要な意味を担っています。同様の時代要請から、子プロセスを生み出す親プロセスの存在を隠蔽し、重要プロセスの系譜分析の難度化も進められています。

 まずはWindows XPのメモリダンプの解析結果からご覧いただきましょう。
kd> .dumpdebug
----- 32 bit Kernel Summary Dump Analysis

DUMP_HEADER32:
MajorVersion        0000000f
MinorVersion        00000a28
KdSecondaryVersion  00000000
DirectoryTableBase  08f20000
PfnDataBase         81000000
PsLoadedModuleList  8055c620
PsActiveProcessHead 805626d8
MachineImageType    0000014c
NumberProcessors    00000001
BugCheckCode        0000008e
BugCheckParameter1  c0000005
BugCheckParameter2  80568ecc
BugCheckParameter3  f38f61a0
BugCheckParameter4  00000000
PaeEnabled          00000000
KdDebuggerDataBlock 8054e260
SecondaryDataState  00000000
ProductType         00000001
SuiteMask           00000110

SUMMARY_DUMP32:
DumpOptions         504d4453
HeaderSize          00003000
BitmapSize          0000ff00
Pages               00003896
Bitmap.SizeOfBitMap 0000ff00

KiProcessorBlock at 8055b520
  1 KiProcessorBlock entries:
  ffdff120


Parent+: 0x0000--->	Child: 0x0004	ActiveThreads->0070	System
Parent+: 0x0004--->	Child: 0x0198	ActiveThreads->0003	smss.exe
Parent+: 0x0198--->	Child: 0x01c8	ActiveThreads->0010	csrss.exe
Parent+: 0x0198--->	Child: 0x01e0	ActiveThreads->0023	winlogon.exe
Parent+: 0x01e0--->	Child: 0x020c	ActiveThreads->0016	services.exe
Parent+: 0x01e0--->	Child: 0x0218	ActiveThreads->0017	lsass.exe
Parent+: 0x020c--->	Child: 0x02d4	ActiveThreads->0018	svchost.exe
Parent+: 0x020c--->	Child: 0x0314	ActiveThreads->0010	svchost.exe
Parent+: 0x020c--->	Child: 0x0358	ActiveThreads->0086	svchost.exe
Parent+: 0x020c--->	Child: 0x03a0	ActiveThreads->0026	blinksvc.exe
Parent+: 0x020c--->	Child: 0x03d8	ActiveThreads->0013	svchost.exe
Parent+: 0x02d4--->	Child: 0x0400	ActiveThreads->0008	blinkrm.exe
Parent+: 0x020c--->	Child: 0x0514	ActiveThreads->0014	spoolsv.exe
Parent+: 0x020c--->	Child: 0x0560	ActiveThreads->0006	alg.exe
Parent+: 0x020c--->	Child: 0x0598	ActiveThreads->0006	mdm.exe
Parent+: 0x020c--->	Child: 0x05c0	ActiveThreads->0002	tcpsvcs.exe
Parent+: 0x020c--->	Child: 0x05e0	ActiveThreads->0005	snmp.exe
Parent+: 0x020c--->	Child: 0x0658	ActiveThreads->0004	wdfmgr.exe
Parent+: 0x020c--->	Child: 0x06c8	ActiveThreads->0015	EEYEEVNT.exe
Parent+: 0x0358--->	Child: 0x05a8	ActiveThreads->0008	wuauclt.exe
Parent+: 0x01bc--->	Child: 0x04bc	ActiveThreads->0013	explorer.exe
Parent-: 0x02d4--->	Child: 0x05d4	ActiveThreads->0000	wmiprvse.exe
Parent+: 0x04bc--->	Child: 0x095c	ActiveThreads->0001	hkcmd.exe
Parent+: 0x04bc--->	Child: 0x0964	ActiveThreads->0001	jusched.exe
Parent+: 0x04bc--->	Child: 0x0970	ActiveThreads->0002	reader_sl.exe
Parent+: 0x04bc--->	Child: 0x0984	ActiveThreads->0001	ctfmon.exe
 この情報は、32ビットWindows XP環境におけるプロセスの起動順序を示しています。「Parent+: 0x0000」プロセスによって起動されたSystemプロセスがまずSMSS(セッションマネージャー)プロセスを起動しています。次に、SMSSプロセスがCSRSSプロセスとwinlogon.exeプロセスを起動するという具合に、プロセス間の親子関係がすっきりしています。この"すっきり"感は、セキュリティー確保の視点からは好ましいことではなく、Windowsバージョンが上がるに従い、消えていきます。以降の文章を読まれる際には、SMSSプロセスとwinlogon.exeプロセスに注目してください。

 Windows 7のプロセスオブジェクトの解析結果は次のようになっています。
64ビットWindows 7


DUMP_HEADER64:
MajorVersion        0000000f
MinorVersion        00001db1
KdSecondaryVersion  00000000
DirectoryTableBase  00000000`00187000
PfnDataBase         fffffa80`00000000
PsLoadedModuleList  fffff800`03c98890
PsActiveProcessHead fffff800`03c7a590
MachineImageType    00008664
NumberProcessors    00000008
BugCheckCode        00000019
BugCheckParameter1  00000000`00000021
BugCheckParameter2  fffffa80`10952000
BugCheckParameter3  00000000`00001040
BugCheckParameter4  922858cc`6c8a01b9
KdDebuggerDataBlock fffff800`03c440d0
SecondaryDataState  00000000
ProductType         00000001
SuiteMask           00000110

SUMMARY_DUMP64:
DumpOptions         504d4453
HeaderSize          0004b000
BitmapSize          00240000
Pages               00030cf1
Bitmap.SizeOfBitMap 00240000

KiProcessorBlock at fffff800`03d02c40
  8 KiProcessorBlock entries:
  fffff800`03c45e80 fffff880`009e8180 fffff880`03364180 fffff880`033d5180 
  fffff880`009b2180 fffff880`034a4180 fffff880`03515180 fffff880`03586180


Parent+: 0x0000--->	Child: 0x0004	ActiveThreads->0200	System
Parent+: 0x0004--->	Child: 0x01ac	ActiveThreads->0003	smss.exe
Parent+: 0x01f4--->	Child: 0x023c	ActiveThreads->0010	csrss.exe
Parent+: 0x01ac--->	Child: 0x02ac	ActiveThreads->0018	psxss.exe
Parent+: 0x02b4--->	Child: 0x02c0	ActiveThreads->0011	csrss.exe
Parent+: 0x01f4--->	Child: 0x02cc	ActiveThreads->0003	wininit.exe
Parent+: 0x02cc--->	Child: 0x02f8	ActiveThreads->0009	services.exe
Parent+: 0x02cc--->	Child: 0x0308	ActiveThreads->0007	lsass.exe
Parent+: 0x02cc--->	Child: 0x0310	ActiveThreads->0010	lsm.exe
Parent+: 0x02b4--->	Child: 0x0330	ActiveThreads->0003	winlogon.exe
Parent+: 0x02f8--->	Child: 0x03a4	ActiveThreads->0012	svchost.exe

[---]

Parent+: 0x2108--->	Child: 0x2004	ActiveThreads->0023	ArcOSBrowser.e
Parent+: 0x192c--->	Child: 0x0d50	ActiveThreads->0005	crypticError.e
Parent+: 0x1178--->	Child: 0x1948	ActiveThreads->0014	iexplore.exe
Parent+: 0x1948--->	Child: 0x1a34	ActiveThreads->0031	iexplore.exe
Parent+: 0x1948--->	Child: 0x23a0	ActiveThreads->0034	iexplore.exe
Parent+: 0x14e4--->	Child: 0x234c	ActiveThreads->0005	crypticError.e
Parent+: 0x1f8c--->	Child: 0x17ec	ActiveThreads->0061	GameClient.exe
 「Parent+: 0x01f4」や「Parent+: 0x02b4」などの親なしプロセスが追加投入され、Windows XP時代と比較すると、親子関係が不明瞭になっています。また、複数のブラウザー(iexplore.exe)プロセスが親子関係を形成しながら動作している点にも注目です。この点は後ほど、Google社のChromeブラウザーを取り上げる箇所で再度触れることになります。

 Windows 8.1のプロセスオブジェクトの解析結果は次のようになっています。
64ビットWindows 8.1


DUMP_HEADER64:
MajorVersion        0000000f
MinorVersion        00002580
KdSecondaryVersion  00000000
DirectoryTableBase  00000001`bea5e000
PfnDataBase         fffffa80`00000000
PsLoadedModuleList  fffff801`68956350
PsActiveProcessHead fffff801`6893c0a0
MachineImageType    00008664
NumberProcessors    00000004
BugCheckCode        00000133
BugCheckParameter1  00000000`00000000
BugCheckParameter2  00000000`00000501
BugCheckParameter3  00000000`00000500
BugCheckParameter4  00000000`00000000
KdDebuggerDataBlock fffff801`68923a20
SecondaryDataState  00000000
ProductType         00000001
SuiteMask           00000310
Attributes          00000000

BITMAP_DUMP:
DumpOptions         00000000
HeaderSize          48000
BitmapSize          22f200
Pages               368e8

KiProcessorBlock at fffff801`689e0d40
  4 KiProcessorBlock entries:
  fffff801`68972180 ffffd001`30bd4180 ffffd001`30d50180 ffffd001`30dce180


Parent+: 0x0000--->	Child: 0x0004	ActiveThreads->0149	System
Parent+: 0x0004--->	Child: 0x0150	ActiveThreads->0002	smss.exe
Parent+: 0x01f4--->	Child: 0x0208	ActiveThreads->0009	csrss.exe
Parent+: 0x01f4--->	Child: 0x0288	ActiveThreads->0001	wininit.exe
Parent+: 0x0288--->	Child: 0x02f4	ActiveThreads->0004	services.exe
Parent+: 0x0288--->	Child: 0x02fc	ActiveThreads->0006	lsass.exe
Parent+: 0x02f4--->	Child: 0x0354	ActiveThreads->0019	svchost.exe
Parent+: 0x02f4--->	Child: 0x0388	ActiveThreads->0015	svchost.exe
Parent+: 0x02f4--->	Child: 0x0124	ActiveThreads->0002	nvvsvc.exe
Parent+: 0x02f4--->	Child: 0x0184	ActiveThreads->0025	svchost.exe

[---]

Parent+: 0x02f4--->	Child: 0x15b8	ActiveThreads->0010	iPodService.ex
Parent+: 0x1ccc--->	Child: 0x0130	ActiveThreads->0013	csrss.exe
Parent+: 0x1ccc--->	Child: 0x0af4	ActiveThreads->0002	winlogon.exe

[---]

Parent+: 0x1d40--->	Child: 0x16d0	ActiveThreads->0002	rundll32.exe
Parent+: 0x1d40--->	Child: 0x1140	ActiveThreads->0041	chrome.exe
Parent+: 0x1d40--->	Child: 0x0e78	ActiveThreads->0001	googledrivesyn
Parent+: 0x1d40--->	Child: 0x0a24	ActiveThreads->0006	ScanToPCActiva
Parent+: 0x1d40--->	Child: 0x06c4	ActiveThreads->0027	GROOVE.EXE
Parent+: 0x1140--->	Child: 0x1468	ActiveThreads->0007	chrome.exe
Parent+: 0x1280--->	Child: 0x1050	ActiveThreads->0002	PDVD10Serv.exe
Parent+: 0x1140--->	Child: 0x185c	ActiveThreads->0010	chrome.exe
Parent+: 0x1140--->	Child: 0x18d0	ActiveThreads->0010	chrome.exe
Parent+: 0x1140--->	Child: 0x0fc4	ActiveThreads->0011	chrome.exe
Parent+: 0x1140--->	Child: 0x0eb4	ActiveThreads->0011	chrome.exe
Parent+: 0x1140--->	Child: 0x1680	ActiveThreads->0015	chrome.exe
Parent+: 0x1140--->	Child: 0x1ec8	ActiveThreads->0012	chrome.exe
Parent+: 0x1140--->	Child: 0x13f4	ActiveThreads->0012	chrome.exe
Parent+: 0x1140--->	Child: 0x0f68	ActiveThreads->0012	chrome.exe
Parent+: 0x1140--->	Child: 0x0624	ActiveThreads->0012	chrome.exe
Parent+: 0x1140--->	Child: 0x139c	ActiveThreads->0012	chrome.exe
Parent+: 0x1280--->	Child: 0x02d8	ActiveThreads->0001	jusched.exe
Parent+: 0x1140--->	Child: 0x177c	ActiveThreads->0013	chrome.exe
Parent+: 0x1140--->	Child: 0x10d8	ActiveThreads->0012	chrome.exe
Parent+: 0x1140--->	Child: 0x1e1c	ActiveThreads->0017	chrome.exe
Parent+: 0x1140--->	Child: 0x0298	ActiveThreads->0010	chrome.exe
Parent+: 0x1280--->	Child: 0x1d28	ActiveThreads->0007	iTunesHelper.e
Parent+: 0x1280--->	Child: 0x0824	ActiveThreads->0001	hpwuschd2.exe
Parent+: 0x1140--->	Child: 0x157c	ActiveThreads->0001	cmd.exe
Parent+: 0x157c--->	Child: 0x1ecc	ActiveThreads->0002	conhost.exe
Parent+: 0x157c--->	Child: 0x108c	ActiveThreads->0004	coNatHst.exe
Parent+: 0x1140--->	Child: 0x1f20	ActiveThreads->0002	nacl64.exe
Parent+: 0x1f20--->	Child: 0x187c	ActiveThreads->0016	nacl64.exe
Parent+: 0x0e78--->	Child: 0x10b8	ActiveThreads->0028	googledrivesyn
Parent+: 0x02bc--->	Child: 0x1af8	ActiveThreads->0005	RAVBg64.exe
Parent+: 0x02bc--->	Child: 0x1730	ActiveThreads->0006	RAVCpl64.exe
Parent+: 0x0354--->	Child: 0x0a34	ActiveThreads->0036	glcnd.exe
Parent+: 0x0354--->	Child: 0x035c	ActiveThreads->0006	SettingSyncHos
Parent+: 0x1140--->	Child: 0x1734	ActiveThreads->0009	chrome.exe
Parent+: 0x1140--->	Child: 0x1e80	ActiveThreads->0019	chrome.exe
Parent+: 0x1140--->	Child: 0x07f8	ActiveThreads->0009	chrome.exe
Parent+: 0x06c4--->	Child: 0x0620	ActiveThreads->0024	MSOSYNC.EXE
Parent+: 0x1154--->	Child: 0x1f98	ActiveThreads->0006	SearchProtocol
Parent+: 0x1154--->	Child: 0x1d00	ActiveThreads->0005	SearchFilterHo
Parent+: 0x0184--->	Child: 0x0e14	ActiveThreads->0005	audiodg.exe
Parent+: 0x0354--->	Child: 0x1840	ActiveThreads->0043	WWAHost.exe
 csrssプロセスとwininitプロセスは、Windows XP時代と異なり、SMSSプロセスではなく、「Parent+: 0x01f4」プロセスにより起動され、親子関係が不明瞭になっています。この親子関係のボカシはWindows 7から開始され、Windows 8.1に引き継がれています。また、先のWindows 7の場合と同様、複数のブラウザー(Chrome)プロセスが親子関係を形成しながら動作している点にも注目です。Google社はChromeのSandbox化を強力に推進し、ブラウザー市場における首位の座に着いているといわれます。

 Windows 10のプロセスオブジェクトの解析結果は次のようになっています。
64ビットWindows 10


DUMP_HEADER64:
MajorVersion        0000000f
MinorVersion        00002800
KdSecondaryVersion  00000000
DirectoryTableBase  00000000`26c49000
PfnDataBase         fffffa80`00000000
PsLoadedModuleList  fffff802`2973f030
PsActiveProcessHead fffff802`29739380
MachineImageType    00008664
NumberProcessors    00000002
BugCheckCode        000000d1
BugCheckParameter1  ffffc001`cd97b010
BugCheckParameter2  00000000`00000002
BugCheckParameter3  00000000`00000000
BugCheckParameter4  fffff800`9d9c1385
KdDebuggerDataBlock fffff802`29723b20
SecondaryDataState  00000000
ProductType         00000001
SuiteMask           00000110
Attributes          00000000

BITMAP_DUMP:
DumpOptions         00000000
HeaderSize          2b000
BitmapSize          140000
Pages               1d36b

KiProcessorBlock at fffff802`297e02c0
  2 KiProcessorBlock entries:
  fffff802`2977d180 ffffd001`5cc55180


Parent+: 0x0000--->	Child: 0x0004	ActiveThreads->0144	System
Parent+: 0x0004--->	Child: 0x0144	ActiveThreads->0002	smss.exe
Parent+: 0x01f0--->	Child: 0x01f8	ActiveThreads->0011	csrss.exe
Parent+: 0x01f0--->	Child: 0x024c	ActiveThreads->0002	wininit.exe
Parent+: 0x024c--->	Child: 0x02b4	ActiveThreads->0005	services.exe
Parent+: 0x024c--->	Child: 0x02c8	ActiveThreads->0009	lsass.exe
Parent+: 0x02b4--->	Child: 0x0318	ActiveThreads->0019	svchost.exe
Parent+: 0x02b4--->	Child: 0x0350	ActiveThreads->0012	svchost.exe
Parent-: 0x02b4--->	Child: 0x03a0	ActiveThreads->0000	sppsvc.exe
Parent+: 0x02b4--->	Child: 0x01b0	ActiveThreads->0023	svchost.exe

[---]

Parent+: 0x1a80--->	Child: 0x03dc	ActiveThreads->0012	csrss.exe
Parent+: 0x1a80--->	Child: 0x140c	ActiveThreads->0005	winlogon.exe
Parent+: 0x140c--->	Child: 0x1cc4	ActiveThreads->0008	dwm.exe
Parent+: 0x0130--->	Child: 0x0b70	ActiveThreads->0010	sihost.exe
Parent+: 0x0130--->	Child: 0x0e7c	ActiveThreads->0011	taskhostw.exe
Parent-: 0x140c--->	Child: 0x0d3c	ActiveThreads->0000	userinit.exe
Parent+: 0x0d3c--->	Child: 0x0614	ActiveThreads->0053	explorer.exe
Parent+: 0x0318--->	Child: 0x14a4	ActiveThreads->0017	RuntimeBroker.

[---]
 Windows 7から導入された重要プロセスの親子関係の不明瞭化はWindows 8.1からWindows 10へもそのまま継承されています。ただ、Windows 10の時代に入り、OSとクラウドとの連携が強化され、Windowsカーネル内部の更新タイミングをまったく予測できなくなりました。その上、更新背景の技術的な説明は、いろいろな事情と理由から、ほとんど公開されなくなりました。同じWindows 10と一口に言っても、ビルド番号や適応パッチに応じて異なるカーネル層が用意されています。たとえば、smss.exeプロセスが別のsmss.exeプロセスを起動し、サンドボックス化が進められています(「Windows XP/7/8/10のセッションとプロセス」参照)。


「Windowsメモリダンプ解析サービス」のご案内
Windowsメモリダンプ解析技術

Copyright©豊田孝 2004- 2024
本日は2024-04-25です。