GandCrab Gets a SQL Update

A new attack is found that uses MySQL as part of the attack chain in a GandCrab ransomware infection.

Dark Reading logo in a gray background | Dark Reading

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

Curtis Franklin, Principal Analyst, Omdia

Curtis Franklin Jr. is Principal Analyst at Omdia, focusing on enterprise security management. Previously, he was senior editor of Dark Reading, editor of Light Reading's Security Now, and executive editor, technology, at InformationWeek, where he was also executive producer of InformationWeek's online radio and podcast episodes

Curtis has been writing about technologies and products in computing and networking since the early 1980s. He has been on staff and contributed to technology-industry publications including BYTE, ComputerWorld, CEO, Enterprise Efficiency, ChannelWeb, Network Computing, InfoWorld, PCWorld, Dark Reading, and ITWorld.com on subjects ranging from mobile enterprise computing to enterprise security and wireless networking.

Curtis is the author of thousands of articles, the co-author of five books, and has been a frequent speaker at computer and networking industry conferences across North America and Europe. His most recent books, Cloud Computing: Technologies and Strategies of the Ubiquitous Data Center, and Securing the Cloud: Security Strategies for the Ubiquitous Data Center, with co-author Brian Chee, are published by Taylor and Francis.

When he's not writing, Curtis is a painter, photographer, cook, and multi-instrumentalist musician. He is active in running, amateur radio (KG4GWA), the MakerFX maker space in Orlando, FL, and is a certified Florida Master Naturalist.

Keep up with the latest cybersecurity threats, newly discovered vulnerabilities, data breach information, and emerging trends. Delivered daily or weekly right to your email inbox.

You May Also Like


More Insights