Posted
by
timothy
on Thursday March 19, 2009 @09:48PM
from the we-see-you-anonymous-reader dept.

An anonymous reader writes "Home directory encryption has been available on Linux for a while now, and it is definitely a smart, useful feature as it is not usually necessary to encrypt the entire drive, just the private documents and software profiles in the home directory. Windows is getting better about keeping everything that needs to be private in the user's home folder. Is there a similar solution for Windows to securely, and preferably transparently, encrypt the home directory only? (Preferably open source so that the code is available for peer review)."

The parents speak wisely. Using Truecrypt to encrypt your entire HDD is by far the best option.

Think of it this way - do you put locks on all your cupboards, chain the TV, Hi-Fi and sofa to the floor, install multiple safes to keep all your private correspondence in, or you simply lock the front door?

By encrypting everything you don't have to think about what you need to encrypt, if programs are leaking data any other ways (temporary files etc) and you don't have to use any special software beyond typing yo

I suppose you mean to imply that TrueCrypt makes your computer slower. I
suppose that may be true, but I haven't noticed it. TrueCrypt seems to be
very, very well designed.

Note that there are TrueCrypt versions for both Windows XP and Vista,
Mac OS X, and Linux. All are free and open source.

Because my hotkey script contains a password, I've installed AutoHotkey [autohotkey.com] in an encrypted
TrueCrypt container. (A TrueCrypt container is either a file or an entire partition.) So, every time I use a hotkey, the system must get it from
an encrypted file and be decrypted. I don't notice any difference in speed between that and
when AutoHotkey was installed on an unencrypted OS partition.

I've used TrueCrypt for years and had no problems with it. Most
software has numerous shortcomings. The biggest problem I can think of now
with TrueCrypt is that the documentation doesn't explain the/q command line
option very well. That's very minor, a problem not even in the program itself.
(Yes, I suggested a re-write in the TrueCrypt forum, and yes, I offered to do
the re-writing myself.)

I haven't yet experimented with encrypting the entire OS partition. I
have experimented with encrypting an entire data partition; I didn't notice a
speed difference. However, I found that it is better not to encrypt data
partitions, it is easier to make an encrypted container on the data partition.
That's especially true if the container can be the size of one DVD, 4.7
gigabytes, less the space necessary for the unencrypted TrueCrypt software.
Then you can just dismount the container and burn a DVD backup of the
container file and the TrueCrypt software.

TrueCrypt has been 100% reliable for me. There has never been a
hint of a problem that might cause loss of data.

TrueCrypt developers: TrueCrypt is a wonderful gift to the world.
Thanks!

My opinion is that it's necessary that encryption software be open source; I would never
run proprietary encryption software because of the possibility that some rogue
employee installed a back door. Also, the U.S. government believes it can force U.S.
commercial companies to install surveillance functions in both hardware and software; executives and
employees who disagree can be put in prison secretly. I suppose that isn't
done very often, but like everything a government does in secret, there are
unintended consequences. One of the consequences is that in some cases it may
be considered unsafe to use U.S. products. It isn't only the U.S. banking
system that is out of control.

Also, since I mentioned AutoHotkey, I will say that it is excellent,
although the programming language is a bit quirky. My main AutoHotkey script
is now 1563 lines; I use it a lot. It is Windows only.

AutoHotkey is great for Hotkeys and also open source and free. If you
want to run scripts that interact with a Windows GUI as though someone is
moving a mouse and typing at a keyboard, then AutoIt [autoitscript.com] is better.
AutoHotkey and AutoIt co-exist perfectly. The two had a common origin.

TrueCrypt encrypted containers can be formatted as NTFS or FAT file systems.
I haven't tried other file systems. All the Windows file system utilities work perfectly inside TrueCrypt encrypted containers:
Windows Explorer, ChkDsk.exe, FsUtil.exe, Format.com, and Defrag.exe. I've found the free open source
JkDefrag [kessels.com] to be a better defragmenter;
it works perfectly inside TrueCrypt containers.

"The OP is asking for something similar on Windows but that's much trickier on NTFS and Windows for a variety of reasons..."

Good points.

It is necessary to encrypt the entire Windows OS partition. That's because Windows scatters files everywhere. For example, on one installation of Windows XP with I seem to remember 4 users, I found that temporary files were stored in 47 locations.

That just begins to describe all the scattering. Commercial programs store files in lots of places. There's a lot of stu

