PlayUKlottery.com - win up to 42 million Pounds
Lesson 5: Increasing Security with EFS

Cover
LOC Page
About This Book
Chapter and Appendix Overview
Getting Started
The Microsoft Certified Professional Program
Technical Support
Chapter 1 -- The Microsoft Windows 2000 Platform
Lesson 1: Overview of the Windows 2000 Platform
Lesson 2: Windows 2000 Professional
Lesson 3: Windows 2000 Server
Lesson 4: Windows 2000 Advanced Server and Windows 2000 Datacenter Server
Review
Chapter 2 -- Installing Windows 2000
Lesson 1: Preparing to Install
Lesson 2: Installing Windows 2000 from a CD-ROM
Lesson 3: Installing Windows 2000 over the Network
Lesson 4: Troubleshooting Windows 2000 Setup
Review
Chapter 3 -- Configuring the DNS Service
Lesson 1: Understanding DNS
Lesson 2: Resolving Names
Lesson 3: Installing the DNS Service
Lesson 4: Configuring the DNS Service
Lesson 5: Configuring a DNS Client
Lesson 6: Troubleshooting the DNS Service
Review
Chapter 4 -- Implementing Active Directory Directory Services
Lesson 1: Introduction to Active Directory Directory Services
Lesson 2: Active Directory Structure and Site Replication
Lesson 3: Active Directory Concepts
Lesson 4: Introduction to Planning
Lesson 5: Installing Active Directory Directory Services
Lesson 6: Configuring Active Directory Replication
Review
Chapter 5 -- Administering Active Directory Directory Services
Lesson 1: Creating Organizational Units
Lesson 2: Creating User and Computer Accounts
Lesson 3: Managing Groups
Lesson 4: Controlling Access to Active Directory Objects
Review
Chapter 6 -- Managing Desktop Environments with Group Policy
Lesson 1: Understanding Group Policy
Lesson 2: Applying Group Policy
Lesson 3: Configuring Group Policy
Review
Chapter 7 -- Managing Software by Using Group Policy
Lesson 1: Introducing the Software Installation and Maintenance Technology
Lesson 2: Deploying Software
Lesson 3: Upgrading Software
Lesson 4: Managing Software
Review
Chapter 8 -- Managing File Resources
Lesson 1: Sharing and Publishing File Resources
Lesson 2: Administering Shared Folders by Using Dfs
Lesson 3: Using NTFS Special Access Permissions
Lesson 4: Managing Disk Quotas on NTFS Volumes
Lesson 5: Increasing Security with EFS
Lesson 6: Using Disk Defragmenter
Review
Chapter 9 -- Configuring Remote Access
Lesson 1: Understanding the New Authentication Protocols in Windows 2000
Lesson 2: Configuring Inbound Connections
Lesson 3: Configuring Outbound Connections
Lesson 4: Examining Remote Access Policies
Lesson 5: Creating a Remote Access Policy
Review
Chapter 10 -- Supporting DHCP and WINS
Lesson 1: New DHCP Functionality
Lesson 2: New WINS Functionality
Review
Chapter 11 -- Managing Disks
Lesson 1: Introduction to Disk Management
Lesson 2: Common Disk Management Tasks
Review
Chapter 12 -- Implementing Disaster Protection
Lesson 1: Using Fault-Tolerant Volumes
Lesson 2: Using Advanced Startup Options
Lesson 3: Using the Recovery Console
Lesson 4: Using the Backup Utility
Lesson 5: Performing an Emergency Repair
Review
Chapter 13 -- Upgrading a Network to Windows 2000
Lesson 1: Planning a Network Upgrade
Lesson 2: Establishing the Root Domain
Lesson 3: Upgrading Domain Controllers and Member Servers
Lesson 4: Upgrading Client Operating Systems
Review
Chapter 14 -- Using Remote Installation Services
Lesson 1: Performing Remote Installations
Lesson 2: Creating Distribution Servers
Review
Appendix A -- Questions and Answers
Appendix B -- Creating Setup Disks
About This Electronic Book
About Microsoft Press


