Presentation is loading. Please wait.

Presentation is loading. Please wait.

深入 Windows Server 2008 系統核心 曹祖聖 台灣微軟資深講師

Similar presentations


Presentation on theme: "深入 Windows Server 2008 系統核心 曹祖聖 台灣微軟資深講師"— Presentation transcript:

1 深入 Windows Server 2008 系統核心 曹祖聖 台灣微軟資深講師 jimycao@syset.com
<SLIDETITLE INCLUDE=7>Windows Server 2008 應用程式相容性</SLIDETITLE> <KEYWORDS></KEYWORDS> <KEYMESSAGE></KEYMESSAGE> <SLIDEBUILDS>0</SLIDEBUILDS> <SLIDESCRIPT> Hello and Welcome to this Microsoft TechNet session on {insert session title}. My name is {insert name} </SLIDESCRIPT> <SLIDETRANSITION> <TRANSITION LENGTH=7>Let us start this session by going into more detail on exactly what we will be covering.</TRANSITION> </SLIDETRANSITION> <COMMENT></COMMENT> <ADDITIONALINFORMATION> <ITEM></ITEM> </ADDITIONALINFORMATION> 曹祖聖 台灣微軟資深講師 MCP, MCP+I, MCSA, MCSE,MCDBA, MCAD, MCSD, MCT, MVP

2 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

3 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

4 核心的重大改變 Windows Server 2008 同時有 32 位元與 64 位元版本
12/25/2018 4:54 PM Windows Server 2008 同時有 32 位元與 64 位元版本 64 位元版本包含了: x64 (AMD64, Intel 64) i64 (Itanium) 這也是最後一版的 32 位元 Windows Server 作業系統 Windows Server 2008 R2 只會有 64 位元版 ! 在 Windows Server 2008 中,單處理器核心與多處理器核心已經沒有差異 多處理器伺服器已經成為主流 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

5 Dynamic Partitioning 在過去,伺服器硬體的升級或維護,往往需要重新開機,造成停機時間增加
12/25/2018 4:54 PM 在過去,伺服器硬體的升級或維護,往往需要重新開機,造成停機時間增加 Windows Server 2008 透過硬體支援,減少因為硬體升級或維護造成的重新開機的次數 Hot plug PCI Express 在 Windows Server 上可以透過硬體廠商的工具來進行熱插拔 記憶體熱插拔 處理器熱插拔 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

6 硬體錯誤報告 在過去,硬體的錯誤並沒有一個標準的管道進行回報
沒有任何硬體錯誤回報的標準 核心中並沒有一套收集與回報硬體錯誤的機制 Windows Server 2008 內建硬體錯誤報架構 Windows Hardware Error Architecture (WHEA) 透過外掛支援各類型的硬體錯誤標準 所有錯類型使用一致的錯誤格式 方便查詢錯誤來源

7 Virtualization Platform and Management
Windows 虛擬化技術 12/25/2018 4:54 PM Management tools VM 2 “Child” VM 1 “Parent” *********************************************************** SCRIPT Windows Virtualization consists on a solution for virtualized environments that will be integrated into Windows Server “Longhorn”. It consists of a Windows Hypervisor, which is a thin layer on the OS dedicated to take advantage of the functionalities offered by hardware virtualization technology, like Intel VT and AMD-V. The Virtual Machines will then run on the Hypervisor. This means, instead of running an application that simulates the Virtual Machines, they will have a more direct interaction with the OS and, consequently, with the hardware. This will significantly improve the performance of your Virtual Machines. Microsoft is expecting this to promote virtualization. So, in order to reach new levels of virtualization the management capabilities have to match technology improvements. On top of all this we will have the entire family of System Center Management solutions, and, in particular for the virtualization technology, the System Center Virtual Machine Manager. POTENTIAL QUESTIONS NOTES Virtualization Platform and Management Windows Hypervisor Windows 平台中內建的虛擬技術 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

9 時間統計 在過去,使用內部的計時器來計算 CPU 時間 執行序的執行時間並不是完全公平 時間片斷間隔
ms 執行序的執行時間並不是完全公平 執行序最少會取得幾乎不到一個回合的時間, 最多三個回合的時間 執行序執行過程中被中斷的時間,仍然算到該執行序的時間 T1 & T2 等待執行; T1 開始執行 閒置 T1 T2 時間片斷間隔

