Forensic Analysis of Windows Registry Against Intr
Forensic Analysis of Windows Registry Against Intr
net/publication/267261942
CITATIONS READS
4 10,671
4 authors, including:
Haoyang Xie
Donghua University
1 PUBLICATION 4 CITATIONS
SEE PROFILE
All content following this page was uploaded by Haoyang Xie on 14 December 2016.
ABSTRACT
Windows Registry forensics is an important branch of computer and network forensics.
Windows Registry is often considered as the heart of Windows Operating Systems because it contains all
of the configuration setting of specific users, groups, hardware, software, and networks. Therefore,
Windows Registry can be viewed as a gold mine of forensic evidences which could be used in courts. This
paper introduces the basics of Windows Registry, describes its structure and its keys and subkeys that
have forensic values. This paper also discusses how the Windows Registry forensic keys can be applied
in intrusion detection.
KEYWORDS
Forensics, Information Security, Windows Registry
1. INTRODUCTION
In a digital age, information has become an important resource that people depend on in every
aspect of their lives. With the development of computers and networks, the communication of
information becomes faster and faster. Fast internet access makes it possible to create social
networks and share news and events across the world quickly. However, as people enjoy the
convenience of information access and transfer, the risks of security and privacy problems
increase greatly too. People with malicious motives use sophisticated technology as a tool to
access information they are not authorized to access. With these malicious actions computer
and network forensics emerged as a discipline. Computer and network forensics is the
abbreviation of computer and network forensic science. It includes a number of fields such as
hard drive forensics, remote forensics, mounted devices forensics, Registry forensics, and so
on. In this paper we focus on Windows Registry forensics which is an important branch of
computer and network forensics.
By the time this research was conducted, Windows XP had been accepted widely and was the
most stable Windows desktop operating system (OS). Therefore, Windows XP was used as the
basic operating system in this research. The Registry structures of Windows XP and Windows
7 are very similar and both of them have the same root keys.
Microsoft has warned its customers to keep away from the Registry --Windows’s heart -- since
it stores all of the computer settings and is very complex. Windows Registry contains all of the
DOI : 10.5121/ijnsa.2012.4209 121
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
configuration settings of specific users, groups, hardware, software, and networks. However,
hackers often explore and alter the keys and values in Windows Registry to attack a computer
or leave a backdoor. However, the operations that hackers performed could be found by
investigators as evidences. This paper introduces the basics of Windows Registry, and discusses
how the Windows Registry keys and subkeys can be applied in intrusion detection.
This paper is organized as follows: Section 2 introduces the Windows Registry basics and the
structure of Windows Registry. Section 3 examines forensic keys in Windows Registry. Section
4 discusses how to apply forensic keys in intrusion detection.
122
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
Registry. Although Windows Vista/7 Registry has more content than Windows XP registry, it
has very similar structures, keys, subkeys, and values as Windows XP registry.
123
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
(2) HKEY_USERS (abbr. HKU). HKU is another master key. It contains all of the per-user
settings such as current console user and other users who logged on this computer before.
Double-click this entry, we can see at least three kinds of subkeys listed: KEFAUTL, SID, and
SID_CLASS [1]. SID is security identifier which refers to the current console. SID-CLASSES
contains per user class registration and file association. Usually, we could see S-1-5-18, S-1-5-
19, and S-1-5-20, which represents Local System Account, Local Service Account, and
Network Service Account respectively [3].
Unlike the above two keys, HKEY_CLASSES_ROOT (abbr. HKCR),
HKEY_CURRENT_USER (abbr. HKCU), and HKEY_CURRENT_CONFIG (abbr. HKCC)
are derived keys and they only link to the two master keys and their subkeys.
(3) HKEY_CLASSES_ROOT (abbr. HKCR). HKCR contains two keys:
HKLM\SOFTWARE\Classes and HKCU\Software\Classes. The first one refers to the default
registration classes, and the second one refers to per user registration classes and file
associations.
(4) HKEY_CURRENT_USER (abbr. HKCU). HKCU links to a subkey of HKU, HKU\SID.
This key allows all of the Windows programs and applications to create, access, modify, and
store the information of current console user without determining which user is logging in [10].
Under the root key HKCU, there are also five subkeys: Environment, Identities, Network,
Software, and Volatile Environment.
• Environment is about the environmental configurations.
• Identities are related to Outlook Express.
• Network contains settings to connect the mapped network drive.
• Software refers to the user application settings.
• Volatile Environment is used to define the environmental variables according to
different users who logon a computer.
(5) HKEY_CURRENT_CONFIG (abbr. HKCC). HKCC is an image of the hardware
configuration profiles. HKLM\SYSTEM\Current\ControlSet\Hardware\Current, is also a link to
HKLM\SYSTEM\ControlSet\Hardware Profiels\XXXX, where XXXX is a four digital number
from 0000.
2.3. Values
If we compare the Windows folders and files with Windows Registry, then the keys and
subkeys could be considered as folders and sub folders, and the values of a key could be
considered as the files in a folder. Just like a file of Windows, a value also has its properties.
Name, type, and data are the three components of a value. Every value has a unique name. The
naming regulations are also similar to those of files. Some special characters such as “?”, “\”,
and so on could not appear in the name of a value [5]. There are six major types of values:
string, multistring, expandable string, binary, Dword, and Qword.
• String values are the easiest to understand because data in this type is recorded in plain
text in English.
124
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
• Multistring values include a list of strings with ASCII code 00 separating these strings
[4].
• Expandable string is another variant of string value. Expandable string contains special
variables such as %SYSTEMROOT%, %USERPROFILE% and so on. These variables
could replace some special path easily. For example, if we want to locate the folder
X:\Documents and Settings\username\Desktop, the %USERPROFIEL%\Desktop could
be used no matter on which drive windows are installed and which user logs on.
• Binary value also stores string but the data is displayed in hex format and the
information stored is always related to hardware [7].
• Unlike the above value types, the data stored in Dword and Qword are not strings of
characters. There are two numbers in Dword and Qword types: 1 and 0 (usually 1 for
enable and 0 for disable). In some cases, numbers within 60 are used to indicate data
related to timeout settings. However, the difference between Dword and Qword is that
Dword stores 32-bit data and Qword stores 64-bit data [6].
2.4. Hives
Hives are the physical files of the two master keys in Windows Registry stored on hard drive.
The tree format we view through Windows Registry Editor, as shown in Figure 1, is a logical
structure of the five root keys. If we use forensic tools to view the Windows Registry in an
offline environment or view the Registry remotely, only the two master keys will be listed. So
only the two master keys and their subkeys have hives. The hives of HKLM’s subkeys are
stored at %SYSTEMROOT%System32\config, and the hives of HKU’s subkeys are stored at
%USERPFOFILE%.
3. RELATED WORK
Derrick J. Farmer explores the Windows registry by examine the MRU List, UserAssist,
Wireless Networks, USB devices, Internet Explorer, Windows passwords, instance message
applications and etc. [3] Lih Wern Won discussed the data hided in Windows registry in his
research and illustrate some techniques to hide data into the registry and registry keys.[4] Both
researchers agree that Windows registry is a very important source for forensics evidence and
understanding the type of data could reside in the registry is crucial in the forensic analysis
process.[3][4]
125
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
Table 1 lists the keys filtered from every subkey that has forensic value under the five root
keys. We discuss some applications of the keys that have forensic value in the next section.
Hardware
HKLM\SYSTEM\CurrentControlSet\HardwareProfile\XXXX Current Hardware
Settings
HKLM\SYSTEM\MountedDevices Mounted devices
126
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
Network
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\ IP Address and
GUID Gateway
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MapNetwor Mapped Network
kDriveMRU Devices
Usually, it’s quite easy to find the information we want in one of the above locations. In a
network intrusion case, investigators almost always need to determine which software has been
installed in a computer. If special forensic tools are not available, the investigators have to look
from many locations for the software to locate its physical path.
Time and date information are also important in some cases. Hackers often change the created,
accessed, and modified times of their malicious programs in order to make the victims think
that these software have been in their computers for a while. However, the last written time in
Windows Registry is often true. The hackers often overlook this timestamp because Windows
Registry Editor does not include the timestamp. If we could find the last written time, then we
can determine the time the hacker attacked the computers. The timestamps could also narrow
the range of the logs we should check. Although timestamp couldn’t be viewed by Windows
Registry Editor, it can be viewed with the help of other tools such as AccessData’s Registry
Viewer (Demo version).
Under HKLM\SOFTWARE, the last logon user could also be found and the exact key path is
HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon. This key contains the
last logon information, as shown in Figure 5. The value named DefaultUserName corresponds
to the information about the last logon user. In Figure 5, Haoyang Xie is the last logon user.
DefaultDomainName is PC-201101170136. The string of numbers is actually the time when the
Windows OS was installed on a computer, by default setting.
128
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
As shown in Figure 6, the functions of the values could be identified by their names easily. If
the data of the “notify” value is 0, the notification is enabled, otherwise it is disabled.
In addition to the notification information about security center, the configurations of firewall
are stored in
HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy. This
key includes two subkeys: StandardProfile and DomainProfile. StandardProfile is the local
profile and the DomainProfile is per group’s settings. Both of them could be controlled by a
129
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
DWORD type value EnableFirewall. If the data is 1, then the firewall is enabled, and the
firewall works normally. If the data is 0, the firewall is disabled. Sometimes, we couldn’t find
the EnableFirewall value under these two profile keys. Then we may create a new value named
“EnableFirewall” with DWORD type. In addition, a subkey named AuthorizedApplications is
listed under each Profile. Some intruders could also use .reg file to allow their malicious codes
to access the compromised systems. In this situation, an intruder doesn’t even need to disable
the notifications.
The last step is to disable antivirus. Often antivirus boots with the startup of a computer. We
have known that the key path of services is HKLM\SYSTEM\CurrentControlSet\Services, as
shown in Figure 7. Each subkey of the Services key has a DWORD value named “Start” which
indicates the ways of booting. If the data is 2, this service will start up with the boot of
Windows. If the data is 3, the service will be started manually. If the data is 4, the service is
disabled. In Figure 7, the highlighted subkey 360rp is related to the antivirus software and the
“Start” data is 2. If a hacker wants to bypass the security control of the desktop, he will set the
“Start” data to 4 to disable 360 Safety to avoid the antivirus software.
Investigators have to be familiar with the processes hackers use so that they could check the
correct locations as soon as possible when an intrusion occurs. Timestamp is also very
important. For network intrusion, intrusion time is very important to forensics.
130
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
Figure 8 shows there are two users in this computer. The longest string is S-1-5-21-602162358-
839522115-1957994488-1004. “S” indicates that the following string is a SID. The first
number “1” is the revision number. The third part is the authorized level which ranges from 0 to
5. The fourth part is the local or domain machine identifier. In this example, 602162358-
839522115-1957994488 is the local computer identifier. The last part “1004” is a relative
identifier which is also a unique number within a local computer or domain [2].
However, what we see here is just a set of numbers. If there are large amount of strings of
numbers, and we are not familiar with the settings of a computer, then we could not know
which user a SID stands for. In Registry Forensics, it is necessary to map SIDs to users. The
mapping between SIDs and users is stored in SAM, a local security database. With the help of
specific forensic tools, this problem could be resolved easily. If forensic tools are not available,
there is also a manual method that could be used to identify the users. In a Windows system, the
username could appear in “My Documents”. If we could find the relationship between SIDs
and “My documents”, we may resolve the mapping of SIDs to users.
The data of the values can offer very useful evidences. The data is 16-byte. The first 4-byte is
for unknown information at this time; the next 4-byte is a counter designed to record the times a
program has been run [2]. The last 8-byte is a Windows 64-bit timestamp which indicates the
last time a program was run. The counter, the middle 4-byte, starts with number 6 when a
program runs for the first time. Compared with the counter, the timestamp indicated by the last
8 bytes is more important. Some professional tools, such as AccessData’s Registry View (Full
License) [12] and EnCase [13], could decode all of the data including the timestamps, counters,
and value names. If these tools are unavailable, we could use another free tool Dcode (Demo)
[14] to decode the data. For example, the second value’s last 8-byte data is 88 37 3a ba f1 cb
01, which is decoded to “Sun, 03 April 2011 04:47:25 UTC”, as shown in Figure 11.
132
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
Besides these, there is still more information about user activities such as the information about
Protected Storage System Provider, which stores some usernames and passwords. However,
without professional forensic software, we could not read the information. In addition, there is
still more information about MRU which could be found at different locations for different
programs.
6. CONCLUSION
Windows Registry Forensics is a very important branch of computer and network forensics.
The real cases are more complex and different forensic tools need to be used together to
achieve enough evidence. This paper focuses on Windows Registry Forensics. Keys and
subkeys that have forensic value are filtered from Windows Registry and organized. They could
be considered as tools to investigate Windows Registry in real cases. As part of Windows
Registry forensics, this paper discusses the applications of the forensic keys against intrusion.
However, the keys filtered and organized in this paper are not all of the keys that have forensic
values. Windows Registry is huge and the research on it continues. Even if we have known
every key, subkey, and value of Windows Registry, we still have to consider how to use them
in real cases since the intrusion cases will not be the same every time.
REFERENCES
[1] Anson, S., & Bunting, S. (2007). Mastering Windows Network Forensics and Investigation.
Indianapolis: Sybex.
[2] Carvey, H. (2011). Windows Registry Forensics: Advanced Digital Forensic Analysis of the
Windows Registry. Burlington: Syngress.
[3] Farmer, D. J. (n.d.). A forensic analysis of the Windows Registry. Retrieved March 13, 2011,
from http://www.forensicfocus.com/downloads/windows-registry-quick-reference.pdf
[4] Ferri, V. (n.d.). Registry Data Types. Retrieved March 13, 2011, from
http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=361
[5] Fisher, T. (n.d.). Registry Value. Retrieved March 10, 2011, from About.com PC Support:
http://pcsupport.about.com/od/termsv/g/registryvalue.htm
[6] Honeycutt, J. (2005). Microsoft Windows Registry Guide. Redmond: Microsoft Press.
133
International Journal of Network Security & Its Applications (IJNSA), Vol.4, No.2, March 2012
[7] Ivens, K. (2001, March 19). Registry Data Types. Retrieved March 14, 2011, from
http://www.windowsitpro.com/article/registry2/registry-data-types.aspx
[8] Kamara, L. (n.d.). The Windows Registry Overview. Retrieved March 11, 2011, from
http://ezinearticles.com/?The-Windows-Registry-Overview&id=2274356
[9] Microsoft Corp. (n.d.). Registry Editor overview. Retrieved March 11, 2011, from
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-
us/regedit_overview.mspx?mfr=true
[10] Microsoft. (2008, February 4). Microsoft Support. Retrieved March 11, 2011, from Windows
registry information for advanced users: http://support.microsoft.com/kb/256986
[11] Wong, L. W. (n.d.). Forensic Analysis of the Windows Registry. Retrieved March 15, 2011,
from http://www.forensicfocus.com/downloads/forensic-analysis-windows-registry.pdf134
[12] AccessData, Registry Viewer. Retrieved February 17, 2012, from
http://accessdata.com/support/adownloads
[13] Guidance Software, EnCase Forensic, Retrieved February 20, 2012, from
http://www.guidancesoftware.com/forensic.htm
[14] Digital Detective, Free Tool-DCode. Retrieved February 20, 2012, from http://www.digital-
detective.co.uk/freetools/decode.asp
134