<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=116645602292181&amp;ev=PageView&amp;noscript=1">

We have recently discovered some variants of the Cerber ransomware which actively look for canary files and try to evade them, as a technique to bypass anti-ransomware technologies that use canary files. Our team created a “fix” that makes sure RansomFree and the Cybereason platform are effectively protecting against these variants.

Like any ransomware program, Cerber’s goal is to quickly encrypt files that matter to users. But Canary files interfere with that mission. These bogus files, which anti-ransomware programs place on machines, are meant to be encrypted and alert the anti-ransomware program that an attack is occurring.

To avoid encrypting canary files and triggering anti-ransomware programs, a new feature in Cerber now searches computers for any image file (.png, .bmp, .tiff, .jpg, etc.) and checks whether they are valid. Image files are commonly used as canary files. If a malformed image is found, Cerber skips the entire directory in which it is located and does not encrypt it.

While this trick might allow Cerber to evade some canary-file anti-ransomware solutions, it also makes it vulnerable - a user can “fix” any important directory against Cerber by creating an invalid image file inside it, for example by copying any non-image file to this directory and renaming it to .jpg. Cerber will assume that the file is a canary file installed by an anti-ransomware program on the user’s machine and refuse to encrypt it!

Check out the video below to see this “vaccine” in action. You’ll see Cerber running on a machine with two, nearly identical directories full of files that ransomware would typically encrypt. The only difference is that one directory contains a bogus .jpg file. As a result, Cerber does not encrypt this directory.

You may find samples of the relevant Cerber variants in the following links:

https://www.virustotal.com/en/file/145d1db4032e3089d9d7ea9ca70ded01e78b9cf04ada90b3b6e41a674a124b09/analysis/

https://www.virustotal.com/en/file/2040fa2a3c5b16d74442d41d224a6ab16e0290a30f0535b18cb50de6a59686d4/analysis/

https://www.virustotal.com/en/file/f2cafb550a0b7c248847d2548389379d0d8954335d81d60991a4d1e7333745b4/analysis/

https://www.virustotal.com/en/file/56f41afc8f025597659f11f59b191e66bd6c6525313cf3c0356c40490722b7c5/analysis/

https://www.virustotal.com/en/file/2888cb8fefe6528e37bc205cdab426bcfd4f622d1287fb3cbc914c5181954c50/analysis/

Interested in how the Cybereason platform works?

Learn More