Anomali’s Modern Honeypot Network (MHN for short) is a worldwide network of honeypot sensors that collects data on scans, probes and intrusions of various network ports and services. By looking at data collected by MHN we can piece together a picture of the current threat landscape for a variety of services.
Recently, security headlines have been ripe with reports of ongoing campaigns against exposed database servers on the internet. Many of them ending up fully compromised and having data hijacked by cyber criminals using Linux variants of ransomware that encrypt the database. Affected database installations include MongoDB, ElasticSearch, Hadoop, Cassandra, CouchDB as well as other well-known databases.
If you are running any of these database technologies, you are urged to immediately review your security posture and ensure systems are not exposed.
The primary issue is that these database systems are setup with default configurations and then made accessible on the open internet. This is usually by way of opening ports on a firewall or in some cases directly connecting the system to the internet without sufficient hardening of the OS and applications. (Did we mention some don’t even bother to change the default password?)
Once installed, the database usually runs quietly as a backend service and unless configured otherwise will listen on its default TCP port (common ones listed below). If that TCP port is accessible via the open internet it means anyone can run a scan and identify systems running these services, making them potential targets for attacks.
Default TCP Ports for common databases
Looking through data available in MHN, we can see the distribution of connection attempts to backend database services for the past year. As far as TCP port activity goes, MongoDB (TCP port 27107) eclipse’s the others in terms of overall volume with Elasticsearch (TCP port 9200) coming in second place.
Figure 1 – TCP port activity, 2016 on left and 2017 year to date on right.
Volume of scans for backend database services within MHN
This is where things start to get interesting. Up until late last year there was only a trickle of scans, though MongoDB was already at the forefront signaling what was yet to come.
Figure 2 – Database TCP Port activity. The bad guys are REALLY interested in MongoDB!
As you can see above, since 2017 started there has seen a significant increase in activity to database services. MongoDB saw more than a 10-fold increase in activity but the other services saw major increases as well. There is no question that exposed databases are actively under attack and it’s ongoing.
Geographically, the US has the highest number of exposed systems for all the represented databases (according to data from shodan.io). The majority of the probes against MongoDB came from an IP located in China and hosted on AS4837.
Attackers will continue to scour the internet for openly accessible databases. Security teams should to be on alert for associated activity and expect scans and probes against any exposed systems, information disclosure alone can be enough to trigger an attack. This should serve as a reminder that security is rarely a “set it & forget it” deal. If you set it up, you must harden it or at least make sure it is not accessible to anyone that is not authorized. Poking holes in the firewall so you can manage the DB remotely may be convenient, but it may be very costly as well.
Every environment is different and fully securing your databases may require additional mitigation. You are encouraged to seek help from the security community and or professionals for the particular database technology.
Proactively looking for signs of activity related to probes, scans, or authentication attempts may be helpful in determining your risk level or amount of exposure. Having access to up to date Threat Intelligence is vital in battling threats like these as it empowers your security team to know which needles to look for in your haystack.
The following short list of vendor recommendations may also help get your started.
- MongoDB Security checklist
For more information on MHN as well as how to setup your own honeypot network for collecting statistics on cyber-attacks, check out the MHN intro page.