Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Cybercrime

‘PGMiner’ Crypto-Mining Botnet Abuses PostgreSQL for Distribution

Palo Alto Networks security researchers have discovered a Linux-based cryptocurrency-mining botnet that being delivered via PostgreSQL.

Palo Alto Networks security researchers have discovered a Linux-based cryptocurrency-mining botnet that being delivered via PostgreSQL.

Dubbed PGMiner, the botnet exploits a remote code execution (RCE) vulnerability in PostgreSQL to compromise database servers and then abuse them for mining for the Monero cryptocurrency. However, the malware attempts to connect to a mining pool that is no longer active.

An open source relational database management system (RDBMS) widely used in production environments, PostgreSQL has a “copy from program” feature that was labeled as a vulnerability (CVE-2019-9193), something that the PostgreSQL security team quickly disputed.

The newly discovered PGMiner, which is believed to be the first crypto-mining botnet delivered via PostgreSQL, targets that disputed vulnerability to propagate.

The attack begins with scans for PostgreSQL servers and attempts to brute-force the password for the user “postgres”, which is present by default on the database. Next, the malware leverages the “copy from program” feature to deploy coin-mining scripts.

Introduced in PostgreSQL 9.3 in 2013, the feature allows a superuser (either local or remote) to run shell scripts on the server. Controversial right from the start, the feature was assigned a CVE in 2019, but the PostgreSQL community challenged it, which resulted in the CVE being considered “disputed.”

The argument is that superuser privileges are required to use the feature and that it won’t be a risk if the access control and authentication system works as expected, but researchers fear that it opens PostgreSQL to remote exploitation and code execution directly on the server.

The malware was observed constantly reproducing itself through recursively downloading certain modules. Furthermore, the researchers identified similarities between the dropped crypto-miner and the SystemdMiner malware family.

Advertisement. Scroll to continue reading.

On the infected machine, the malware attempts to download the curl binary if the curl command is not available. For communication with the command and control (C&C) server, the malware uses the SOCKS5 proxy technique.

The botnet then iterates through a list of folders to find one that allows it to create a file and update its attributes, thus ensuring that the downloader payload can be executed. Furthermore, client tracking functionality was included in the malware, as well as support for multiple architectures.

“PGMiner can potentially be disruptive, as PostgreSQL is widely adopted in PDMS. With additional effort, the malware could target all major operating systems. For example, PostgreSQL is available for all major platforms, including macOS, Windows and Linux. Theoretically, the malware actors could implement another version of PGMiner by targeting a new platform, such as Windows, and deliver it using PostgreSQL,” Palo Alto Networks concludes.

Related: Nearly 1,000 Vulnerabilities Found in Popular Open Source Projects in 2019

Related: Kinsing Linux Malware Deploys Crypto-Miner in Container Environments

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Cybercrime

The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.

Cybercrime

A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Cybercrime

As it evolves, web3 will contain and increase all the security issues of web2 – and perhaps add a few more.

Cybercrime

Luxury retailer Neiman Marcus Group informed some customers last week that their online accounts had been breached by hackers.

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...