Think about it. You installed Autohotkey in an encrypted container. What is Autohotkey makes some log or stores something in the registry? What if Windows pages it to the pagefile.sys on your unencrypted C: drive and the password is stored there in plain text?

The only safe way is to just encrypt the whole drive, OS and all. There is negligible performance loss, and you can be certain that your private data will never, ever be saved unencrypted anywhere.

"The parents speak wisely. Using Truecrypt to encrypt your entire HDD is by far the best option."

In Windows most user data is stored under Documents and Settings but misbehaving applications may put it elsewhere . On Linux all user data is always under/home, which is typically a separate partition either on the same physical media or another storage medium or mediums. Therefore, if you want to protect your data rather than the OS itself:

"That simply isn't the case. Both Windows and Linux use virtual memory paging to disk. Even if you encrypt/home your data will still get saved in unencrypted form to the swap partition."

It is 2009 now. Unless you have a woefully inadequate system, you won't be swapping. Try "swapon -s" to verify that you are not swapping, and that you can safely not have a swap partition. That being said, your only valid point is that I should have added that you need to also encrypt your swap partition if you have o

Quoting from the section about making your own modifications to TrueCrypt and calling it by a different name: "Note: TrueCrypt and the TrueCrypt logos are trademarks of the TrueCrypt Foundation. The goal is not to monetize the name or the product, but to protect the reputation of TrueCrypt, and to prevent support issues and other kinds of issues that might arise from the existence of similar products with the same or similar name. Even though TrueCrypt and the Tru

I think on Windows one can have a home directory but I don't know whether you can make it a mount point for a separate partition encrypted transparently (which would ease maintenance). Anyway, I'm not sure... haven't used Windows for quite some time.

Because the cert and keys in the keystore are required, if you backup encrypted files to a USB thumbdrive using NTFS, you can't read them on another computer, even if you know the login password you were using when you encrypted them.

*It's too dumb to realize you only want it encrypted while it's in that folder.

I don't know about recent incarnations of Windows but traditionally the file names are stored in clear in EFS; I see this as a huge disadvantage.

The problem with the propagation of the "encrypted" attribute to mostly any NTFS filesystems where you copy files to can't be underestimated. Probably well (security-wise) intended the problem is that users copy files to external drives and are somehow under the impression that having the external drive itself is enough to have access to the info on it. The problem

You can customize the password prompt to your liking (or have nothing at all, just looks like system has crashed/locked up), you can install multiple OSes and boot by default in an unencrypted one, you can have the decoy encrypted OS and so on.

You know, I see this sort of thing all the time with TruCrypt and I have to ask... Short of a few government agencies and a few paranoid dorks, who the hell uses this? It can't be used on a server unless you want a reboot to cause the server to require a human to f

Usually a reboot on a server DOES require a human to fix it. But yes, it's not intended for servers because they tend to be pretty well locked up (unless it is your home server and you'll be better off running Linux anyway and in any case it doesn't matter if the server goes down until you go home and can enter the password).The UK government loses laptops by the thousands, truecrypt would do a lot of good here. The argument that you shouldn't carry the data on the laptop is moot as some users have only one

Most companies consider the documents written by their employees during work as proprietary.

Minutes from meetings with suppliers or customers, code written on the train by commuters and reports written to your managers in that quiet moment on the plane are all examples of data that should be encrypted.

Of course, good crypto should not be an excuse to download the entire customer database to your laptop.

If an administrator changes your password the administrator can still access your files as ActiveDirectory stores a copy of the encryption key for administrator usage in just such cases as you describe.

You can encrypt to a USB thumbdrive and use the data on multiple machines within a domain environment just fine as long as you always are using a login with access to the encryption key, such as the original encryptor or an administrator account.

If an administrator changes your password the administrator can still access your files as ActiveDirectory stores a copy of the encryption key for administrator usage in just such cases as you describe.

Most home user machines are standalone XP Home, so there is no backup of the users keys stored in AD, in that case.

That would be a considerable flaw, in that the backup is only available to some users...

The multiple computer problem in a domain is solved by setting up a PKI through certificate services. This combined with a logon script to encrypt the profile directory takes care of those problems. If you are doing EFS on a large scale in a domain you would be crazy not to use a PKI. Another advantage to this is should the certificate get lost you can set recovery keys that a admin can use to decrypt the data.

This can also in a windows domain be used to create bitlocker keys as well which encrypts the enti

