My MongoDB got hacked!
I was playing around with mongodb so I quickly spun up a server at my provider and installed the MERN stack. After some time I was testing an app that I was working on and I was getting mixed results. It would work the first time and then suddenly stop working. The data kept disappearing. Being new to mongodb I was thinking that maybe I was starting an initialisation script that was deleting the database. I looked everywhere: my code, online, under the rug... but still could not pin point the reason why the data would go missing. Then I thought, maybe my server instance was being shutdown and maybe when there was lack of activity my server was being put to sleep - I mean I went for the cheap option and got a shared instance. It was a ubuntu distro on my server, so I looked through the logs. All the logs that I could find. Still nothing. Then out of no where I noticed there was a DB saying README, I looked in there and found a collection, and in that collection wa...