10 Time Stamp Counter (TSC)
Windows Server 2008 會讀取 Time Stamp Counter (TSC),做為切換執行序的依據 執行序真正消耗的 CPU 週期才會被計算 被中斷的時間不算 允許更為精確的時間分配與計算 執行序最少會取得一個回合的時間,最多一個回合的時間 + 1 tick 更為精確的計算執行序真正執行的時間 閒置 T1 T1 T2 時間片斷間隔

11 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

12 I/O Completion Port 在過去,每一個 I/O 的完成,都會回傳資訊給發出 I/O 要求的執行序,造成過多的 context switch 會造成延遲狀態 (如果執行序無法立即處理回應) I/O completion ports 允許執行序更有效率的等待多重 I/O 要求的完成 已完成的 I/O 動作會佇列在 completion port 可一次回傳多個 I/O 的結果 Windows Server 2008 只有在執行序去取得 completion port 時,才會做 context switch 減少 context switch 的次數,增加效能

13 I/O 優先權 背景的 I/O (例如:病毒掃瞄、磁碟重組、…) 會造成前景的應用程式反應變慢
在過去,只能在執行序的 CPU 優先權上做調整 Windows Server 2008 提供兩類的 I/O 優先權設定: I/O 優先權 I/O 頻寬保留 I/O 優先權的功能在 ATAPI 和 USB 儲存裝置驅動程式中實作

14 I/O 優先權 I/O 優先權是基於發出 I/O 要求的執行序本身的優先權,也可以明確指定 I/O 的優先權
五個等級: Critical, High, Normal, Low, Very Low High 和 Low 這兩個等級沒有實作 Critical 只被用於記憶體管理員 儲存在 I/O Request Packet (IRP) 的欄位中 行程或執行序可以透過呼叫 API 來降低 I/O 優先權 Windows Server 2008 背景工作會使用到,例如索引、Windows Defender 掃瞄

15 Idle I/O Priority Queue Hierarchy Priority Queue
在驅動程式等級 (IDE, SCSI) 實作 idle I/O priority ,每秒鐘送出一次的 I/O 要求 其它等級 (hierarchy priority) 由 ATA 與 USB 驅動程式管理 應用程式 儲存裝置 檔案系統 磁碟分割 裝置驅動程式 Command Port User mode Kernel mode Idle I/O Priority Queue Hierarchy Priority Queue

16 支援 I/O 取消功能 在過去,I/O 的開啟是不能取消的
例如,打開開啟舊檔的對話方塊來瀏覽網路共用資料夾,但是網路連線中斷,對話方塊會停住不動,直到網路逾時為止 在 Windows Server 2008 中,I/O 的開啟與其它同步的 I/O 動作都是可以取消的 Windows Server 2008 的檔案開啟與儲存對話方塊會實作這個功能 伺服器端應用程式可以針對 I/O 實作取消功能,減少前端的逾時等待時間

17 自我修復 NTFS 檔案系統 在過去,NTFS 發生問題時,必須透過執行 chkdsk 來進行檢查與修復,但是常常需要重新開機
在 Windows Server 2008 中,當系統偵測到有 NTFS 檔案或資料夾發生問題時,NTFS 工作執行序 (worker thread) 會在背景進行像 chkdsk 一樣的修復動作 不嚴重的磁碟問題在背景就處理掉了,根本不會影響使用者 只有發生問題的檔案或資料夾無法存取 (在修復過程中),不像以前的系統在修復時會將整個磁碟鎖住 不需要重新開機

18 檔案符號連結 在過去,NTFS 只支援目錄符號連結 Windows Vista 的 NTFS 磁碟支援檔案符號連結
類似 UNIX 系統中 ln –s 所做的動作 有點像磁碟分割區的掛載 使用 CreateSymbolicLink API 或 mklink.exe 工具 需要 “Create Symbolic Links” 權限 mklink.exe 也可以建立永久連結 (hard link)

19 SMB2 通訊協定 SMB 是過去 Windows 網路中用來存取遠端檔案的通訊協定
無法整合新的 NTFS 功能 並不是設計用來傳輸大型的遠端檔案 SMB2 內建在 Windows Vista 與 Windows Server 2008 支援 NTFS 用戶端符號連結 所有操作可以批次處理,減少 client/server 之間的來回 支援更大的暫存大小,比以前增加 30 到 40 倍的傳輸量

20 mklink.exe 二○一八年十二月二十五日
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

21 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

