Group Policy Central

Posts tagged ‘Bitlocker’

Best Practive: How to enable a disabled Local Administrator account offline in Windows 7 (even when using BitLocker)

Back in the days of Windows XP IT administrators could disable the local administrator account on domain joined computers but still be able to use the account if they rebooted the computer into safe mode (see How to access the computer after you disable the administrator account ).

To log on to Windows by using the disabled local Administrator account, start Windows in Safe mode.

However this behaviour has change since Windows Vista (and 7) and now you are no longer able to logon to a computers local administrator account if it is disabled (see Built-in Administrator Account Disabled ).

On domain joined computers, the disabled built-in administrator account cannot logon in safe mode

This presents some challenges as IT administrator as sometime you still need to ability to logon to a computer using the local administrator. The most common scenario you need to do this is when you need to troubleshoot domain account issues (e.g. re-join the computer to the domain) when the AD computer account has been reset or deleted or the password has become out of sync and you get a workstation trust relationship issue (see below).

The security database on teh server does not have a comptuer accounf for this workstation trust relationship.

The problem is that the local administrator account is now disabled and due to the new behaviour of the account you can no longer log with it using safe mode.

The built-in administrator account is disabled by default in Windows Vista on new installations.

This of course makes it almost impossible to configure the computer into a workgroup so that it can then be re-added to the domain to fix the problem. Its even more difficult if you have BitLocker encryption enabled on your local hard drive.


It is possible that you could logon with a user with local administrator access using cached credentials however this is limited to the last 10 people that logged on (increasable to 50 if you change the CachedLogonsCount below registry key).

CachedLogonsCount Registry Key

But even so, this would also mean you have to know the username and password of the account at the time they last logged onto the computer. This may be a bit hard to do as they may have changed their password a number of times since they logged on to that computer.

Unfortunately, it is also much more unlikely now that the normal local user of the computer has not been given local admin due to all the improvement with Windows 7 (e.g. UAC) that allows users to work with standard user permissions.

Now you might think the really obvious solution is to just enable the local administrator account and set a password in advanced using Group Policy Preferences (see below) so that you can use it when you need to however doing this has a few security issues.

Group Policy Prefereces - New Local User Properties

However enabling the local administrator account means it can be used by anyone who knows the credentials and they could then use the account to remotely access any workstation on the network (not good). It also mean a normal user that knows the local admin credentials ( we would like to think they don’t but somehow they find out) could us them whenever they are presented with a specify credentials UAC prompt. So it’s pretty much a back door that anyone can use to get around the fact you spent all this time setting up their computers for them to not require local administrator access…

So to get around this issues you could just set the password on a regular basis using Group Policy Preference (see above image) however this also has a few problems as well… While setting the local administrator password is easy to do however it is stored in the SYSVOL as an encrypted string that is fairly easy to crack (see Passwords in Group Policy Preferences ).

A password in a preference item is stored in SYSVOL ….. it is not stored as clear text in the XML source code of the preference item. However, the password is not secured.

To help mitigate this I have also written an article that explain a way to more securely apply the new password to all the computers (see How to use Group Policy Preferences to change account Passwords ) but even if you did this on a regular basis you would still need to tell all the IT support staff what the new password is when you change the password and thus people quickly learn the local admin account credentials all over again…

Note: That all being said it is still a really good idea to set a password for the local administrator account as the default password is configured as blank.

