Admin Tip #24 : Windows 2000 Encrypting File System EFS .

Hits: Failed to execute CGI : Win32 Error Code = 3


The Encrypting File System ( EFS ) available in Windows 2000 lets you encrypt files or folders using public key cryptography. There are obvious advantages to using it on laptops with sensitive data. If the laptop were stolen, and there are theft rings in airports targeting these highly expensive and portable items, then its hoped that the EFS would prevent your privacy from being violated.

EFS Tidbits

The public keys of the user of EFS and the key recovery agent are used to encrypt the data. The default data recovery agent is the built in administrator account. There are far too many methods to gain access to this account if one has physical access to the box. See Recover Lost Windows NT Administrator Password which is my Windows NT tip but this stuff works under Windows 2000, as most things do. Anyone possessing the Administrator account password can also decrypt files.

You need to backup the encryption certificates and export them. If you don't remove them, you have no real security and you are in danger of lossing access to encrypted files should your HD fail.

Organizations need policies to insure that EFS is used properly and safely. Microsoft has written the following:

Step-by-Step Guide to Encrypting File System
Best Practices for Encrypting File System
Encrypting File System for Windows 2000
Analysis of Reported Vulnerability in the Windows 2000 Encrypting File System (EFS)
How to Back Up Your Encrypting File System Private Key
How to Restore an Encrypting File System Private Key for Encrypted Data Recovery
Methods for Recovering Encrypted Data Files
5-Minute Security Advisor - Recovering Encrypted Data Using EFS

Related EFS links:

If you are depending on the administrator keys to recover files should the user lose his/her keys, unfortunately the local admin keys are also stored in his profile located on the hard drive. If the HD fails or is reformatted, or if Windows is reinstalled, these keys will also be lost. Additionally, for XP users : Windows XP Professional does not make the local Administrator account the data recovery agent! If the user's keys are corrupt or lost in a standalone workstation, you are out of luck. Well, maybe NOT. Elcomsoft has created Advanced EFS Data Recovery to decrypt files encrypted on NTFS partitions in Windows 2000. Files can be decrypted even in a case when the system is not bootable and so you cannot log on, and/or some encryption keys have been tampered. Besides,they say decryption is possible even when Windows is protected using SYSKEY.

If W2K or XP are joined to a W2K domain, the domain admins are recovery agents making EFS less vulnerable to hardware failures.

For the commandline oriented, there is the cipher command. Encryption is performed with the /e switch. Used alone, the /e switch instructs Windows 2000 to encrypt an entire folder. For example, to encrypt a folder named folder1, you'd type the following command:

cipher /e myfolder1

Any files that you later add to myfolder1 will automatically be encrypted.

To encrypt an individual file, the /a switch must also be used. So to encrypt a file named mydocument.txt, you'd enter the command:

cipher /e /a document.txt

Decryption from the command prompt is handled the same way, except that the /d switch replaces /e. You can get a list of all files and folders and their current encryption state simply by running cipher without any parameters.

Microsoft has recently upgraded cipher to support the security function of overwriting deallocated data. Have you deleted a file and want to be sure it can not be recovered. Use ciper.exe.

You can also get the complete list of supported options using the following syntax:

cipher /?

For more info on cipher, read Cipher.exe Security Tool for the Encrypting File System.

Mark Russinovich at www.sysinternals.com has released the freeware utility EFSDump for Windows 2000 which displays what accounts are authorized to access encrypted files.

Windows 2000 introduces the Encrypting File System (EFS) so that users can protect their sensitive data. Several new APIs make their debut to support this factility, including one - QueryUsersOnEncryptedFile - that lets you see who has access to encrypted files. This applet uses the API to show you what accounts are authorized to access encrypted files. Full source code is included.