Admin Tip #51: Manage W2K's EFS with EFSinfo

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


W2K's Encrypting File System (EFS) protects confidential files even from intruders who gain physical access to the disk. Perhaps its best useability feature is its transparency. One can encrypt at the file or directory level. EFS lets a user per file designate a file or directory as encrypted. To clarify, encrypted files and directories are encrypted by an individual and can not be shared at this time. If UserX encrypts the file, UserY can not read them (even if UserX wants to share access). There is no method to share the encryption credentials. To encrypt a directory, you

W2K automatically encrypts and decrypts file data in memory as applications write to and read the file. Thus the transparency. After you encrypt the directory, you can use the files as you usually do, without thinking about encryption.

As a systems administrator, a required feature for encryption systems, W2K supports data-recovery agents such that one can recover data that any user encrypts. Consider the situation where critical data has been encrypted on the server and the owner is unavailable (dead, sick, on vacation, ...) You can use Group Policy to assign data-recovery agents. If EFS is used to encrypt a file, only the data-recovery agents specified in Group Policy can access that file. This sets up the situation where server administrators see files and directories they can't read on their "own" servers.

The key to recovery is determining what agent has access. To solve the dilemma, use EFSinfo which is a command-line utility from the W2K Server Resource Kit (it installs with the Security Tools component). EFSinfo displays the recovery agents for a specified directory or file. If you don't specify a pathname, EFSinfo displays encryption information for each file in the current directory. If you type

efsinfo /u

the utility will tell you whether the file is encrypted and who originally encrypted the file. You must use the /r parameter to get the authorized data-recovery agents. In the following example, myprivate.txt was encrypted by Administrator, who is also the data-recovery agent for this system.


D:\docs>efsinfo /r "myprivate.txt"

D:\docs

secret formula.txt: Encrypted
 Recovery Agents:
 XYZ\Administrator (OU=EFS File Encryption Certificate, L=EFS, CN=Administrator)

Efsinfo Syntax:

efsinfo [/u] [/r] [/c] [/i] [/y] [/s:dir] [pathname [...]] [/?]

Where: 
/u displays encryption information about the files and folders in the current folder. This is the default option. Running Efsinfo without switches produces the same output.


/r displays Recovery agent information.


/c displays certificate thumbnail information.


/i continues performing the specified operation even after errors have occurred. By default, Efsinfo stops when an error is encountered.


/y displays the current EFS certificate thumbnail on the local computer. The files specified might not be on this computer. If no items are returned, there are no encrypted files on the computer.


/s:dir performs the specified operation on folders in the given folder and all subfolders.


pathname [...] specifies the path of one or more files or folders for which to display encryption information.


/? displays command-line Help.
If you need to recover EFS, 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.

EFS Tidbits

EFS links:

HowItWorks: Encrypting File System

Best Practices for Encrypting File System

Step-by-Step Guide to Encrypting File System

SANS Analysis : Windows 2000 Encrypting File System

Encrypting File System

Default SYSKEY configuration compromises encrypting file system



After the Resource Kits, the Admin Companions are next most useful books from Microsoft.