Live data from Hacker News

Several thousand MongoDBs without access control on the Internet [pdf]

cispa.saarland

21–30 of 45 posts

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#21
post #19

We take security seriously at MongoDB. Here is a response on security best practices from the MongoDB CTO & Co-Founder: http://www.mongodb.com/blog/post/mongodb-security-best-pract...

As I understand things based on the OP it seems however your documentation promotes the insecure way of setting up mongodb. It's even true that mongodb doesn't even ask to create db credentials during the installation,something it should do by default.

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#22
post #5

This can also happen with Memcached, Redis, and for that matter SQL databases. If you find it on your servers, you should be very, very alarmed. (Assume that any attacker with arbitrary access to any of these owns the box. [+]) One easy-ish way to make sure you don't inadvertently leave a port open is to use iptables and deny inbound connections to everything but 22, 80, and 443 by default. This is part of the Sliceh…

> This can also happen with Memcached, Redis, and for that matter SQL databases.

No one else binds to all interfaces by default.

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#23
post #22
post #5

This can also happen with Memcached, Redis, and for that matter SQL databases. If you find it on your servers, you should be very, very alarmed. (Assume that any attacker with arbitrary access to any of these owns the box. [+]) One easy-ish way to make sure you don't inadvertently leave a port open is to use iptables and deny inbound connections to everything but 22, 80, and 443 by default. This is part of the Sliceh…

> This can also happen with Memcached, Redis, and for that matter SQL databases. No one else binds to all interfaces by default.

[deleted]

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#24
post #19

We take security seriously at MongoDB. Here is a response on security best practices from the MongoDB CTO & Co-Founder: http://www.mongodb.com/blog/post/mongodb-security-best-pract...

The first point in your article is:

> "The most popular installer for MongoDB (RPM) limits network access to localhost by default."

The first download for Linux at https://www.mongodb.org/downloads is:

> https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.7....

At the bottom of the page there are alternate links to packages. Here is the description:

> "MongoDB is included in several different package managers. Generally speaking, it is easier to simply install the prebuilt binaries from above."

If the properly packaged versions have secure defaults, maybe you should steer people towards them?

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#26
post #22
post #5

This can also happen with Memcached, Redis, and for that matter SQL databases. If you find it on your servers, you should be very, very alarmed. (Assume that any attacker with arbitrary access to any of these owns the box. [+]) One easy-ish way to make sure you don't inadvertently leave a port open is to use iptables and deny inbound connections to everything but 22, 80, and 443 by default. This is part of the Sliceh…

> This can also happen with Memcached, Redis, and for that matter SQL databases. No one else binds to all interfaces by default.

Memcached does, for one. This is (sensibly) turned off if you do "apt-get install memcached" or similar.

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#27
post #26
post #22

Earlier quoted context omitted.

> This can also happen with Memcached, Redis, and for that matter SQL databases. No one else binds to all interfaces by default.

Memcached does, for one. This is (sensibly) turned off if you do "apt-get install memcached" or similar.

Only if you compile memcached from source. They can afford to do this because distro package maintainers give it sensible defaults on their behalf.

MongoDB fucks this balance up by recommending you use their package repositories instead of distro maintained packages.

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#28
# 1st: accept connections from localhost

iptables -A INPUT -p tcp -s 127.0.0.1 --dport 27017 -j ACCEPT

iptables -A INPUT -p tcp -s 127.0.0.1 --dport 28017 -j ACCEPT

# 2nd: drop from all others

iptables -A INPUT -p tcp --dport 27017 -j DROP

iptables -A INPUT -p tcp --dport 28017 -j DROP

Re: Several thousand MongoDBs without access control on the Internet [pdf]

#30
post #21
post #19

We take security seriously at MongoDB. Here is a response on security best practices from the MongoDB CTO & Co-Founder: http://www.mongodb.com/blog/post/mongodb-security-best-pract...

As I understand things based on the OP it seems however your documentation promotes the insecure way of setting up mongodb. It's even true that mongodb doesn't even ask to create db credentials during the installation,something it should do by default.

the real problem is lack of network protections. there are many things on the internet unprotected. this article is not news. dont put your database on the internet.
Post reply on HN