22 動態的系統虛擬位址空間 在過去,系統虛擬位址空間區分成固定的區域
未分頁集區、已分頁集區、系統分頁表 在 32 位元 Windows Server 2008 中,系統記憶體空間可以視需要指派 允許更大的未分頁、已分頁、Session 集區 支援更大的終端機伺服器、更大的堆積記憶體 在 32 位元系統上,仍然不能使用超過 2GB 的空間 系統虛擬記憶體空間的改進: 核心分頁表是動態配置,而不再是開機時配置 減少核心堆疊的使用,以允許在終端機伺服器上有更多的使用者 堆積區可以動態擴展大小,而不需要重新開機 在 64 位元的 Windows Server 2008 中,各區域的記憶體位址空間都設定到最大

23 記憶體效能與擴展性 磁碟使用更有效率 更有效率的使用 Translation Lookaside Buffer (TLB)
讀取次數減少、讀取量增大 (分頁錯誤、系統快取預讀功能) 不再有 64 KB 的限制,可以做大區塊的 I/O 存取 分頁檔可以使用更大的叢集大小 I/O 次數減少 減少分頁檔碎裂的狀況 更有效率的使用 Translation Lookaside Buffer (TLB) 支援 Superfetch™ 功能 支援 NUMA

24 非統一記憶體存取 (NUMA ) 使用 SMP 時,所有記憶體存取都會公佈到相同共用記憶體匯流排 愈來愈多的應用程式使用 NUMA
這適合只有少數幾個 CPU 的時候使用 當有幾十個甚至幾百個 CPU 爭相存取共用記憶體匯流排時,效率會很差 愈來愈多的應用程式使用 NUMA Non-Uniform Memory Access (NUMA)

25 非統一記憶體存取 (NUMA ) 硬體的趨勢已走向可提供多個系統匯流排 而每一個匯流排都可服務一小組處理器 (節點)
每一節點都有自己的記憶體,或自己的 I/O 通道 I/O 系統直接將中斷繫結到指定的節點 存取本機記憶體會比取與其他 NUMA 節點相關聯的記憶體更快 與目前執行之執行緒的 CPU 位於相同節點上的記憶體 本機記憶體 不屬於目前執行之執行緒節點的記憶體  外部記憶體 (遠端端記憶體)

26 非統一記憶體存取 (NUMA ) Windows Server 2008
每一個節點在 nonpaged pool 中使用互相不重覆的位址 每一個節點都可以引用所有的分頁 系統 PTE (Page Table Entry),系快取的分頁表配置會平均分散到各個節點 硬體與軟體 NUMA 支援新的 NUMA APIs,允許應用程式指定節點數量 (記憶體配置、檔案對應) I/O 系統直接將中斷繫結到指定的節點

27 NUMA 記憶體配置 執行緒 T 被安排到另一個節點,但是記憶體卻是指到指定的節點,這會產生軟分頁錯誤 (soft page fault)
節點 #1 節點 #2 記憶體 記憶體 CPU 0 CPU 1 CPU 4 CPU 5 T 理想的 CPU CPU 2 CPU 3 CPU 6 CPU 7 理想的節點

28 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

29 新的開機環境 – 支援 UEFI 使用 Boot Configuration Database (BCD) 取代 boot.ini
12/25/2018 4:54 PM 新的開機環境 – 支援 UEFI x64 Windows Server 2008 支援透過 UEFI 2.0 開機 IA-64 同時支援 EFI 1.1 和 UEFI 2.0 使用 Boot Configuration Database (BCD) 取代 boot.ini 抽象的韌體 統一不同作業系統的安裝 使用 Unicode 字串 BCD 儲存在系統機碼中 二進位格式 \Boot\BCD 載入 HKLM\BCD 機碼受到安全性保護 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

30 Session 平行建立 在過去,session 的建立是依序進行的 Windows Server 2008:
Session Manager (SMSS) 為每個 session 建立 Winlogon 和 Csrss 行程 是 Terminal Services 的瓶頸所在 Winlogon 建立 Local 安全性 Authority (Lsass.exe) 以及 Service Control Manager (Services.exe) Windows Server 2008: SMSS 會建立新的執行個體來初始化每一個 session 支援平行 session 建立的功能 最小的平行 session 啟動是 4 個 最大值是 CPU 的數目 Session 0 的 SMSS 執行 Wininit.exe (新元件) Wininit 負責啟動原本 Winlogon 要啟動的服務、Lsass、… 也負責啟動 Local Session Manager (Lsm.exe) Session 1-n 的 SMSS 負責建立 該 session 的 csrss.exe 和 winlogon.exe

