Microsoft
Windows8
Internals,
Sixth
Edition,
Part 1
Mark
Russinovich
David
A.
Solomon
Contents
Windows
Internals,
Sixth
Edition,
Part i
Introduction xvii
Chapter
1Concepts
and Tools 1Windows
Operating
SystemVersions 1 FoundationConcepts
and Terms 2WindowsAPI 2
Services, Functions, and Routines 4 Processes,Threads,and Jobs 5 Virtual
Memory
15 Kernel Modevs.UserMode 17 TerminalServicesandMultiple Sessions 20Objects
and Handles 21Security
22Registry
23Unicode 24
Digging into Windows Internals 24 Performance Monitor 25 Kernel
Debugging
26 Windows SoftwareDevelopmentKit 31 Windows Driver Kit 31Sysintemals
Tools 32Conclusion 32
Chapter
2System
Architecture
33Requirements
and DesignGoals 33Operating System
Model 34 Architecture Overview 35Portability
37Symmetric Multiprocessing
38 What do youthinkof thisbook?We want to hearfrom you!Microsoft is interested inhearingyourfeedbackso we cancontinually improveourbooks andlearningresourcesfor you. Toparticipateinabrief onlinesurvey,pleasevisit:
Scalability
40Differences Between Clientand Server Versions 41 Checked Build 45
Key System Components
46 Environment Subsystems andSubsystem
DLLs 48Ntdil.dll 53
Executive 54
Kernel 57
Hardware Abstraction Layer 60 Device Drivers 63
System
Processes 68Conclusion 78
Chapter
3System
Mechanisms79
Trap
Dispatching
79Interrupt Dispatching
81 TimerProcessing 112Exception Dispatching
123System
ServiceDispatching
132Object
Manager I40Executive
Objects
143Object
Structure 145Synchronization
176High-IRQL Synchronization
178Low-IRQL
Synchronization
183System
WorkerThreads 205 WindowsGlobalFlags
207 Advanced Local ProcedureCall 209 Connection Model 210MessageModel 211
Asynchronous Operation
213Views, Regions,and Sections 214
Attributes 215
Blobs, Handles,and Resources 215
Security
216Performance 2^
Debugging
andTracing
218Kernel Event
Tracing
220Wow64 224
Wow64Process AddressSpace Layout 224
System
Calls 225Exception
Dispatching
225UserAPC
Dispatching
225Console Support 225
UserCallbacks 226 File
System
Redirection 226Registry
Redirection 227I/O Control
Requests
22716-Bit Installer
Applications
228Printing
228Restrictions 228 User-Mode
Debugging
229KernelSupport 229
Native
Support
230 WindowsSubsystem
Support 232 ImageLoader 232Early
Process Initialization 234 DLL Name Resolution and Redirection 235 Loaded ModuleDatabase 238Import Parsing
242Post-ImportProcessInitialization 243
SwitchBack 244 API Sets 245
Hypervisor (Hyper-V)
248 Partitions 249 Parent Partition 249 Child Partitions 251 Hardware Emulation and Support 254Kernel TransactionManager 268
Hotpatch Support
270Kernel Patch Protection 272 CodeIntegrity 274
Conclusion 276
Chapter
4Management
Mechanisms
277The
Registry
277Viewing
andChanging
theRegistry
277Registry Usage
278Registry Data
Types
279Registry Logical
Structure 280 TransactionalRegistry
(TxR) 287Monitoring
Registry Activity
289Process Monitor Internals 289
Registry
Internals 293Services 305
Service
Applications
305 The Service ControlManager
321 ServiceStartup
323Startup Errors 327
Accepting
the Boot and Last Known Good 328 Service Failures 330 Service Shutdown 331 Shared ServiceProcesses 332 ServiceTags
335 UnifiedBackground
ProcessManager
336 Initialization 337UBPMAP1 338
Provider
Registration
338 ConsumerRegistration
339Task Host 341
Service Control
Programs
341 WindowsManagement
Instrumentation 342Providers 344
The Common Information Model and the
Managed
Object
FormatLanguage
345 Class Association 349 WMIImplementation
351 WMI Security 353Windows
Diagnostic
Infrastructure 354 WDl Instrumentation 354Diagnostic
Policy
Service 354Diagnostic Functionality
356Conclusion ^57
Chapter
5Processes, Threads, and Jobs
359Process Internals 359 Data Structures 359 Protected Processes 368 Flow ofCreateProcess 369
Stage
1:Converting
andValidating
Parameters and Flags 371Stage
2:Opening
the Imageto Be Executed 373Stage
3:Creatingthe Windows Executive ProcessObject {PspAllocateProcess)
376Stage
4:Creating
theInitialThreadand Its Stack andContext 381
Stage
5:Performing
WindowsSubsystem-Specific
Post-Initialization 383
Stage6:
Starting
Execution of the Initial Thread 385Stage
T.Performing
Process Initialization in the Contextof theNewProcess 386 Thread Internals 391 Data Structures 391 Birth ofaThread 398
ExaminingThread Activity 398 LimitationsonProtected Process Threads 401
Worker Factories(Thread Pools) 403 Thread
Scheduling
408 Overview of WindowsScheduling
408PriorityLevels 410 Thread States 416
Dispatcher
Database 421 Quantum 422 PriorityBoosts 430 ContextSwitching
448Scheduling
Scenarios 449 IdleThreads 453 Thread Selection 456Multiprocessor Systems
458Thread Selection on
Multiprocessor Systems
467Processor Selection 468 Processor Share-Based
Scheduling
470 Distributed Fair ShareScheduling
471 CPURate Limits 478Dynamic
ProcessorAddition andReplacement
479 JobObjects
480 Job Limits 481 Job Sets 482 Conclusion 485Chapter
6
Security
487Security Ratings
487 TrustedComputer System
Evaluation Criteria 487 The CommonCriteria 489Security System Components
490Protecting Objects
494 Access Checks 495Security
Identifiers 497 Virtual Service Accounts 518Security
Descriptorsand Access Control 522The AuthZAPI 536
Account
Rights
andPrivileges
538 AccountRights
540Privileges
540Super Privileges
546 Access Tokens of Processes and Threads 547Security Auditing
548Object
AccessAuditing
549 Global AuditPolicy
552Advanced Audit
Policy
Settings
554Logon 555
Winlogon
Initialization 556 UserLogon Steps 558 Assured Authentication 562Biometric FrameworkforUserAuthentication 563 UserAccount Control and Virtualization 566
File
System
andRegistry
Virtualization 566Elevation 573
Application
Identification(AppID)
581AppLocker
583Software Restriction Policies 589
Chapter
7Networking
591Windows
Networking
Architecture 591The OSI ReferenceModel 592 Windows
Networking
Components
594Networking
APIs 597 WindowsSockets 597 Winsock Kernel 603 RemoteProcedureCall 605 Web Access APIs 610 NamedPipes
and Mailslots 612NetBIOS 618
Other
Networking
APIs 620Multiple Redirector
Support
627Multiple
Provider Router 627Multiple
UNCProvider 630Surrogate
Providers 632Redirector 633
Mini-Redirectors 634 Server
Message
Block and Sub-Redirectors 635DistributedFile
System Namespace
637Distributed File
System
Replication 638 Offline Files 639Caching
Modes 641 Ghosts 643 DataSecurity
643 Cache Structure 643 BranchCache 645Caching
Modes 647BranchCache
Optimized Application
Retrieval:SMB
Sequence
651BranchCache
Optimized Application
Retrieval:HTTPSequence 653 Name Resolution 6^5
Domain Name
System
655 Peer Name Resolution Protocol 656 Location andTopology
658 Network Location Awareness 658Network
Connectivity
Status Indicator 659Link-Layer Topology
Discovery 662Protocol Drivers 663
Windows
Filtering
Platform 666 NDIS Drivers 672 Variationsonthe NDISMiniport
677Connection-Oriented NDIS 677
Remote NDIS 680
QoS
682Binding
684Layered
Network Services 685RemoteAccess 685 Active
Directory
686 Network LoadBalancing
688 Network Access Protection 689 Direct Access 695Conclusion 696