[Previous] [Next]

Lesson 5: Increasing Security with EFS

The Microsoft Encrypting File System (EFS) provides encryption for data in NTFS files stored on disk. EFS encryption is public key-based and runs as an integrated-system service, making it easy to manage, difficult to attack, and transparent to the file owner. If a user who attempts to access an encrypted NTFS file has the private key to that file, the file can be decrypted so that the user can open the file and work with it transparently as a normal document. A user without the private key is denied access.

Windows 2000 also includes the Cipher command-line utility, which provides the ability to encrypt and decrypt files and folders from a command prompt. Windows 2000 also provides a recovery agent. In the event that the owner loses the private key, the recovery agent can still recover the encrypted file.

Understanding EFS

EFS allows users to encrypt NTFS files by using a strong public key-based cryptographic scheme that encrypts all files in a folder. Users with roaming profiles can use the same key with trusted remote systems. No administrative effort is needed to begin, and most operations are transparent. Backups and copies of encrypted files are also encrypted if they are in NTFS volumes. Files remain encrypted if you move or rename them, and encryption is not defeated by temporary files created during editing and left unencrypted in the paging file or in a temporary file.

Enterprises can set policies to recover EFS-encrypted data when necessary. The recovery policy is integrated with overall Windows 2000 security policy. Control of this policy can be delegated to individuals with recovery authority, and different recovery policies can be configured for different parts of the enterprise. Data recovery discloses only the recovered data, not the key that was used to encrypt the file. Several protections are in place to ensure that data recovery is possible and that no data is lost in the case of total system failure.

EFS is implemented either from Windows Explorer or from the command line. It can be enabled or disabled for a computer, domain, or organizational unit (OU) by resetting recovery policy in the Group Policy console in MMC.

You can use EFS to encrypt and decrypt files on remote file servers but not to encrypt data that is transferred over the network. Windows 2000 provides network protocols, such as Secure Sockets Layer authentication, to encrypt data over the network.

Table 8.7 lists the key features provided by Windows 2000 EFS.

Table 8.7 EFS Features

Feature Description
Transparent encryption In EFS, file encryption does not require the file owner to decrypt and re-encrypt the file on each use. Decryption and encryption happen transparently on file reads and writes to disk.
Strong protection of encryption keys Public-key encryption resists all but the most sophisticated methods of attack. Therefore, in EFS, the file-encryption keys that are used to encrypt the file are encrypted by using a public key from the user's certificate. (Note Windows 2000 uses X.509 v3 certificates.) The list of encrypted file-encryption keys is stored with the encrypted file and is unique to it. To decrypt the file-encryption keys, the file owner supplies a private key, which only the file owner has.
Integral data-recovery system If the owner's private key is unavailable, the recovery agent can open the file using his or her own private key There can be more than one recovery agent, each with a different public key, but at least one public recovery key must be present on the system to encrypt a file.
Secure temporary and paging files Many applications create temporary files while you edit a document, and these temporary files can be left unencrypted on the disk. On computers running Windows 2000, EFS is implemented at the folder level, so any temporary copies of an encrypted file are also encrypted, provided that all files are on NTFS volumes. EFS resides in the Windows operating system kernel and uses the nonpaged pool to store file encryption keys, ensuring that they are never copied to the paging file.

Encryption

The recommended method to encrypt files is to create an NTFS folder and then "encrypt" the folder. To "encrypt" a folder, in the Properties dialog box for the folder, select the General tab. On the General tab, click the Advanced button, and then click the Encrypt Contents To Secure Data check box. All files placed in the folder are encrypted. The folder is now marked for encryption. Folders that are marked for encryption are not actually encrypted; only the files within the folder are encrypted.

NOTE
Compressed files cannot be encrypted, and encrypted files cannot be compressed.

After you encrypt the folder, when you save a file in that folder, the file is encrypted by using file encryption keys, which are fast symmetric keys designed for bulk encryption. The file is encrypted in blocks, with a different file encryption key for each block. All of the file encryption keys are stored, encrypted, in the Data Decryption Field (DDF) and the Data Recovery Field (DRF) in the file header.

