Basic OperationsNothing has to be done to implement EFS. It's already available to any user who can select a check box. Unless EFS is disabled or a policy is implemented that denies the user this right, the user determines which of his files will be encrypted. Most users will be oblivious to the impact of doing so, other than it appears as if others cannot view their files. While users only see the result (their files appear to be impenetrable to others), IT needs to provide a structure that will ensure that files are private when they need to be and can be recovered if the user is unable to do so. The first step in developing sound administrative practices and polices for EFS is to understand EFS basic operations.While there are no operating system restrictions on encryption of application or data files, system files cannot be encrypted. The reason is that the file system must be available before files can be decrypted, and some files are needed to boot the OS that therefore would be encrypted and unavailable. Encrypting and DecryptingIndividual files can be encrypted one by one, or a folder can be marked for encryption, in which case every file placed in the folder is encrypted. Users may decrypt an encrypted file by modifying the file's encryption property using Windows Explorer, by using the cipher command, or by opening the file in the application used to create it. When the file's encryption property is used, users must re-encrypt the file. However, when an application is used to decrypt the file, the file is re-encrypted when the file is saved.If a folder is marked for encryption, often called encrypting the folder, files placed or saved in the folder will be encrypted. When the user who encrypted it accesses the file, it is automatically decrypted. For example, if the user saves a Word document in the encrypted folder, the document is encrypted. When the user opens the document, it is automatically decrypted. To the user, it appears as if nothing has happened; encryption and decryption are transparent to the user.Encryption transparency has several advantages. First, the user is not required to understand how to encrypt or decrypt files and doesn't have to do anything to accomplish it. Instead, she just does her work. Second, when a file is first saved in plain text and then later encrypted, a temporary file is made. Since the plaintext copy of the file is marked for deletion, it might be possible for someone to forensically examine the drive and recover the data. However, when a file is first stored in an encrypted folder, no plaintext copy of the file is stored.WARNING: Deleted Plaintext Copy May Still Be PresentWhen ordinary files are deleted, they are not really removed from the drive. Instead, they are simply "marked for deletion" and gradually overwritten as new data is added to the drive. Forensic applications and techniques exist that can gather these "remnants," or "data shreds." To prevent data remanence (the existence of leftover shreds) from exposing sensitive data, organizations often use special utilities to overwrite data multiple times, use magnets to degauss drives before they are reused, and destroy drives rather than resell them or give them away.To prevent encrypted file data remanence from becoming a problem, always encrypt folders, not files. However, if plaintext shreds of sensitive data may exist on a drive, or you want to be sure that there aren't any, the cipher.exe tool can be used to overwrite data marked for deletion. Using File and Folder Properties to Encrypt and Decrypt FilesWhen the folder property is set to encrypt files, files are automatically encrypted when placed in the folder. However, individual files can be encrypted or decrypted by using the Advanced file properties page of the file. To encrypt a file, follow these steps:
To decrypt a file:
To encrypt a folder (to create a folder that will automatically encrypt files placed in it):
To decrypt a folder, follow these steps:
Using the Cipher Command to Encrypt and Decrypt FilesCipher.exe is a utility that can be used at the command line to manipulate EFS encrypted files. It is particularly useful if you have large numbers of files to encrypt or decrypt, as in recovery operations. The syntax for cipher is provided in the "Tools" section later in this chapter.To encrypt the reports folder and all subfolders, enter the following command:To encrypt a single filein this case the JanuarySales.doc in the Midwest\Sales folderenter the following: To decrypt the JanuarySales.doc file, enter this:
Archive/Backup of Certificates and KeysAn understanding of EFS architecture and how it works is not necessary to perform backup of its keys. Users should be trained, however, to back up both an EFS certificate and its associated private key. If this backup or archival of certificate and private key is not done, users will eventually lose critical or sensitive data. It's just a matter of time.EFS Architecture" and "Avoiding Data LossPlanning for Recovery," later in this chapter.Meanwhile, if EFS is not disabled, certificates and keys must be backed up, and the backup must be secured. Backup should be periodically repeated to ensure that a good copy is available in case it is needed to recover encrypted files.Users and IT pros should be aware that the archived certificate and private key can be imported into the certificate store of any user, not just the original user. This is a good thing because the original user account may also have been deleted or destroyed in whatever circumstances damaged or destroyed their keys. However, it can mean that if the archived certificate and key become available to an unauthorized individual, that person might be able to use the keys to decrypt files to which he or she should not have access. To prevent this from happening, a complex password should be used to protect the file, and the media should be stored in a safe place. The password will be needed to use the backup. Because this password may be infrequently used, it may also need to be stored in a safe location, separate from the media. Storing the password on the hard drive or in documents kept with the computer or with the media is not acceptable.During the archival process, the private key must be selected for backup. Instruct users to do so because the certificate alone will not be sufficient to recover encrypted files. When prompted, users should not remove the private key from the computer. Removing the private key will make it impossible for existing encrypted files to be decrypted.Getting users to follow this procedure may be difficult, and some explanation of how EFS keys can be damaged or destroyed may help encourage the practice. Any operation that can damage data can damage keys. Keys are part of the user's profile. Keys might be accidentally deleted, for example, if an administrator deletes the user's profile. (Profile deletion is a common practice when profile problems occur. Because a new profile is created when the user logs on, the new profile may solve the problem. Unfortunately, it may also create a new oneloss of access to encrypted files.) Another way keys are destroyed is when a drive crashes or when the operating system is reinstalled. In some cases the keys remain, but since they are not associated with any current user, they cannot be used to decrypt the files.To archive certificate and private keys, you can use the Certificates snap-in, the file system Backup Keys button, or the cipher command. Use the Certificates Snap-In to Archive Keys
When the private key is exported, the .PFX file format is used. This format is based on the PKCS#12 standard, a standard for storing or transporting private keys, certificates, and other miscellaneous secrets. Use the Cipher Command to Archive KeysEnter the following cipher command to back up the EFS keys to the EFS folder on the A:\ drive and save them in the RBkeys file.
Use the Backup Keys Button
Import Certificate and KeysIf keys are archived, they can be used if the originals are destroyed or if it is necessary to decrypt files encrypted by someone who has left the company. To do so, import the keys into the profile of an account. This account does not have to be the one that originally was used to create the keys.
Remove the Private KeyWhen traveling with encrypted data on a Windows XP or Windows Server 2003 laptop, a sound practice is to remove the private key and carry it separately from the laptop or data storage device. If the laptop is lost or stolen, even if the password for the account used to encrypt the data is known, the encrypted data cannot be decrypted without the private key. The laptop owner can decrypt files by importing the private key. A Windows 2000 laptop computer that is a domain member also can have this protection if a domain account was used to encrypt the files. When local user accounts are used to encrypt data on a Windows 2000 computer, a recovery agent may also be able to decrypt data. (Windows XP and Windows Server 2003 standalone computers do not automatically create a recovery agent.) If recovery agent credentials can be compromised, an attacker might use them to decrypt encrypted files. The recovery agent private key should also be removed to mitigate the impact of such an attack. To delete the private keys for each account that may have keys stored on the computer, export the keys, including the private key, but select the choice Delete the private key if the export is successful during step 6 in the earlier "Archive/Backup of Certificates and Keys" section of this chapter (refer to Figure 6-6). Recover FilesWindows XP and Windows Server 2003 computers do not automatically create a recovery agent for EFS files. However, Windows 2000 computers do. In a Windows Server 2003 domain, the first domain administrator to log on after dcpromo will become the recovery agent. Windows XP and Windows Server 2003 computers joined in either a Windows Server 2003 or Windows 2000 domain will use the recovery agent keys to make their own protected copy of the file encryption key. This means that the recovery agent can recover the encrypted filesin fact, the recovery agent can transparently view any encrypted files that use the recovery agent's certificate to protect a copy of the file encryption key. It also means that anyone who can log on using the recovery agent account can read the encrypted files. The recovery agent account should be protected with a strong password and should not be used for day-to-day activities. While the files can be recovered (decrypted) by opening them, proper procedures dictate that they should be recovered by using the cipher command. This way, the recovery agent recovering the files will not see the data during the recovery process. It also means that many files can be decrypted at the same time. To recover encrypted files using the recovery agent, follow these steps: Obtaining Encryption KeysIf EFS has not been disabled, a user will obtain his EFS keys when he first encrypts a file. If the computer is joined in an Active Directory domain, the operating system will first look for the existence of a Certification Authority (CA) by searching the Active Directory. (If the Active Directory cannot be located, the request will fail.) If a CA is present, the operating system will request a certificate from the CA. If no CA is present, a self-signed certificate will be created for the user. A self-signed certificate is one that has not been issued by a CA. On Windows XP Professional, Windows 2000, and Windows Server 2003, the operating system automatically creates these certificates. This operation is transparent to the user.However, the user can request a new certificate either using the Certificates snap-in or the cipher command. Before a new certificate is requested, the old certificate should be archived. Until an encrypted file is decrypted and then encrypted again, the new certificate will not be used, so its associated private key cannot be used to decrypt the file. To use the Certificates snap-in, do the following:
Old EFS keys should be archived, including the private key, but not destroyed. All files encrypted using the old keys need to be decrypted using the old key and then encrypted using the new one. The best way to do so is to use cipher /u. Adding a Recovery AgentThe default recovery agent in the domain is the first administrator account to log on to the domain after the domain is created. Nothing specific has to be done for this to occur. If this certificate and key are archived, the certificate and key can be added back to the recovery policy if this is ever necessary. Additional recovery agents for the domain can be created if a CA is available. A CA is necessary to create the new recovery agent certificate.On a Windows Server 2003 standalone system, no recovery agent is created. By default, there is no recovery policy for the standalone system. This is a rather large difference between Windows 2000 and Windows Server 2003. Windows XP also operates like Server 2003; there is no default recovery agent for a standalone computer. When the computer is joined to the domain, it will obtain and use the domain recovery policy and recovery agent if EFS has not been disabled. |