NoSQL Injection
Theory
NoSQL databases provide looser consistency restrictions than traditional SQL databases. By requiring fewer relational constraints and consistency checks, NoSQL databases often offer performance and scaling benefits. Yet these databases are still potentially vulnerable to injection attacks, even if they aren't using the traditional SQL syntax.
Practice
Authentication Bypass
Using not equal ($ne) or greater ($gt) we can try to bypass authentication
Extract data
We can use regex to find the length of a value
We can use regex to extract information.
We can use $nin
(not in) if you don't want to match with some values.
MangoDB Injection
You may try to make boolean based injection on MongoDB with following payloads
Resources
Last updated
Was this helpful?