What it means by "Authentication partially enabled" on MongoDB?

Viewed 470

I ran a scan on Shodan for my server IP and I noticed it listed my MongoDB with "Authentication partially enabled"

Now, I can't find what it actually mean. I am sure I set up authentication right way but the word "partially" concern me.

1 Answers

It means you have a mongodb database with enabled authentication.

I guess Shodan uses this fancy wording to highlight that the database is still listening on the externally facing interface, i.e. you can connect to the database with command

mongo <your IP>

from anywhere.

There are commands that don't require authentication, e.g.

db.isMaster()
db.runcommand({buildInfo:1})
db.auth()
....

It leaves room for exploitation of vulnerabilities, brute force attack, etc.

The server responds to the connection request which exposes the fact that you are using mongo. Version of your server, ssl libraries, compilation options and other information advertised by the server can be used to search known or 0day vulnerabilities.

You can see what info is exposed on shodan https://www.shodan.io/search?query=mongodb+server+information. Compare it with amount of information available for hosts without "Authentication partially enabled"

The most popular ways to harden mongodb set up is to make it accessible from local network/VPC/VPN only. If nature of your business requires bare mongo accessible from the internet, hide it behind a firewall to allow connections only from known IPs. In both cases you will be completely invisible to Shodan and similar services.

Related