It is bad enough when a ransomware infection encrypts your data and demands a ransom, but it's even worse when shoddy programming destroys it instead. This is what happened in a new variant of the Power Worm ransomware where bad programming encrypts your data using AES encryption and then throws away the key.  Since the decryption key was not properly initialized and not saved, a victim's files become unrecoverable even if they wanted to pay the ransom. Therefore, if you are a victim of this infection, DO NOT pay the ransom as it will not help you recover your files.

At BleepingComputer we never disclose bugs in a ransomware infection as that will just alert the developer and cause them to fix the weakness. In this particular case, though, we are going to tell the developer how to fix his mistake so that he doesn't continue to destroy his victim's data going forward. In our opinion, if a person becomes infected, we would rather they have a fighting chance of recovering their files rather than no chance at all.

After receiving the sample from White Hat Mike, one of our resident malware researchers, and further analysis by, Nathan Scott, it was discovered that there is a flaw in how this ransomware initializes the AES encryption engine.  This developer planned on using a static AES key for all of his victims. Since everyone would have the same decryption key, this would allow the developer to have one decryptor that would work for everyone rather than having to manage a intricate payment site and decryption engine. The problem is that the AES key was not properly padded when it was converted into a Base64 string. When the PowerShell script tried to decode this string, it failed, and instead of the variable $RgDhcxSdghWd containing his decoded AES string, it now contained a NULL or empty value. If he had added one one more = character to the string, it would have worked as intended and everyone would have had the same AES key.

Unfortunately, since the above variable had a NULL value, when he attempted to use it to initialize the AES cryptography API,  the API instead created a random key for every victim.

As the developer thought he that knew the key that was being used, this random key was never saved and there is no way to recover it in the future. That one little missing "=" character irretrievably destroyed a victim's data. If the malware dev had simply tested (what a crazy concept) his infection, then this mess wouldn't have happened. Instead the victim's would have had their data encrypted with a static AES key, which would have given us a chance of recovering their files.

So the sad news is that for anyone who was affected by this ransomware, there is nothing that can be done to retrieve your files and your only option is restore from a backup. For those who want a little more information on how this PowerShell ransomware works, please read below.

Technical Details:

This new ransomware was developed in PowerShell and is a small 54 line script. When executed, it first deletes your shadow volume copies so that you are unable to use them to restore your files.



It will then use the PowerShell GDR command and filter its output for only drives that show free space. This allows the script to get a list of drives that are writable.

$VxRgsjfThsnvHjh=gdr|where {$_.Free}|Sort-Object -Descending

It then scans this list of drives for data files that match the following extensions and encrypts them using a randomly generated AES encryption key. Unfortunately this key is not saved or transmitted to the developer and thus lost after the script terminates.


For each folder that it encrypts a file, it will also create a ransom note called DECRYPT_INSTRUCTION.html. This ransom note is a copy of Cryptowall's, but the developer adds his own warnings to the bottom that state your ransom price will go up if you don't pay quickly. This ransom note also includes an ID that is supposedly unique to the victim. In reality this ID is the same for everyone and can be ignored.



This ransom note also contains links to the payment sites, which are currently or lgemfolpt5ntjaot.onion. A picture of the payment site can be seen below.




As already stated, there is unfortunately nothing that can be done for victims of this infection. If you have been affected by this ransomware, your only option is to restore from a backup.