Heimdal Security Blog

Gh0stCringe Malware Impacts Unsecured Microsoft SQL, MySQL Servers

Cybercriminals distribute the Gh0stCringe Remote Access Trojan (RAT) on exposed machines by attacking poorly protected Microsoft SQL and MySQL database servers.

Researchers from cybersecurity company AhnLab detailed in a report issued yesterday how the operators behind GhostCringe are aiming at poorly managed database servers with inadequate account credentials and no oversight.

According to BleepingComputer, attackers hack the database servers and write the malicious’mcsql.exe’ executable to disk using the mysqld.exe, mysqld-nt.exe, and sqlserver.exe processes.

Source

Aside from Gh0stCringe, AhnLab’s notes in its report the existence of various malware samples on the analyzed servers, implying that competing cybercriminals are hacking the same servers to drop payloads for their own operations.

Since database servers with vulnerable account credentials usually become targets of various attackers and malware, many different malware infection logs were found.

Source

Gh0stCringe RAT is a dangerous malware that connects to the C&C server in order to receive custom commands or exfiltrate stolen data to the attackers. The threat actor can configure numerous settings to Gh0stCringe just like other Remote Access Trojan (RAT) malware.

As per AhnLab report, there are 7 settings, and the malware behaves differently depending on the data that has been configured:

Source

The keylogger is perhaps the most aggressive of the above components.

The keylogging feature can operate by receiving a command from the C&C server, and it can also be activated depending on the settings data. Unlike Gh0st RAT which uses the Windows Hooking method (use of SetWindowsHookEx() API), Gh0stCringe uses the keylogging technique of Windows Polling method (using GetAsyncKeyState() API).

Source

As explained by BleepingComputer, the malware will also trace keystrokes for the last three minutes and transmit them to the malware’s command and control servers along with basic system and network data.

These logged keystrokes will enable malicious actors to steal login credentials and other confidential material entered on the machine by logged-in users.

Modes and Commands

Gh0stCringe supports four distinct modes. The three modes are the values of the previously mentioned settings data, which were 0, 1, and 2. Furthermore, the malware is carried out in an exclusive mode in the Windows 10 version.

All modes eventually connect with the C&C server and execute commands, but there are contrasts in their features related to maintaining persistence.

Here is a list of commands that can be received and executed from the C&C server. Some of Gh0stCringe’s commands are present in the original Gh0st RAT, but there are many new ones as well.

Performing Commands

Stealing Information

Self-Control

System Control

Database Servers Protection

  1. Update your server software to implement the most recent security patches. This will help to rule out a variety of attacks that take advantage of known flaws.
  2. Use a hard-to-guess admin password.
  3. Place the database server behind a firewall so that only allowed devices can access it.
  4. Keep an eye on everything to spot any dubious reconnaissance activity.

If you liked this article, follow us on LinkedInTwitterFacebookYoutube, and Instagram for more cybersecurity news and topics.