It's built into the OS, so it's as open source as any other part of Windows. If open source is that important to you then you probably won't be using Windows anyway. Besides, it's pretty clear that the OP didn't know about EFS, and so was thinking about third-party tools. I think the standard in that case might be different.

This is not a good faith question. Nobody is going to waste their time writing an open source extension to a proprietary operating system that duplicates the functionality of the core O/S. And if they did the result is probably not going to be worth using because nobody with sense is going to use and test it.

What this amounts to is that the slashcrew will post pretty much anything that panders to their biases and so they will post without thinking a question that is clearly desi

(1) Right Click the directory
(2) Left Click Properties
(3) Left Click "Advanced" near the bottom
(4) Check with you Left Moust button "Encrypt contents to secure data"
(5) Left Click OK, wait until it finishes

The directory would appear green thereafter, indicated it's encrypted and can only be accessed by the owner. Home edition might not have encryption enabled, mind you.

Google for "windows directory encryption" would lead you to the answer anyway.

(1) Right Click the directory
(2) Left Click Properties
(3) Left Click "Advanced" near the bottom
(4) Check with you Left Moust button "Encrypt contents to secure data"
(5) Left Click OK, wait until it finishes

What's next? Are you going to suggest using NTBackup to back files up? Netmeeting to do an H323 conference with the office? Use 'windows' degragmenter? Remote Desktop instead of VnC? Crazy talk I say!

EFS is very powerful in the right hands, the simple encryption checkbox betrays the real power lying just beneath the surface. I do find it amusing when people criticise complex encryption architectures because not everything is exposed in a pretty UI. Would you feel better if there were some nice Aero encryption animations?

NTBackup is absolutely solid as a basic backup solution; I know many people who are very unhappy with Microsoft that it isn't present in Vista and 2008.

I know your post was meant to be ridiculing various Windows features, but it really just reveals your ignorance.

I thought it was meant to be ridiculing people who choose Windows and then don't know/use the core elements that actually make it worth using....

The RDP that comes with 2008 is really quite neat; you can now administer remote "RDP Apps" that, in my mind, totally replace Citrix and the like. Granualar application-level ACLs via RDP -- what's not to like? I wish there was a fully open source alternative that was that powerful. NX/VNC gets close, but the server isn't OSS... meh.

Windows file encryption should not be used. It has extreme shortcomings. Many people have lost their data because of Windows file encryption. This information has been verified by several Microsoft technical support people.

I know your post was meant to be ridiculing various Windows features, but it really just reveals your ignorance.

Quite the contrary. My NY style sarcasm sometimes is a little overboard for you interweb folks. It would never occur to me to pay money, download, and install an alternative to any of these packages, with the possible exception of an entirely different OS.

That said.. I wasn't aware that Meeting Space was an H323 and T120 app. It looks more like a WebX competitor and Sharepoint accessory than a Netmeeting replacement.

Windows Defrag is fine for any system. Any further optimization is polishing a turd.

There's so many Slashdot posters/trolls who are completely ignorant of what they are talking about with regards to Microsoft products and technology, that I find it can be very difficult to sift out the ignorant from those select few who know what they are talking about but are talking in jest.

No apology necessary. This is slashdot after all. I will say that there does seem to be a windows paradigm where users feel obligated to purchase, download, and install software for functionality already offered by the default OS. For example:

People wanting to defrag download speedDisk. People wanting to surf the web download firefox. People wanting to burn CDs purchase Nero, and so on and so forth. It's as if they do not even try to use the built-in software any more. It always struck me as odd. M

One very important thing to remember if you choose to use Windows built in encryption is that it uses the Windows password to encrypt the keys, and by default that password is stored using an LM hash which is extremely insecure (in addition to the NTLM which is less insecure).

To prevent this, you can either modify a registry [microsoft.com] setting to disable LM Hashes, or you can pick a password 15 characters or longer (since LM is limited to 14, it will be filled in with garbage and NTLM used instead).

Note that this also applies if you use TrueCrypt or some other program, but use the same password as you use for Windows.

It's worth noting this only applies to pre-Vista machines. Vista and newer do support LM hashes, but they must be explicitly enabled manually in the systems security policy.

You raise an excellent point though, checking the password policy strength is a very good idea. You should ideally be mandating the usage of NTLMv2, and forbidding the usage of anything earlier (NTLMv1/LM) in the system security policy. If this is just a home box, not connected to a corporate network, then this should not be a problem

