Module 7 The Windows Operating System
Module 7 The Windows Operating System
1 Windows History
7.1.1 Disk Operating System
The first computers did not have modern storage devices such as hard
drives, optical drives, or flash storage. The first storage methods used punch
cards, paper tape, magnetic tape, and even audio cassettes.
Floppy disk and hard disk storage require software to read from, write to, and
manage the data that they store. The Disk Operating System (DOS) is an
operating system that the computer uses to enable these data storage
devices to read and write files. DOS provides a file system which organizes
the files in a specific way on the disk. Microsoft bought DOS and developed
MS-DOS.
MS-DOS used a command line as the interface for people to create programs
and manipulate data files, as shown in the command output. DOS commands
are shown in bold text.
With MS-DOS, the computer had a basic working knowledge of how to access
the disk drive and load the operating system files directly from disk as part of
the boot process. When it was loaded, MS-DOS could easily access the disk
because it was built into the operating system.
Today, many things that used to be accomplished through the command line
interface of MS-DOS can be accomplished in the Windows GUI. You can still
experience what it was like to use MS-DOS by opening a command window,
but what you see is no longer MS-DOS, it is a function of Windows. To
experience a little of what it was like to work in MS-DOS, open a command
window by typing cmd in Windows Search and pressing Enter. The table lists
some commands that you can use. Enter help followed by the command to
learn more about the command.
MS-DOS Command Description
Since 1993, there have been more than 20 releases of Windows that are
based on the NT operating system. Most of these versions were for use by
the general public and businesses because of the file security offered by the
file system that was used by the NT OS. Businesses also adopted NT OS-
based Windows operating systems. This is because many editions were built
specifically for workstation, professional, server, advanced server, and
datacenter server, to name just a few of the many purpose-built versions.
Beginning with Windows XP, a 64-bit edition was available. The 64-bit
operating system was an entirely new architecture. It had a 64-bit address
space instead of a 32-bit address space. This is not simply twice the amount
of space because these bits are binary numbers. While 32-bit Windows can
address a little less than 4 GB of RAM, 64-bit Windows can theoretically
address 16.8 million terabytes. When the OS and the hardware all support
64-bit operation, extremely large data sets can be used. These large data
sets include very large databases, scientific computing, and manipulation of
high definition digital video with special effects. In general, 64-bit computers
and operating systems are backward-compatible with older, 32-bit programs,
but 64-bit programs cannot be run on older, 32-bit hardware.
With each subsequent release of Windows, the operating system has become
more refined by incorporating more features. Windows 7 was offered with six
different editions, Windows 8 with as many as five, and Windows 10 with
eight different editions! Each edition not only offers different capabilities, but
also different price points. Microsoft has said that Windows 10 is the last
version of Windows, and that Windows has become a service rather than just
an OS. They say that rather than purchasing new operating systems, users
will just update Windows 10 instead.
Windows has a graphical user interface (GUI) for users to work with data files
and software. The GUI has a main area that is known as the Desktop,
The Desktop can be customized with various colors and background images.
Windows supports multiple users, so each user can customize the Desktop to
their liking. The Desktop can store files, folders, shortcuts to locations and
programs, and applications. The Desktop also has a recycle bin icon, where
files are stored when the user deletes them. Files can be restored from the
recycle bin or the recycle bin can be emptied of files, which truly deletes
them.
At the bottom of the desktop is the Task Bar. The Task Bar has three areas
that are used for different purposes. At the left is the Start menu. It is used to
access all of the installed programs, configuration options, and the search
feature. At the center of the Task Bar, users place quick launch icons that run
specific programs or open specific folders when they are clicked. Finally, on
the right of the Task Bar is the notification area. The notification area shows,
at a glance, the functionality of many different programs and features. For
example, a blinking envelope icon may indicate new email, or a network icon
with a red “x” may indicate a problem with the network.
< Encryption
This is not only important for desktop computers, but especially mobile
devices.
<Security policy
< Firewall
For example, a port may be left open that should no longer be readily
available.
When a user logs in as an administrator, any program that they run will
have the privileges of that account.
As identified in the figure, there are two different modes in which a CPU
operates when the computer has Windows installed: the user mode and the
kernel mode.
Installed applications run in user mode, and operating system code runs in
kernel mode. Code that is executing in kernel mode has unrestricted access
to the underlying hardware and is capable of executing any CPU instruction.
Kernel mode code also can reference any memory address directly. Generally
reserved for the most trusted functions of the OS, crashes in code running in
kernel mode stop the operation of the entire computer. Conversely, programs
such as user applications, run in user mode and have no direct access to
hardware or memory locations. User mode code must go through the
operating system to access hardware resources. Because of the isolation
provided by user mode, crashes in user mode are restricted to the
application only and are recoverable. Most of the programs in Windows run in
user mode. Device drivers, pieces of software that allow the operating
system and a device to communicate, may run in either kernel or user mode,
depending on the driver.
All of the code that runs in kernel mode uses the same address space.
Kernel-mode drivers have no isolation from the operating system. If an error
occurs with the driver running in kernel mode, and it writes to the wrong
address space, the operating system or another kernel-mode driver could be
adversely affected. In this respect, the driver might crash, causing the entire
operating system to crash.
When user mode code runs, it is granted its own restricted address space by
the kernel, along with a process created specifically for the application. The
reason for this functionality is mainly to prevent applications from changing
operating system code that is running at the same time. By having its own
process, that application has its own private address space, rendering other
applications unable to modify the data in it. This also helps to prevent the
operating system and other applications from crashing if that application
crashes.
1) exFAT
FAT has limitations to the number of partitions, partition sizes, and file
sizes that it can address, so it is not usually used for hard drives (HDs)
or solid-state drives (SSDs) anymore.
Both FAT16 and FAT32 are available to use, with FAT32 being the most
common because it has many fewer restrictions than FAT16.
This is the most commonly used file system when installing Windows.
All versions of Windows and Linux support NTFS.
Mac-OS X computers can only read an NTFS partition. They are able to
write to an NTFS partition after installing special drivers.
NTFS is the most widely used file system for Windows for many reasons.
NTFS supports very large files and partitions and it is very compatible with
other operating systems. NTFS is also very reliable and supports recovery
features. Most importantly, it supports many security features. Data access
control is achieved through security descriptors. These security descriptors
contain file ownership and permissions all the way down to the file level.
NTFS also tracks many time stamps to track file activity. Sometimes referred
to as MACE, the timestamps Modify, Access, Create, and Entry Modified are
often used in forensic investigations to determine the history of a file or
folder. NTFS also supports file system encryption to secure the entire storage
media.
NTFS formatting creates important structures on the disk for file storage, and
tables for recording the locations of files:
System Files - These are hidden files that store information about
other volumes and file attributes.
File Area - The main area of the partition where files and directories
are stored.
NTFS stores files as a series of attributes, such as the name of the file, or a
timestamp. The data which the file contains is stored in the attribute $DATA,
and is known as a data stream. By using NTFS, you can connect Alternate
Data Streams (ADSs) to the file. This is sometimes used by applications that
are storing additional information about the file. The ADS is an important
factor when discussing malware. This is because it is easy to hide data in an
ADS. An attacker could store malicious code within an ADS that can then be
called from a different file.
In the NTFS file system, a file with an ADS is identified after the filename and
a colon, for example, Testfile.txt:ADS. This filename indicates an ADS
called ADS is associated with the file called Testfile.txt. An example of ADS
is shown in the command output.
In the output:
The first command places the text “Alternate Data Here” into an ADS of
the file Testfile.txt called “ADS”.
After that, dir, shows that the file was created, but the ADS is not
visible.
The next command shows that there is data in the Testfile.txt:ADS data
stream.
The last command shows the ADS of the Testfile.txt file because
the r switch was used with the dir command.
BIOS firmware was created in the early 1980s and works in the same way it
did when it was created. As computers evolved, it became difficult for BIOS
firmware to support all the new features requested by users.
UEFI was designed to replace BIOS and support the new features.
In BIOS firmware, the process begins with the BIOS initialization phase. This
is when hardware devices are initialized and a power on self-test (POST) is
performed to make sure all of these devices are communicating. When the
system disk is discovered, the POST ends. The last instruction in the POST is
to look for the master boot record (MBR).
The MBR contains a small program that is responsible for locating and
loading the operating system. The BIOS executes this code and the operating
system starts to load.
In contrast to BIOS firmware, UEFI firmware has a lot of visibility into the boot
process. UEFI boots by loading EFI program files, stored as .efi files in a
special disk partition, known as the EFI System Partition (ESP).
Note: A computer that uses UEFI stores boot code in the firmware. This
helps to increase the security of the computer at boot time because the
computer goes directly into protected mode.
If the computer is being booted from a cold start, then the Winload.exe file
is loaded. The Winload.exe file creates a record of the hardware
configuration in the registry. The registry is a record of all of the settings,
options, hardware, and software the computer has. The registry will be
explored in depth later in this chapter. Winload.exe also uses Kernel Mode
Code Signing (KMCS) to make sure that all drivers are digitally signed. This
ensures that the drivers are safe to load as the computer starts.
The Msconfig tool opens the System Configuration window. There are five
tabs which contain the configuration options.
1. General
Three different startup types can be chosen here. Normal loads all drivers
and services. Diagnostic loads only basic drivers and services. Selective
allows the user to choose what to load on startup.
2. Boot
Any installed operating system can be chosen here to start. There are also
options for Safe boot, which is used to troubleshoot startup.
3. Services
All the installed services are listed here so that they can be chosen to start at
startup.
4. Startup
All the applications and services that are configured to automatically begin
at startup can be enabled or disabled by opening the task manager from this
tab.
5. Tools : >>> Many common operating system tools can be launched
directly from this tab.
It is always best to perform a proper shutdown to turn off the computer. Files
that are left open, services that are closed out of order, and applications that
hang can all be damaged if the power is turned off without first informing the
operating system. The computer needs time to close each application, shut
down each service, and record any configuration changes before power is
lost.
During shutdown, the computer will close user mode applications first,
followed by kernel mode processes. If a user mode process does not respond
within a certain amount of time, the OS will display notification and allow the
user to wait for the application to respond, or forcibly end the process. If a
kernel mode process does not respond, the shutdown will appear to hang,
and it may be necessary to shut down the computer with the power button.
There are several ways to shut down a Windows computer: Start menu power
options, the command line command shutdown, and
using Ctrl+Alt+Delete and clicking the power icon. There are three
different options from which to choose when shutting down the computer:
Some of the processes that Windows runs are services. These are programs
that run in the background to support the operating system and applications.
They can be set to start automatically when Windows boots or they can be
started manually. They can also be stopped, restarted, or disabled.
Each user space process runs in a private address space, separate from
other user space processes. When the user space process needs to access
kernel resources, it must use a process handle. This is because the user
space process is not allowed to directly access these kernel resources. The
process handle provides the access needed by the user space process
without a direct connection to it.
A powerful tool for viewing memory allocation is RAMMap, which is shown in
the figure. RAMMap is part of the Windows Sysinternals Suite of tools. It can
be downloaded from Microsoft. RAMMap provides a wealth of information
regarding how Windows has allocated system memory to the kernel,
processes, drivers, and applications.
HKEY_CURRENT_USER (HKCU)
HKEY_USERS (HKU)
HKEY_CLASSES_ROOT (HKCR)
HKEY_LOCAL_MACHINE (HKLM)
HKEY_CURRENT_CONFIG (HKCC)
New hives cannot be created. The registry keys and values in the hives can
be created, modified, or deleted by an account with administrative
privileges. As shown in the figure, the tool regedit.exe is used to modify the
registry. Be very careful when using this tool. Minor changes to the registry
can have massive or even catastrophic effects.
Navigation in the registry is very similar to Windows file explorer. Use the left
panel to navigate the hives and the structure below it and use the right panel
to see the contents of the highlighted item in the left panel. With so many
keys and subkeys, the key path can become very long. The path is displayed
at the bottom of the window for reference. Because each key and subkey is
essentially a container, the path is represented much like a folder in a file
system. The backslash (∖) is used to differentiate the hierarchy of the
database.
Registry keys can contain either a subkey or a value. The different values
that keys can contain are as follows:
Because the registry holds almost all the operating system and user
information, it is critical to make sure that it does not become compromised.
Potentially malicious applications can add registry keys so that they start
when the computer is started. During a normal boot, the user will not see the
program start because the entry is in the registry and the application
displays no windows or indication of starting when the computer boots. A
keylogger, for example, would be devastating to the security of a computer if
it were to start at boot without the user’s knowledge or consent. When
performing normal security audits, or remediating an infected system, review
the application startup locations within the registry to ensure that each item
is known and safe to run.
The registry also contains the activity that a user performs during normal
day-to-day computer use. This includes the history of hardware devices,
including all devices that have been connected to the computer including the
name, manufacturer and serial number. Other information, such as what
documents a user and program have opened, where they are located, and
when they were accessed is stored in the registry. This is all very useful
information when a forensics investigation needs to be performed.
When you start a new computer for the first time, or you install Windows,
you will be prompted to create a user account. This is known as a local user.
This account will contain all of your customization settings, access
permissions, file locations, and many other user-specific data. There are also
two other accounts that are present, the guest, and the administrator. Both
of these accounts are disabled by default.
The Guests account should not be enabled. The guest account does not have
a password associated with it because it is created when a computer is going
to be used by many different people who do not have accounts on the
computer. Each time the guest account logs on, a default environment is
provided to them with limited privileges.
The Windows command line interface (CLI) can be used to run programs,
navigate the file system, and manage files and folders. In addition, files
called batch files can be created to execute multiple commands in
succession, much like a basic script.
To open the Windows CLI, search for cmd.exe and click the program.
Remember that right-clicking the program provides the option to Run as
administrator, giving much more power to the commands that will be used.
The prompt displays the current location within the file system. These are a
few things to remember when using the CLI:
Commands that have optional switches use the forward slash (/) to
delineate between the command and the switch option.
You can use the Tab key to auto-complete commands when directories
or files are referenced.
Even though the CLI has many commands and features, it cannot work
together with the core of Windows or the GUI. Another environment, called
the Windows PowerShell, can be used to create scripts to automate tasks
that the regular CLI is unable to create. PowerShell also provides a CLI for
initiating commands. PowerShell is an integrated program within Windows
and can be opened by searching for “powershell” and clicking the program.
Like the CLI, PowerShell can also be run with administrative privileges.
To see more information about Windows PowerShell and get started using it,
type help in PowerShell, as shown in the command output.
There are four levels of help in Windows PowerShell:
Some attacks today use WMI to connect to remote systems, modify the
registry, and run commands. WMI helps them to avoid detection because it is
common traffic, most often trusted by the network security devices and the
remote WMI commands do not usually leave evidence on the remote host.
Because of this, WMI access should be strictly limited.
Windows has many commands that can be entered at the command line.
One important command is the net command, which is used in the
administration and maintenance of the OS. The net command supports
many subcommands that follow the net command and can be combined
with switches to focus on specific output.
To see a list of the many net commands, type net help at the command
prompt. The command output shows the commands that the net command
can use. To see verbose help about any of the net commands, type C:∖> net
help ,as shown below.
o net accounts
o net session
o net share
o net stop
o net use
o net view
There are two very important and useful tools to help an administrator to
understand the many different applications, services, and processes that are
running on a Windows computer. These tools also provide insight into the
performance of the computer, such as CPU, memory, and network usage.
These tools are especially useful when investigating a problem where
malware is suspected. When a component is not performing the way that it
should be, these tools can be used to determine what the problem might be.
Task Manager
The Task Manager, which is shown in the figure, provides a lot of information
about the software that is running and the general performance of the
computer.
Processes
Lists all of the programs and processes that are currently running.
Performance
App history
Click Options and Show history for all processes to see the history
of every process that has run since the computer was started.
Startup
All of the applications and services that start when the computer is
booted are shown in this tab.
Users
All of the users that are logged on to the computer are shown in this
tab.
Also shown are all the resources that each user’s applications and
processes are using.
Details
CPU affinity can also be set which determines which core or CPU a
program will use.
Also, a useful feature called Analyze wait chain shows any process for
which another process is waiting.
Services
All the services that are loaded are shown in this tab.
The process ID (PID) and a short description are also shown along with
the status of either Running or Stopped.
Overview
If you select a single process, it will be filtered across all of the tabs to
show only that process’s statistics.
CPU
The PID, number of threads, which CPU the process is using, and the
average CPU usage of each process is shown.
Additional information about any services that the process relies on,
and the associated handles and modules can be seen by expanding
the lower rows.
Memory
All of the statistical information about how each process uses memory
is shown in this tab.
Also, an overview of usage of all the RAM is shown below the Processes
row.
Disk
All of the processes that are using a disk are shown in this tab, with
read/write statistics and an overview of each storage device.
Network
All of the processes that are using the network are shown in this tab,
with read/write statistics.
Most importantly, the current TCP connections are shown, along with
all of the ports that are listening.
This tab is very useful when trying to determine which applications and
processes are communicating over the network.
7.3.7 Networking
One of the most important features of any operating system is the ability for
the computer to connect to a network. Without this feature, there is no
access to network resources or the internet. To configure Windows
networking properties and test networking settings, the Network and Sharing
Center is used. The easiest way to run this tool is to search for it and click it.
Use the Network and Sharing Center to verify or create network connections,
configure network sharing, and change network adapter settings.
The initial view shows an overview of the active network. This view shows
whether there is internet access and if the network is private, public, or
guest. The type of network, either wired or wireless, is also shown. From this
window, you can see the HomeGroup the computer belongs to, or create one
if it is not already part of a HomeGroup. This tool can also be used to change
adapter settings, change advance sharing settings, set up a new connection,
or troubleshoot problems. Note that HomeGroup was removed from Windows
10 in version 1803.
C. Change Settings
Like other operating systems, Windows uses networking for many different
applications such as web, email, and file services. Originally developed by
IBM, Microsoft aided in the development of the Server Message Block (SMB)
protocol to share network resources. SMB is mostly used for accessing files
on remote hosts. The Universal Naming Convention (UNC) format is used to
connect to resources, for example:
∖∖servername∖sharename∖file
In the UNC, servername is the server that is hosting the resource. This can
be a DNS name, a NetBIOS name, or simply an IP address. The sharename is
the root of the folder in the file system on the remote host, while the file is
the resource that the local host is trying to find. The file may be deeper
within the file system and this hierarchy will need to be indicated.
When sharing resources on the network, the area of the file system that will
be shared will need to be identified. Access control can be applied to the
folders and files to restrict users and groups to specific functions such as
read, write, or deny. There are also special shares that are automatically
created by Windows. These shares are called administrative shares. An
administrative share is identified by the dollar sign ($) that comes after the
share name. Each disk volume has an administrative share, represented by
the volume letter and the $ such as C$, D$, or E$. The Windows installation
folder is shared as admin$, the printers’ folder is shared as print$, and there
are other administrative shares that can be connected. Only users with
administrative privileges can access these shares.
The easiest way to connect to a share is to type the UNC of the share into
the Windows File Explorer, in the box at the top of the screen which shows
the breadcrumb listing of the current file system location. When Windows
tries to connect to the share, you will be asked to provide credentials for
accessing the resource. Remember that because the resource is on a remote
computer, the credentials need to be for the remote computer, not the local
computer.
Besides accessing shares on remote hosts, you can also log in to a remote
host and manipulate that computer, as if it were local, to make configuration
changes, install software, or troubleshoot an issue. In Windows, this feature
uses the Remote Desktop Protocol (RDP). When investigating security
incidents, a security analyst uses RDP often to access remote computers. To
start RDP and connect to a remote computer, search for remote desktop and
click the application. The Remote Desktop Connection window is shown in
the figure.
Windows Event Viewer logs the history of application, security, and system
events. These log files are a valuable troubleshooting tool because they
provide information necessary to identify a problem. To open the Event
Viewer, search for it and click the program icon, as shown in the figure.
It is also possible to create a custom view. This is useful when looking for
certain types of events, finding events that happened during a certain time
period, displaying events of a certain level, and many other criteria. There is
a built-in custom view called Administrative Events that shows all critical,
error, and warning events from all of the administrative logs. This is a good
view to start with when trying to troubleshoot a problem.
Security event logs are found under Windows Logs. They use event IDs to
identify the type of event.
Update status, shown in the figure, allows you to check for updates manually
and see the update history of the computer.
There are also settings for the hours where the computer will not
automatically restart, for example during regular business hours. You can
also choose when to restart the computer after an update, if necessary, with
the Restart options. Advanced options are also available to choose how
updates are installed how other Microsoft products are updated.
7.4.4 Local Security Policy
It is important to make sure that computers are secure when users are away.
A security policy should contain a rule about requiring a computer to lock
when the screensaver starts. This will ensure that after a short time away
from the computer, the screen saver will start and then the computer cannot
be used until the user logs in.
If the Local Security Policy on every stand-alone computer is the same, then
use the Export Policy feature. Save the policy with a name, such as
workstation.inf. Copy the policy file to an external media or network drive to
use on other stand-alone computers. This is particularly helpful if the
administrator needs to configure extensive local policies for user rights and
security options.
The Local Security Policy applet contains many other security settings that
apply specifically to the local computer. You can configure User Rights,
Firewall Rules, and even the ability to restrict the files that users or groups
are allowed to run with the AppLocker.
1) Antivirus protection
2) Adware protection
3) Phishing protection
This program blocks the IP addresses of known phishing websites and warns
the user about suspicious sites.
4) Spyware protection
If you wish to use a different software firewall, you will need to disable
Windows Firewall. To disable the Windows Firewall, click Turn Windows
Firewall on or off.
Many additional settings can be found under Advanced settings. Here you
can create inbound or outbound traffic rules based on different
criteria. You can also import and export policies or monitor different
aspects of the firewall.