31 完整的服務關閉 在過去,服務沒有任何方式可以延長關機的時間
在固定逾時時間 (預設是 20 秒) 之後,SCM 就會被終止執行,然後系統就當機 (當服務還在執行時) 對於需要將快取資料寫入磁碟的服務來說是一個大問題 Windows Server 2008 的服務可以要求關機通知,並且要求足夠的時間來關機 SCM 會通知這些服務 SCM 接下來會等待這些服務進入停止狀態 預設逾時時間是 3 分鐘 服務可以進一步延長時間 在所有 pre-shutdown 服務都停止之後,剩下的服務就照原本 Windows XP 的方式進行關機

32 服務關閉的順序 在過去,服務無法指定關閉的順序 Windows Server 2008 的服務可以指定關閉順序
但是有些服務有關閉的順序問題 必須自行解決 Windows Server 2008 的服務可以指定關閉順序 使用 SERVICE_ACCEPT_PRESHUTDOWN 來呼叫 SetServiceStatus API 服務的名稱必須列在: HKLM\System\CurrentControlSet\Control\ PreShutdownOrder 例如: Wuauserv (Windows Update Service) 順序高於 Gpsvc (Group Policy Client Service) WindowsUpdate 更新完成後,才會套用群組原則

33 Session 0 Isolation 二○一八年十二月二十五日 WinInit WinLogon LogonUI
LSA RCM WinInit Profiles SCM Group Policy Other Sessions WinLogon LogonUI Credential Provider 1 Credential Provider 2 Credential Provider 3 © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

34 服務延遲啟動 - DelayAutoStart
二○一八年十二月二十五日 服務延遲啟動 - DelayAutoStart © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

35 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

36 Kernel Transaction Manager (KTM)
在過去,應用程式很難修復因為修改檔案或系統機碼所造成的錯誤 Windows Server 2008 實作了核心交易管理員 (KTM) 所有的變更都可以透過交易來控制 其它廠商可以進一步延伸這個功能到其它資源管理員上 核心交易管理員會負責協調應用程式與資源管理員的交易 系統機碼與 NTFS 都支援這項功能 Windows Update 和 System Protection 都使用這項功能 透過 DTC 與其它資料來源進行交易處理 Windows Server 2003 R2 開始就支援 Common Log File System (Clfs.sys) 提供有效率的交易記錄

37 Windows 錯誤報告 在過去,例外處理是在產生例外的行程中執行
如果行程的堆疊嚴重損毀,就會死的不明不白 Windows Server 2008 會將例外訊息交由 Windows Error Reporting (WER) 服務來處理 WER 啟動 Werfault.exe (取代之前的 Dwwin.exe) 所有行程 crash 都能夠完整記錄並回報

38 Improved Crash Dump Support
在過去,在系統啓動早期發生的 crash 並不不能產生 crash dump 檔 Crash dumps 被寫到分頁檔 可是在核心初始化之後,Smss 行程尚未開啓分頁檔 現在,分頁檔會先開啓,然後再做驅動程式初始化 因此驅動程式造成的 crash 是可以被 dump 下來的 記憶體傾印 過去: 完整 現在: 核心

39 磁碟陰影複製 在過去 Windows Server 2008 使用磁碟陰影複製來做系統還原與以前的版本
無法還原檔案修改或意外刪除 系統還原只能保護已知的系統檔案或機碼 Windows Server 2008 使用磁碟陰影複製來做系統還原與以前的版本 過去只能使用在共用資料夾上 統一資料檔案與系統檔案的保護機制 使用 KTM 來維護跨磁碟快照的一致性 快照每天產生一份,或者在建立系統還原點時也會產生一份快照

