How Registry Is Helpful In Managing Security Computer Science Essay

Published:

The Registry is a database used to store settings and options for the 32 bit versions of Microsoft Windows including Windows 95, 98, ME and NT/2000. It contains information and settings for all the hardware, software, users, and preferences of the PC. Whenever a user makes changes to a Control Panel settings, or File Associations, System Policies, or installed software, the changes are reflected and stored in the Registry.

The physical files that make up the registry are stored differently depending on version of Windows; under Windows 95 & 98 it is contained in two hidden files in your Windows directory, called USER.DAT and SYSTEM.DAT, for Windows Me there is an additional CLASSES.DAT file, while under Windows NT/2000 the files are contained seperately in the %SystemRoot%\System32\Config directory. You can not edit these files directly, you must use a tool commonly known as a "Registry Editor" to make any changes.

Lady using a tablet
Lady using a tablet

Professional

Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

Registry Editor is "hidden" to discourage its use by the normal user; the tool is intended for advanced users. It can only be opened from the Run menu.

The Structure of "The Registry"

The Registry has a hierarchal structure, although it looks complicated the structure is similar to the directory structure on hard disk, with Regedit being similar to Windows Explorer.

Each main branch (denoted by a folder icon in the Registry Editor, see left) is called a Hive, and Hives contains Keys. Each key can contain other keys (sometimes referred to as sub-keys), as well as Values. The values contain the actual information stored in the Registry.

There are three types of values; String, Binary, and DWORD - the use of these depends upon the context.

There are six main branches, each containing a specific portion of the information stored in the Registry. They are as follows:

* HKEY_CLASSES_ROOT - This branch contains all of your file association mappings to support the drag-and-drop feature, OLE information, Windows shortcuts, and core aspects of the Windows user interface.

* HKEY_CURRENT_USER - This branch links to the section of HKEY_USERS appropriate for the user currently logged onto the PC and contains information such as logon names, desktop settings, and Start menu settings.

* HKEY_LOCAL_MACHINE - This branch contains computer specific information about the type of hardware, software, and other preferences on a given PC, this information is used for all users who log onto this computer.

* HKEY_USERS - This branch contains individual preferences for each user of the computer, each user is represented by a SID sub-key located under the main branch.

* HKEY_CURRENT_CONFIG - This branch links to the section of HKEY_LOCAL_MACHINE appropriate for the current hardware configuration.

* HKEY_DYN_DATA - This branch points to the part of HKEY_LOCAL_MACHINE, for use with the Plug-&-Play features of Windows, this section is dymanic and will change as devices are added and removed from the system.

Each registry value is stored as one of five main data types:

* REG_BINARY - This type stores the value as raw binary data. Most hardware component information is stored as binary data, and can be displayed in an editor in hexadecimal format.

* REG_DWORD - This type represents the data by a four byte number and is commonly used for boolean values, such as "0" is disabled and "1" is enabled. Additionally many parameters for device driver and services are this type, and can be displayed in REGEDT32 in binary, hexadecimal and decimal format, or in REGEDIT in hexadecimal and decimal format.

* REG_EXPAND_SZ - This type is an expandable data string that is string containing a variable to be replaced when called by an application. For example, for the following value, the string "%SystemRoot%" will replaced by the actual location of the directory containing the Windows NT system files. (This type is only available using an advanced registry editor such as REGEDT32)

* REG_MULTI_SZ - This type is a multiple string used to represent values that contain lists or multiple values, each entry is separated by a NULL character. (This type is only available using an advanced registry editor such as REGEDT32)

Lady using a tablet
Lady using a tablet

Comprehensive

Writing Services

Lady Using Tablet

Plagiarism-free
Always on Time

Marked to Standard

Order Now

* REG_SZ - This type is a standard string, used to represent human readable text values.

Other data types not available through the standard registry editors include:

* REG_DWORD_LITTLE_ENDIAN - A 32-bit number in little-endian format.

* REG_DWORD_BIG_ENDIAN - A 32-bit number in big-endian format.

* REG_LINK - A Unicode symbolic link. Used internally; applications should not use this type.

* REG_NONE - No defined value type.

* REG_QWORD - A 64-bit number.

* REG_QWORD_LITTLE_ENDIAN - A 64-bit number in little-endian format.

* REG_RESOURCE_LIST - A device-driver resource list.

Editing the Registry

