Educational Purpose Only
This project demonstrates the vulnerability of NoSQL databases, focusing on MongoDB when used with a Node.js application. It highlights how attackers can bypass authentication using improperly validated inputs.
- Exploit NoSQL Injection using special MongoDB operators like
$gt
and$or
. - Demonstrate how unsecured queries can alter logic.
- Showcase mitigation strategies to secure your app.
- Backend: Node.js
- Database: MongoDB
- Testing Tool: Postman
- Setup: Create a database
demo
with ausers
collection containingusername
andpassword
fields. - Attack: Use Postman to send specially crafted JSON payloads with MongoDB operators like:
{ "username": { "$gt": "" }, "password": { "$gt": "" } }