07.MONGOD (MONGODB)
MongoDB, Databases, Reconnaissance, Misconfiguration, Anonymous/Guest Access
root@oco:~$ sudo openvpn ~/Downloads/starting_point.ovpn
ENUMERATE SERVICES
root@htb:~$ nmap -sV -T4 {targetIP} -p-
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0)
27017/tcp open mongodb MongoDB 3.6.8
VULNERABILITY SCANNING
root@htb:~$ nmap -sV -sC -T4 {targetIP} -p 27017
PORT STATE SERVICE VERSION
27017/tcp open mongodb MongoDB 3.6.8 3.6.8
| mongodb-info:
| MongoDB Build info
| openssl
| running = OpenSSL 1.1.1f 31 Mar 2020
| compiled = OpenSSL 1.1.1f 31 Mar 2020
| ok = 1.0
| buildEnvironment
| target_arch = x86_64
| distmod =
| target_os = linux
...
* the -SC runs the default set of Nmap scripts (NSE scripts), which typically include
scripts for service enumeration, version detection, and other basic checks.
root@htb:~$ sudo nmap --script=vuln {targetIP} -p 27017
PORT STATE SERVICE
27017/tcp open mongod
* the --script=vuln will run scripts that focus specifically on detecting known
vulnerabilities in the service running on port 6379
- e.g., weak configurations, or known vulnerabilities in the redis service
- if no results are found then the service may be fully patched!
FOOTHOLD/COMPROMISE
Last updated