The Registry Editor (REGEDIT.EXE) is included with most version of Windows (although you won't find it on the Start Menu) it enables you to view, search and edit the data within the Registry. There are several methods for starting the Registry Editor, the simplest is to click on the Start button, then select Run, and in the Open box type "regedit", and if the Registry Editor is installed it should now open and look like the image below.

An alternative Registry Editor (REGEDT32.EXE) is available for use with Windows NT/2000, it includes some additional features not found in the standard version, including; the ability to view and modify security permissions, and being able to create and modify the extended string values REG_EXPAND_SZ & REG_MULTI_SZ.

Create a Shortcut to Regedit

This can be done by simply right-clicking on a blank area of your desktop, selecting New, then Shortcut, then in the Command line box enter "regedit.exe" and click Next, enter a friendly name (e.g. 'Registry Editor') then click Finish and now you can double click on the new icon to launch the Registry Editor.

Using Regedit to modify your Registry

Once you have started the Regedit you will notice that on the left side there is a tree with folders, and on the right the contents (values) of the currently selected folder.

Like Windows explorer, to expand a certain branch (see the structure of the registry section), click on the plus sign [+] to the left of any folder, or just double-click on the folder. To display the contents of a key (folder), just click the desired key, and look at the values listed on the right side. You can add a new key or value by selecting New from the Edit menu, or by right-clicking your mouse. And you can rename any value and almost any key with the same method used to rename files; right-click on an object and click rename, or click on it twice (slowly), or just press F2 on the keyboard. Lastly, you can delete a key or value by clicking on it, and pressing Delete on the keyboard, or by right-clicking on it, and choosing Delete.

Note: it is always a good idea to backup your registry before making any changes to it. It can be intimidating to a new user, and there is always the possibility of changing or deleting a critical setting causing you to have to reinstall the whole operating system. It's much better to be safe than sorry!

Importing and Exporting Registry Settings

A great feature of the Registry Editor is it's ability to import and export registry settings to a text file, this text file, identified by the .REG extension, can then be saved or shared with other people to easily modify local registry settings. You can see the layout of these text files by simply exporting a key to a file and opening it in Notepad, to do this using the Registry Editor select a key, then from the "Registry" menu choose "Export Registry File...", choose a filename and save. If you open this file in notepad you will see a file similar to the example below:

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\Setup]

"SetupType"=dword:00000000

"CmdLine"="setup -newsetup"

"SystemPrefix"=hex:c5,0b,00,00,00,40,36,02

The layout is quite simple, REGEDIT4 indicated the file type and version, [HKEY_LOCAL_MACHINE\SYSTEM\Setup] indicated the key the values are from, "SetupType"=dword:00000000 are the values themselves the portion after the "=" will vary depending on the type of value they are; DWORD, String or Binary.

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

So by simply editing this file to make the changes you want, it can then be easily distributed and all that need to be done is to double-click, or choose "Import" from the Registry menu, for the settings to be added to the system Registry.

How registry is helpful in managing security

By typing regedit at run interface, we can get access to registry editor interface. We can configure the whole OS according to the security policy we need to implement.

It is basically used to prevent unauthorized access from unknown users, protect data and to implement file permissions, to open/close ports so that nobody can gain access when the machine is on network.

Few examples of such policies are described below:

To disable USB

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ultra]

"ErrorControl"=dword:00000001

"Group"="SCSI miniport"

"Start"=dword:00000004

"Tag"=dword:0000003b

"Type"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ultra\Parameters]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ultra\Parameters\PnpInterface]

"5"=dword:00000001

Prevent Access to the Contents of Selected Drives: This restriction prevents users from using My Computer or Explorer to access the content of selected drives. Also, they cannot use Run, Map Network Drive, or the Dir command to view the directories on these drives.

To hide drive C

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoDriveTypeAutoRun"=dword:00000095

"CDRAutoRun"=dword:00000000

"NoNetworkConnections"=dword:00000001

"NoSMHelp"=dword:00000001

"ForceStartMenuLogOff"=dword:00000001

"noviewondrive"=dword:00000004

To hide drive D

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoDriveTypeAutoRun"=dword:00000095

"CDRAutoRun"=dword:00000000

"NoNetworkConnections"=dword:00000001

"NoSMHelp"=dword:00000001

"ForceStartMenuLogOff"=dword:00000001

"noviewondrive"=dword:00000008

To Enable All drives

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoDriveTypeAutoRun"=dword:00000095

"CDRAutoRun"=dword:00000000

