Page 1 of 1

Crypt the file itself

Posted: Thu May 19, 2016 5:52 pm
by johnmcloud
Hi,
I just like to know if is possible, using Windows command line, to crypt directly the original file instead of create a new crypted file. Yes i know all the possible behavior of this choice for this reason i'm asking for the command line, maybe using pipe? Dunno. If actually is not possible, take this post like a feature request i don't think require so much of work, like additional parameter.

Re: Crypt the file itself

Posted: Fri May 20, 2016 5:17 am
by paulej
It's not possible and dangerous. If it failed, the original would be lost forever. It would be possible to encrypt to a temporary file, then replace the original with the temporary file. You'd get the same effect. But why add that as a feature when it can be easily scripted?

Re: Crypt the file itself

Posted: Fri May 20, 2016 2:56 pm
by johnmcloud
I know all the possible risk. Why is not possible? All the ransom ware (ok wrong example but is the first come in mind) don't leave a copy of the original or delete the original* but crypt the original itself and AES is one of the algorithm used by them.
*for this reason using recovery software is a useless try

Re: Crypt the file itself

Posted: Fri May 20, 2016 6:27 pm
by paulej
I bet the ransomware encryts files into a temp file and then replaces the original when done. I don't mean to say it's technically not possible, but a read or write error could destroy the original file forever. That's an unacceptable risk, IMO.

Re: Crypt the file itself

Posted: Fri May 20, 2016 6:59 pm
by johnmcloud
I'm not sure about the temp folder. For what i have read all the operation are in memory and at the end they just replace the original content of the file with the encrypted one. No file delete, no possibily to recover the original file except for shadow copies, if are enabled. I can understand you point of view.