40 硬體診斷 減少因磁碟損毀所造成的資料遺失 把原本不可預期的磁碟錯誤變成可預先規劃的 磁碟錯誤診斷
二○一八年十二月二十五日 磁碟錯誤診斷 減少因磁碟損毀所造成的資料遺失 把原本不可預期的磁碟錯誤變成可預先規劃的 Windows Disk Diagnostics <SLIDETITLE INCLUDE=7>Hardware Diagnostics</SLIDETITLE> <KEYWORDS></KEYWORDS> <KEYMESSAGE>Windows Server 2008 Reliability: Built-in Diagnostics</KEYMESSAGE> <SLIDEBUILDS>2</SLIDEBUILDS> <SLIDESCRIPT> Windows Server 2008 can self-diagnose a number of common problems, including failing hard disks, memory problems, and networking issues. [BUILD1] Regarding disk failure diagnostics we want to minimize the risk of data loss when the physical disk starts to show signs of failure. We want to turn that unplanned event of the disk just going south and not being able to be read at all into a planned maintenance event where we can tell the user “Hey we think there may be something wrong with your disk. We think it’s a good idea if you go back it up.” Windows Disk Diagnostics detect impending disk failures and guide users through data backup, disk replacement, and data restoration. [BUILD2] For memory diagnostics, our goal is to prevent recurring crashes due to bad RAM. We’ve seen this in our data through Windows error reporting where certain customers will see the same crash over and over and over again or different crashes in different places. But systems will behave very erratically due to having bad memory. Windows Memory Diagnostics work with Microsoft Online Crash Analysis to detect crashes possibly caused by failing memory, prompting the user to schedule a memory test the next time the computer is restarted, and providing guided support. The Windows Server 2008 RAM tester will identify the physical pages of memory that are bad and then tell the operating system not to use those pages on the next reboot. These memory diagnostics are integrated directly into the OS and will have results that are both easy to understand for the end user as well as for IT pros. </SLIDESCRIPT> <SLIDETRANSITION> <TRANSITION LENGTH=1>New technology in Windows Server 2008 can detect deteriorating performance and tune the performance automatically.</TRANSITION> <TRANSITION LENGTH=2>New technology in Windows Server 2008 can detect deteriorating performance and tune the performance automatically.</TRANSITION> <TRANSITION LENGTH=4>New technology in Windows Server 2008 can detect deteriorating performance and tune the performance automatically.</TRANSITION> </SLIDETRANSITION> <COMMENT></COMMENT> <ADDITIONALINFORMATION> <ITEM></ITEM> </ADDITIONALINFORMATION> 記憶體診斷 避免因為記憶體的不穩定所造成的當機 尋找並標示出有問題的記憶體分頁 Windows Memory Diagnostics Microsoft Online Crash Analysis © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

41 記憶體診斷 以前的版本 二○一八年十二月二十五日
© 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

42 大綱 硬體平台支援 行程與執行序 I/O 與檔案系統 記憶體管理 開機與關機 穩定性與系統復原 安全性

43 Address Space Load Randomization (ASLR)
Win2003 #1 Win2003 #2 在過去 核心、HAL、執行檔和 DLLs 檔會被載入固定的記憶體位置 緩衝區溢位的攻擊就是因為系統功能的位址是固定的,所以能夠成功 Windows Server 2008 核心的功能模組會載入到隨機的記憶體位址 (1/256) 作業系統檔案現在包含了重新定位的資訊 每次載入時的記憶體位址都不一樣 使用者堆疊的位址一樣是隨機的 驅動程式、核心、HAL 的位址也是隨機的 Exe Exe User32 User32 Kernel32 Kernel32 NTDLL NTDLL Win2008 #1 Win2008 #2 Exe Exe User32 User32 Kernel32 Kernel32 NTDLL NTDLL

