Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Visual Studio from encrypting files

I was just shocked when I saw this dialog popping up, because I thought I was a victim of an encryption virus:

Backup encryption key

Using Process Explorer to see which process opened the dialog, I found efsui.exe and I verified the signature to make sure it was an official Microsoft product.

Next, I googled about this and I found the command cipher /u to find encrypted files on my disk. The result was

C:\Windows\system32>cipher /u
C:\Users\XXX\Documents\Visual Studio 2015\Backup Files\Form1.Designer.vb\~AutoRecover.Form1.Designer.vb.sln: Encryption updated.

and that's confirmed when opening the folder in Explorer.

Encryption in Windows Explorer

I'm using Visual Studio for a long time, but it's the first time I opened a VB Form.

Is it common that Visual Studio encrypts files? Does it only happen for VB or is this due to some other VS update that was installed recelty? How to turn that feature off?

I tried:

  • enter "encrypt" and "encryption" in Visual Studio's quick find box.
  • finding an answer like this one about removable drives but my drive is C: and not removable.
like image 261
Thomas Weller Avatar asked Feb 18 '16 20:02

Thomas Weller


People also ask

Can I disable Encrypting File System?

To do so, right-click on “FileSystem” and select “New” > “DWORD Value“. Give the value a name of “NtfsDisableEncryption“. Press the “Enter” key when you are done. Right-click the “NtfsDisableEncryption” entry and click “Modify“.

How do I turn off auto encryption?

Navigate to: Security Settings -> Public Key Policies -> Encrypting File System. Right-click on “Encrypting File System” and select Properties. Under the General tab, choose to not allow “File encryption Using Encrypting File System (EFS)”. Click OK and reboot your system.


1 Answers

I suspect this is a feature that project templates/extensions can enable:

From: http://www.visualmicro.com/forums/YaBB.pl?num=1362001590/0

In summary, a number of machinations of Win32 code produced .sln recovery files, none encrypted. A creation of an independent arduino project created an encrypted .sln recovery file within a a minute or so

In this case the Arduino template seems to have this particular flag (perhaps because it can store credentials (App Store IDs, private keys etc.)).

In my mind it's an excellent sign that Microsoft Visual Studio devs have thought of the possibility of leaking sensitive/confidential information in the "temporary" files that might even go roaming via the domain controller and profile replication.

As such, there doesn't seem to be a way to disable the feature (and rightly so). But you can always store your projects/application data on a filesystem that doesn't support NTFS encryption. As the name implies, this would likely be any other filesystem.¹


¹ it's not impossible that any POSIX filesystems supporting extended attributes could also support this feature on Windows, but I haven't heard of it before

like image 111
sehe Avatar answered Sep 21 '22 14:09

sehe