d415k's CTF memos.

雑な技術メモ

18 June 2022

MongoDB

admin@nodeblog:/opt/blog$ mongo
mongo
MongoDB shell version v3.6.8
connecting to: mongodb://127.0.0.1:27017
Implicit session: session { "id" : UUID("280c8939-7811-4422-b2c7-e4fffa87119e") }
MongoDB server version: 3.6.8
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
2022-06-18T16:01:33.335+0000 I STORAGE  [main] In File::open(), ::open for '/home/admin/.mongorc.js' failed with Permission denied

Server has startup warnings:
    2022-06-18T09:38:14.124+0000 I CONTROL  [initandlisten]
    2022-06-18T09:38:14.124+0000 I CONTROL  [initandlisten] 
    ** WARNING: Access control is not enabled for the database.
    2022-06-18T09:38:14.124+0000 I CONTROL  [initandlisten] 
    **          Read and write access to data and configuration is unrestricted.
    2022-06-18T09:38:14.124+0000 I CONTROL  [initandlisten]
    2022-06-18T16:01:33.336+0000 E -
    [main] Error loading history file: FileOpenFailed: Unable to fopen() file /home/admin/.dbshell: Permission denied
> show dbs
shshow dbs
admin   0.000GB
blog    0.000GB
config  0.000GB
local   0.000GB
> use blog
ususe blog
switched to db blog

> show collections
shshow collections
articles
users
> db.users.find()
dbdb.users.find()
{ "_id" : ObjectId("61b7380ae5814df6030d2373"), "createdAt" : ISODate("2021-12-13T12:09:46.009Z"), "username" : "admin", "password" : "IppsecSaysPleaseSubscribe", "__v" : 0 }
>
tags: CTF - Common - cheatsheet - MongoDB