44 Windows Server 2008 服務安全強化 減少高風險層的大小 將服務分區段 層加安全防護層次 二○一八年十二月二十五日
使用者權限 服務安全強化 使用者帳戶控制 低權限服務 <SLIDETITLE INCLUDE=7>Windows Server 2008 Service Hardening</SLIDETITLE> <KEYWORDS></KEYWORDS> <KEYMESSAGE>Contrast Windows Server 2008 安全性 layers</KEYMESSAGE> <SLIDEBUILDS>2</SLIDEBUILDS> <SLIDESCRIPT> Windows service hardening is key to securing Windows Server Comparing this diagram to that of Windows XP, you’ll notice we’ve increased the number of 安全性 layers between the user and the system kernel. The first thing we’ve done is reduced the size of the high-risk layers. This means that the amount of code that has to run at the kernel level has been significantly reduced. Using the printer driver example again, in the past we’ve had printer drivers that had some kernel-mode code, and some user-mode code. What we’re done are things like moving printer drivers into user-mode exclusively so that there’s no kernel code in the drivers themselves. This has been done for a variety of services, and by making sure that services run with the least privilege that they need to have the system becomes more secure. The services that do require high privilege have been segmenting so that there’s some lower privilege code running and some higher privilege code running. We’ll talk more about this in greater detail when we look at Internet Explorer’s protected mode, but you can have components of the operating system that are running with lower privilege and some that are running with higher privilege. Again, the key is reducing the amount of code that is high privilege. Also, by using outbound filtering on the firewall with some other components, applications or operating systems can be profiled when they start such as which network ports they can use, where in the file system they can write, and where in the registry they can write. What does this mean? Let us consider the Blaster Worm that appeared a couple of years ago. It did several different things. First, it exploited a vulnerability in the RPC service and forced RPC to write a file to the file system and also wrote a key to the “run” key registry that made the malware persist once the system restarted. However, RPC shouldn’t be writing to the run key in the registry, and should not be able to write to the file system. With service hardening in Windows Server 2008, when RPC starts it will have a profile of which network ports it can talk on and where it can write in the file system and registry. This is then enforced by the operating system, so that if something like Blaster comes along again in the future, it won’t be able to use RPC or other Windows services to do things that they shouldn’t normally be able to do. In this way, we to prevent malware from propagating rapidly across your network. </SLIDESCRIPT> <SLIDETRANSITION> <TRANSITION LENGTH=1>In this way, we prevent malware from propagating rapidly across your network.</TRANSITION> <TRANSITION LENGTH=2>In this way, we prevent malware from propagating rapidly across your network.</TRANSITION> <TRANSITION LENGTH=4>In this way, we prevent malware from propagating rapidly across your network.</TRANSITION> </SLIDETRANSITION> <COMMENT></COMMENT> <ADDITIONALINFORMATION> <ITEM></ITEM> </ADDITIONALINFORMATION> 管理權限 使用者 帳戶控制 系統服務 S 核心 S S D D D D S 核心驅動程式 系統服務 低權限服務 使用者模式驅動程式 S D D © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

45 服務安全性加強 大部份的服務都會被賦予一個 SID 服務安全強化 服務的權限設定 主動式保護 SID 預設是停用的,當服務 啟動時才會被啟用
用來設定物件的寫入權限 服務的權限設定 在服務的系統機碼設定中 設定 RequiredPrivileges 值 (MULTI_SZ) 服務安全強化 主動式保護 檔案系統 系統機碼 網路

46 Mandatory Integrity Control (MIC)
Token 中有 Mandatory Integrity Level (IL) SIDs Low (100): 保護模式下的 IE Medium (200): LUA 行程 High (300): 提升權限後的行程 System (400): 系統行程 物件的 ILs 儲存在 SACL 中的 IL ACE 行程、執行序、Access Token 中一定有 IL ACE 檔案或機碼如果沒有 IL ACE,IL = Medium 由 IL=Medium (含)以上的行程所建立的物件,IL = Medium 由 IL=Low 的行程 (例如保護模式 IE) 所建立的物件,IL = Low

47 IL 存取檢查 IL 會在 DACL 之前檢查 執行序的 IL 一定要大於等於物件的 IL,才可以修改該物件
執行序可以開啟任何物件進行讀取: 如果該物件不是行程 或者是 IL 等於或小於自已的 IL Windows 子系統也遵守 IL 規則 只有查詢的訊息才可以從 LUA 行程送到提升權限的行程

48 服務權限控管 - sc 指令 - RequiredPrivileges
二○一八年十二月二十五日 服務權限控管 - sc 指令 - RequiredPrivileges © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Server 2008 and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

49 總結 Windows Server 2008 核心在效能、擴展性、穩定性與安全性上都有許多改善 更公平的執行緒執行
更快速有效的 I/O 機制 更大、更有效率的記憶體管理 自我錯誤偵測與修復 更加安全系統核心 作業系統直接支援虛擬化機制

50 在何處取得 TechNet 相關資訊? 訂閱 TechNet 資訊技術人快訊 訂閱 TechNet Plus 參加 TechNet 的活動 下載 TechNet 研討會簡報與錄影檔

51 <SLIDETITLE INCLUDE=0>Tag line</SLIDETITLE>
<KEYWORDS></KEYWORDS> <KEYMESSAGE></KEYMESSAGE> <SLIDEBUILDS>0</SLIDEBUILDS> <SLIDESCRIPT></SLIDESCRIPT> <SLIDETRANSITION> </SLIDETRANSITION> <COMMENT></COMMENT> <ADDITIONALINFORMATION> <ITEM></ITEM> </ADDITIONALINFORMATION>


Download ppt "深入 Windows Server 2008 系統核心 曹祖聖 台灣微軟資深講師"

Similar presentations


Ads by Google