Difference between pages "BitLocker: how to image" and "Windows Registry"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
(Imaging Options)
 
(Tracking removable media)
 
Line 1: Line 1:
 +
==File Locations==
 +
The Windows Registry is stored in multiple files.
  
= Imaging Options =
+
===Windows NT 4 ===
 +
In Windows NT 4 (and later) the Registry is stored in the [[Windows NT Registry File (REGF)]] format.
  
There are multiple ways to image a computer with BitLocker security in place, namely:
+
Basically the following Registry hives are stored in the corresponding files:
* Offline imaging
+
* HKEY_USERS: \Documents and Setting\User Profile\NTUSER.DAT
* Live imaging
+
* HKEY_USERS\DEFAULT: C:\Windows\system32\config\default
 +
* HKEY_LOCAL_MACHINE\SAM: C:\Windows\system32\config\SAM
 +
* HKEY_LOCAL_MACHINE\SECURITY: C:\Windows\system32\config\SECURITY
 +
* HKEY_LOCAL_MACHINE\SOFTWARE: C:\Windows\system32\config\software
 +
* HKEY_LOCAL_MACHINE\SYSTEM: C:\Windows\system32\config\system
  
== Offline imaging ==
+
===Windows 98/ME===
 +
* \Windows\user.dat
 +
* \Windows\system.dat
 +
* \Windows\profiles\user profile\user.dat
  
One can make an offline image with the image containing encrypted information.
+
== Keys ==
  
