Listing CouchDB databases

CouchDB installations may contain numerous databases. Nmap provides an easy way to list the available databases for penetration testers or system administrators who may need to monitor for rogue databases.

This recipe will show you how to list databases in CouchDB servers by using Nmap.

How to do it...

To list all databases in a CouchDB installation with Nmap, enter the following command:

# nmap -p5984 --script couchdb-databases <target>

The results will include all the databases returned by CouchDB in the couchdb-databases output section:

PORT     STATE SERVICE VERSION 
5984/tcp open  httpd   Apache CouchDB 0.10.0 (Erlang OTP/R13B) 
| couchdb-databases: 
|   1 = nmap 
|_  2 = packtpub 

How it works...

The argument -p5984 --script ...

Get Nmap 6: Network Exploration and Security Auditing Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.