HTB – Mongod

작성자

카테고리:

← 피드로
DEV Community · Jung · 2026-09-09 개발(SW)

Jung

OS: Linux
Difficulty: Very Easy

After doing nmap enumeration, we will see one TCP port 27017 which refers to MongoDB

Whenever we see such port open, we can try to connect to it and access the database via mongosh aka MongoDB Shell

You can download MongoDB Shell here:

Unzip it
dpkg-deb -x mongodb-mongosh_2.10.0_amd64.deb <directory that you want>

Go to the bin folder and execute the mongo shell command
./mongosh mongodb://10.129.228.30:27017

For syntax, you can check in mongosh --help

Once connected, you can interact with following commands:
show dbs -> Show all databases
use <dbs name> -> Choose database
show collections -> Show all collections in the chosen database
db.<collection>.find() -> Dump the content of all the documents within the collection named

to find the flag

We get to learn how to identify MongoDB service as well as connecting to the database from this machine

원문에서 계속 ↗

추출 본문 · 출처: dev.to · https://dev.to/zkrnvkf/htb-mongod-4c37