NOTE
By default, encryption provided by EFS is standard 56-bit encryption. For additional security, North American users can obtain 128-bit encryption by ordering the Enhanced CryptoPAK from Microsoft. Files encrypted by the CryptoPAK cannot be decrypted, accessed, or recovered on a system that supports the 56-bit encryption only.

You use a file that you encrypted just like you would use any other file. Encryption is transparent. You do not need to decrypt a file you encrypted before you can use it. When you open an encrypted file, your private key is applied to the DDF to unlock the list of file-encryption keys, allowing the file contents to appear in plain text. EFS automatically detects an encrypted file and locates a user certificate and associated private key. You open the file, make changes to it, and save it, like you would any other file. However, if someone else tries to open your encrypted file, he or she is unable to access the file and receives an access denied message.

NOTE
Encrypted files cannot be shared.

Decryption

Decrypting a folder or file refers to unchecking the Encrypt Contents To Secure Data check box in a folder's or file's Advanced Attributes dialog box, which you access from the folder's or file's Properties dialog box. Once decrypted, the file remains decrypted until you check the Encrypt Contents To Secure Data check box. The only reason you might want to decrypt a file would be if other people needed access to the folder or file; for example, if you want to share the folder or make the file available across the network.

The Cipher Command

Windows 2000 also includes command-line utilities for the richer functionality that is required for some administrative operations. The Cipher command-line utility provides the ability to encrypt and decrypt files and folders from a command prompt.

The following example shows the available options for the Cipher command. Table 8.8 describes these options.

cipher [/e | /d] [/s:folder_name] [/a] [/i] [/f] [/q] [/h] [/k] [file_name [...]]

Table 8.8 Cipher Command Options and Descriptions

Option Description
/e Encrypts the specified folders. Folders are marked so that files that are added later will be encrypted.
/d Decrypts the specified folders. Folders are marked so that files that are added later will not be encrypted.
/s Performs the specified operation on files in the given folder and all subfolders.
/a Performs the operation for files as well as directories. If the parent directory is not encrypted, the encrypted file could become decrypted when it is modified. It is recommended you encrypt both the file and the parent directory.
/i Continues performing the specified operation even after errors have occurred. By default, Cipher stops when an error is encountered.
/f Forces the encryption operation on all specified files, even those that are already encrypted. Files that are already encrypted are skipped by default.
/q Reports only the most essential information.
/h Displays files with the hidden or system attribute. These files are omitted by default.
/k Creates a new file encryption key for the user running Cipher. If this option is chosen, all the other options will be ignored.
file_name Specifies a pattern, file, or folder.

If you run the Cipher command without parameters, it displays the encryption state of the current folder and any files that it contains. You can specify multiple filenames and use wildcards. You must put spaces between multiple parameters.

Recovery Agent

If the owner's private key is unavailable, a person designated as the recovery agent can open the file using his or her own private key, which is applied to the DRF to unlock the list of file-encryption keys. If the recovery agent is on another computer in the network, send the file to the recovery agent. The recovery agent can bring his or her private key to the owner's computer, but it is never a good security practice to copy a private key onto another computer.

NOTE
The default recovery agent is the administrator of the local computer unless the computer is part of a domain. In a domain, the domain administrator is the default recovery agent.

It is a good security practice to rotate recovery agents. However, if the agent designation changes, access to the file is denied. For this reason, it is recommended that recovery certificates and private keys be kept until all files that are encrypted with them have been updated.

The person designated as the recovery agent has a special certificate and associated private key that allow data recovery. To recover an encrypted file, the recovery agent would do the following:

  1. Use Backup or another backup tool to restore a user's backup version of the encrypted file or folder to the computer where his or her file recovery certificate is located.
  2. In Windows Explorer open the Properties dialog box for the file or folder, and on the General tab, click the Advanced button.
  3. Clear the Encrypt Contents To Secure Data check box.
  4. Make a backup version of the decrypted file or folder and return the backup version to the user.

Practice: Encrypting Files

In this practice, you will encrypt a folder and its files.

