Bad Rabbit first came to public notice on 24 October 2017, as multiple security firms reported their discovery of a new ransomware family affecting a number of organizations, mainly in Russia and Ukraine.
According to reports, at least three media companies have been affected by the ransomware, as well as as transportation services.
For more information about the incident:
From our analysis, the initial infection vector for the Bad Rabbit ransomware is via compromised websites that host an injected malicious script. The script redirects users to a secondary site where the actual ransomware file is downloaded. The actual file itself may be disguised as an Adobe Flash Player update.
Bad Rabbit also includes functionality to spread through a network, as it is able to check for accessible SMB shares using hardcoded usernames and passwords:
If any SMB shares are found with these usernames or passwords, Bad Rabbit then checks for open RPC pipes. If any are found, it then uses the Eternal Romance exploit to spread within the network.
The use of the NSA-linked Eternal Romance exploit to spread marks a similarity between this ransomware and the Petya.F ransomware, though Bad Rabbit uses a different implementation of it. In contrast however, Bad Rabbit does not use the EternalBlue exploit, which is also used by Petya.
When the Bad Rabbit file is executed on a machine, it drops a file named 'C:\Windows\infpub.dat', a DLL that in turn drops the following files:
- C:\Windows\cscc.dat - installed as a service and renamed DCRYPT.SYS (a legitimate file name from the ReactOS)
- C:\Windows\dispci.exe - A file decrypter. A shortcut link (DECRYPT.lnk) is also added to the file on the Desktop
The infpub.dat file will also create the following Windows tasks:
And registry keys:
- HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\drogon
- HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\rhaegal
- HKLM\SYSTEM\ControlSet001\services\cscc\ImagePath: "cscc.dat"
- HKLM\SYSTEM\CurrentControlSet\services\cscc\ImagePath: "cscc.dat"
The task names and registry keys reference the popular television series, Game of Thrones.
Once Bad Rabbit is installed, it will encrypt files stored on the machine. The ransomware targets the following types of files:
- .3ds, .7z
- .accdb, .ai, .asm, .asp, .aspx, .avhd
- .back, .bak, .bmp, .brw
- .c, .cab, .cc, .cer, .cfg, .conf, .cpp, .crt, .cs, .ctl, .cxx
- .dbf, .der, .dib, .disk, .djvu, .doc, .docx, .dwg
- .h, .hdd, .hpp, .hxx
- .java, .jfif, .jpe, .jpeg, .jpg, .js
- .kdbx, .key
- .mail, .mdb, .msg
- .odc, .odf, .odg, .odi,.odm, .odp, .ods, .odt, .ora, .ost, .ova, .ovf
- .p12, .p7b, .p7c, .pdf, .pem, .pfx, .php, .pmf, .png, .ppt,.pptx, .ps1, .pst, .pvi, .py, .pyc, .pyw
- .qcow, .qcow2
- .rar, .rb, .rtf
- .scm, .sln, .sql
- .tar, .tib, .tif, .tiff
- .vb, .vbox, .vbs, .vcb, .vdi, .vfd, .vhd, .vhdx, .vmc, .vmdk, .vmsd, .vmtm, .vmx, .vsdx, .vsv
- .xls, .xlsx, .xml, .xvd
Bad Rabbit uses a driver from the open-source DisCryptor disk encryption software to perform the encryption. After rebooting the machine, the driver runs AES string encryption using a randomly generated key, which is then encrypted with the ransomware's hard-coded public key and then encoded to the machine's Master Boot Record (MBR) This code is intended for later use during the ransom payment process.
Bad Rabbit's encryption behavior shows similarities to the known Petya ransomware.
Unlike other ransomware, Bad Rabbit does not change the extensions of the encrypted files, making it less obvious that they have been tampered with. It does however add the string 'encrypted' to the end of the encrypted file.
Once the files are encrypted, Bad Rabbit will display the following ransom demand:
Ransom demand displayed by Bad Rabbit ransomware
Users are directed to pay the ransom at a specified payment site, which also provides the amount of the ransom to be paid.
Bad Rabbit payment site