• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
iGuRu

iGuRu

Real-time Technology News. Opinions & Tweaks

  • / news
  • / tools
  • / tweaks
  • / dummies
  • / opinions
  • / support
  • / yourpost
home / dummies / What is a NoSQL injection vulnerability?

What is a NoSQL injection vulnerability?

14/12/2020 08:39 by Anastasis Vasileiadis

NoSQL databases (also known as non-relational) do not use SQL for queries. There are a variety of different types of NoSQL databases, such as:

  • Key-Value
  • Key-Document
  • Column-Family
  • Graph

NoSQL was designed in response to flexible design methodologies. Relational databases (SQL) require pre-defined schemas and do not allow updates when the data is already in the database. Adding new fields requires moving the database to a new format, which can be time consuming.

no sql injection - What is a NoSQL injection vulnerability?

NoSQL attack

While NoSQL databases, such as MongoDB, do not use SQL for queries, they still query based on user input.

The main difference between SQL and NoSQL injection is the grammar and syntax of the query. NoSQL databases do not have a standard language. However, the syntax of their languages ​​is similar (since they are designed to do the same thing).

A NoSQL injection application is an attack on web applications created in the MEAN stack (MongoDB, Express, Angular and Node). When transmitting data, MEAN applications use JSON, which is the same thing used by MongoDB. Penetration of JSON code into a MEAN application can enable injection attacks on a MongoDB database.

1 328 - What is a NoSQL injection vulnerability?

For example, the above screenshot (from NullSweep ) shows an application that is vulnerable to NoSQL. From a request, the code pulls a username and password and places it in a MongoDB query. By passing JSON {"username": "myaccount", "password": $ "$ ne": 1}}, an attacker could authenticate to the service without a password.

MongoDB and other NoSQL databases are commonly used in web applications. For example, a website might request user account credentials on a web form, store authentication information in a MongoDB database, and perform credential checks using JavaScript.

Strict integration of MongoDB in JavaScript and other programming languages ​​means that NoSQL attacks can be used to execute attacks at other levels. A NoSQL injection attack that includes JavaScript code will allow this code to be executed within the web application.

 

NoSQL injection protection against attacks

NoSQL injection attacks are very similar to SQL injection attacks: they exploit the poor resolution of user input when creating database queries. This means that the same tools for protection against SQL injection attacks also work for NoSQL, such as:

NoSQL databases are still databases, which means that it is often important to run queries using user-provided data. As with SQL databases, it is important to ensure that the information is properly disinfected before using it in a query to minimize the vulnerability of an application to injection attacks.

 

Πηγές

  1. Foreword, OWASP
  2. 2019 CWE Top 25 Most Dangerous Software Errors, Common Weakness Enumeration
  3. NoSQL Databases Explained, MongoDB
  4. NoSQL Injection, RangeForce (Medium)
  5. A NoSQL Injection Primer (with Mongo), NullSweep
What is a NoSQL injection vulnerability? was last modified: 14 December, 2020, 8: 39 am by Anastasis Vasileiadis

spread the news

  • Facebook
  • Twitter
  • Reddit
  • Printing
  • Email

Read them Technology News from all over the world, with the validity of iGuRu.gr

Follow us on Google News


Competition: dummies, opinionstag: database, injection, javascript, NoSQL, SQL, base, data, injection

You May Also Like

Gootkit returned in parallel with REvil ransomware
RainbowSQL: A very fast dork scanner
Microsoft Internet Explorer enables JavaScript to be disabled

About Us Anastasis Vasileiadis

Translations are like women. When they are beautiful they are not faithful and when they are faithful they are not beautiful.

Previous Post: « SolarWinds's Orion platform hacked
Next Post: Windows 10 GUI Debloater remove junk »

Reader Interactions

Comment Policy:

IGuRu.gr does not publish the comments immediately. Malicious comments, comments that include ads, or comments that are offensive are deleted without notice. We do not adopt the opinions expressed by our readers.
Your comments will be displayed after approval by the administrators


Leave your comment
Ακύρωση απάντησης

Your email address is not published. Τα υποχρεωτικά πεδία σημειώνονται με *

 

 © 2021 · iGuRu.gr · ☢ · Keep It Simple Stupid Genesis theme

about  ·   get in touch  ·  rss  ·  sitemap  ·  cough

loading Cancel
Could not post post - check your email address!
Email verification failed, please try again
Your blog can not post posts via email.