This study looks at how to keep data safe in MongoDB, a type of database used by many businesses to store large amounts of information. As more companies use MongoDB, it becomes a target for hackers who may try to steal or delete important data. While there has been a lot of research into protecting traditional databases, there is less focus on databases like MongoDB. This study explores ways to detect and stop harmful activities in MongoDB, as well as how to recover deleted data. By analyzing the database’s logs, we can track and prevent unauthorized actions. The goal is to create a tool that helps protect databases from attacks like data theft or loss, and ensures data is recoverable if something goes wrong. This tool will help businesses protect their data and recover it when necessary.