Betabot - An Example of Cheap Modern Malware Sophistication
4.10.2018 securityweek
Virus

What appears to be a new campaign delivering the Betabot malware has been detected by security researchers. It doesn't look as if this campaign is directly related to the wide-ranging campaign disclosed by Kaspersky Lab in August. However, like the Kaspersky campaign, this one also uses phishing as the original point of infection.

"The campaign doesn't seem directly related to the Kaspersky report," Assaf Dahan, senior director, threat hunting at Cybereason's Nocturnus Research told SecurityWeek. "The TTPs are quite different. The campaign discussed in our report seems less targeted, and originates from generic phishing emails."

Cybereason does not know who is behind the new campaign. "Since Betabot's source code and old builders are available online in hacking forums (or new ones sold rather cheaply ~200$), it is hard to estimate who is behind it," added Dahan.

"The Betabot infections seen in our telemetry originated from phishing campaigns that used social engineering to persuade users to download and open what appears to be a Word document that is attached to an email," explains the report.

Betabot, also known as Neurevt, first appeared in late 2012. "The malware began as a banking Trojan," writes Dahan, "and is now packed with features that allow its operators to practically take over a victim's machine and steal sensitive information." Its main features include a form grabber, FTP and mail client stealer, banking, USB infection, Userland rootkit, command execution via shell, additional malware downloads, persistence, and a crypto-currency miner (which was added in late 2017).

It attempts to be persistent and to hide its presence by using all the tricks available, including anti-debugging, anti-virtual machine/sandbox, anti-disassembly and the ability to detect security products and analysis tools. It also seeks to find and eliminate any other malware on the system "with heuristic approaches that would put many security products to shame."

The infection chain starts with social engineering designed to get users to download and open what appears to be an attached Word document. It exploits an 18-year-old vulnerability in the Equation Editor tool in Microsoft Office, that was patched in 2017 (CVE-2017-11882).

If successful, what is a weaponized RTF document executes dqfm.cmd, which spawns hondi.cmd. Hondi does preparatory work and executes the Betabot dropper, mondi.exe. This extracts the Betabot loader and the encrypted main payload, and injects it into its own child process. Betabot then examines all running processes to find additional injection candidates.

"In many of the cases Cybereason observed," writes Dahan, "the Betabot loader injected its code into multiple running processes for persistence and maximized survival purposes. If an injected process is terminated, another process will kick in and spawn the loader as a child process."

While the first candidate is usually a second instance of explorer.exe, Cybereason has seen Betabot injecting itself into a McAfee process called shtat.exe. Once injected, Betabot attempts to connect to its C2 servers.

Cybereason describes Betabot as paranoid, doing everything it can to prevent detection and maintain persistence. It seeks to detect a virtual environment by querying the registry and looking for the names of virtual machine vendors such as VMware, VirtualBox and Parallels, as well as searching for specific drivers' vendor files. It also checks for indications of a sandbox, and attempts to prevent debugging.

Betabot attempts to detect -- and sometimes remove -- 30 different leading anti-malware products. Apart from trying to neutralize threats to its presence, it also seeks to eliminate rival malware (which could attract the attention of security teams).

"Betabot will attempt to detect other bots and malware on the infected host," writes Dahan, "by looking for common malware persistence patterns and other heuristic features. For example, Betabot will enumerate registry autorun keys to look for suspicious-looking persistence indicators that are common in malware."

It even has a routine that looks for script-based fileless malware persistence patterns.

Boston, MA-based Cybereason raised $100 million in Series D funding from SoftBank Corp in June 2017, bringing the total investment in the cyber-attack detection firm to $189 million since it was founded in 2012.