NTFS and PGP interact to expose EFS encrypted data

From: Ry Jones (rjones@AIRGAP.NET)
Date: 05/08/02


Date:         Wed, 8 May 2002 14:57:28 -0700
From: Ry Jones <rjones@AIRGAP.NET>
To: NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

NTFS and PGP interact to expose EFS encrypted data
(c) 2002 Ry Jones, Airgap Networks.

Summary:
NTFS, a feature of Windows XP, supports an "encrypted" attribute. PGP
7.0.3 Freeware, a product of Network Associates, supports wiping
files as they are deleted. If you enable file wiping and then set the
"encrypted" attribute on a folder, copies of the contents are left
un-encrypted on the file system.

Details:
As explorer works it's way through the file system encrypting the
contents, it first renames the source file to a name in the format of
"EFSn.TMP" where n is an increasing series of integers starting at 0.
It then encrypts the file into a target file with the same name as
the original. The permissions on the temp file are set to a very
restrictive level; the temp file is then deleted. However, if you
have set PGP to wipe deleted files, it appears PGP intercepts the
deletion of the file. PGP, running as the user, has insufficient
privilege to delete the file, and leaves the temp file in place.

Anyone who recovers the hard drive can take ownership of these temp
files and read them. Also, in the default setting, hidden files are
not shown in explorer, so a user may not be aware that the temp files
exist at all. Any administrator may take ownership of the temp files
and read the data.

Repro:
1: create a directory "efs-pgp-interaction-bug". Copy a text file
into the directory.
2: right click on the PGP icon. Set the "Automatically wipe on
delete" flag. Click OK.
3: right click on the "efs-pgp-interaction-bug" directory in
explorer. Click properties, advanced, and check the "Encrypt contents
to secure data" flag. Click OK, OK.
4: double click on efs-pgp-interaction-bug. If you have set the "show
hidden files and folders" flag (tools, folder options, view, show
hidden files and folders, OK) you well see the EFSn.TMP files.
Attempting to open the temp files will result in an error (depending
on application). Vim reports "[Permission Denied]".
5: hit the backspace key. Right click on the efs-pgp-interaction-bug
directory. Select sharing and security; select security, advanced.
Check the "replace permission entries on all child objects..." check
box and click OK. Click "Yes", "OK".
6: Re-open efs-pgp-interaction-bug and right click on the temp file
(EFS0.TMP). Select Open With, Notepad. View your file.

Workaround:
Do not enable PGP's Wipe Deleted Files option if you are using
Encrypted NTFS.

Vendor Response:

This issue has been resolved, and a hot fix for PGP Desktop Security
v7.0.x, PGP Corporate Desktop v7.1.x and PGPfreeware v7.0.x (all for
Windows 2000) is available at
http://www.nai.com/naicommon/download/upgrade/upgrades-patch.asp.

Users should be aware that Win2K EFS does NOT wipe the contents of
files that are encrypted according to the steps above. The PGP Wipe
Free Space feature to ensure that the clear text has been wiped.

Discovered: 10 MAR 2002
Sent to vendors: 17 MAR 2002
Submitted to NTBugtraq, Bugtraq: 08 MAY 2002

Thanks to: Russ of NTBugtraq for driving the issue with Microsoft and
NAI much more effectively than I ever would have. There never would
have been a resolution without his efforts.

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPNl9sxLoz2rGojSMEQIqXACg0CbHJHJOm0bh9gqBfr5HvdIz+ZAAn2Ve
HOJ1qt1tkX7wnU5qpQxOOXiU
=0LBF
-----END PGP SIGNATURE-----



Relevant Pages

  • NTFS and PGP interact to expose EFS encrypted data
    ... NTFS and PGP interact to expose EFS encrypted data ... As explorer works it's way through the file system encrypting the ... The permissions on the temp file are set to a very ... Do not enable PGP's Wipe Deleted Files option if you are using ...
    (Bugtraq)
  • Re: Hifn 7955/7956 crypto accelerator questions
    ... Assuming two FreeBSD computers with crypto accelerators are ... It all depends on your CPU and your algorithm. ... PGP mostly uses an asymmetric cypher encrypted using RSA or DSA because ... symmetric key and encrypting it, but for large files the cost would be ...
    (freebsd-current)
  • Re: PGP
    ... Subject: PGP ... > encrypting an email with PGP, then providing the key to decrypt it is ... Anyone can use that key to decrypt the email. ... Only the recipient's private key (which is not [and should not ...
    (Security-Basics)
  • Re: Where to store id/password on the net?
    ... > I would recommend using a plain text file and encrypting it ... > Your only problem then is computers without PGP installed. ... I agree that a USB key is a good solution, and that if I encrypt my ... my small personal site, something just like ...
    (comp.security.misc)
  • RE: PGP scripting...
    ... I would assume that the main reason you're encrypting the data on disk ... likely can access the key files that you said are also locally on disk. ... At a very minimum, I would explain this to your client, and if they ... Just my $0.02 Whatever you do, if you learn of a Java-based PGP ...
    (SecProg)