Back to services
database27017/tcp

MongoDB

MongoDBMongoNoSQL Database

MongoDB is a NoSQL document database. Exposed instances without authentication allow full database access, including all collections and documents.

Ports

PortProtocolDescription
27017tcpMongoDB daemon
27018tcpMongoDB web admin
28017tcpMongoDB HTTP status

Fingerprints

Banner / ProbeExpected Response
nmap -sV -p <port> <target>Service banner and version info
nc -nv <target> <port>Raw banner grab

Key Files

PathDescription
/etc/mysql/mysql.cnfMySQL client configuration
/var/lib/mysql/mysql/user.MYDMySQL user table data
postgresql.confPostgreSQL configuration file
pg_hba.confPostgreSQL client authentication rules
mongod.confMongoDB daemon configuration

Default Credentials

UsernamePasswordContext
(none)No authentication by default

Known CVEs

IdentifierTypeDescription
AuthNo authentication by default

Exploitation Primitives

TechniqueTool / CommandResult
Dump Allmongosh "mongodb://<target>:27017" --eval "db.adminCommand('listDatabases')"List databases
MongoShellmongosh "mongodb://<target>:27017"Interactive shell

Notes

MongoDB had a massive exposure problem circa 2016 with default installations on the internet.

Authentication is not enabled by default — even in recent versions if installed without security config.

Tools: `mongosh`, `mongodump`, `nosqlbooster`.

Seen on

ShodanCensysFOFAZoomEye

References