Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Has anyone ever done a serious technological evaluation of one of these programs? I'd be very interesting in learning more specifically about its encryption mechanism. For example, To be able to decrypt (edit: used to say encrypt) the files, it has to store the private key (and obviously the public key) somewhere on the computer, whether in memory or elsewhere to decrypt the files. In addition to this, if this is a variant like mentioned in the article, where you can "decrypt one file for free", then the software obviously has to access both keys to decrypt that, meaning with the right tools you should be able to capture those keys if you can capture the program in the action of decrypting a file.

While an obviously viable solution to this is good backups and educating people about computer security, that won't put these people out of business, which is what would really stop this.

Either way though, if anyone here knows of any material delving into hacking ransomware like this let me know, I'd love to read about it.



@logn cites a couple links explaining how CryptoLocker worked[1].

Each file gets its own key, and those keys are stored on the victim's computer, encrypted with a single key.

DeCryptoLocker can defeat the encryption and restore your files[2].

Symantec says CryptoWall similarly uses public-key encryption with a 2048-byte key[3], but no indication if it can be defeated like CryptoLocker was.

[1] https://news.ycombinator.com/item?id=8834012

[2] https://www.decryptcryptolocker.com/

[3] http://www.symantec.com/security_response/writeup.jsp?docid=...


> To be able to encrypt the files, it has to store the private key (and obviously the public key) somewhere on the computer

Why do you say that? The very purpose of public-key crypto is so that you can send only the public key, have the other end encrypt with that, while you hold onto the private key which is the only thing that can decrypt it.

No guarantee this uses public key for the crypto though. From what I know, a symmetric key is more suitable to encrypting huge amounts of data. Could be wrong about that though.


> From what I know, a symmetric key is more suitable to encrypting huge amounts of data.

Symmetric key encryption is more efficient, but the typical approach when using public key encryption with large files is to use symmetric key encryption, then encrypt the symmetric key with the public key, and then transmit that over the wire.

I imagine that the process used in this software is the following:

1. Generate symmetric key

2. Encrypt symmetric key using (known) public key (the private key remains on the malware owner's servers)

3. Delete the unencrypted symmetric key.

If these three steps are done before the user is told that their files have been held hostage, then by the time that they know they are infected, it's too late to do any analysis of the program, sniff memory, etc. (at best they'll be able to recover the public key and the encrypted symmetric key, which is useless without the corresponding private key). As soon as the ransom is paid, the malware owners will decrypt the symmetric key (using their private key), and send that back to the victim[0].

This could, of course, also use a different symmetric key for each file as well, in addition to the above.

[0] In theory, the malware owners don't even need to store anything per-victim, since the encrypted symmetric key can remain "safely" with the users the entire time. All they need to store is the single master private key.


My mistake. I said encrypt when I should have said decrypt. You are correct though, symmetric key encryption would be better for this, and utilizing the answer giving by kolinko below, I wouldn't be surprised if they did use a different key for each file.


You only need to decrypt once the payment has been received, so the private key doesn't need to be sent to the infected machine before that. Encrypt/Decrypt, it seems to be a moot point.

The "decrypt one file for free" feature seems to be specific to CryptoWall which, some have reported, do not use symmetric encryption like CryptoLocker. CryptoLocker stores symmetric keys for each file on the infected machine, encrypt those with a public key and when the payment is received, send the private key from the C&C Server. I would say it's very unlikely CryptoWall would store remotely a private key per file. That could mean a lot of information to be transferred over the wire. Probably because of using only asymmetric (slow) encryption, CryptoWall apparently only encrypt small files completely, and only a piece of the larger ones. One way the "decrypt one file for free" feature might work is by actually uploading the file (or the the encrypted piece of file) to the C&C Server, decrypting it remotely and sending it back. But the feature is definitely worth investigating.

https://blog.fortinet.com/post/cryptowall-another-ransomware...

http://stopmalvertising.com/malware-reports/cryptowall-behin...


It doesn't have to know the private key, just the public one, woth the private being on the virus-owner's side.

Furthermore, it's possible to encrypt each file with a different key so one public key would only deceypt one file.

Oh, and a fun fact - with the newest cryptography algorithms it's even possible to modify the files without knowing what they contain. If I'm not mistaken it would even be possoble to create a software that can conpute checksums of files without knowing the file contents.


> Oh, and a fun fact - with the newest cryptography algorithms it's even possible to modify the files without knowing what they contain. If I'm not mistaken it would even be possoble to create a software that can conpute checksums of files without knowing the file contents.

To my knowledge, this is only true in a purely academic (not practical) sense at present. There do exist homomorphic encryption schemes but current implementations are ridiculously slow.


Also, wouldn't it be possible to recover the files on most filesystems, assuming the disk is too not full?

The program has to encrypt them, unlink the files, and save the encrypted files / archive. If the filesystem needs more space later, it writes over those (discarded) files, right? Everything else would increase disk wear and decrease performance.

Edit: of course excluding SSDs with TRIM/discard enabled.


The problem is that "needs more space later" can occur as soon as the malware moves on to the next file to encrypt.

Also, overwriting discarded files can happen even before the filesystem runs out of space; it depends on the allocation strategy. To maximally preserve the possibility of undeleting files, there would have to be a policy of using the least recently freed blocks for new allocation. That could be pessimistic in other regards, like minimizing fragmentation and seek time.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: