Mongod
Initial Scan
Task 1
How many TCP ports are open on the machine?
Found from the initial scan
Answer: 2
Task 2
Which service is running on port 27017 of the remote host?
Found from the initial scan
Answer: MongoDB 3.6.8
Task 3
What type of database is MongoDB? (Choose: SQL or NoSQL)
As they only give us 2 options and it's more than 3 characters long, BUT also a google search will show: "MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas."
Answer: NoSQL
Task 4
What is the command name for the Mongo shell that is installed with the mongodb-clients package?
Google search and looking on their webpage reveal: "The mongo
shell is included as part of the MongoDB server installation. If you have already installed the server, the mongo
shell is installed to the same location as the server binary."
With this, lets connect to the mongo databse on the target machine
Answer: mongo
Task 5
What is the command used for listing all the databases present on the MongoDB server? (No need to include a trailing ;)
Another google search.
Answer: show dbs
Task 6
What is the command used for listing out the collections in a database? (No need to include a trailing ;)
Similar to last answer just with collections rather than databases.
We see the secsitive_information database, so let use that.
Answer: show collections
Task 7
What is the command used for dumping the content of all the documents within the collection named flag in a format that is easy to read?
Googling around says "Using the db.collection.find() command." So we know our collection is called flag, use the collection name flag instead of the word collection.
But this doesn't give us the full answer. After more googling around I found this blog post mentioning the pretty() function.
Answer: db.flag.find().pretty()
Task 8
Submit the root flag
From previous command/task
Answer: 1b6e6fb359e7c40241b6d431427ba6ea
Last updated