Exercise 1: Encryption

  • To encrypt a file
    1. In Windows Explorer, create C:\Secret\File1.txt, and then right-click File1 and click Properties.
    2. Windows 2000 displays the Properties dialog box with the General tab active.

    3. Click Advanced.
    4. The Advance Attributes dialog box appears.

    5. Click the Encrypt Contents To Secure Data check box and then click OK.
    6. Click OK to close the File1 Properties dialog box.
    7. An Encryption Warning dialog box informs you that you are about to encrypt a file that is not in an encrypted folder. The default is to encrypt the folder and file, but you may also choose to encrypt only the file.

    8. Click Cancel, and then click Cancel again to close the Owner Properties dialog box.
    9. In Windows Explorer, right-click C:\Secret and then click Properties.
    10. Click Advanced.
    11. The Advance Attributes dialog box appears.

    12. Click the Encrypt Contents To Secure Data check box and then click OK.
    13. Click OK to close the Secret Properties dialog box.
    14. The Confirm Attribute Changes dialog box informs you that you are about to encrypt a folder. You have two choices: You can encrypt only this folder, or you can encrypt the folder and all subfolders and files in the folder.

    15. Select the Apply Changes To This Folder, Subfolders And Files option, and then click OK.
    16. In the Secret folder, right-click File1 and then click Properties.
    17. The File1 Properties dialog box appears.

    18. Click Advanced.
    19. The Advanced Attributes dialog box appears. Notice the Encrypt Contents To Secure Data check box is selected.

    20. Close the Advanced Attributes dialog box.
    21. Close the Properties dialog box.
    22. Close all windows and log off.

    Exercise 2: Testing the Encrypted Files

    In this exercise, you will log on using the User Three account and then attempt to open an encrypted file. You will then try to disable encryption on the encrypted files.

    NOTE
    This is the first time you are logging on as User3. Recall that the password is User3, but you will have to change it. Change the password to user.

  • To test encrypt files
    1. Log on as User3 with a password of User3.
    2. When prompted, change User3's password to user.
    3. Start Windows Explorer and open C:\Secret\File1.txt.
    4. What happens?

    5. Close Notepad.

    Answer

  • To attempt to disable the encryption
    1. Right-click C:\Secret\File1.txt and then click Properties.
    2. Click Advanced.
    3. Clear the Encrypt Contents To Secure Data check box and then click OK.
    4. Click OK to close the File1 Properties dialog box.
    5. The Error Applying Attributes dialog box appears and informs you that access to the file is denied.

    6. Click Cancel.
    7. Close all open windows and dialog boxes.
    8. Log off as User3 and log on as Administrator.

    Exercise 3: Decrypting Folders and Files

    In this exercise, you will decrypt the folder and file that you previously encrypted.

  • To decrypt files
    1. Start Windows Explorer.
    2. Right-click C:\Secret\File1.txt, and then click Properties.
    3. Click Advanced.
    4. Clear the Encrypt Contents To Secure Data check box and then click OK.
    5. Click OK to close the File1 Properties dialog box.
    6. Close Windows Explorer and log off.

    Lesson Summary

    EFS provides the core file-encryption technology for storage of NTFS files on disk. EFS allows users to encrypt NTFS files by using a strong public key-based cryptographic scheme that encrypts all files in a folder. Users with roaming profiles can use the same key with trusted remote systems. Backups and copies of encrypted files are also encrypted if they are in NTFS volumes. Files remain encrypted if you move or rename them, and encryption is not defeated by leakage to paging files. Windows 2000 also provides a recovery agent. In the event an owner loses the private key, the recovery agent can still recover the encrypted file.

    EFS is implemented either from Windows Explorer or from the command line, using commands such as Cipher. EFS can be enabled or disabled for a computer, domain, or organizational unit (OU) by resetting recovery policy in the Group Policy console in MMC.

    You can use EFS to encrypt and decrypt files on remote file servers, but not to encrypt data that is transferred over the network. Windows 2000 provides network protocols, such as Secure Sockets Layer, to encrypt data over the network.