GandCrab Gets a SQL Update
A new attack is found that uses MySQL as part of the attack chain in a GandCrab ransomware infection.
May 28, 2019
A new type of attack by the pervasive GandCrab ransomware could open the door to more juicy targets -- database servers.
Researchers at Sophos Labs discovered a new attack using GandCrab against one of its honeypots. The attack entered the system through Port 3306/tcp — the default port for SQL database servers.
The attack targets MySQL databases via SQL commands to install a helper DLL, upload a series of small files, and ultimately employ SQL commands to upload and install the GandCrab ransomware payload to the database server.
"The origin of the attack is pretty clear; the fact that a server admin may not be monitoring a database server for what other things it might be doing (aside from hosting a database) is part of the problem here. Servers are not really 'set it and forget it' devices and this is why," says Sophos principal researcher Andrew Brandt.
Attacks targeting a SQL server are neither new nor particularly novel — Brandt has written about other such attacks in the past. One of the unusual aspects of this attack is the way in which the attack calls its software from a server with a purported US location — and at least some software with a user interface written in simplified Chinese.
It's notable that the attack uses the MySQL server but isn't necessarily aimed at that server. "I see no evidence that the attackers care about what's in the actual database, or any sign that they are attempting to manipulate or even trying to determine what data is on the machine prior to conducting this type of attack," says Brandt.
But the honeypot where the attack was first seen doesn't have a rich dataset ripe for exploitation, either, he notes.
"The honeypot’s 'server' isn't really a server and it isn't really 'infected' – the honeypot allows the SQL commands to execute and download the executable, but does nothing with it except store a local copy," Brandt explains. Within that limitation, he says that he's not positive that there is a real distinction between the server being used as a tool in the attack and the server being the target of that attack.
GandCrab's licensing model makes it useful for criminals of varying sophistication levels, and this attack mechanism could use a similar model to become popular.
"Once the attack has been designed (and presumably, tested to work out the bugs), we see attacks such as this one used repeatedly, with little to no variation over time," Brandt says. "The automation required to send out these kinds of attacks, once they've been engineered, is not particularly sophisticated at all."
As for protection against the attack, Brandt says using a non-standard SQL port might slow down port-scanning operations, and the real protection comes from using strong, unique passwords for root accounts and admin accounts, as well as a VPN for any application that needs a direct connection to the database server.
Related Content:
About the Author
You May Also Like