The other solution you might think of is to boot the computer using a third-party tool that can reset and enable the local admin account (see http://www.bing.com/search?q=sethc.exe+%22windows+7%22+administrator+password&form=QBRE&qs=n&sk= ) however these tools don’t work if your local drive is encrypted with BitLocker nor are they supported from Microsoft (see Microsoft policy about lost or forgotten passwords ).

If you want help to break or to reset a password, you can locate and contact a third-party company for this help. You use such third-party products and services at your own risk.

So lets assume you have a computer that is no longer properly connected to the domain with a disabled local administrator account. The computers local system drive is BitLocker encrypted and and you don’t know the credentials of any other accounts that have previously logged on with local administrator permissions… What do you do?

So below I will show you how to enable the local administrator account so that you can at least still logon with the local administrator even if the account has been disabled…



How to enable a disabled local administrator account on a Windows 7 computer with BitLocker enabled

Before you begin you are going to at a minimum know the following information:

Step 1. Boot the computer using the Windows 7 Installation media

Step 2. When prompted to “Install now” click the “Repair your computer” option at the bottom left.

Windows 7 Install Windows Menu

Step 3 (optional). If your local computer hard drive is BitLocker is encrypted you will now be prompted to type in the recovery key (see below) and just follow the next couple of step that is appropriate for your situation.

Note: You may need to use the Recovery Key Identifier (e.g. A5103515) to find the correct encryption recovery key from Active Directory.

Note2: This step is only required if your local hard drive is encrypted using BitLocker drive encryption.

BitLocker Drive Encryption Recovery

Step 4. After you have entered the correct recovery and unlocked the drive select the appropriate installation of Windows 7 that you wish to gain access to (You will probably only have one option to select).

WinRE Select System Recovyer Option

Note: Remember the drive letter in the location column as you will need to use this later (Almost definitely going to be “(D:) Local Disk” ).

Step 5. From the System Recovery Options click on “Command Prompt”

WinRE System Recovery Options

Step 6. Now run “regedit” from the command prompt.

Regedit in WinRE

Step 7. Click on HKEY_USERS and then click on File > Load Hive

Load Hive...

Step 8. Navigate to D:\Windows\System32\Config folder and select the SAM file then click Open

Note: The drive letter you use in the path above is the same as the the drive letter in the Location column in Step 4.

Loading SAM registry

Step 9. Now type “SAM_TEMP” (or any value) in the Key Name text field and click OK

Load Hive Name

Step 10. Expand SAM_TEMP\SAM\Domains\Account\Users\000001F4 and double click on the “F” key.

Local Administrator Account SAM registry

Step 11. Change the value “11” in the first column, row 0038 to “10” and click OK

Before

After

Account Disabled

Account Enabled

 

Step 12. Click back on “SAM_TEMP” and then from the File > Unload Hive and Yes to confirm.

Unload Hive...

Step 13. Exit Regedit and close the Command Prompt and click Restart from the System Recovery Option menu

Done…

Summary

You will now be able to logon as the local administrator account by using the account name “.\administrator” and the password of the account (which you should already know). This will enable you to configure the computer into a workgroup and then re-join the computer account back into the domain but without having to resort to enabling a back door administrator account on the all the computers in your environment…

Now you might now be wondering what is the point of security is on Windows 7 (i.e. BitLocker and disabled local admin) if it is so easy to circumvent however you need to remember that for this process to work you still need to know the local administrator password and more importantly you will need to know the unique BitLocker recovery key… Obviously this makes it very important to have BitLocker drive encryption deployed otherwise it will make it very easy to break into pretty much any computer if you have physical access.

the best network software security measures can be rendered useless if you fail to physically protect your systems

I know this is not strictly a Group Policy topic however it is very closely related topic and one I feel that this is still well worth knowing for any IT administrator so you can configured a more secure environment…

Other References

How to configure Group Policy to use Data Recovery Agents with “Bitlocker to Go” drives – Part 2
How to use Group Policy to save “BitLocker to Go” recovery keys in Active Directory – Part 1

Windows Seven Forums: How to Enable the Built-in Administrator Account from WinRE

TechEd 2010 NZ – Windows 7 – AppLocker / BitLocker

Best Practice: How to configure Group Policy to use Data Recovery Agents with “Bitlocker to Go” drives – Part 2

As I previously mentioned in Part 1 “use Group Policy to save “How to use BitLocker to Go” recovery keys in Active Directory – Part 1” one of the cool new features in Windows 7 is the ability to encrypt removable storage devices to help prevent the loss of data within an organisation while storing a copy of the decryption key in Active Directory. Another way to encrypt the removable storage devices and still have the ability to recover a encrypted devices if the unlock key is lost is to use a Data Recovery Agent digital certificate.

Now before you begin you first need to have deployed you a PKI infrastructure in your organisation so that you can issue the data recovery certificate to your nominated recovery agents.

So lets get started…

How to configured Group Policy to use a Data Recovery Agent with “BitLocker to Go” drives

Issuing the EFS Data Recovery Agent

First you need to create/issue at least one account with the Data Recovery Agent certificate that will be used for when encrypting all the Bitlocker to Go drives.

Step 1. Click Start, and then type certmgr.msc to open the Certificates snap-in

Step 2. In the console tree, expand Personal, and then click Certificates.

Step 2. Right click on Certificates and click on All Tasks and then Request New Certificate…

image

Step 3. Click Next to the first page of the Certificate Enrollment wizard and then then click on Active Directory Enrollment Policy and click Next

image

Step 4. Tick the EFS Recovery Agent policy and then click Enroll

image

Step 5. Click Finish once your account has enrolled as the EFS Recovery Agent certificate.

image

You should now see the File Recovery Certificate in you Personal Certificate store.

image

Exporting the DRA Certificate

You now need to export the DRA certification information to be used in the BitLocker Drive Encryption group policy in a future step.  

Step 1. Double-click the BitLockerDRA certificate to display the certificate properties sheet.

image

Step 2. Click the Details tab

image

Step 3. Click Copy to File

image

Step 4. Click Next on the Welcome to the Certificate Export Wizard page

image

Step 5. Leave the No, do not export the private key selected and then click Next.

image

Step 6. On the Export File Format page, verify that DER encoded binary x.509 (.CER) is selected, and then click Next.

image

Step 7. On the File to Export page, click Browse to display the Save as dialog box. In File name, type BitLocker. In Save as type, verify that DER Encoded Binary X.509 (.cer) is selected, and then click Save to return to the File to Export page.

image

Step 8. The File name box on the wizard page should now display the path to the BitLocker.cer file in your document library. Click Next.

image

Step 9. On the Completing the Certificate Export Wizard page, verify that the information displayed is correct, and then click Finish.

image

Step 10. When the certificate has been exported, the Certificate Export Wizard dialog box will be displayed with the message The export was successful. Click Close to close the dialog and the wizard.

Configuring the Bitlocker Data Recovery Agent in Group Policy

In this section we are going to take the Data Recover Agent certificate we exported above and import it into the group policy to apply to computers that will have DRA certification for encrypting Bitlocker drives. The screenshots below are from a Windows Server 2008 R2 server with the group policy management console installed but if you are on a Windows 7 computer you will need to have install the Remote Server Admin Tools installed.

Step 1. Click Start, type gpedit.msc in the Search programs and files box, and then press ENTER.

Step 2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

Step 3. In the console tree under Local Computer Policy\Computer Configuration\Windows Settings\Security Settings\Public Key Policies, right-click BitLocker Drive Encryption, and then click Add Data Recovery Agent to start the Add Recovery Agent Wizard.

image 

Step 4. Click Next on the Add Recovery Agent Wizard welcome screen

image

Step 5. On the Select Recovery Agents page, click Browse Folder

image 

Step 6. Browse to the location you have a copy of the BitLocker.cer file that you exported in the previous procedure select the certificate and click Open

image

Step 7. Click

image

Note: You can repeat this process as necessary to add multiple data recovery agents. After all data recovery agent certificates you want to use have been specified, click Next.

Note: The example above has USER_UNKNOWN because the DRA file was manually imported.

Step 8. On the Completing the Recovery Agent Wizard page, click Finish to add the data recovery agent

image

Below is the BitLocker Drive Encryption setup with a DRA installed.

image

Additional Group Policy Configuration

BitLocker Identification Field

You now need to configure the BitLocker Identification field on all the computers you are going to use Bitlocker on as this helps identify what removable devices belong to your organisation.

Step 1. Click Start, type gpedit.msc in the Search programs and files box, and then press ENTER.

Step 2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

Step 3. In the console tree under Computer Configuration\Administrative Templates\Windows Components\Bitlocker Drive Encryption and then double click on Provide the unique identifiers for your organization

image

Step 3. Enter you specific Bitlocker identification name that you use to identify your Bitlocker encrypted devices in the BitLocker identification field

Note: You can add additional Bitlocker identifiers from other trusted organisations in the Allowed BitLocker identification field 

image

Enable Allow Data Recovery Agent

Continuing on from above you will need to configure you computers to Allow the Data Recovery Agent option.

Step 4 (cont.). In the console tree under Computer Configuration\Administrative Templates\Windows Components\Bitlocker Drive Encryption\Removable Data Drive and then double click on Choose how Bitlocker-protected removable drives can be recovered , then you will need to click Enabled and tick Allow data recovery agent then click OK

Note: You still have the option of configuring the standard AD recovery keys in this window. The Allow Data Recovery Agent option as far as I can tell has no bearing of the other options.

image

You have now configured Group Policy to use a Data Recovery Agent certificate to be used to encrypt all the “Bitlocker to Go” drives in your organisation.

How to unlock a “BitLocker to Go” drive with a Data Recovery Agent

Below are the instructions explaining how to use the Data Recovery Agent to unlock a BitLocker to Go encrypted drive

Step 1. Put the drive into the computer you want to unlock.

Step 2. Right Click on a Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.

Step 3 (optional). If you want to get information on the volume before you unlock it you can run manage-bde -status E:

image

Step 4. Now you need to get the “CertificateThumbprint” of the drive you want to unlock type the command manage-bde –protectors –get E: where E: is the volume you are trying to unlock

image

Note: Take a note of the Data Recovery Agent (Certificate Based) Certificate Thumbprint (see circled in red).

Tip: You could also mark the thumbprint by using the Edit > Mark option of the command prompt.

image

Then select the thumbprint by clicking on the first character of the thumbprint and dragging to the last character.

image

Step 4. To unlock the drive, type the following command Manage-bde –unlock E: -cert –ct  88d07b2874031569e17eedf402e0a098fc0f7b81

image

You have now successfully unlocked the drive using a Data Recovery Agent.

Note: You will need to have the Data Recovery Agent Certificate (with the private key) installed in the Personal certificate store on the computer you are performing this task.

Step 5 (optional). Try getting running the following command again to view more information about the drives encryption manage-bde -status E:

image

Form more information about BitLocker drive encryption with Data Recovery Agents see the following pages:

Alan Burchill