Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
SQL Injection Strategies

You're reading from   SQL Injection Strategies Practical techniques to secure old vulnerabilities against modern attacks

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781839215643
Length 210 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (4):
Arrow left icon
 Galluccio Galluccio
Author Profile Icon Galluccio
Galluccio
Gabriele Lombari Gabriele Lombari
Author Profile Icon Gabriele Lombari
Gabriele Lombari
 Caselli Caselli
Author Profile Icon Caselli
Caselli
 Lombari Lombari
Author Profile Icon Lombari
Lombari
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Section 1: (No)SQL Injection in Theory
2. Chapter 1: Structured Query Language for SQL Injection FREE CHAPTER 3. Chapter 2: Manipulating SQL – Exploiting SQL Injection 4. Section 2: SQL Injection in Practice
5. Chapter 3: Setting Up the Environment 6. Chapter 4: Attacking Web, Mobile, and IoT Applications 7. Chapter 5: Preventing SQL Injection with Defensive Solutions 8. Chapter 6: Putting It All Together 9. Assessments 10. Other Books You May Enjoy

The injection vulnerability in non-relational repositories

The problem of injectability is strictly dependent on trusting input, which could include interpretable code. This is also true in some cases of NoSQL database systems.

Document-based databases still use formatted text to be inserted in a structured format. Most applications that use such databases rely mostly on text, be it in JavaScript Object Notation (JSON) format, or in any case from user-provided input. Thus, if not adequately sanitized, specific input could trigger some issues, in a similar fashion to how these happen in SQL.

Let's for now consider a fictitious website that relies on a document-based database, MongoDB, for authentication purposes. An attacker could send an HTTP GET request, https://targetsite.org/login?user=admin&password[%24ne]=. The target website, coded using a framework of Node.js, unfortunately has a very naïve way to check for credentials. Have a look at the following code snippet...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
SQL Injection Strategies
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon