Return of Not Petya as Bad Rabbit Diskcoder, yes those two are the same!
The first time I read about #BadRabbit, it reminded me of the movie Secret Life of Pets. I wonder if the malware namers thought of the same.
After Wannacry and Petya/Not Petya/GoldenEye, its clear that Ukraine is a testing ground for everyone to try out their malware, program different variants and perfect before launching to target their final destination.
Today, we have BadRabbit and DiskCoder. When we first read about them this morning, we thought they are two separate malwares. On deeper analysis, they are both the same.
ESET reported earlier today said that several transportation organizations in Ukraine and as well as some governmental organizations had suffered a cyberattack, resulting in some computers becoming encrypted, public sources have confirmed that computer systems in the Kiev Metro, Odessa airport and also a number of organizations in Russia were affected.
They discovered that in the case of the Kiev Metro, the malware used for the cyberattack was Diskcoder.D, — a new variant of ransomware known also as Petya. The previous variant of Diskcoder was used in a damaging cyberattack on a global scale in June, 2017.
In an analyzed version, the script reports the following to 185.149.120[.]3, which doesn’t seem to respond at the moment. There is also information about:
- Browser User-Agent
- Cookie from the visited site
- Domain name of the visited site
Server side logic can determine if the visitor is of interest and then add content to the page. In that case, what we have seen is that a popup asking to download an update for Flash Player is shown in the middle of the page.
When clicking on the “Install” button, download of an executable file from 1dnscontrol[.]com is initiated. This executable file, install_flash_player.exe is the dropper for Win32/Filecoder.D.
Finally the computer is locked and show the ransom note:
And then the very creative payment page:
So far we know of this malware to be spreading via SMB and through the flashplayer update.
As opposed to some public claims, it does not use the EthernalBlue vulnerability like the Win32/Diskcoder.C (Not-Petya) outbreak. First, it scans internal network for open SMB shares. It looks for the following shares:
Mimikatz is launched on the compromised computer to harvest credentials. A hardcoded list username and password is also present.
When working credentials are found, the infpub.dat file is dropped into the Windows directory and executed trough SCManager and rundll.exe.
Win32/Diskcoder.D is modified version of Win32/Diskcoder.C. Bugs in file encryption were fixed. The encryption now uses DiskCryptor, an open source legitimate software used to do full drive encryption. Keys are generated using CryptGenRandom and then protected by hardcoded RSA 2048 public key.
Which makes it curious because the sample metadata uploaded on VirusTotal shows copyright belonging to DiskCryptor.
Encrypted files have extension .encrypted. Like before, AES-128-CBC is used.
Interestingly, ESET telemetry shows that Ukraine accounts only for 12.2% of the total number of times we have seen the dropper component Here are the statistics:
- Russia: 65%
- Ukraine: 12.2%
- Bulgaria: 10.2%
- Turkey: 6.4%
- Japan: 3.8%
- Other: 2.4%
It’s interesting to note that all these big companies were all hit at the same time. It is possible that the group already had foot inside their network and launched the watering hole attack at the same time as a decoy.
The good news is that this morning only 9/66 AV companies had signatures for the malware as of this morning. The bad news, as of right now only 27/66. Why its taking so long for the other companies, we dont really know.
Indicators of Compromise
As always, we have Indicators of Compromise to share with all of you:
Header Image from: https://pm1.narvii.com