"NoNetworkConnections"=dword:00000001

"NoSMHelp"=dword:00000001

"ForceStartMenuLogOff"=dword:00000001

"noviewondrive"=dword:00000000

Restrict Changes to User Folder Locations: These restrictions disable the ability for users to change the location of user-specific folders such as My Documents, My Pictures, My Music and Favorites.

For each folder create a new DWORD value from the list below and set it to equal "1" to restrict changes or "0" to allow them.

DisablePersonalDirChange - Restrict changes to My Documents

DisableMyPicturesDirChange - Restrict changes to My Pictures

DisableMyMusicDirChange - Restrict changes to My Music

DisableFavoritesDirChange - Restrict changes to Favorites

Log off or restart Windows for the change to take effect

User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\

Explorer]

System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\

Explorer]

Value Name: DisablePersonalDirChange, DisableMyPicturesDirChange, DisableMyMusicDirChange, DisableFavoritesDirChange

Data Type: REG_DWORD (DWORD Value)

Value Data: (0 = allow changes, 1 = restrict changes)

Restrict Users from Running Specific Applications: This setting allows you to specify applications and filenames that users are restricted from running.

Disable Run Commands Specified in the Registry: This restriction is used to disable the ability to run startup programs specified in the registry when Windows launches.

Disable the Windows Hotkeys: This restriction allows you to disable the use of the Windows hotkey combinations that provide shortcuts to the Start Menu and task swapping.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

"SCANCODE MAP"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5b,e0,00,00,5c,e0,\

00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes]

"00000402"="bg"

"00000404"="ch"

"00000405"="cz"

"00000406"="dk"

"00000407"="gr"

"00000408"="gk"

"00000409"="us"

"0000040A"="sp"

"0000040B"="su"

"0000040C"="fr"

"0000040E"="hu"

"0000040F"="is"

"00000410"="it"

"00000411"="jp"

"00000412"="ko"

"00000413"="nl"

"00000414"="no"

"00000415"="pl"

"00000416"="br"

"00000418"="ro"

"00000419"="ru"

"0000041A"="yu"

"0000041B"="sl"

"0000041C"="us"

"0000041D"="sv"

"0000041F"="tr"

"00000422"="us"

"00000423"="us"

"00000424"="yu"

"00000425"="et"

"00000426"="us"

"00000427"="us"

"00000804"="ch"

"00000807"="sg"

"00000809"="uk"

"0000080A"="la"

"0000080C"="be"

"00000813"="be"

"00000816"="po"

"00000C0C"="cf"

"00000C1A"="us"

"00001009"="us"

"0000100C"="sf"

"00001809"="us"

"00010402"="us"

"00010405"="cz"

"00010407"="gr"

"00010408"="gk"

"00010409"="dv"

"0001040A"="sp"

"0001040E"="hu"

"00010410"="it"

"00010415"="pl"

"00010419"="ru"

"0001041B"="sl"

"0001041F"="tr"

"00010426"="us"

"00010C0C"="cf"

"00010C1A"="us"

"00020408"="gk"

"00020409"="us"

"00030409"="usl"

"00040409"="usr"

"00050408"="gk"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs]

"00000410"="141"

"0000041F"="179"

"00010408"="220"

"00010410"="142"

"00010415"="214"

"0001041F"="440"

"00020408"="319"

Prevent an Automatic Reboot After a Crash:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]

"AutoReboot"=dword:00000000

"CrashDumpEnabled"=dword:00000003

"DumpFile"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\

74,00,25,00,5c,00,4d,00,45,00,4d,00,4f,00,52,00,59,00,2e,00,44,00,4d,00,50,\00,00,00

"LogEvent"=dword:00000001

"MinidumpDir"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\00,74,00,25,00,5c,00,4d,00,69,00,6e,00,69,00,64,00,75,00,6d,00,70,00,00,00

"Overwrite"=dword:00000001

"SendAlert"=dword:00000001

Disable Registry Editing Tools: This restriction disables the ability to interactively run the standard Microsoft registry editing tools such as REGEDIT and REGEDT32.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]

"DisableChangePassword"=dword:00000001

"disableregistrytools"=dword:00000001

Restrict Applications Users Can Run: Windows gives the ability to restrict the applications that can be run by users on a workstation.

Reference Cited

http://www.pctools.com/guides/registry/id/4/

http://en.wikipedia.org/wiki/Regedit#Editing