Options to offline decrypt the information, provided the password or recovery password is available, exists some are:
+
=== Run/RunOnce ===
* [http://www.hsc.fr/ressources/outils/dislocker/ dislocker]
+
System-wide:
* [[EnCase]] (as of version 6) with the (optional) encryption module
+
<pre>
* [[libbde]]
+
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
 +
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
 +
</pre>
  
The recovery password is a long series of digits broken up into 8 segments.
+
Per user:
 
<pre>
 
<pre>
123456-123456-123456-123456-123456-123456-13456-123456
+
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
 +
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
 
</pre>
 
</pre>
  
Note that there is no white space in the recovery password including not at the end, e.g. EnCase does not accept the recovery password if there is trailing white space.
+
== Special cases ==
 +
The Windows Registry has several special case scenarios, mainly concerning key and value name, that are easy to fail to account for:
 +
* special characters key and value names
 +
* duplicate key and value names
 +
* the names when stored in extended ASCII (ANSI string) use a codepage that is dependent on the system settings
  
The recovery password can be recovered from a BitLocker enabled computer provided it can be logged into or if stored in escrow.
+
=== special characters key and value names ===
 +
Both key and values names are case insensitive. The \ character is used as the key separator. Note
 +
that the \ character can be used in value names. The / character is used in both key and value names.
 +
Some examples of which are:
 +
<pre>
 +
Key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\NetBT\Parameters\
 +
Value: Size/Small/Medium/Large
 +
</pre>
 +
 
 +
<pre>
 +
Key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\VIDEO\disc\
 +
Value: \Device\Video0
 +
</pre>
 +
 
 +
<pre>
 +
Key:
 +
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\xmlprov\Parameters\SchemaGroups\User\http://www.microsoft.com/provisioning/eaptlsuserpropertiesv1\
 +
Value: SchemaFile
 +
</pre>
 +
 
 +
=== codepaged ASCII strings ===
 +
 
 +
Value with name "ëigenaardig" created on Windows XP codepage 1252.
 +
 
 +
<pre>
 +
value key data:
 +
00000000: 76 6b 0b 00 46 00 00 00  20 98 1a 00 01 00 00 00  vk..F...  .......
 +
00000010: 01 00 69 6e eb 69 67 65  6e 61 61 72 64 69 67 00  ..in.ige naardig.
 +
00000020: 55 4e 49 43                                        UNIC
 +
 
 +
value key signature                    : vk
 +
value key value name size              : 11
 +
value key data size                    : 0x00000046 (70)
 +
value key data offset                  : 0x001a9820
 +
value key data type                    : 1 (REG_SZ) String
 +
value key flags                        : 0x0001
 +
        Value name is an ASCII string
 +
 
 +
value key unknown1                      : 0x6e69 (28265)
 +
value key value name                    : ëigenaardig
 +
value key value name hash              : 0xb78835ee
 +
value key padding:
 +
00000000: 00 55 4e 49 43                                    .UNIC
 +
</pre>
  
The basic steps are:
+
As you can see the name is stored in extended ASCII (ANSI) using codepage 1252.
  
# Make an offline full disk image.
+
==Tools==
# Recover the password, this can be done by booting the original computer, or by creating a clone and booting the clone. (booting from a clone has not been tested at this time.)
+
===Open Source===
## Once booted log into the computer
+
* [https://www.pinguin.lu/index.php Forensic Registry EDitor (fred)] - "Forensic Registry EDitor (fred) is a cross-platform M$ registry hive editor" by [[Daniel Gillen]]
## Use the BitLocker control panel applet to display the password. This can also be done from the command-line.
+
* [http://projects.sentinelchicken.org/data/doc/reglookup/regfi/ libregfi] - The regfi library is a read-only NT registry library which serves as the main engine behind the reglookup tool
## record the password
+
* [http://projects.sentinelchicken.org/reglookup/ reglookup] — "small command line utility for reading and querying Windows NT-based registries."
#:
+
* [http://sourceforge.net/projects/regviewer/ regviewer] — a tool for looking at the registry.
# For EnCase v6 or higher with the encryption module installed
+
* [[Regripper|RegRipper]] — "the fastest, easiest, and best tool for registry analysis in forensics examinations."
## Load the image into EnCase
+
* [http://search.cpan.org/~jmacfarla/Parse-Win32Registry-0.51/lib/Parse/Win32Registry.pm Parse::Win32Registry] Perl module.
## You will be prompted for the password. Simply enter it and continue.
+
* [http://www.williballenthin.com/registry/index.html python-registry] Python module.
## If you prefer to have an un-encrypted image to work with other tools or share with co-workers, you can "re-acquire" the image from within EnCase.  The new image will have unencrypted data.
+
* [http://code.google.com/p/registrydecoder/ Registry Decoder] offline analysis component, by [[Andrew Case]]
## After adding the encrypted image into your case, simply right click on the drive in the left panel and select acquire. Select "do not add to case". You will be presented a dialog window to enter new information about the image.  Make sure the destination you select for your new image does not exist.
+
* [http://code.google.com/p/registrydecoder/ RegDecoderLive] live hive acquisition component, by [[Andrew Case]]
 +
* [[libregf]] - Library and tools to access the Windows NT Registry File (REGF) format
 +
* [[Registryasxml]] - Tool to import/export registry sections as XML
 +
* [http://samba.org/~jelmer/kregedit/ kregedit] - a KDE utility for viewing and editing registry files.
 +
* [http://www.bindview.com/Services/RAZOR/Utilities/Unix_Linux/ntreg_readme.cfm ntreg] a file system driver for linux, which understands the NT registry file format.  
  
== Live imaging ==
+
===Freeware===
 +
* [http://www.tzworks.net/prototype_page.php?proto_id=3 Yet Another Registry Utility (yaru)] Free tool that can be run on Windows, Linux or Mac OS-X. If run in admin mode, allows viewing of registry hives on live system.
  
=== FTK Live Imaging of a physical drive ===
+
* [http://www.tzworks.net/prototype_page.php?proto_id=14 Windows ShellBag Parser] Free tool that can be run on Windows, Linux or Mac OS-X.
  
Using FTK Imager lite, it was determined a live image of the physical system disk resulted in an image with an encrypted bitlocker container on it.
+
* [http://tzworks.net/prototype_page.php?proto_id=19 ''cafae''] - Computer Account Forensic Artifact Extractor.  Free tool that can be run on Windows, Linux or Mac OS-X to parse ntuser.dat hives.
  
Note that the phrase "physical" here corresponds directly with FTK Imagers use of the term in their image acquire menu.
+
===Commercial===
 +
* [http://www.abexo.com/free-registry-cleaner.htm Abexo Free Regisry Cleaner]
 +
* [http://www.auslogics.com/registry-defrag Auslogics Registry Defrag]
 +
* [http://lastbit.com/arv/ Alien Registry Viewer]
 +
* [http://www.larshederer.homepage.t-online.de/erunt/index.htm NT Registry Optimizer]
 +
* [http://www.registry-clean.net/free-registry-defrag.htm iExpert Software-Free Registry Defrag]
 +
* [http://arsenalrecon.com/apps Registry Recon]
 +
* [http://paullee.ru/regundel Registry Undelete (russian)]
 +
* [http://mitec.cz/wrr.html Windows Registry Recovery]
 +
* [http://registrytool.com/ Registry Tool]
  
=== FTK Live Imaging of a logical partition ===
+
==Bibliography==
 +
* [http://www.dfrws.org/2009/proceedings/p69-zhu.pdf Using ShellBag Information to Reconstruct User Activities], by Yuandong Zhu*, Pavel Gladyshev, Joshua James, DFRWS 2009
 +
* [http://www.sentinelchicken.com/research/registry_format/ The Windows NT Registry File Format], by [[Timothy Morgan]], June 9, 2009
 +
* [http://amnesia.gtisc.gatech.edu/~moyix/suzibandit.ltd.uk/MSc/ The Internal Structure of the Windows Registry], by Peter Norris, February 2009
 +
* [http://www.dfrws.org/2008/proceedings/p33-morgan.pdf Recovering Deleted Data From the Windows Registry] and [http://www.dfrws.org/2008/proceedings/p33-morgan_pres.pdf slides], by [[Timothy Morgan]], DFRWS 2008
 +
* [http://dfrws.org/2008/proceedings/p26-dolan-gavitt.pdf Forensic Analysis of the Windows Registry in Memory] and [http://dfrws.org/2008/proceedings/p26-dolan-gavitt_pres.pdf slides], by Brendan Dolan-Gavitt, DFRWS 2008
 +
* [http://www.sentinelchicken.com/data/JolantaThomassenDISSERTATION.pdf Forensic analysis of unallocated space in Windows Registry Hive files], by Jolanta Thomassen, March 11, 2008
 +
* [http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B7CW4-4GX1J3B-1&_user=3326500&_rdoc=1&_fmt=&_orig=search&_sort=d&view=c&_acct=C000060280&_version=1&_urlVersion=0&_userid=3326500&md5=ab887593e7be6d5257696707886978f1 The Windows Registry as a forensic resource], Digital Investigation, Volume 2, Issue 3, September 2005, Pages 201--205.
  
This has not been verified to work or fail at this time.
+
=== Undated ===
 +
* [http://eptuners.com/forensics/A%20Windows%20Registry%20Quick%20Reference.pdf A Windows Registry Quick Reference: For the Everyday Examiner], by Derrick Farmer, Burlington, VT.
 +
* [http://www.forensicfocus.com/downloads/forensic-analysis-windows-registry.pdf Forensic Analysis of the Windows Registry], by Lih Wern Wong , School of Computer and Information Science, Edith Cowan University
  
Note that the phrase "logical" here corresponds directly with FTK Imagers use of the term in their image acquire menu.
+
== External Links ==
 +
* [http://en.wikipedia.org/wiki/Windows_Registry Wikipedia: Windows Registry]
 +
* [http://windowsir.blogspot.com/search/label/Registry Windows Incident Response Articles on Registry]
 +
* [http://www.answers.com/topic/win-registry Windows Registry Information]
 +
* [http://moyix.blogspot.com/search/label/registry Push the Red Button] — Articles on Registry
 +
* [http://www.beginningtoseethelight.org/ntsecurity/ Security Accounts Manager]
 +
* [http://windowsxp.mvps.org/RegistryMRU.htm Registry MRU Locations]
  
=== FTK Live Files and Folders collections ===
+
=== Tracking removable media ===
 +
* [http://www.swiftforensics.com/2012/08/tracking-usb-first-insertion-in-event.html Tracking USB First insertion in Event logs], by Yogesh Khatri, August 18, 2012
  
This was not attempted, but it seems reasonable to assume this will collect unencrypted files.
+
=== Windows 32-bit on Windows 64-bit (WoW64) ===
 +
* [http://msdn.microsoft.com/en-us/library/aa384253(v=vs.85).aspx Registry Keys Affected by WOW64], by [[Microsoft]]
 +
* [http://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx Registry Redirector], by [[Microsoft]]
  
== See Also ==
+
=== User Assist ===
* [[BitLocker Disk Encryption]]
+
* [http://blog.didierstevens.com/programs/userassist/ UserAssist], by Didier Stevens
* [[Defeating Whole Disk Encryption]]
+
* [http://blog.didierstevens.com/2007/07/17/userassist-v230/ UserAssist V2.3.0], by Didier Stevens, Tuesday 17 July 2007
 +
* [http://windowsir.blogspot.ch/2007/09/more-on-userassist-keys.html More on (the) UserAssist keys], by [[Harlan Carvey]], Monday, September 03, 2007
 +
* [http://blog.didierstevens.com/2009/01/18/quickpost-windows-7-beta-rot13-replaced-with-vigenere-great-joke/ Windows 7 Beta: ROT13 Replaced With Vigenère? Great Joke!], by Didier Stevens, January 18, 2009
 +
* [http://forensicsfromthesausagefactory.blogspot.ch/2010/05/prefetch-and-user-assist.html Prefetch and User Assist], by DC174, Thursday, 27 May 2010
 +
* [http://forensicartifacts.com/2010/07/userassist/ Forensic Artifact: UserAssist], July 2010
 +
* [http://sploited.blogspot.ch/2012/12/sans-forensic-artifact-6-userassist.html SANS Forensic Artifact 6: UserAssist], by Sploited, Thursday, 27 December 2012
 +
* [http://www.4n6k.com/2013/05/userassist-forensics-timelines.html UserAssist Forensics (timelines, interpretation, testing, & more)], by Dan (@4n6k), Tuesday, May 14, 2013
 +
* [http://hackingexposedcomputerforensicsblog.blogspot.ch/2013/08/daily-blog-45-understanding-artifacts.html Daily Blog #45: Understanding the artifacts: User Assist], by [[David Cowen]], Wednesday, August 7, 2013
  
[[Category:Disk encryption]]
+
[[Category:Windows Analysis]]
[[Category:Windows]]
+
[[Category:Bibliographies]]

Revision as of 01:28, 3 September 2013

File Locations

The Windows Registry is stored in multiple files.

Windows NT 4

In Windows NT 4 (and later) the Registry is stored in the Windows NT Registry File (REGF) format.

Basically the following Registry hives are stored in the corresponding files:

  • HKEY_USERS: \Documents and Setting\User Profile\NTUSER.DAT
  • HKEY_USERS\DEFAULT: C:\Windows\system32\config\default
  • HKEY_LOCAL_MACHINE\SAM: C:\Windows\system32\config\SAM
  • HKEY_LOCAL_MACHINE\SECURITY: C:\Windows\system32\config\SECURITY
  • HKEY_LOCAL_MACHINE\SOFTWARE: C:\Windows\system32\config\software
  • HKEY_LOCAL_MACHINE\SYSTEM: C:\Windows\system32\config\system

Windows 98/ME

  • \Windows\user.dat
  • \Windows\system.dat
  • \Windows\profiles\user profile\user.dat

Keys

Run/RunOnce

System-wide:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Per user:

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Special cases

The Windows Registry has several special case scenarios, mainly concerning key and value name, that are easy to fail to account for:

  • special characters key and value names
  • duplicate key and value names
  • the names when stored in extended ASCII (ANSI string) use a codepage that is dependent on the system settings

special characters key and value names

Both key and values names are case insensitive. The \ character is used as the key separator. Note that the \ character can be used in value names. The / character is used in both key and value names. Some examples of which are:

Key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\NetBT\Parameters\
Value: Size/Small/Medium/Large
Key: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Terminal Server\VIDEO\disc\
Value: \Device\Video0
Key:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\xmlprov\Parameters\SchemaGroups\User\http://www.microsoft.com/provisioning/eaptlsuserpropertiesv1\
Value: SchemaFile

codepaged ASCII strings

Value with name "ëigenaardig" created on Windows XP codepage 1252.

value key data:
00000000: 76 6b 0b 00 46 00 00 00  20 98 1a 00 01 00 00 00   vk..F...  .......
00000010: 01 00 69 6e eb 69 67 65  6e 61 61 72 64 69 67 00   ..in.ige naardig.
00000020: 55 4e 49 43                                        UNIC

value key signature                     : vk
value key value name size               : 11
value key data size                     : 0x00000046 (70)
value key data offset                   : 0x001a9820
value key data type                     : 1 (REG_SZ) String
value key flags                         : 0x0001
        Value name is an ASCII string

value key unknown1                      : 0x6e69 (28265)
value key value name                    : ëigenaardig
value key value name hash               : 0xb78835ee
value key padding:
00000000: 00 55 4e 49 43                                     .UNIC

As you can see the name is stored in extended ASCII (ANSI) using codepage 1252.

Tools

Open Source

Freeware

  • cafae - Computer Account Forensic Artifact Extractor. Free tool that can be run on Windows, Linux or Mac OS-X to parse ntuser.dat hives.

Commercial

Bibliography

Undated

External Links

Tracking removable media

Windows 32-bit on Windows 64-bit (WoW64)

User Assist