Hacker wiping unprotected MongoDB installs and holding data for ransom

Unprotected MongoDB installations are being erased and replaced with a ransom demand

How many years have we been hearing about the dangers of leaving MongoDB instances unprotected? In December 2015, Shodan creator John Matherly warned that there were 684.8 TB of data exposed due to publicly accessible MongoDB instances. Yet there are still people don’t who bother to learn how to lock it down and so now a hacker is targeting and erasing those MongoDB installations, replacing the data with a ransom demand.

Security researcher Victor Gevers, aka @0xDUDE and co-founder of the GDI Foundation, has personally been notifying owners of exposed MongoDB for years. But near the end of 2016, he came across an open MongoDB server that had the database contents replaced with a ransom note.

Gevers tweeted an example of the ransom warning:

Ransom demand warning on unprotected MongoDB server Victor Gevers

With the price of Bitcoin going up, the demanded ransom of .2 BTC is currently equal to about $219. After paying the ransom, victims are to email the attacker with the IP of their server in order to recover their database.

According to Bleeping Computer, Gevers said a hacker going by “Harak1r1” was responsible for wiping the database contents and leaving behind the ransom. And some of the desperate, targeted souls—system admins who apparently have no recent backups—have been paying the ransom to recover the data.

Victims have been reaching out to Gevers for help. At one point yesterday, Gevers said he’d “received 27 requests for assistance and 9 RFIs.” That number is likely to climb, since John Matherly said there are now “nearly 2,000 instances affected with MongoDB ransomware.”

While exposed MongoDB installs are being replaced with a ransom demand, Gevers told Bleeping Computer, “This is not ransomware. Database does not get encrypted. It only gets replaced.”

Easy to take a MongoDB hostage

Forensics expert Matt Bromiley took to Medium to show just how easy it is for an attacker to quickly hold a MongoDB hostage. “There are built-in tools that can be easily abused without credentials.” After showing several ways to pwn MongoDB, Bromiley wrote, “There was no need to develop elite 0-day exploits or find some fatal flaw in MongoDB itself. The box itself need not be compromised, as MongoDB was open to the world.”

If the wiped and ransomed data was sensitive, then it doesn’t matter whether or not an attacker looked at it after downloading it. Bromiley said, “This is a data breach” and to be sure and “notify the proper parties.” He included some tips for how victims can recover.

Gevers told Salted Hash’s Steve Ragan that the attacker may be finding the MongoDB installs via Shodan or other basic scans. Or the attacker may be finding MongoDB installations that are vulnerable to exploits, “including one that allows remote authenticated users to obtain internal system privileges.”

Speaking of being vulnerable to exploits, Gevers told Bleeping Computer, “The most open and vulnerable MongoDBs can be found on the AWS platform because this is the most favorite place for organizations who want to work in a DevOps way. About 78% of all these hosts were running known vulnerable versions.”

If you are running an older version of MongoDB, then update. If you used the default configuration for those older DB instances, then the database is vulnerable.

If you don't know where to start in securing MongoDB, Ragan shared some of the advice from the notification letter Gever has been sending to victims.

While this is neither here nor there, I still wanted to share this tidbit, since it stunned me. One of the unprotected MongoDB servers that Gevers found had over 853 billion records pertaining to phone calls.

unprotected MongoDB with over 853 billion records with meta data from phone calls Victor Gevers

If you have a MongoDB installation, now is the time to make sure it is secure. Or in the tweeted words of Gever, “Open MongoDB = Money 4 bad ppl.”

Copyright © 2017 IDG Communications, Inc.

7 hot cybersecurity trends (and 2 going cold)