Windows XP Boot Milestones & Behaviour
Windows XP Boot Milestones & Behaviour
1. Download ‘WinDbg’ to get the most recent versions of the DLL’s (DbgHelp.dll and
SymSrv.dll) and point ‘ProcMon’ at them.
2. Make sure both DLL’s are in the same directory.
3. Make sure 1 and 2 are done *before* capture, otherwise you cannot resolve the symbols
afterwards.
Boot Logging
During Boot Logging, Process Monitor writes a file, ‘C:\Windows\Procmon.pmb’. When Process
Monitor is started after a Boot Logging session, a request will be made to save capture information
from the boot session. If ‘Yes’ is selected the file is read in and converted to a PML file.
The location of the boot logging file cannot be changed and the only viable option to reduce the
impact to the performance of the client during start-up is to move the location of the paging file to
another disk.
It has not been possible to identify the processor and memory utilisation when running ProcMon
with Boot Logging enabled during startup.
Capture files have a maximum size of 256Mbytes and should a capture session remain running for a
long period of time, then multiple capture files will be generated by ProcMon.
The total load on the processor by the ProcMon process seems to peak at just under 10%. This
measurement was taken on an Intel dual core 1.8GHz processor with 2GB of memory.
You can obtain the latest revision of Process Monitor from the Microsoft Sys-internals technical site,
found at:
http://technet.microsoft.com/en-us/sysinternals/
Page 1 of 47
Windows XP Boot – Milestones & Behaviour
The SMSS.EXE process now waits forever for the process handles to CSRSS.EXE and WINLOGON.EXE.
If either of these processes terminates unexpectedly, SMSS.EXE or the kernel will crash the system.
Page 2 of 47
Windows XP Boot – Milestones & Behaviour
Page 3 of 47
Windows XP Boot – Milestones & Behaviour
2. Defines the symbolic links for MS-DOS device names such as COM1 and LPT1.
MS-DOS device names defined, such as COM1: in sequence 55375 and LPT1: in sequence 55379
Page 4 of 47
Windows XP Boot – Milestones & Behaviour
3. If Terminal Services is installed, Smss.exe creates the \Sessions directory in the object manager’s namespace for multiple sessions. This step is not
present in this capture as Terminal Services was not installed on the machine.
Below the smss.exe process runs the program defined in the registry key shown above
Note: A description of Autochk.exe, how it is used and how to disable it can be found in Appendix B - Manually Resetting AUTOCHK.EXE for a Drive.
Page 5 of 47
Windows XP Boot – Milestones & Behaviour
This step was not executed as no pending operations were defined in the registry keys accessed by the Smss.exe process, highlighted below.
The Smss.exe process accesses the registry keys detailed in step 5, to identify any pending operations to be executed in the boot process
Page 6 of 47
Windows XP Boot – Milestones & Behaviour
6. Opens known DLL’s and creates section objects for them in the \Knowndlls directory of the Object Manager Namespace. The list of DLLs considered
known is located in HKLM\System\CurrentControlSet\Control\Session Manager\KnownDLLs, and the path to the directory in which the DLLs are
located is stored in the DllDirectory value of the key.
Page 7 of 47
Windows XP Boot – Milestones & Behaviour
Page 8 of 47
Windows XP Boot – Milestones & Behaviour
7. Creates the paging file and writes to it. Paging file configuration is stored under HKLM\System\CurrentControlSet\Control\Session
Manager\Memory Management\PagingFiles.
Page 9 of 47
Windows XP Boot – Milestones & Behaviour
8. Initialises the registry. The configuration manager fleshes out the registry by loading the registry hives for the HKLM\SAM, HKLM\SECURITY and
HKLM\SOFTWARE keys. Although ‘HKLM\SYSTEM\CurrentControlSet\Control\hivelist’ locates the hive files on disk, the configuration manager is
coded to first look for them in ‘\Windows\System32\Config.
Smss.exe reads in the hive list and maps these to the local files
Page 10 of 47
Windows XP Boot – Milestones & Behaviour
Smss.exe reads the environment variables that are defined in HKLM\System\CurrentControlSet\Session Manager\Environment
Page 11 of 47
Windows XP Boot – Milestones & Behaviour
9. Continued. SMSS.EXE process creates the system environment variables seen in the path below.
Creates system environment variables defined in the registry keys highlighted in previous page
10. Loads the kernel-mode part of the Windows subsystem (Win32K.sys). Smss.exe determines the location of Win32k.sys and other components it
loads by looking for their paths in HKLM\ System\CurrentControlSet\Control\Session Manager.
Page 12 of 47
Windows XP Boot – Milestones & Behaviour
10. (Continued). The initialisation code in Win32k.sys uses the video driver to switch the screen to the resolution defined by the default profile, so this
is the point at which the screen changes from VGA mode the boot driver uses to the default resolution chosen for the system.
11. Starts the subsystem processes, including Csrss, (client/server runtime subsystem).
Page 13 of 47
Windows XP Boot – Milestones & Behaviour
12. SMSS.EXE starts the logon process (WinLogon) and a new thread is created by the new WinLogon process.
Smss.exe process starting the WinLogon process
Page 14 of 47
Windows XP Boot – Milestones & Behaviour
Svchost reading DHCP information from the registry, including the previous IP Address
Page 15 of 47
Windows XP Boot – Milestones & Behaviour
13. Continued. Identifying when the DHCP request has been formed. This can be used to determine roughly when the DHCP request was sent.
The last entry that contains the API ‘SendDhcpRequest’ can be used to mark when the request was transmitted over the network
Page 16 of 47
Windows XP Boot – Milestones & Behaviour
Page 17 of 47
Windows XP Boot – Milestones & Behaviour
13. Continued. The system is configuring the network interface once having received an answer to the DHCP request. This can be used to determine
when the IP address was obtained and applied. The IP Address can be seen in event 109508 in the ProcMon window behind the stack window.
The IP Address being set using the ‘SetDhcpConfigurationForNIC’ function
Page 18 of 47
Windows XP Boot – Milestones & Behaviour
14. NetBIOS is bound to all adapters and the host name registration announcement is broadcast.
NetBIOS name registration announcement being formed
Page 19 of 47
Windows XP Boot – Milestones & Behaviour
14. Continued. The TDI driver sending or preparing to send the NetBIOS announcement.
The kernel mode TDI driver translates API calls into low level network protocol requests
Page 20 of 47
Windows XP Boot – Milestones & Behaviour
Page 21 of 47
Windows XP Boot – Milestones & Behaviour
Page 22 of 47
Windows XP Boot – Milestones & Behaviour
15. Continued. The Winlogon process reads the standard theme library that affects the presentation of the logon dialog box.
Page 23 of 47
Windows XP Boot – Milestones & Behaviour
15. Continued. The Winlogon process can be seen to check for values in the ‘ForceFriendlyUI’ registry key. When the first instance of this is seen, it can
be used to determine when the dialog box is displayed.
The Windows logon dialog box is displayed at this point
Page 24 of 47
Windows XP Boot – Milestones & Behaviour
15. Continued. The ‘WinLogon’ process calls the ‘WlxDisplaySASNotice’ function to display a notice when no users are logged on. This notice informs
users that they must enter CTRL+ALT+DELETE to logon.
The stack showing the WlxDisplaySASNotice function being called by the WinLogon process
Page 25 of 47
Windows XP Boot – Milestones & Behaviour
The next function to be called in the sequence is the WlxLoggedOutSAS which can be seen in the stack. This function is used to identify the type of
SAS event that has taken place. The function will return a value to represent the actions, CTRL-ALT-DEL pressed, Smart Card inserted, Smart Card
removed and Timeout where no user input was received within the timeout period.
WlxLoggedOutSAS function is used to return the type of SAS event that occurred
Page 26 of 47
Windows XP Boot – Milestones & Behaviour
17. The user has entered their username and password and pressed enter. This triggers the use of Kerberos to carry out the authentication against the
domain. Below the lsass.exe process is shown compiling the authentication request and below that is the associated network traffic.
Page 27 of 47
Windows XP Boot – Milestones & Behaviour
The username (asldmr in this case) and domain can be seen in the Kerberos AS-REQ packet in frame 219 and the resulting Ticket Granting Service (TGS)
request from the client to obtain a ticket for the services in the domain in frame 223.
Please see ‘Appendix F – Kerberos Authentication Sequence’ for info about the behaviour of Kerberos during a domain logon.
Page 28 of 47
Windows XP Boot – Milestones & Behaviour
18. Once initial authentication has been successful, the desktop starts to load and this is associated with a large amount of SMB traffic to AD controllers
and file servers to retrieve policies, scripts and sometimes executables. Searching for the username in the SMB traffic identifies the stream(s)
associated with the user and user profile. It appears that once the SMB streams associated with policies and logon scripts stop, the desktop is more
or less loaded, although responsiveness is reduced while waiting for AV software to complete loading and services to complete startup.
Searching for the username in the SMB traffic allows you to quickly identify the activity associated with the user and user profile
Page 29 of 47
Windows XP Boot – Milestones & Behaviour
18. Continued. Filtering the ProcMon capture file for anything in the path or detail that contains the username quickly identifies the processes
associated with loading the profile and profile specific settings. The large gaps in the activity near the end of the filtered trace can be used as a
marker to identify when the desktop is loaded as shown by the highlighted sequence below.
Filtering the capture file for references to the username quickly identifies process activity associated with loading the user profile
Page 30 of 47
Windows XP Boot – Milestones & Behaviour
RegCloseKey
The process closed the Registry key specified in the Path column.
RegQueryValue
The process queried for the value of the Registry value listed in the Path statement. The value retrieved is listed in the Detail column.
RegEnumValue
The process is querying the value names and their data for the key in the Path. You will see repeated RegEnumValue and RegQueryValue operations
until all the values under this key have been enumerated.
RegQueryKey
The process queried the Registry key listed in the Path for information about the key. This information, such as the amount of values or subkeys
underneath it, is displayed in the Detail column.
RegEnumKey
The process queried the Registry key listed in the Path for information about it’s subkeys. You will see further RegEnumKey entries until there are no
more subkeys to enumerate.
RegCreateKey
The process attempted to create the key specified in the Path column.
RegSetValue
The process created or set the data of the value in the Path column with the information from the Detail column.
Page 31 of 47
Windows XP Boot – Milestones & Behaviour
File Operations:
QueryBasicInformationFile (FASTIO_QUERY_INFORMATION)
The process queried the file in the Path column for one of the following attributes:
CreationTime, LastAccessTime, LastWriteTime, ChangeTime, FileAttributes
QueryStandardInformationFile(FASTIO_QUERY_INFORMATION)
The process queried the file in the Path column for one of the following attributes:
AllocationSize, EndOfFile, NumberOfLinks, DeletePending, Directory
QueryNameInformationFile (IRP_MJ_QUERY_INFORMATION)
The process queried the file in the Path column for one of the following attributes: FileNameLength, FileName
SetBasicInformationFile (IRP_MJ_SET_INFORMATION)
The process changed one of the following attributes in the file in the Path field:
CreationTime, LastAccessTime, LastWriteTime, ChangeTime, FileAttributes
QueryOpen (FASTIO_NETWORK_QUERY_OPEN)
Appears before each CreateFile operation, checks for file specified in the Path.
CreateFile (IRP_MJ_CREATE)
The process opened or created the file specified in the Path. Whether the file was opened or created can be determined by the Disposition value in the
Details column.
CloseFile (IRP_MJ_CLEANUP)
The process closed the file specified in the Path.
QueryDirectory (IRP_MJ_DIRECTORY_CONTROL)
The process queried the contents of the directory listed in the Path. This listing will be found in the Details column.
WriteFile (IRP_MJ_WRITE)
The process wrote data to the file specified in the Path. The location written to in the file and the amount of data is specified in the Details column.
Page 32 of 47
Windows XP Boot – Milestones & Behaviour
ReadFile (IRP_MJ_READ)
The process is reading the file specified in the Path statement. The Details column will tell you how many bytes were read during this operation. You
will see more ReadFile operations until an End of File (EOF) is reached.
SetEndOfFileInformationFile (IRP_MJ_SET_INFORMATION)
The process set the offset which the file’s End of File should be set to. This value is listed in the Details column.
SetRenameFileInformationFile (IRP_MJ_SET_INFORMATION)
The process renamed the file or directory in the Path column to the file or directory found in the Details column.
Process Operations:
Thread Create
The process opened the Registry key specified in the Path column..
Thread Exit
The process closed the Registry key specified in the Path column.
Process Exit
The process queried for the value of the Registry value listed in the Path statement. The value retrieved is listed in the Detail column.
Page 33 of 47
Windows XP Boot – Milestones & Behaviour
Sometimes the dirty bit may be set spuriously, when in fact there is no cause for alarm. A crash can sometimes cause the dirty bit to be set when there was
no data pending to be written, provoking a disk check the next time the system is rebooted. This in turn can cause a disk check to run persistently at each
reboot, even when the dirty bit has not been set. If a disk check is running at each reboot regardless of whether or not the system was shut down cleanly,
then the problem is no longer the dirty bit per se, but rather the way AUTOCHK.EXE has been configured to run at startup.
There are a few ways to manually override this. The first is to run CHKDSK /F on the drive in question; if it runs successfully, the AUTOCHK.EXE command is
cleared and the system will no longer be checked at each reboot. Another way to do it is to edit the Registry directly and remove the AUTOCHK command.
To do this, navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/Session Manager/ in the Registry and look for a REG_MULTI_SZ value
with the name BootExecute. Set the value of BootExecute to a null value. This will prevent AUTOCHK from running on next reboot.
On the whole, it's safest to first attempt to use CHKDSK /F on the drive that is being repeatedly checked at startup. Editing BootExecute should only be
done if CHKDSK doesn't seem to be working. Running CHKDSK also has the added bonus of manually clearing the dirty bit.
Page 34 of 47
Windows XP Boot – Milestones & Behaviour
General OS Information
OS Name Microsoft Windows XP Pro Version 5.1.2600 SP 2 Build 2600
OS Manufacturer Microsoft Corporation
System Name ASL9300B
System Manufacturer Dell Inc.
System Model Inspiron 9300
System Type X86-based PC
Processor x86 Family 6 Model 13 Stepping 8 GenuineIntel ~603 Mhz
BIOS Version/Date Dell Inc. A03, 29/03/2005 SMBIOS Version 2.3
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\system32
Boot Device \Device\HarddiskVolume2
Locale United Kingdom
Hardware Abstraction Layer Version = "5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)"
User Name ASL_HQ\asldmr
Time Zone GMT Standard Time
Total Physical Memory 512.00 MB
Available Physical Memory 105.88 MB
Total Virtual Memory 2.00 GB
Available Virtual Memory 1.96 GB
Page File Space 4.47 GB
Page File C:\pagefile.sys
Disk Volume
Description Local Fixed Disk
Compressed No
File System NTFS
Size 52.96 GB (56,861,360,128 bytes)
Free Space 41.86 GB (44,950,687,744 bytes)
Page 35 of 47
Windows XP Boot – Milestones & Behaviour
Page 36 of 47
Windows XP Boot – Milestones & Behaviour
Page 37 of 47
Windows XP Boot – Milestones & Behaviour
Page 38 of 47
Windows XP Boot – Milestones & Behaviour
Page 39 of 47
Windows XP Boot – Milestones & Behaviour
Page 40 of 47
Windows XP Boot – Milestones & Behaviour
SMSS starts the WinLogon process. SMSS.EXE reads the ‘WinLogon.exe’ file.
No network activity associated with
12 WinLogon process can be seen to start and Page 18
this step.
create a new thread.
The interface TCP/IP parameters as SVCHOST.EXE can be seen to access the TCP/IP The DHCP request broadcast is seen
read and set. parameters for the interface and later the stack and the response to it from a DHCP
Page 19
of this process can be seen to form the DHCP server, although a response may not
13 To
request and set the IP information for the be sent in all cases. Read up on
Page 22
interface. Microsoft DHCP behaviour Windows
2000 onwards.
Page 41 of 47
Windows XP Boot – Milestones & Behaviour
Page 42 of 47
Windows XP Boot – Milestones & Behaviour
1. AS Exchange
2. TGS Exchange
3. Client/Server (CS) Exchange
Page 43 of 47
Windows XP Boot – Milestones & Behaviour
AS Exchange
When initially logging on to a network, users must negotiate access by providing a log-in name and password in order to be verified by the AS portion of a
KDC within their domain. The KDC has access to Active Directory user account information. Once successfully authenticated, the user is granted a Ticket to
Get Tickets (TGT) that is valid for the local domain. The TGT has a default lifetime of 10 hours and may be renewed throughout the user's log-on session
without requiring the user to re-enter his password. The TGT is cached on the local machine in volatile memory space and used to request sessions with
services throughout the network. The following is a discussion of the TGT retrieval process.
Example AS Administration
The AS request identifies the client to the KDC in plain text and if pre-authentication is enabled, a time stamp will be encrypted using the user's password
hash as an encryption key. If the KDC reads a valid time when using the user's password hash (stored in the Active Directory) to decrypt the time stamp, the
KDC knows that request isn't a replay of a previous request. The pre-authentication feature may be disabled for specific users in order to support some
applications that don't support the security feature. Access the user account from the Active Directory users and the computers will snap-in and select the
account tab. From the account options: slide window, check mark the "Do not require Kerberos" pre-authentication option as shown below.
Page 44 of 47
Windows XP Boot – Milestones & Behaviour
If the KDC approves the client's request for a TGT, the reply (referred to as the AS reply) will include two sections: a TGT encrypted with a key that only the
KDC (TGS) can decrypt and a session key encrypted with the user's password hash to handle future communications with the KDC. Because the client
system cannot read the TGT contents, it must blindly present the ticket to the TGS for service tickets. The TGT includes time to live parameters,
authorization data, a session key to use when communicating with the client and the client's name.
TGS Exchange
The user presents the TGT to the TGS portion of the KDC when desiring access to a server service. The TGS on the KDC authenticates the user's TGT and
creates a ticket and session key for both the client and the remote server. This information, known as the service ticket, is then cached locally on the client
machine.
The TGS receives the client's TGT and reads it using its own key. If the TGS approves of the client's request, a service ticket is generated for both the client
and the target server. The client reads its portion using the TGS session key retrieved earlier from the AS reply. The client presents the server portion of the
TGS reply to the target server in the client/server exchange coming next.
Client/Server Exchange
Once the client user has the client/server service ticket, he can establish the session with the server service. The server can decrypt the information coming
indirectly from the TGS using its own long-term key with the KDC. The service ticket is then used to authenticate the client user and establish a service
session between the server and client. After the ticket's lifetime is exceeded, the service ticket must be renewed to use the service.
Referral Tickets
The AS and TGS functions are separate within the KDC. This permits the user to use the TGT obtained from an AS in his domain to obtain service tickets
from a TGS in other domains. This is accomplished through referral tickets.
Page 45 of 47
Windows XP Boot – Milestones & Behaviour
Once a trust has been established between two domains, referral tickets can be granted to clients requesting authorization for services in other domains.
When there is a trust established between the two domains, an interdomain key based on the trust password becomes available for authenticating KDC
functions. This can best be explained by example of a user/client seeking services in another domain. As illustrated in Figure 3, a user client in Entcert1.com
requests authority for a server in Entcert2.com. He utilizes referral tickets. The numbers in Figure 3 correspond to the following numbered explanations:
1. The client contacts its domain KDC TGS using a TGT. The KDC recognizes a request for a session with a foreign domain server and responds by
returning a referral ticket for the KDC in the foreign domain.
2. The client contacts the KDC of the foreign domain with the referral ticket. This ticket is encrypted with the interdomain key. Given that the
decryption works, the TGS service for the foreign domain returns a service ticket for the server service in Entcert2.com.
3. The client performs the client/server exchange with the server and begins the user session with the service.
When more domains are involved, the referral process extends and involves the transitive properties between Windows 2000 domains. Maintaining
individual two-way trusts between all domains creates a complex administrative nightmare. The use of Kerberos transitive domains cuts down on
interdomain administration. This can best be explained by example of a user/client seeking services in another domain. As illustrated in Figure 11-4,
Entcert1.com has a trust relationship with Entcert2.com. Entcert2.com has a trust relationship with Entcert3.com. There is no trust between Entcert1.com
and Entcert3.com. A client from Entcert1.com accessing a service on a server in Entcert3.com would obtain a service ticket through the following steps (the
numbers appearing in Figure 4 correspond to the following numbered explanations):
Use the TGS service in Entcert1.com to obtain a referral ticket for a KDC in Entcert2.com.
1. Use the referral ticket with the TGS service on the KDC in Entcert2.com and obtain a referral for Entcert3.com.
Page 46 of 47
Windows XP Boot – Milestones & Behaviour
2. Use the second referral ticket with the TGS service on the KDC for Entcert3.com and obtain a service ticket for the server in Entcert3.com.
3. Use the Client/Server Exchange to open a session with the service in Entcert3.com.
Page 47 of 47