If you're using MongoDB, you might want to check to make sure you have it configured properly -- or better yet, that you're running the latest and greatest -- to avoid finding it wiped and your data being held for ransom.

A hacker who goes by the name Harak1r1 is attacking unprotected MongoDB installations, wiping their content and installing a ransom note in place of the the stolen data. The cost to get the data returned is 0.2 bitcoin, which comes to about $203. If that sounds cheap, it isn't. Not if you're deploying multiple Mongo databases and they all get hit -- which has been happening.

The ransomware attack on the popular open source NoSQL database was first noticed by Victor Gevers, a penetration tester and chairman of the GDI Foundation, as he was reporting on exposed, non-password-protected MongoDB installations, a problem his organization -- a nonprofit dedicated to "a safer Internet" -- has been sounding an alarm about for some time.

The attacks appear to have been going on for several weeks -- Gervers made his initial discoverey December 27 -- and have been hitting sites located around the globe. The problem appears to be with older versions of the database, where the default configuration left it open to connections from the Internet -- a problem that was fixed by the MongoDB folks shortly after the vulnerability was made public in 2015. Administrators can avoid the current attack by upgrading to the latest MongoDB version and by following the company's recommended security practices.

The most vulnerable deployments seem to be those running in the public cloud. "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," Gevers told BleepingComputer. "About 78 percent of all these hosts were running known vulnerable versions."

It's not difficult for attackers to find vulnerable instances, either through an Internet scan or -- easier yet -- by using the security search engine Shodan, which is used for finding Internet-connected devices. According to The Register, Shodan's creator, John Matherly, has been warning about this problem since 2015, when he said that there were about 30,000 MongoDB instances without access controls open to the Internet. The current number is thought to be around 25,000.

At last count an estimated 2,000 databases had been affected by the attack, and Gevers warns identified victims to check for other modifications. "Criminals often target open databases to deploy their activities like data theft/ransom. But we also have seen cases where open servers like these are used for hosting malware (like ransomware), botnets and for hiding files in the GridFS."