4. Notify the subsystem of the new process so that it
can set up for the new process and thread.
5. Start execution of the initial thread
6. In the context of the new process and thread, com-
plete the initialization of the address space and be-
gin execution of the program.
The item of interest in this list is step two, creat-
ing the executive process object. During this step, a
copy of the parent’s access token is made, which be-
comes the new process’s access token. Since this to-
ken grants access under the user’s security context, it
is the key to hardening the system.
The first step to controlling the security context of
processes is to take control of the process creation
process. This is accomplished through a kernel driver.
The idea is to capture the process creation process,
locate the proper security context for the process and
execute the process with the appropriate access token.
For this whole process to work correctly and se-
curely, the security credentials need to be stored in a
manner that prevents, and in the worst case detects,
tampering. The security context for each process are
stored in a Execution Control List database. This in-
formation is stored in a format that is encrypted and
digitally signed for security and authentication pur-
poses. The kernel driver is the only process that is
allowed to write to thi database.
An important point to note is that this concept, by
itself, cannot successfully secure a system. When
combined with proper techniques already available to
secure a Windows™system, this concept can yield
a much more secure system. This technique also
requires the use of an access-based filesystem, like
NTFS, to work properly. If write access cannot be
restricted to the ECL database, the kernel driver will
be able to identify a compromised system through an
invalid digital signature.
This entire methodology is related to the idea of
running each and every process on the computer un-
der a unique user id. Each process would have a se-
curity context that would be inherited from a unique
user id. However, there are some concerns using this
methodology. First, how does one process access
shared information from another process, since they
are running under different user contexts? And sec-
ondly, how does one manage such a large number of
user accounts, especially in the example of multiple
users running on one system (i.e. Terminal Services)?
2.3 Process Identification
For this technique to function properly, a method
needs to be used to accurately identify processes.
This method needs to be able to determine if a ma-
licious process is trying to run as a known validated
process. For example, assume notepad.exe has previ-
ously been identified, validated and has a ECL entry
in the database. Now a malicious process names it-
self notepad.exe. This process should not be allowed
to run under the original notepad.exe security context.
Therefore, a method of process identification needs to
developed to ensure that the proper security context is
assigned to the intended process only.
A digital signature or hash will be created from the
process’s executable image. This signature will then
be stored in the database to identify the process. Be-
fore a process is allowed to execute, it’s signature will
be compared to those in the database. If a match is
found, the access token associated with that signature
will be used. Otherwise, the process will be handled
as an unknown process as described in Section 2.5. If
an executable file is updated through a service pack,
patch or upgrade, the digital signature will need to be
updated as well, otherwise it could be denied the abil-
ity to execute properly.
2.4 Extracting an ECL
Two approaches can be utilized to create an Execu-
tion Control List for a process. The first approach is
to start the process without any rights and add rights
as needed. This approach is very secure, however
it requires an in-depth knowledge of the process in
question. Since most Windows™programs are closed
source, this is usually not possible by the end-user,
unless a trial and error approach is attempted. The de-
velopers would have the knowledge required to create
an ECL for each process as described in Section 2.6 .
The second approach is to run the process with a
monitor in place. The kernel driver can log all secu-
rity token requests of the monitored process. Once
this has been completed, the ECL information can be
incorporated into the ECL database. From this point,
the user can just use this ECL as is or make modifi-
cations to the ECL. This allows the user to limit the
rights of the process without generating this list from
scratch.
2.5 Default Execution Control List
What happens when a process is launched that doesn’t
have an Execution Control List associated with it?
If the process were allowed to run without an ECL,
this would be a breach of the hardening of the sys-
tem. Therefore, an approach needs to be developed to
eliminate this potential threat.
When a process is created that does not have an
ECL associated with it, the process is created with
a default access token. This token can be defined
with predetermined access rights. These predeter-
mined access rights could deny all rights to the sys-
tem - thereby eliminating the ability of any unknown
HARDENING WINDOWS SYSTEMS
369