Up to XP, the insecure hash was used. On Vista and above (probably Server 2003 as well, don't know) it is disabled by default.

nteresting side note: Unless Group Poilcy was set up to enable this, even an Administrator can not unlock a non-Administrator's encrypted files/folders. The encryption is tied to a hash of the user's password, and while an Admin can force any user (including another Admin) to change their password, doing so will render the encrypted data unrecoverable unless you have the key from som

The password is stored that way only if you are in a compatibility mode. By default new ADS systems don't store the password that way. You must enable backwards compatibility with older DOMAIN controllers in order for the lm hash system to be used.

I know its possible to make user directories private from within windows, and I'd be surprised if microsoft didn't have an existing policy for rolling out EFS (as stated above) to user folders.

If this is a single computer not on a network, why not use truecrypt to encrypt the entire drive? I have not noticed ANY slow down on any relatively modern system running whole drive encryption. Its a simple 45 minute process for less than 100gig drives.

Hi, Me again, by the way, even though your FILES may live entirely in the documents and settings/username folder, the page file, 4 out of 5 registry hives, and other forensically important data exists outside of the user folder which may be recoverable to a determined attacker with whole drive access.

I think there are two major/popular ways to do what you want that I'm familiar with. There are of course other options, but I've not used them, and won't comment on them.

1. TrueCrypt
This is a simple but very powerful encryption utility that is also open-source. It performs its magic by either encrypting volumes or by using encrypted file containers (a file which contains encrypted data that can be mounted as a virtual drive). The file container approach is very easy to use but you won't be able to use it to encrypt your _entire_ home directory, only elements of it. Effectively, you'd create one or more encrypted file containers and store everything sensitive in them. You could use full volume encryption by storing your entire user profile on a seperate volume, but this is obviously more difficult to setup, depending on your OS. To do something like the latter properly in something like Vista, you'd probably need to do it at install time through an unattend and state which drive the Users directory should be located on, as changing this once installed is not simple and ill-advised.

2. NTFS EFS (Encrypting File System)
Included with all "professional" (ie. not Home/Starter/etc..) editions of Windows since Windows 2000. Enables file-system level encryption tied into NTFS to encrypt individual files/folders on any NTFS device. This has some significant pros, in that not only is it included as a stock component of the OS, but is extremely easy to setup. Just right click on the folder/file you want to encrypt and do so through the Advanced properties. However, getting into the guts of EFS and fiddling with encryption certificates, ciphers, etc... requires some additional skill and research as there is no simple unified front-end to managing EFS like there is for TrueCrypt.

It's important to note that these two encryption suites are very different in how they work. Whereas TC stores data in file containers (unless you encrypt the entire volume), EFS works at the filesystem level and is completely transparent to userland, enabling transparent encryption of anything on the NTFS volume that is user-related. Note that EFS binds to user accounts. You generally can't use EFS to encrypt data that is outside the scope of a user account (such as system files). You'll need full volume encryption technology for that.Microsoft also has BitLocker for full-volume encryption, but this is Vista only, and for home setups, needlessly complicated and difficult to setup, not to mention the TPM requirements for full functionality.

Other things to note would be the importance of portability. TrueCrypt works across Windows/Unix, whereas EFS is obviously specific to Microsoft. I'm not sure if there's an OSS implementation for reading EFS encrypted data under Unixes, but even if there was, I think you'd be mad to use it. You shouldn't be using EFS if portability between OS's is a concern. Also note that whereas TC will have a seperate password, EFS will use your account password for encrypting your user data. This means that if you lose/forget your account password, you _WILL_ lose your EFS encrypted data, unless you've set up things like recovery certificates. Further, if you use a password reset tool to reset your account password outside of your user account, you _WILL_ lose all your EFS encrypted data. Your account password is the key to your EFS data, and so losing it or changing it improperly can have very nasty consequences.

I can't really recommend either method, you really need to research and have a play with both to decide which you prefer. I will say that if you are going the full-volume encryption route, I'd highly recommend TrueCrypt over BitLocker for home setups. The general trend I've observed from using both is that they both are very powerful tools, and can both easily get the job done when setup properly. However, TrueCrypt is more geared towards home/smaller setups, while EFS/BitLocker can work on anything from an individual box to a centrally managed enterprise network. T

A couple small points:You can actually create a user profile outside of the standard location once your system is installed - no need to do it at install time. There's a single registry key that controls the folder where new accounts go; setting it, then creating a brand new account and logging into it, will put the profile in the new location.

Alternatively, it is possible to change the location of an existing profile if you're determined enough. It's a bitch, though - definitely not recommended. I've found it MUCH easier to install, create a throw-away/backup account at install time, use it to set the location for new accounts to another drive, and then create your *real* account on that drive.

Finally, while BitLocker is definitely complex on Vista, Win7 includes much better UI and more options for key protection. On my beta Win7 tablet, it's literally a matter of right-click on a drive, select "Turn on BitLocker" from the context menu, select protectors I want to use (say, a passphrase plus I need to have a specific USB device attached - no TPM needed, and all user-configurable), and let it do its thing for a little while.

As a side note, Win7 BitLocker can also encrypt removable drives - very handy if you need to move sensitive data in physical media, and it includes a tool allowing you to decrypt them on older versions of Windows.

and it doesn't integrate open source software. The closest thing to the "home" directory on Windows is Documents and Settings -> User Name.

I don't recommend encrypting your "home" directory on Windows, because Windows tends to self destruct, and the last thing you want is for your data to be lost permintaly when that happens. If you have specific files you need to encrypt, try AxCrypt [axantum.com], make sure you have a portable version of AxCrypt to decrypt the files if needed.

Windows does have a home directory, it's the one you correctly indicated. It stores user data and preferences. In this sense, it is identical to Unix home directories.

Windows in my experience only self destructs when the user is either an idiot, or does something incredibly stupid; these often go hand-in-hand. As such, my Windows installation and those I administer never spontaneously combust. Yours on the other hand...

Finally, you can use recovery certificates as others have indicated as a fail safe

Author said he wanted only the home directory (I'm assuming you mean %USERPROFILE%) encrypted.
While TrueCrypt can natively encrypt the entire drive, there is an addon available to perform only encryption on your "Documents and Settings\Username" folder.
The enhancement is available at http://tcgina.t35.com/ [t35.com]
Of course, truecrypt is available at www.truecrypt.org
Even though I use truecrypt for the entire drive, I separately use TCGINA so that I can have a portable encrypted container of just my user profile, so that I have a compact way to transport my documents, program settings, etc.

If you're concerned enough to consider encrypting your home directory, you ought to go all the way and use full disk encryption. There are too many artifacts that can escape your home directory (RAM contents saved to swap file or hibernation file) or are never in your home directory to begin with (system logs, print spool, etc).

Better be careful with that. Full disk crypto doesn't work unless you're disciplined enough to properly shut Windows down at the end of the day, which means every time you boot you'll lose the usual 15 minutes before you have a usable system.

File based crypto can be set to disconnect on a more useful set of circumstances..

Put your homedirectory on a separate partition (a very good idea anyways) and then encrypt that using truecrypt. You can also encrypt a less-tnan-professional simgle-partition installation, the overhead for encryption is not too bad.

You can put "c:\Documents and Settings" in another folder name on a different partition but it's tricky for non-corporate users. You need to burn a copy of your installation CD with a custom OEMINFO.INI and partition your drive first.

I went to the trouble of doing this for my current Windows box and it works beautifully. Now I can reinstall the OS (on the C partition) to a clean state by dd'ing a tar.gz of it from a Live CD without clobbering my user data, and at the same time my backups are more focussed

It's certainly possible to move the whole Documents and Settings folder to a new drive even after the install. I've done it several times and it isn't all that horrible. It is a lot of manually searching and replacing in the registry though.

truecrypt is not an automated process (that I know of), it sorta works if you have portable apps and config files you can import/export, but you'd have to "mount" it, then prob log in.
while I've never had need to use ntfs file encryption it would be first -- free option to try
I'm sorta wondering what options will be replied so gonna watch this topic myself. oh wells
Geo

I've found that CrossCrypt [scherrer.cc] is a really good solution--entirely open source--that works on any version of NT.

If you do not have a separate partition, CrossCrypt will also allow you to mount a file as a drive. This comes in really handy for mounting ISO images as well.

The only tricky bit is if you want to set your entire user profile directory (including registry) to the mounted partition, because this means that you would need to have to run the encryption before you login--probably requiring an adminis

You can always use TrueCrypt whit its vast list of encryption algorithms, what u do is you create an encrypted partition and redirect my documents folders to that partition. And vuala. There u have it. Or u can create an encrypted file container and redirect all your documents there. Its open source, itâ(TM)s free and it works.

I used CFS (from AT&T research) some 15 years ago. CFS was an early effort based on the NFS protocol, providing a server (trusted, run by you) which would hold your keys and re-export an encrypted directory in plain text for you to mount locally. It was quite useable.