MongoDB
MongoDBMongoNoSQL Database
MongoDB is a NoSQL document database. Exposed instances without authentication allow full database access, including all collections and documents.
Ports
| Port | Protocol | Description |
|---|---|---|
| 27017 | tcp | MongoDB daemon |
| 27018 | tcp | MongoDB web admin |
| 28017 | tcp | MongoDB HTTP status |
Fingerprints
| Banner / Probe | Expected Response |
|---|---|
nmap -sV -p <port> <target> | Service banner and version info |
nc -nv <target> <port> | Raw banner grab |
Key Files
| Path | Description |
|---|---|
/etc/mysql/mysql.cnf | MySQL client configuration |
/var/lib/mysql/mysql/user.MYD | MySQL user table data |
postgresql.conf | PostgreSQL configuration file |
pg_hba.conf | PostgreSQL client authentication rules |
mongod.conf | MongoDB daemon configuration |
Default Credentials
| Username | Password | Context |
|---|---|---|
— | (none) | No authentication by default |
Known CVEs
| Identifier | Type | Description |
|---|---|---|
— | Auth | No authentication by default |
Exploitation Primitives
| Technique | Tool / Command | Result |
|---|---|---|
| Dump All | mongosh "mongodb://<target>:27017" --eval "db.adminCommand('listDatabases')" | List databases |
| MongoShell | mongosh "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