1. What is SQL Injection?

πŸ”˜ A. A technique used to inject client-side scripts
πŸ”˜ B. A technique used to exploit vulnerabilities in an SQL database
πŸ”˜ C. A method to encrypt SQL queries
πŸ”˜ D. A process for securing SQL databases

βœ… Answer: B
Explanation: SQL Injection is a vulnerability that allows attackers to manipulate an SQL database by injecting malicious SQL queries.


2. Which SQL statement is most commonly targeted by SQL Injection attacks?

πŸ”˜ A. INSERT
πŸ”˜ B. UPDATE
πŸ”˜ C. SELECT
πŸ”˜ D. DELETE

βœ… Answer: C
Explanation: The SELECT statement is commonly targeted because it retrieves data from the database, making it a primary point of exploitation.


3. What type of SQL Injection attack exploits errors returned by the database?

πŸ”˜ A. Blind SQL Injection
πŸ”˜ B. Error-Based SQL Injection
πŸ”˜ C. Time-Based SQL Injection
πŸ”˜ D. Boolean-Based SQL Injection

βœ… Answer: B
Explanation: Error-Based SQL Injection leverages detailed database error messages to extract information about the database structure.


4. What character is commonly used to terminate SQL queries in injection attacks?

πŸ”˜ A. #
πŸ”˜ B. ;
πŸ”˜ C. ' (single quote)
πŸ”˜ D. " (double quote)

βœ… Answer: C
Explanation: A single quote (') is often used to break out of an SQL statement and inject malicious code.


5. Which type of SQL Injection attack does NOT return any data to the attacker?

πŸ”˜ A. Boolean-Based SQL Injection
πŸ”˜ B. Error-Based SQL Injection
πŸ”˜ C. Blind SQL Injection
πŸ”˜ D. UNION-Based SQL Injection

βœ… Answer: C
Explanation: Blind SQL Injection does not return data directly but allows attackers to infer information based on the application’s response.


6. What is the best way to prevent SQL Injection attacks?

πŸ”˜ A. Using input validation only
πŸ”˜ B. Using prepared statements and parameterized queries
πŸ”˜ C. Encrypting all database queries
πŸ”˜ D. Disabling SQL commands

βœ… Answer: B
Explanation: Parameterized queries and prepared statements ensure that user input is treated as data, preventing it from being executed as SQL commands.


7. What is the role of the UNION operator in SQL Injection attacks?

πŸ”˜ A. Combines legitimate and malicious queries
πŸ”˜ B. Encrypts SQL queries
πŸ”˜ C. Blocks SQL Injection attempts
πŸ”˜ D. Deletes database records

βœ… Answer: A
Explanation: The UNION operator allows attackers to combine results from multiple SELECT queries, potentially exposing sensitive data.


8. How can attackers use “Boolean-Based Blind SQL Injection”?

πŸ”˜ A. By modifying queries and observing different application responses
πŸ”˜ B. By directly extracting database records
πŸ”˜ C. By corrupting database indexes
πŸ”˜ D. By disabling authentication

βœ… Answer: A
Explanation: Attackers modify queries with true/false conditions and analyze the application’s behavior to infer database information.


9. What does the SQL OR 1=1 condition achieve in an SQL Injection attack?

πŸ”˜ A. Validates SQL queries
πŸ”˜ B. Ensures only valid input is executed
πŸ”˜ C. Always evaluates to TRUE, allowing unauthorized access
πŸ”˜ D. Causes the query to fail

βœ… Answer: C
Explanation: The condition OR 1=1 always evaluates to TRUE, often allowing unauthorized access to database records.


10. Which of the following is an example of a parameterized SQL query?

πŸ”˜ A. SELECT * FROM users WHERE username = '$user'
πŸ”˜ B. SELECT * FROM users WHERE username = ?
πŸ”˜ C. SELECT * FROM users WHERE username = user_input()
πŸ”˜ D. SELECT * FROM users WHERE username = 'user' OR '1'='1'

βœ… Answer: B
Explanation: Parameterized queries (e.g., using ? placeholders) safely separate user input from SQL execution.


11. Which database management system (DBMS) is vulnerable to SQL Injection?

πŸ”˜ A. MySQL
πŸ”˜ B. PostgreSQL
πŸ”˜ C. SQL Server
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: All major DBMSs can be vulnerable if user input is not properly sanitized.


12. Which function in PHP helps prevent SQL Injection when using MySQL?

πŸ”˜ A. mysql_real_escape_string()
πŸ”˜ B. htmlspecialchars()
πŸ”˜ C. base64_encode()
πŸ”˜ D. strip_tags()

βœ… Answer: A
Explanation: mysql_real_escape_string() escapes special characters to prevent SQL Injection (though prepared statements are preferred).


13. Which HTTP method is most commonly exploited in SQL Injection?

πŸ”˜ A. GET
πŸ”˜ B. POST
πŸ”˜ C. Both GET and POST
πŸ”˜ D. PUT

βœ… Answer: C
Explanation: Both GET and POST requests can be used to send malicious SQL queries if input validation is weak.


14. What does a Time-Based Blind SQL Injection attack do?

πŸ”˜ A. Executes time delays in queries to infer database responses
πŸ”˜ B. Returns full database results
πŸ”˜ C. Encrypts database records
πŸ”˜ D. Uses CAPTCHA to bypass authentication

βœ… Answer: A
Explanation: Attackers use time delays (SLEEP(n)) to determine whether their injected query was executed.


15. What is a Web Application Firewall (WAF) used for?

πŸ”˜ A. Detecting and blocking SQL Injection attacks
πŸ”˜ B. Encrypting database queries
πŸ”˜ C. Storing SQL logs
πŸ”˜ D. Optimizing SQL queries

βœ… Answer: A
Explanation: A WAF can analyze incoming requests and block SQL Injection attempts.


16. How does stored SQL Injection differ from reflected SQL Injection?

πŸ”˜ A. Stored SQL Injection affects stored data, while reflected attacks execute immediately
πŸ”˜ B. Stored SQL Injection is harmless
πŸ”˜ C. Reflected SQL Injection only targets admin accounts
πŸ”˜ D. They are the same

βœ… Answer: A
Explanation: Stored SQL Injection persists in the database, affecting multiple users, while reflected SQL Injection executes immediately.


25. Which security measure can further reduce SQL Injection risks?

πŸ”˜ A. Using Least Privilege Principle for database accounts
πŸ”˜ B. Granting full database access to all users
πŸ”˜ C. Disabling database authentication
πŸ”˜ D. Allowing all SQL queries

βœ… Answer: A
Explanation: Limiting privileges ensures attackers cannot execute dangerous queries even if they exploit an injection flaw.


26. What is an advanced method to test for SQL Injection vulnerabilities?

πŸ”˜ A. Sending regular inputs to check for errors
πŸ”˜ B. Using SQL fuzzing techniques to detect blind SQL Injection
πŸ”˜ C. Running JavaScript inside SQL queries
πŸ”˜ D. Only using known SQL injection payloads

βœ… Answer: B
Explanation: SQL fuzzing involves injecting various unexpected inputs to detect blind SQL vulnerabilities.


27. What is the main difference between UNION-based SQL Injection and Boolean-based SQL Injection?

πŸ”˜ A. UNION-based SQL Injection extracts data, while Boolean-based infers data
πŸ”˜ B. Boolean-based SQL Injection is more dangerous
πŸ”˜ C. UNION-based SQL Injection does not require SQL syntax knowledge
πŸ”˜ D. Boolean-based SQL Injection returns entire database tables

βœ… Answer: A
Explanation: UNION-based SQLi retrieves data directly, whereas Boolean-based SQLi determines information by altering conditions and observing responses.


28. Which SQL function can be abused in an SQL Injection attack to determine the database version?

πŸ”˜ A. GETVERSION()
πŸ”˜ B. DATABASE()
πŸ”˜ C. VERSION()
πŸ”˜ D. DB_NAME()

βœ… Answer: C
Explanation: The VERSION() function in MySQL and @@VERSION in SQL Server return the database version, helping attackers tailor their exploits.


29. Why is input validation alone insufficient to prevent SQL Injection?

πŸ”˜ A. Attackers can bypass weak validation rules
πŸ”˜ B. Validation can break normal functionality
πŸ”˜ C. It slows down queries
πŸ”˜ D. Input validation is only needed for passwords

βœ… Answer: A
Explanation: Input validation helps but is not foolproof because attackers can find ways to bypass weak validation rules.


30. Which of the following is NOT a recommended SQL Injection prevention technique?

πŸ”˜ A. Using ORM (Object-Relational Mapping) frameworks
πŸ”˜ B. Implementing prepared statements
πŸ”˜ C. Granting full database privileges to all users
πŸ”˜ D. Escaping special characters

βœ… Answer: C
Explanation: Granting full privileges increases risks. It’s best to use least privilege access principles.


31. What does a “Time-Based Blind SQL Injection” attack use to determine success?

πŸ”˜ A. Database errors
πŸ”˜ B. Boolean values
πŸ”˜ C. Time delays
πŸ”˜ D. Random database values

βœ… Answer: C
Explanation: Attackers use SLEEP(), BENCHMARK(), or similar functions to delay responses, indicating whether an injected query was executed.


32. What tool is commonly used to automate SQL Injection attacks?

πŸ”˜ A. Wireshark
πŸ”˜ B. Sqlmap
πŸ”˜ C. Burp Suite
πŸ”˜ D. Metasploit

βœ… Answer: B
Explanation: Sqlmap is an automated tool that detects and exploits SQL Injection vulnerabilities.


33. What is the risk of using dynamic SQL queries with user input?

πŸ”˜ A. It slows down performance
πŸ”˜ B. It can allow SQL Injection attacks
πŸ”˜ C. It increases memory usage
πŸ”˜ D. It requires more code

βœ… Answer: B
Explanation: Dynamic queries that concatenate user input can be injected with malicious SQL code.


34. What type of SQL Injection attack uses out-of-band techniques to extract data?

πŸ”˜ A. Blind SQL Injection
πŸ”˜ B. Out-of-Band SQL Injection
πŸ”˜ C. Error-Based SQL Injection
πŸ”˜ D. Time-Based SQL Injection

βœ… Answer: B
Explanation: Out-of-Band SQL Injection sends results via DNS or HTTP requests, useful when direct output is unavailable.


35. Which query would be vulnerable to SQL Injection?

πŸ”˜ A. SELECT * FROM users WHERE username = ?
πŸ”˜ B. SELECT * FROM users WHERE username = '$user'
πŸ”˜ C. SELECT * FROM users WHERE username = :username
πŸ”˜ D. SELECT * FROM users WHERE username = $1

βœ… Answer: B
Explanation: String concatenation with user input ('$user') makes it vulnerable to SQL Injection.


36. What is a common sign of an attempted SQL Injection attack?

πŸ”˜ A. Increased CPU usage
πŸ”˜ B. Sudden database crashes
πŸ”˜ C. Strange error messages related to SQL syntax
πŸ”˜ D. Slow internet speed

βœ… Answer: C
Explanation: Attackers often receive SQL syntax errors when testing injection techniques.


37. Which function in SQL Server helps prevent SQL Injection by limiting execution of dynamic queries?

πŸ”˜ A. sp_executesql
πŸ”˜ B. execute
πŸ”˜ C. db_exec
πŸ”˜ D. run_query

βœ… Answer: A
Explanation: sp_executesql allows execution of parameterized queries, reducing SQL Injection risks.


38. What is the impact of an SQL Injection attack?

πŸ”˜ A. Unauthorized data access
πŸ”˜ B. Database corruption
πŸ”˜ C. System takeover
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: SQL Injection can lead to data theft, modification, and complete system compromise.


39. What is an example of an SQL Injection payload?

πŸ”˜ A. DROP TABLE users;
πŸ”˜ B. 1=1 --
πŸ”˜ C. ' OR '1'='1
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: These payloads attempt to alter SQL logic or delete data.


40. Why is it dangerous to display SQL error messages to users?

πŸ”˜ A. It slows down performance
πŸ”˜ B. It reveals database structure and vulnerabilities
πŸ”˜ C. It causes data duplication
πŸ”˜ D. It logs too much information

βœ… Answer: B
Explanation: Error messages can disclose table names, column details, and SQL syntax, helping attackers craft better payloads.


41. What is a second-order SQL Injection attack?

πŸ”˜ A. When an attack is executed immediately
πŸ”˜ B. When the injected SQL is stored and executed later
πŸ”˜ C. When an attacker modifies login credentials
πŸ”˜ D. When an attack is prevented by a WAF

βœ… Answer: B
Explanation: Second-order SQL Injection stores injected input in the database, which later executes during a different database operation.


42. Which security measure is the most effective against SQL Injection?

πŸ”˜ A. Using HTTPS
πŸ”˜ B. Implementing CSP (Content Security Policy)
πŸ”˜ C. Using Prepared Statements and Parameterized Queries
πŸ”˜ D. Encrypting database backups

βœ… Answer: C
Explanation: Prepared statements prevent input from being interpreted as SQL commands.


43. What is the most dangerous outcome of an SQL Injection attack?

πŸ”˜ A. Slow database performance
πŸ”˜ B. Full compromise of the database and underlying system
πŸ”˜ C. Unauthorized API access
πŸ”˜ D. Reduced query efficiency

βœ… Answer: B
Explanation: Attackers can escalate SQLi to Remote Code Execution (RCE), leading to full system compromise.


44. What is “Hex Encoding” in SQL Injection?

πŸ”˜ A. A method to bypass security filters
πŸ”˜ B. A way to encrypt SQL queries
πŸ”˜ C. A secure input validation technique
πŸ”˜ D. A SQL database command

βœ… Answer: A
Explanation: Hex encoding (e.g., 0x313133) allows attackers to bypass security filters by encoding malicious SQL queries.


45. What type of SQL Injection attack manipulates an application’s HTTP headers?

πŸ”˜ A. Error-Based SQL Injection
πŸ”˜ B. Header-Based SQL Injection
πŸ”˜ C. Time-Based SQL Injection
πŸ”˜ D. Out-of-Band SQL Injection

βœ… Answer: B
Explanation: Header-Based SQL Injection manipulates HTTP headers, such as User-Agent or Referer, to inject malicious SQL queries.


46. Which of the following security mechanisms is NOT effective against SQL Injection?

πŸ”˜ A. Using Web Application Firewalls (WAF)
πŸ”˜ B. Implementing Content Security Policy (CSP)
πŸ”˜ C. Using Parameterized Queries
πŸ”˜ D. Validating and sanitizing user inputs

βœ… Answer: B
Explanation: CSP (Content Security Policy) is used for XSS (Cross-Site Scripting) prevention, not SQL Injection.


47. Which of these is an example of a Boolean-Based Blind SQL Injection payload?

πŸ”˜ A. ' OR 1=1 --
πŸ”˜ B. ' AND 1=2 --
πŸ”˜ C. ' UNION SELECT null,null --
πŸ”˜ D. DROP TABLE users;

βœ… Answer: B
Explanation: Boolean-Based Blind SQL Injection works by evaluating conditions (1=2), observing responses, and inferring database structure.


48. How does an attacker determine the number of columns in a UNION-based SQL Injection attack?

πŸ”˜ A. Using ORDER BY n in the injected query
πŸ”˜ B. Checking for errors in the SQL syntax
πŸ”˜ C. Modifying HTTP request headers
πŸ”˜ D. By encrypting the SQL query

βœ… Answer: A
Explanation: Attackers use ORDER BY followed by an increasing number (ORDER BY 1, ORDER BY 2, etc.) to identify the number of columns.


49. What is a major limitation of SQL Injection in NoSQL databases (e.g., MongoDB)?

πŸ”˜ A. NoSQL databases do not use SQL queries
πŸ”˜ B. NoSQL databases are fully secure by design
πŸ”˜ C. NoSQL databases do not store user data
πŸ”˜ D. NoSQL does not allow user authentication

βœ… Answer: A
Explanation: NoSQL databases (like MongoDB) do not use SQL syntax, but they can be vulnerable to NoSQL Injection.


50. Which database privilege should be avoided for web application accounts to limit SQL Injection impact?

πŸ”˜ A. SELECT
πŸ”˜ B. INSERT
πŸ”˜ C. DROP
πŸ”˜ D. UPDATE

βœ… Answer: C
Explanation: DROP privileges allow attackers to delete entire database tables, making SQL Injection attacks more destructive.


51. What is “Batch SQL Injection”?

πŸ”˜ A. Executing multiple SQL statements in a single request
πŸ”˜ B. Injecting SQL into batch scripts
πŸ”˜ C. Using multiple databases for SQL Injection
πŸ”˜ D. A method of bypassing firewalls

βœ… Answer: A
Explanation: Batch SQL Injection occurs when an application allows multiple SQL statements to be executed in a single query.


52. Which of these techniques helps prevent SQL Injection in stored procedures?

πŸ”˜ A. Using dynamic SQL inside stored procedures
πŸ”˜ B. Parameterizing all input variables
πŸ”˜ C. Allowing direct user input in stored procedures
πŸ”˜ D. Disabling stored procedures

βœ… Answer: B
Explanation: Stored procedures should use parameterized inputs to avoid SQL Injection.


53. How do attackers use SQL Injection to bypass login authentication?

πŸ”˜ A. By injecting 1=1 conditions
πŸ”˜ B. By using double quotes instead of single quotes
πŸ”˜ C. By using JavaScript to bypass the login page
πŸ”˜ D. By encrypting their SQL queries

βœ… Answer: A
Explanation: Injecting conditions like ' OR '1'='1' -- always evaluates to TRUE, bypassing authentication.


54. What is a limitation of Time-Based Blind SQL Injection?

πŸ”˜ A. It is detectable by WAFs
πŸ”˜ B. It takes longer to extract data
πŸ”˜ C. It only works on MySQL
πŸ”˜ D. It cannot be automated

βœ… Answer: B
Explanation: Time-based attacks use delays (SLEEP()), making data extraction slow compared to other techniques.


55. How does a WAF help prevent SQL Injection attacks?

πŸ”˜ A. By encrypting SQL queries
πŸ”˜ B. By blocking malicious payload patterns
πŸ”˜ C. By disabling SQL features
πŸ”˜ D. By converting SQL queries to NoSQL

βœ… Answer: B
Explanation: Web Application Firewalls (WAFs) inspect incoming traffic for SQL Injection patterns and block suspicious requests.


56. Which modern security approach is most effective against SQL Injection?

πŸ”˜ A. Secure coding practices
πŸ”˜ B. Using only HTTPS
πŸ”˜ C. Storing SQL queries in encrypted files
πŸ”˜ D. Disabling JavaScript in browsers

βœ… Answer: A
Explanation: Writing secure code (using prepared statements and least privilege access) is the best defense against SQL Injection.


57. What is the purpose of an SQL Injection cheat sheet?

πŸ”˜ A. To provide pre-made attack payloads
πŸ”˜ B. To help developers prevent SQL Injection
πŸ”˜ C. To automate SQL attacks
πŸ”˜ D. To replace prepared statements

βœ… Answer: B
Explanation: SQL Injection cheat sheets (like OWASP’s) help developers identify and fix security flaws.


58. What does an attacker achieve with SELECT @@VERSION in SQL Injection?

πŸ”˜ A. Extracts database version information
πŸ”˜ B. Bypasses authentication
πŸ”˜ C. Deletes database tables
πŸ”˜ D. Encrypts the SQL query

βœ… Answer: A
Explanation: SELECT @@VERSION reveals database version details, helping attackers tailor their attacks.


59. How do attackers exfiltrate data using Out-of-Band SQL Injection?

πŸ”˜ A. By extracting data through email notifications
πŸ”˜ B. By using external HTTP/DNS requests
πŸ”˜ C. By writing to the database log files
πŸ”˜ D. By encoding the data in Base64

βœ… Answer: B
Explanation: Out-of-Band SQL Injection sends data to an external attacker via HTTP, DNS, or email.


60. Which of these is an advanced SQL Injection payload for MySQL?

πŸ”˜ A. UNION SELECT NULL, NULL, @@datadir --
πŸ”˜ B. SELECT * FROM users WHERE username = '$input'
πŸ”˜ C. SELECT FROM users WHERE id=1
πŸ”˜ D. CREATE TABLE attack;

βœ… Answer: A
Explanation: UNION SELECT NULL, NULL, @@datadir -- allows attackers to enumerate MySQL directories and extract database files.


61. What is the primary goal of a SQL Injection attack?

πŸ”˜ A. To increase database performance
πŸ”˜ B. To gain unauthorized access to data or manipulate it
πŸ”˜ C. To improve indexing in SQL databases
πŸ”˜ D. To prevent database administrators from running queries

βœ… Answer: B
Explanation: SQL Injection is used by attackers to steal, modify, or delete data stored in a database.


62. What type of SQL Injection attack attempts to extract data without triggering database errors?

πŸ”˜ A. Error-Based SQL Injection
πŸ”˜ B. Boolean-Based Blind SQL Injection
πŸ”˜ C. UNION-Based SQL Injection
πŸ”˜ D. Batch SQL Injection

βœ… Answer: B
Explanation: Boolean-Based Blind SQL Injection works by injecting true/false conditions and observing application behavior without causing errors.


63. Which of the following is NOT a common SQL Injection technique?

πŸ”˜ A. UNION-Based SQL Injection
πŸ”˜ B. Reflected SQL Injection
πŸ”˜ C. Boolean-Based SQL Injection
πŸ”˜ D. Stored SQL Injection

βœ… Answer: B
Explanation: Reflected attacks are common in XSS (Cross-Site Scripting), not SQL Injection.


64. What is the best method to prevent SQL Injection in PHP applications?

πŸ”˜ A. Using mysql_query() with user input
πŸ”˜ B. Using htmlspecialchars() to escape input
πŸ”˜ C. Using prepared statements with PDO or MySQLi
πŸ”˜ D. Allowing all special characters in input fields

βœ… Answer: C
Explanation: Prepared statements ensure that user input is always treated as data, preventing SQL Injection.


65. Why is LIMIT 1 sometimes used in SQL Injection attacks?

πŸ”˜ A. To prevent detection by WAFs
πŸ”˜ B. To retrieve only one record, avoiding errors
πŸ”˜ C. To increase query execution speed
πŸ”˜ D. To make attacks more complex

βœ… Answer: B
Explanation: Attackers use LIMIT 1 to avoid fetching multiple records and making the attack less noticeable.


66. What is a “stacked query” in SQL Injection?

πŸ”˜ A. Executing multiple queries in a single statement
πŸ”˜ B. Using complex subqueries
πŸ”˜ C. Injecting SQL into stored procedures
πŸ”˜ D. Encrypting SQL Injection payloads

βœ… Answer: A
Explanation: Stacked queries allow execution of multiple SQL commands in a single request (e.g., SELECT * FROM users; DROP TABLE users;).


67. What is the most effective way to test for SQL Injection vulnerabilities?

πŸ”˜ A. Manually entering ' OR 1=1 -- in input fields
πŸ”˜ B. Using automated tools like sqlmap
πŸ”˜ C. Reviewing database logs
πŸ”˜ D. Using encrypted SQL queries

βœ… Answer: B
Explanation: Automated tools like sqlmap can efficiently test and exploit SQL Injection vulnerabilities.


68. How do attackers bypass basic input validation in SQL Injection attacks?

πŸ”˜ A. By encoding input in Base64
πŸ”˜ B. By using comments (--, #, /* */)
πŸ”˜ C. By using case-insensitive SQL keywords
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Attackers use Base64 encoding, SQL comments, and case variations to bypass weak input validation.


69. What does UNION SELECT null,null -- do in an SQL Injection attack?

πŸ”˜ A. Retrieves multiple rows from the database
πŸ”˜ B. Checks for column count compatibility in a UNION-based attack
πŸ”˜ C. Drops the table if NULL values exist
πŸ”˜ D. Converts all database entries to NULL

βœ… Answer: B
Explanation: Attackers use UNION SELECT null,null -- to identify the number of columns before extracting data.


70. Why is dynamic SQL dangerous when handling user input?

πŸ”˜ A. It increases database performance
πŸ”˜ B. It allows attackers to inject malicious SQL commands
πŸ”˜ C. It prevents SQL Injection
πŸ”˜ D. It is required for executing stored procedures

βœ… Answer: B
Explanation: Dynamic SQL concatenates user input into queries, making it vulnerable to SQL Injection.


71. Which type of SQL Injection attack targets XML-based databases?

πŸ”˜ A. Blind SQL Injection
πŸ”˜ B. XPath Injection
πŸ”˜ C. Boolean-Based SQL Injection
πŸ”˜ D. UNION-Based SQL Injection

βœ… Answer: B
Explanation: XPath Injection exploits XML-based databases, similar to how SQL Injection targets relational databases.


72. What is “Polyglot SQL Injection”?

πŸ”˜ A. An SQL Injection attack that works across multiple DBMS
πŸ”˜ B. A SQL Injection that requires multiple encodings
πŸ”˜ C. A technique that encrypts malicious SQL queries
πŸ”˜ D. A method for testing multiple SQL queries at once

βœ… Answer: A
Explanation: Polyglot SQL Injection is a technique where a single payload is crafted to work across multiple database management systems (DBMS).


73. What does SELECT table_name FROM information_schema.tables; do in an SQL Injection attack?

πŸ”˜ A. Retrieves a list of tables in the database
πŸ”˜ B. Deletes all tables in the database
πŸ”˜ C. Encrypts the database schema
πŸ”˜ D. Displays all user credentials

βœ… Answer: A
Explanation: information_schema.tables contains metadata about all database tables, which is useful for enumeration.


74. How can an attacker exfiltrate data from a database without direct output?

πŸ”˜ A. DNS-based data exfiltration
πŸ”˜ B. HTTP error responses
πŸ”˜ C. Using side-channel timing attacks
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Attackers use DNS requests, HTTP responses, and timing analysis to extract data even when direct output is restricted.


75. What SQL function is commonly exploited in time-based attacks?

πŸ”˜ A. BENCHMARK()
πŸ”˜ B. NOW()
πŸ”˜ C. RAND()
πŸ”˜ D. COUNT()

βœ… Answer: A
Explanation: BENCHMARK() in MySQL is used to artificially delay query execution, aiding time-based SQL Injection.


76. How do hackers use LOAD_FILE('/etc/passwd') in MySQL SQL Injection?

πŸ”˜ A. To upload malicious files
πŸ”˜ B. To read system files on the server
πŸ”˜ C. To encrypt database tables
πŸ”˜ D. To execute shell commands

βœ… Answer: B
Explanation: LOAD_FILE() allows attackers to read system files, exposing sensitive configuration data.


77. Which SQL Injection method is the hardest to detect?

πŸ”˜ A. Error-Based SQL Injection
πŸ”˜ B. UNION-Based SQL Injection
πŸ”˜ C. Blind SQL Injection
πŸ”˜ D. Second-Order SQL Injection

βœ… Answer: D
Explanation: Second-Order SQL Injection is difficult to detect because malicious queries are stored and executed later.


78. Which modern authentication method significantly reduces SQL Injection risks?

πŸ”˜ A. Basic Authentication
πŸ”˜ B. Token-Based Authentication (JWT, OAuth)
πŸ”˜ C. CAPTCHA verification
πŸ”˜ D. MD5 password hashing

βœ… Answer: B
Explanation: Token-Based Authentication (like JWT, OAuth) prevents direct SQL-based login bypass attacks.


79. How does an SQL Injection attack differ from a Command Injection attack?

πŸ”˜ A. SQL Injection targets web databases, while Command Injection affects OS commands
πŸ”˜ B. Command Injection is only possible in Windows
πŸ”˜ C. SQL Injection cannot modify database contents
πŸ”˜ D. Command Injection uses JavaScript

βœ… Answer: A
Explanation: SQL Injection exploits databases, while Command Injection allows execution of system commands.


80. What is “Time Delay Injection”?

πŸ”˜ A. Forcing the database to delay response to infer data
πŸ”˜ B. Injecting SQL after a time limit expires
πŸ”˜ C. Using a scheduler to automate SQL Injection
πŸ”˜ D. Encrypting queries before execution

βœ… Answer: A
Explanation: Attackers use delays (SLEEP(n)) to infer whether an SQL query was executed.


81. Which database feature can help prevent SQL Injection by limiting input execution time?

πŸ”˜ A. Execution Timeout
πŸ”˜ B. SQL Caching
πŸ”˜ C. Rate Limiting
πŸ”˜ D. Query Optimization

βœ… Answer: A
Explanation: Execution Timeout can prevent long-running malicious queries from executing indefinitely in SQL Injection attacks.


82. What is the main advantage of using Object-Relational Mapping (ORM) for database interaction?

πŸ”˜ A. ORM prevents SQL Injection by using abstraction layers
πŸ”˜ B. ORM speeds up database queries significantly
πŸ”˜ C. ORM eliminates the need for database authentication
πŸ”˜ D. ORM converts SQL queries into NoSQL

βœ… Answer: A
Explanation: ORM frameworks (like SQLAlchemy, Hibernate, Django ORM) use parameterized queries, reducing SQL Injection risks.


83. Which of the following is NOT a sign of an SQL Injection attempt?

πŸ”˜ A. Sudden database slowdowns
πŸ”˜ B. Unusual database error messages
πŸ”˜ C. Increased network latency
πŸ”˜ D. A surge in failed login attempts

βœ… Answer: C
Explanation: SQL Injection affects the database layer, not network latency.


84. How can security teams detect SQL Injection attempts in real-time?

πŸ”˜ A. Manual database audits
πŸ”˜ B. Intrusion Detection Systems (IDS)
πŸ”˜ C. Disabling SQL commands
πŸ”˜ D. Rewriting all queries manually

βœ… Answer: B
Explanation: IDS and SIEM systems monitor suspicious SQL queries and block potential attacks in real time.


85. What is the primary risk of allowing “dynamic WHERE clauses” in SQL queries?

πŸ”˜ A. They allow faster query execution
πŸ”˜ B. They introduce SQL Injection risks
πŸ”˜ C. They improve database indexing
πŸ”˜ D. They prevent unauthorized access

βœ… Answer: B
Explanation: Dynamic WHERE clauses can concatenate user input directly into SQL queries, making them vulnerable.


86. What is the impact of “time-based blind SQL Injection” on the target system?

πŸ”˜ A. Immediate database dump
πŸ”˜ B. Performance degradation due to repeated SLEEP() queries
πŸ”˜ C. Direct file access
πŸ”˜ D. Database user privilege escalation

βœ… Answer: B
Explanation: Time-based SQL Injection uses commands like SLEEP(10) to introduce artificial delays, which can slow down performance.


87. Why is xp_cmdshell dangerous in SQL Server?

πŸ”˜ A. It allows attackers to execute OS commands via SQL queries
πŸ”˜ B. It enables automatic database indexing
πŸ”˜ C. It bypasses firewall restrictions
πŸ”˜ D. It improves query performance

βœ… Answer: A
Explanation: xp_cmdshell in SQL Server can be abused for Remote Code Execution (RCE) through SQL Injection.


88. How does an attacker use ' OR 'x'='x in SQL Injection?

πŸ”˜ A. To retrieve encrypted passwords
πŸ”˜ B. To force the query to always return TRUE
πŸ”˜ C. To disable authentication
πŸ”˜ D. To perform a DoS attack

βœ… Answer: B
Explanation: ' OR 'x'='x always evaluates TRUE, allowing attackers to bypass authentication.


89. How does setting a “deny all” default policy in a firewall help against SQL Injection?

πŸ”˜ A. It blocks all unauthorized requests
πŸ”˜ B. It speeds up SQL queries
πŸ”˜ C. It prevents SQL queries from executing
πŸ”˜ D. It encrypts SQL queries

βœ… Answer: A
Explanation: A default deny policy ensures that only explicitly allowed queries are executed, reducing risks.


90. How do hackers use “Error-Based SQL Injection” to extract data?

πŸ”˜ A. By causing SQL errors that return database information
πŸ”˜ B. By manipulating the browser console
πŸ”˜ C. By modifying database indexing
πŸ”˜ D. By brute-forcing SQL queries

βœ… Answer: A
Explanation: Attackers trigger SQL errors that leak database structure details, helping them refine attacks.


91. Which SQL statement is the MOST dangerous if improperly secured?

πŸ”˜ A. SELECT
πŸ”˜ B. UPDATE
πŸ”˜ C. DELETE
πŸ”˜ D. DROP

βœ… Answer: D
Explanation: DROP statements can delete entire databases, causing permanent data loss in SQL Injection attacks.


92. Why should database credentials never be stored in plaintext?

πŸ”˜ A. Attackers can easily access them if compromised
πŸ”˜ B. It reduces database query speed
πŸ”˜ C. It improves data compression
πŸ”˜ D. It prevents remote access

βœ… Answer: A
Explanation: Storing plaintext credentials makes databases an easy target in data breaches.


93. How can attackers exfiltrate data using DNS-Based SQL Injection?

πŸ”˜ A. By encoding SQL results in DNS queries
πŸ”˜ B. By modifying DNS records
πŸ”˜ C. By exploiting browser vulnerabilities
πŸ”˜ D. By injecting JavaScript into SQL queries

βœ… Answer: A
Explanation: DNS-based SQL Injection encodes stolen data in DNS requests sent to an attacker-controlled server.


94. What is “Hybrid SQL Injection”?

πŸ”˜ A. A mix of multiple SQL Injection techniques
πŸ”˜ B. An attack that targets hybrid cloud databases
πŸ”˜ C. A NoSQL-based SQL Injection attack
πŸ”˜ D. A method for encrypting SQL Injection payloads

βœ… Answer: A
Explanation: Hybrid SQL Injection combines Boolean, Error-Based, UNION-Based, and Time-Based techniques.


95. Which security control helps prevent SQL Injection at the database level?

πŸ”˜ A. Using Least Privilege Principle
πŸ”˜ B. Running SQL queries as root
πŸ”˜ C. Disabling database authentication
πŸ”˜ D. Encrypting SQL tables

βœ… Answer: A
Explanation: Limiting privileges ensures attackers cannot execute unauthorized queries.


96. Which header can be used to prevent SQL Injection payloads in web applications?

πŸ”˜ A. X-Frame-Options
πŸ”˜ B. Content-Security-Policy
πŸ”˜ C. Strict-Transport-Security
πŸ”˜ D. Referrer-Policy

βœ… Answer: B
Explanation: Content-Security-Policy (CSP) can help mitigate reflected SQL Injection attacks.


97. Which of the following is a recommended security measure for APIs to prevent SQL Injection?

πŸ”˜ A. Using GraphQL instead of REST APIs
πŸ”˜ B. Allowing only GET requests
πŸ”˜ C. Implementing prepared statements
πŸ”˜ D. Encrypting all API responses

βœ… Answer: C
Explanation: Prepared statements prevent SQL Injection in APIs handling user input.


98. What is an example of “Nested SQL Injection”?

πŸ”˜ A. Injecting an SQL query inside another query
πŸ”˜ B. Running SQL Injection in hidden forms
πŸ”˜ C. Using multiple encoding techniques
πŸ”˜ D. Injecting SQL inside an API

βœ… Answer: A
Explanation: Nested SQL Injection involves inserting a subquery inside another query, making detection harder.


99. What makes NoSQL databases different in terms of SQL Injection risk?

πŸ”˜ A. They do not use SQL syntax
πŸ”˜ B. They have built-in SQL Injection protection
πŸ”˜ C. They encrypt all queries
πŸ”˜ D. They only allow read operations

βœ… Answer: A
Explanation: NoSQL databases (e.g., MongoDB, Firebase) use JSON-like syntax, making traditional SQL Injection ineffective.


100. What is a common SQL Injection attack against login forms?

πŸ”˜ A. ' OR '1'='1' --
πŸ”˜ B. ORDER BY 1
πŸ”˜ C. UPDATE users SET password = 'hacked'
πŸ”˜ D. DROP TABLE users

βœ… Answer: A
Explanation: ' OR '1'='1' -- bypasses authentication by always evaluating TRUE, granting access.


101. What is an “Automated SQL Injection” attack?

πŸ”˜ A. An attack that uses scripts or tools to inject SQL queries
πŸ”˜ B. An SQL Injection attack that runs without user interaction
πŸ”˜ C. An SQL Injection attack targeting AI-based databases
πŸ”˜ D. A manually executed SQL Injection attack

βœ… Answer: A
Explanation: Automated SQL Injection uses tools like sqlmap to detect and exploit SQL vulnerabilities efficiently.


102. What is a common challenge in detecting SQL Injection attacks?

πŸ”˜ A. They often generate legitimate-looking queries
πŸ”˜ B. They always require an authenticated session
πŸ”˜ C. They can only target stored procedures
πŸ”˜ D. They do not leave any logs

βœ… Answer: A
Explanation: Many SQL Injection payloads look like normal queries, making detection harder without specialized tools.


103. What SQL keyword is often abused in SQL Injection attacks to extract data?

πŸ”˜ A. FROM
πŸ”˜ B. WHERE
πŸ”˜ C. UNION
πŸ”˜ D. LIMIT

βœ… Answer: C
Explanation: The UNION keyword allows attackers to merge query results, potentially leaking sensitive data.


104. What does an attacker achieve with SELECT @@hostname in SQL Injection?

πŸ”˜ A. Retrieves the database server’s hostname
πŸ”˜ B. Executes remote shell commands
πŸ”˜ C. Deletes all database records
πŸ”˜ D. Encrypts all SQL queries

βœ… Answer: A
Explanation: @@hostname exposes the name of the database server, useful for reconnaissance.


105. How do attackers use nested queries in SQL Injection?

πŸ”˜ A. To execute multiple SQL queries inside a single query
πŸ”˜ B. To speed up database performance
πŸ”˜ C. To bypass WAF protections
πŸ”˜ D. To trigger SQL caching mechanisms

βœ… Answer: A
Explanation: Nested queries allow attackers to execute multiple subqueries, extracting sensitive data.


106. What is “Encoding-Based SQL Injection”?

πŸ”˜ A. An attack that uses encoded payloads to bypass security filters
πŸ”˜ B. A method for encrypting SQL queries
πŸ”˜ C. A technique that only works on NoSQL databases
πŸ”˜ D. An SQL Injection attack that modifies database indexing

βœ… Answer: A
Explanation: Attackers encode payloads (Base64, HEX, URL-encoding) to bypass input validation and WAFs.


107. What is an effective countermeasure against second-order SQL Injection?

πŸ”˜ A. Input validation only
πŸ”˜ B. Encrypting all database responses
πŸ”˜ C. Parameterized queries and stored procedures
πŸ”˜ D. Using SQL wildcards

βœ… Answer: C
Explanation: Parameterized queries and stored procedures prevent SQL Injection in stored data.


108. What is the purpose of using INFORMATION_SCHEMA.COLUMNS in an SQL Injection attack?

πŸ”˜ A. To list all available columns in a database
πŸ”˜ B. To encrypt database tables
πŸ”˜ C. To modify authentication rules
πŸ”˜ D. To generate a brute-force attack

βœ… Answer: A
Explanation: INFORMATION_SCHEMA.COLUMNS allows attackers to list all column names, aiding in data extraction.


109. Which of these would help an attacker determine the database type in an SQL Injection attack?

πŸ”˜ A. SELECT version();
πŸ”˜ B. SELECT @@version;
πŸ”˜ C. SELECT DATABASE();
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: These queries reveal database version and type, helping attackers tailor their SQL Injection payloads.


110. Why should user input never be directly concatenated into SQL queries?

πŸ”˜ A. It slows down database performance
πŸ”˜ B. It increases the risk of SQL Injection
πŸ”˜ C. It is not supported by NoSQL databases
πŸ”˜ D. It prevents proper indexing

βœ… Answer: B
Explanation: Concatenating user input into SQL queries makes them vulnerable to SQL Injection.


111. What role does “Least Privilege Access” play in SQL Injection prevention?

πŸ”˜ A. It ensures users have only the necessary permissions
πŸ”˜ B. It speeds up query execution
πŸ”˜ C. It allows all users to execute queries
πŸ”˜ D. It removes the need for authentication

βœ… Answer: A
Explanation: Restricting user permissions ensures attackers cannot execute harmful SQL commands.


112. How can attackers bypass a Web Application Firewall (WAF) in an SQL Injection attack?

πŸ”˜ A. By using encoded payloads
πŸ”˜ B. By manipulating case sensitivity
πŸ”˜ C. By using time delays
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Attackers use encoding, case manipulation, and time-based techniques to evade WAF detection.


113. What is “Log-Based SQL Injection”?

πŸ”˜ A. Injecting malicious SQL queries into database logs
πŸ”˜ B. Exploiting database logging features to extract data
πŸ”˜ C. Overwriting database logs to avoid detection
πŸ”˜ D. Injecting SQL queries through a logging system

βœ… Answer: B
Explanation: Log-Based SQL Injection manipulates database logs to extract sensitive information.


114. Why is error suppression (@ in PHP) ineffective for SQL Injection prevention?

πŸ”˜ A. It only hides errors without fixing vulnerabilities
πŸ”˜ B. It prevents users from logging in
πŸ”˜ C. It encrypts database queries
πŸ”˜ D. It stops SQL Injection completely

βœ… Answer: A
Explanation: Hiding errors does not prevent SQL Injection; the vulnerability still exists.


115. What is a “NoSQL Injection” attack?

πŸ”˜ A. Injecting malicious code into NoSQL databases
πŸ”˜ B. Converting NoSQL databases into SQL databases
πŸ”˜ C. Using SQL queries in NoSQL environments
πŸ”˜ D. Encrypting NoSQL queries

βœ… Answer: A
Explanation: NoSQL Injection targets NoSQL databases (e.g., MongoDB) by manipulating query structures.


116. How does an attacker use SHOW TABLES in SQL Injection?

πŸ”˜ A. To list all tables in the database
πŸ”˜ B. To delete all tables
πŸ”˜ C. To modify authentication rules
πŸ”˜ D. To encrypt table structures

βœ… Answer: A
Explanation: SHOW TABLES reveals all available tables, aiding enumeration in SQL Injection.


117. What is an SQL Injection “Payload”?

πŸ”˜ A. The injected SQL query that executes malicious actions
πŸ”˜ B. A backup of the target database
πŸ”˜ C. A legal statement protecting against SQL Injection
πŸ”˜ D. A database indexing technique

βœ… Answer: A
Explanation: An SQL Injection payload is the crafted SQL input used to exploit a vulnerability.


118. How does “Database Mirroring” help prevent SQL Injection damage?

πŸ”˜ A. By keeping a backup copy of the database
πŸ”˜ B. By preventing unauthorized queries
πŸ”˜ C. By allowing read-only access to mirrored copies
πŸ”˜ D. Both A and C

βœ… Answer: D
Explanation: Database mirroring keeps a backup and limits direct modification of mirrored copies.


119. How does “Prepared Statement Batching” improve security?

πŸ”˜ A. By executing multiple safe queries efficiently
πŸ”˜ B. By allowing dynamic queries
πŸ”˜ C. By caching SQL responses
πŸ”˜ D. By removing query execution limits

βœ… Answer: A
Explanation: Batching prepared statements allows multiple secure queries without SQL Injection risks.


120. What is “Self-Blind SQL Injection”?

πŸ”˜ A. An attacker injects SQL queries but cannot see the output directly
πŸ”˜ B. An attacker extracts data using XSS
πŸ”˜ C. An attacker manipulates SQL queries via hidden forms
πŸ”˜ D. An SQL Injection attack that relies on API endpoints

βœ… Answer: A
Explanation: Self-Blind SQL Injection occurs when attackers inject queries but infer results indirectly.


121. How does an attacker use “SQL Injection in JSON-based APIs”?

πŸ”˜ A. By injecting SQL queries inside JSON parameters
πŸ”˜ B. By modifying JSON schema definitions
πŸ”˜ C. By encrypting JSON payloads
πŸ”˜ D. By manipulating API headers

βœ… Answer: A
Explanation: Attackers inject malicious SQL payloads inside JSON parameters to exploit API vulnerabilities.


122. Which HTTP header can sometimes be used to perform an SQL Injection attack?

πŸ”˜ A. User-Agent
πŸ”˜ B. Referer
πŸ”˜ C. X-Forwarded-For
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Attackers can inject SQL payloads into HTTP headers, which are then processed by backend applications.


123. Why are “comment markers” (--, #, /* */) useful in SQL Injection?

πŸ”˜ A. They allow attackers to ignore unwanted parts of queries
πŸ”˜ B. They speed up SQL query execution
πŸ”˜ C. They improve query readability
πŸ”˜ D. They disable database authentication

βœ… Answer: A
Explanation: SQL comments truncate remaining query parts, allowing attackers to alter query logic.


124. What is “Case-Sensitive SQL Injection Evasion”?

πŸ”˜ A. Using uppercase and lowercase variations to bypass filters
πŸ”˜ B. Injecting SQL into case-sensitive databases only
πŸ”˜ C. Encrypting SQL queries to evade detection
πŸ”˜ D. Using time-based payloads

βœ… Answer: A
Explanation: Some security filters are case-sensitive, allowing attackers to evade detection using variations (UnIoN SeLeCt).


125. What is the impact of “Truncation-Based SQL Injection”?

πŸ”˜ A. It exploits data truncation to bypass authentication
πŸ”˜ B. It corrupts database tables
πŸ”˜ C. It speeds up SQL queries
πŸ”˜ D. It prevents SQL Injection

βœ… Answer: A
Explanation: Truncation attacks force username/password values to be truncated, sometimes leading to unintended access.


126. What does INFORMATION_SCHEMA.TABLES reveal in an SQL Injection attack?

πŸ”˜ A. List of all tables in the database
πŸ”˜ B. User authentication details
πŸ”˜ C. Encrypted database records
πŸ”˜ D. Firewall logs

βœ… Answer: A
Explanation: INFORMATION_SCHEMA.TABLES provides a list of all database tables, aiding attackers in enumeration.


127. Why is CHAR() sometimes used in SQL Injection?

πŸ”˜ A. To inject obfuscated SQL payloads
πŸ”˜ B. To decode encrypted SQL queries
πŸ”˜ C. To execute database backups
πŸ”˜ D. To bypass two-factor authentication

βœ… Answer: A
Explanation: CHAR() allows attackers to inject characters using ASCII values, bypassing security filters.


128. How does “Error Suppression” affect SQL Injection attempts?

πŸ”˜ A. It makes SQL Injection harder by hiding error messages
πŸ”˜ B. It prevents SQL Injection entirely
πŸ”˜ C. It improves SQL query execution speed
πŸ”˜ D. It disables logging

βœ… Answer: A
Explanation: Suppressing SQL errors (@ in PHP, TRY...CATCH in SQL Server) hides valuable debugging information from attackers.


129. What is an “Error-Based Boolean Attack” in SQL Injection?

πŸ”˜ A. A method where attackers cause SQL errors to infer data
πŸ”˜ B. A way to retrieve full database dumps
πŸ”˜ C. A technique that bypasses login authentication
πŸ”˜ D. An attack that exploits NULL values

βœ… Answer: A
Explanation: Attackers inject Boolean conditions into queries and use error messages to infer data.


130. What is the risk of storing SQL queries inside client-side JavaScript?

πŸ”˜ A. Attackers can modify them to execute malicious SQL commands
πŸ”˜ B. It improves website speed
πŸ”˜ C. It prevents SQL Injection
πŸ”˜ D. It encrypts database transactions

βœ… Answer: A
Explanation: Storing SQL queries in JavaScript is dangerous because attackers can modify them before they reach the server.


131. Which type of SQL Injection is the most difficult to detect?

πŸ”˜ A. Error-Based SQL Injection
πŸ”˜ B. Time-Based Blind SQL Injection
πŸ”˜ C. UNION-Based SQL Injection
πŸ”˜ D. Batch SQL Injection

βœ… Answer: B
Explanation: Time-Based Blind SQL Injection does not return visible errors, making detection challenging.


132. What is “SQL Injection via Cookies”?

πŸ”˜ A. An attack where SQL payloads are stored in cookies
πŸ”˜ B. An attack that modifies SQL database indexing
πŸ”˜ C. A technique that forces SQL errors using HTTP headers
πŸ”˜ D. A method to inject SQL into API tokens

βœ… Answer: A
Explanation: Cookies are often processed in SQL queries, allowing attackers to inject malicious SQL payloads.


133. What does LOAD DATA INFILE do in SQL Injection attacks?

πŸ”˜ A. Reads files from the system into the database
πŸ”˜ B. Modifies user authentication tokens
πŸ”˜ C. Prevents unauthorized SQL execution
πŸ”˜ D. Encrypts SQL queries

βœ… Answer: A
Explanation: LOAD DATA INFILE allows reading local files, which can be abused to extract sensitive system files.


134. Why is INFORMATION_SCHEMA.ROUTINES valuable in an SQL Injection attack?

πŸ”˜ A. It reveals stored procedures and functions
πŸ”˜ B. It increases SQL execution speed
πŸ”˜ C. It encrypts database logs
πŸ”˜ D. It allows privilege escalation

βœ… Answer: A
Explanation: INFORMATION_SCHEMA.ROUTINES helps attackers find stored procedures that may have vulnerabilities.


135. What is an “SQL Injection Bypass” technique?

πŸ”˜ A. A method to evade security controls and filters
πŸ”˜ B. A way to encrypt SQL Injection queries
πŸ”˜ C. A process for fixing SQL Injection vulnerabilities
πŸ”˜ D. A method for optimizing SQL queries

βœ… Answer: A
Explanation: Attackers use SQL Injection bypass techniques (encoding, comments, nesting) to evade security controls.


136. What is a “White-Box SQL Injection Test”?

πŸ”˜ A. A security test where the attacker has full knowledge of the system
πŸ”˜ B. An SQL Injection attack on cloud databases
πŸ”˜ C. A way to encrypt SQL queries
πŸ”˜ D. A test that targets AI-based databases

βœ… Answer: A
Explanation: White-Box Testing means attackers (or testers) have full access to the application’s source code and SQL structure.


137. Why is “AI-Powered SQL Injection Detection” gaining popularity?

πŸ”˜ A. AI can analyze large datasets to identify attack patterns
πŸ”˜ B. AI automatically patches SQL vulnerabilities
πŸ”˜ C. AI speeds up SQL query execution
πŸ”˜ D. AI prevents all SQL Injection attacks

βœ… Answer: A
Explanation: AI-powered security tools detect anomalies in SQL queries, improving SQL Injection detection.


138. What does SHOW PROCESSLIST reveal in an SQL Injection attack?

πŸ”˜ A. Active database processes, including running queries
πŸ”˜ B. User authentication tokens
πŸ”˜ C. Encrypted database logs
πŸ”˜ D. API request headers

βœ… Answer: A
Explanation: SHOW PROCESSLIST reveals active queries, which attackers can use to analyze database operations.


139. How do attackers use “Time-Based SQL Injection” for reconnaissance?

πŸ”˜ A. By causing database delays to infer query results
πŸ”˜ B. By executing SQL Injection inside stored procedures
πŸ”˜ C. By modifying database timestamps
πŸ”˜ D. By bypassing API security controls

βœ… Answer: A
Explanation: Attackers use SLEEP(n) or BENCHMARK() to measure query response times and extract data indirectly.


140. What is a “Database Fingerprinting Attack” in SQL Injection?

πŸ”˜ A. Identifying database type and version using SQL queries
πŸ”˜ B. Encrypting SQL queries for authentication
πŸ”˜ C. Generating SQL logs for performance analysis
πŸ”˜ D. Using NoSQL Injection in traditional databases

βœ… Answer: A
Explanation: Attackers use database fingerprinting to identify the DBMS (MySQL, SQL Server, PostgreSQL), helping them craft targeted SQL Injection payloads.


141. What is an “SQL Injection Proxy Attack”?

πŸ”˜ A. Using an intermediary server to launch SQL Injection attacks
πŸ”˜ B. An SQL Injection attack that targets proxy servers
πŸ”˜ C. A technique to encrypt SQL Injection queries
πŸ”˜ D. A method to modify SQL queries without detection

βœ… Answer: A
Explanation: Attackers use proxies to obfuscate their origin and launch SQL Injection attacks through different IP addresses.


142. Which database privilege should be removed to reduce SQL Injection risks?

πŸ”˜ A. DROP
πŸ”˜ B. ALTER
πŸ”˜ C. EXECUTE
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Restricting dangerous privileges like DROP, ALTER, and EXECUTE helps prevent SQL Injection exploitation.


143. How can attackers use SQL Injection in search queries?

πŸ”˜ A. By injecting wildcards (%, _) to manipulate results
πŸ”˜ B. By modifying query logic to return unintended results
πŸ”˜ C. By using UNION to extract sensitive data
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Attackers manipulate search queries using SQL Injection techniques to extract data or disrupt application behavior.


144. How does an attacker use GROUP_CONCAT() in an SQL Injection attack?

πŸ”˜ A. To concatenate multiple database values into a single output
πŸ”˜ B. To execute SQL commands remotely
πŸ”˜ C. To create a brute-force attack on SQL queries
πŸ”˜ D. To encrypt database records

βœ… Answer: A
Explanation: GROUP_CONCAT() combines multiple rows into a single string, allowing attackers to extract multiple values in a single query.


145. What is a “Delayed SQL Injection Attack”?

πŸ”˜ A. An attack where injected queries execute at a later time
πŸ”˜ B. A method for encrypting SQL queries
πŸ”˜ C. A technique to slow down database queries
πŸ”˜ D. A time-based brute-force SQL attack

βœ… Answer: A
Explanation: Delayed SQL Injection (or Second-Order SQL Injection) stores malicious input, which executes later when retrieved.


146. What is “Blind SQL Injection in Login Forms”?

πŸ”˜ A. Injecting SQL queries without seeing direct output
πŸ”˜ B. A brute-force SQL Injection attack
πŸ”˜ C. Encrypting login credentials before injecting SQL
πŸ”˜ D. A technique only applicable to PostgreSQL

βœ… Answer: A
Explanation: Blind SQL Injection does not return error messages, so attackers infer results based on system behavior.


147. What does HAVING help an attacker achieve in an SQL Injection attack?

πŸ”˜ A. Bypass filtering and execute conditions on grouped data
πŸ”˜ B. Modify the structure of database tables
πŸ”˜ C. Encrypt SQL queries before execution
πŸ”˜ D. Prevent SQL Injection

βœ… Answer: A
Explanation: Attackers use HAVING to filter and manipulate SQL query results, bypassing some security mechanisms.


148. Why is using LOAD_FILE() in MySQL dangerous?

πŸ”˜ A. It allows attackers to read arbitrary files from the server
πŸ”˜ B. It improves database performance
πŸ”˜ C. It encrypts SQL queries
πŸ”˜ D. It prevents SQL Injection

βœ… Answer: A
Explanation: LOAD_FILE() can be exploited to read system files (e.g., /etc/passwd), exposing sensitive data.


149. How do attackers use SQL Injection in file upload functionalities?

πŸ”˜ A. By modifying file metadata to contain SQL Injection payloads
πŸ”˜ B. By injecting SQL through filename parameters
πŸ”˜ C. By modifying database queries used for file handling
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: File upload functionalities that store filenames in databases can be exploited for SQL Injection.


150. Why is INFORMATION_SCHEMA.COLUMNS valuable for an SQL Injection attacker?

πŸ”˜ A. It lists all column names in the database
πŸ”˜ B. It encrypts SQL queries
πŸ”˜ C. It modifies SQL constraints
πŸ”˜ D. It prevents SQL Injection

βœ… Answer: A
Explanation: INFORMATION_SCHEMA.COLUMNS helps attackers enumerate table structures for further exploitation.


151. How can SQL Injection lead to “Privilege Escalation”?

πŸ”˜ A. By exploiting stored procedures to gain higher access
πŸ”˜ B. By modifying user privileges in the database
πŸ”˜ C. By injecting malicious SQL into admin-level queries
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: SQL Injection can modify privileges, execute high-level commands, or exploit stored procedures, leading to privilege escalation.


152. What is “Federated SQL Injection”?

πŸ”˜ A. An attack targeting linked or federated databases
πŸ”˜ B. A method for securing SQL queries
πŸ”˜ C. An encryption technique for SQL queries
πŸ”˜ D. A NoSQL-based SQL Injection attack

βœ… Answer: A
Explanation: Federated SQL Injection exploits federated or linked databases, where queries execute across multiple systems.


153. How does an attacker use BENCHMARK() in SQL Injection?

πŸ”˜ A. To slow down query execution and confirm vulnerabilities
πŸ”˜ B. To speed up SQL queries
πŸ”˜ C. To brute-force SQL credentials
πŸ”˜ D. To prevent SQL Injection

βœ… Answer: A
Explanation: BENCHMARK() artificially delays queries, helping attackers measure SQL Injection success through response time.


154. How do attackers evade SQL Injection detection?

πŸ”˜ A. By using URL encoding
πŸ”˜ B. By injecting whitespace variations
πŸ”˜ C. By using nested queries
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Attackers use encoding, whitespace manipulation, and query nesting to evade detection.


155. Why is “Stored Procedure SQL Injection” dangerous?

πŸ”˜ A. It bypasses many traditional security filters
πŸ”˜ B. It allows attackers to execute administrative SQL commands
πŸ”˜ C. It can execute system-level commands
πŸ”˜ D. All of the above

βœ… Answer: D
Explanation: Stored procedure vulnerabilities allow attackers to bypass input validation, execute OS commands, and escalate privileges.


156. What is “Heap-Based SQL Injection”?

πŸ”˜ A. An attack targeting in-memory database operations
πŸ”˜ B. A technique that modifies database indexing
πŸ”˜ C. A method that affects NoSQL databases
πŸ”˜ D. A technique that encrypts SQL Injection queries

βœ… Answer: A
Explanation: Heap-Based SQL Injection targets in-memory database operations, allowing temporary data manipulation.


157. Why is UNION SELECT ALL dangerous in SQL Injection?

πŸ”˜ A. It retrieves duplicate values, increasing the data leak risk
πŸ”˜ B. It allows attackers to execute multiple queries
πŸ”˜ C. It improves SQL Injection performance
πŸ”˜ D. It encrypts query results

βœ… Answer: A
Explanation: UNION SELECT ALL returns duplicate values, increasing data exposure in SQL Injection attacks.


158. How does “AI-Assisted SQL Injection” work?

πŸ”˜ A. AI models craft advanced SQL Injection payloads
πŸ”˜ B. AI automatically patches SQL vulnerabilities
πŸ”˜ C. AI speeds up query execution
πŸ”˜ D. AI prevents SQL Injection

βœ… Answer: A
Explanation: AI can automate SQL Injection attacks by learning from attack patterns and generating optimized payloads.


159. How does “DNS Exfiltration SQL Injection” work?

πŸ”˜ A. Attackers extract data via DNS queries
πŸ”˜ B. SQL queries modify DNS records
πŸ”˜ C. SQL Injection queries are encrypted over DNS
πŸ”˜ D. Attackers block database logging via DNS

βœ… Answer: A
Explanation: DNS Exfiltration SQL Injection sends stolen data encoded inside DNS queries to an attacker’s server.


160. What is a “Hybrid SQL Injection” attack?

πŸ”˜ A. Combining multiple SQL Injection techniques
πŸ”˜ B. Targeting both SQL and NoSQL databases
πŸ”˜ C. Encrypting SQL Injection queries
πŸ”˜ D. Executing SQL Injection in cloud environments

βœ… Answer: A
Explanation: Hybrid SQL Injection combines multiple techniques (UNION-Based, Boolean-Based, Time-Based) for maximum effectiveness.


161. What is “AI-Powered SQL Injection Defense”?

πŸ”˜ A. AI models analyze queries to detect SQL Injection attempts
πŸ”˜ B. AI encrypts SQL Injection payloads
πŸ”˜ C. AI speeds up SQL query execution
πŸ”˜ D. AI automatically exploits SQL Injection vulnerabilities

βœ… Answer: A
Explanation: AI-powered defenses use machine learning models to detect SQL Injection patterns in real time.


162. How does an attacker exploit “SQL Injection via WebSockets”?

πŸ”˜ A. By injecting SQL queries through WebSocket communication channels
πŸ”˜ B. By modifying SQL logs using WebSockets
πŸ”˜ C. By injecting JavaScript into SQL queries
πŸ”˜ D. By disabling WebSockets

βœ… Answer: A
Explanation: WebSockets bypass traditional security filters, allowing attackers to inject SQL payloads.


163. What is an “SQL Injection Exploit Kit”?

πŸ”˜ A. A set of tools for automating SQL Injection attacks
πŸ”˜ B. A software for securing SQL databases
πŸ”˜ C. A framework for encrypting SQL queries
πŸ”˜ D. A legal compliance tool for database security

βœ… Answer: A
Explanation: Exploit kits automate SQL Injection attacks, making them more efficient.


164. What does XP_FILEEXIST() do in SQL Injection attacks?

πŸ”˜ A. Checks if a specific file exists on the system
πŸ”˜ B. Encrypts SQL queries
πŸ”˜ C. Modifies SQL database logs
πŸ”˜ D. Deletes system files

βœ… Answer: A
Explanation: XP_FILEEXIST() can reveal sensitive system files, aiding attackers in file enumeration.


165. How does “Automated Payload Mutation” enhance SQL Injection attacks?

πŸ”˜ A. It generates new payloads dynamically to bypass filters
πŸ”˜ B. It improves database performance
πŸ”˜ C. It encrypts all SQL Injection queries
πŸ”˜ D. It prevents SQL Injection

βœ… Answer: A
Explanation: Automated payload mutation helps attackers evade detection by modifying SQL Injection payloads.


166. What is “Deferred SQL Injection”?

πŸ”˜ A. When SQL Injection is stored and executed later
πŸ”˜ B. A method that prevents SQL Injection
πŸ”˜ C. A way to prioritize SQL queries
πŸ”˜ D. A NoSQL-based attack

βœ… Answer: A
Explanation: Deferred SQL Injection (Second-Order Injection) stores malicious input, which executes later.


167. How does “Virtual Patching” help mitigate SQL Injection?

πŸ”˜ A. It applies security fixes at the web application firewall level
πŸ”˜ B. It modifies the database schema
πŸ”˜ C. It encrypts SQL queries
πŸ”˜ D. It disables SQL logging

βœ… Answer: A
Explanation: Virtual patching applies temporary security fixes at the WAF level until the actual patch is implemented.


168. What is an “SQL Injection Honeypot”?

πŸ”˜ A. A decoy system designed to detect and track attackers
πŸ”˜ B. A method to automate SQL Injection
πŸ”˜ C. A tool that prevents SQL Injection
πŸ”˜ D. A framework for securing databases

βœ… Answer: A
Explanation: SQL Injection honeypots are decoy systems used to detect, log, and analyze SQL Injection attempts.


169. How do attackers use SELECT @@TIMESTAMP in SQL Injection?

πŸ”˜ A. To check the system’s current time and infer database details
πŸ”˜ B. To encrypt SQL queries
πŸ”˜ C. To disable logging
πŸ”˜ D. To perform brute-force attacks

βœ… Answer: A
Explanation: SELECT @@TIMESTAMP helps attackers determine system behavior and response times.


170. Why are “Blind Time-Based SQL Injection” attacks difficult to detect?

πŸ”˜ A. They do not return error messages
πŸ”˜ B. They bypass web application firewalls
πŸ”˜ C. They only work on NoSQL databases
πŸ”˜ D. They do not affect database performance

βœ… Answer: A
Explanation: Time-Based SQL Injection relies on query execution delays, without triggering direct errors.


171. What is the risk of allowing xp_cmdshell in SQL Server?

πŸ”˜ A. Attackers can execute system commands via SQL Injection
πŸ”˜ B. It improves query performance
πŸ”˜ C. It allows for faster indexing
πŸ”˜ D. It prevents unauthorized access

βœ… Answer: A
Explanation: xp_cmdshell enables Remote Code Execution (RCE), allowing attackers to execute system-level commands.


172. How does an attacker use STUFF() in SQL Injection?

πŸ”˜ A. To modify and manipulate string-based SQL queries
πŸ”˜ B. To perform brute-force attacks
πŸ”˜ C. To encrypt SQL queries
πŸ”˜ D. To bypass authentication

βœ… Answer: A
Explanation: STUFF() manipulates string data, allowing attackers to modify query structures dynamically.


173. What is “SQL Injection over DNS”?

πŸ”˜ A. An attack that exfiltrates data using DNS queries
πŸ”˜ B. A way to modify DNS records using SQL Injection
πŸ”˜ C. A technique that prevents SQL Injection
πŸ”˜ D. A database indexing optimization

βœ… Answer: A
Explanation: Attackers encode stolen data in DNS requests, allowing exfiltration even when direct database access is blocked.


174. Why is “Multi-Stage SQL Injection” more dangerous?

πŸ”˜ A. It involves multiple attack steps to exploit deep vulnerabilities
πŸ”˜ B. It only affects NoSQL databases
πŸ”˜ C. It prevents SQL Injection
πŸ”˜ D. It requires administrator privileges

βœ… Answer: A
Explanation: Multi-Stage SQL Injection executes in sequential steps, allowing attackers to bypass advanced security measures.


175. How does an attacker use EXEC() in SQL Injection?

πŸ”˜ A. To execute dynamic SQL commands
πŸ”˜ B. To perform brute-force attacks
πŸ”˜ C. To prevent SQL Injection
πŸ”˜ D. To modify encryption settings

βœ… Answer: A
Explanation: EXEC() executes dynamic SQL, making it a common target for SQL Injection.


176. What is “Command Chaining SQL Injection”?

πŸ”˜ A. Executing multiple SQL commands in a single injection
πŸ”˜ B. Encrypting SQL Injection payloads
πŸ”˜ C. Modifying database indexing
πŸ”˜ D. Injecting NoSQL queries into SQL databases

βœ… Answer: A
Explanation: Command chaining executes multiple SQL commands, increasing attack impact.


177. How do attackers use sysobjects in SQL Injection?

πŸ”˜ A. To list database objects like tables and procedures
πŸ”˜ B. To encrypt SQL queries
πŸ”˜ C. To disable SQL Injection protection
πŸ”˜ D. To perform brute-force attacks

βœ… Answer: A
Explanation: sysobjects contains metadata about database structures, useful for enumeration attacks.


178. Why is sp_addlogin dangerous in SQL Injection?

πŸ”˜ A. Attackers can create new database users with elevated privileges
πŸ”˜ B. It speeds up SQL queries
πŸ”˜ C. It encrypts database records
πŸ”˜ D. It disables logging

βœ… Answer: A
Explanation: Attackers use sp_addlogin to create new privileged accounts, escalating access.


179. How can an attacker exploit sysdatabases in SQL Injection?

πŸ”˜ A. To list all databases on the server
πŸ”˜ B. To encrypt SQL queries
πŸ”˜ C. To perform brute-force attacks
πŸ”˜ D. To optimize SQL query performance

βœ… Answer: A
Explanation: sysdatabases reveals the list of databases, helping attackers identify potential targets.


180. What is the role of “Error-Based Out-of-Band SQL Injection”?

πŸ”˜ A. It sends extracted data to an external server using error messages
πŸ”˜ B. It encrypts SQL Injection payloads
πŸ”˜ C. It prevents database access
πŸ”˜ D. It modifies SQL query logs

βœ… Answer: A
Explanation: Out-of-Band SQL Injection sends extracted data via alternative channels (DNS, HTTP requests).


181. How does an attacker use INTO OUTFILE in SQL Injection?

πŸ”˜ A. To write database query results into a file on the server
πŸ”˜ B. To encrypt SQL queries
πŸ”˜ C. To disable SQL Injection detection
πŸ”˜ D. To modify system logs

βœ… Answer: A
Explanation: INTO OUTFILE allows attackers to write query results to a file, potentially creating a backdoor.


182. What is “Stealth SQL Injection”?

πŸ”˜ A. An attack that minimizes logs and traces
πŸ”˜ B. A method for securing SQL queries
πŸ”˜ C. A technique used only in PostgreSQL
πŸ”˜ D. A brute-force attack

βœ… Answer: A
Explanation: Stealth SQL Injection avoids triggering security alerts or logs, making it harder to detect.


183. How do attackers use sysprocesses in SQL Injection?

πŸ”˜ A. To monitor active database queries and processes
πŸ”˜ B. To encrypt SQL queries
πŸ”˜ C. To bypass authentication
πŸ”˜ D. To optimize SQL query performance

βœ… Answer: A
Explanation: sysprocesses provides information about currently running queries, which attackers can use for reconnaissance.


184. What is a “Compound SQL Injection Attack”?

πŸ”˜ A. A combination of multiple SQL Injection techniques
πŸ”˜ B. A technique used in NoSQL environments
πŸ”˜ C. A method to prevent SQL Injection
πŸ”˜ D. A way to automate SQL queries

βœ… Answer: A
Explanation: Compound SQL Injection combines techniques like Error-Based, Time-Based, and UNION-Based attacks for maximum exploitation.


185. How does an attacker use sp_configure in SQL Injection?

πŸ”˜ A. To modify database security settings
πŸ”˜ B. To speed up SQL queries
πŸ”˜ C. To prevent SQL Injection
πŸ”˜ D. To encrypt user credentials

βœ… Answer: A
Explanation: sp_configure can alter database configurations, allowing attackers to weaken security settings.


186. What is “Multi-Vector SQL Injection”?

πŸ”˜ A. Using multiple entry points to inject SQL payloads
πŸ”˜ B. A method for encrypting SQL queries
πŸ”˜ C. A brute-force attack on SQL queries
πŸ”˜ D. A technique that prevents SQL Injection

βœ… Answer: A
Explanation: Multi-Vector SQL Injection exploits various attack surfaces (URL parameters, headers, cookies, POST data).


187. How does an attacker use INSERT INTO in SQL Injection?

πŸ”˜ A. To insert malicious records into the database
πŸ”˜ B. To delete all user data
πŸ”˜ C. To encrypt database tables
πŸ”˜ D. To optimize SQL queries

βœ… Answer: A
Explanation: Attackers use INSERT INTO to inject persistent malicious data, which can be executed later.


188. What is the risk of allowing SELECT * FROM users WHERE id=$user_id?

πŸ”˜ A. It allows SQL Injection if $user_id is not validated
πŸ”˜ B. It prevents query optimization
πŸ”˜ C. It requires administrator privileges
πŸ”˜ D. It speeds up SQL execution

βœ… Answer: A
Explanation: Using unvalidated user input in queries allows SQL Injection exploits.


189. How does “Cross-Database SQL Injection” work?

πŸ”˜ A. An attack that targets multiple databases on the same server
πŸ”˜ B. A method that prevents SQL Injection
πŸ”˜ C. A way to automate SQL queries
πŸ”˜ D. A brute-force attack

βœ… Answer: A
Explanation: Cross-Database SQL Injection occurs when a vulnerable query accesses multiple databases, allowing attackers to escalate access.


190. How does xp_regread help an attacker in SQL Injection?

πŸ”˜ A. It reads Windows Registry values via SQL
πŸ”˜ B. It encrypts SQL queries
πŸ”˜ C. It prevents SQL Injection
πŸ”˜ D. It modifies database indexes

βœ… Answer: A
Explanation: xp_regread allows attackers to access Windows Registry values, which can expose system configurations.


191. Why is “AI-Generated SQL Injection Payloads” a growing concern?

πŸ”˜ A. AI can craft more effective SQL Injection attacks
πŸ”˜ B. AI speeds up SQL execution
πŸ”˜ C. AI encrypts SQL queries
πŸ”˜ D. AI prevents SQL Injection

βœ… Answer: A
Explanation: AI models can generate SQL Injection payloads that evade detection.


192. How does “Cloud SQL Injection” differ from traditional SQL Injection?

πŸ”˜ A. It targets cloud-hosted databases with different architectures
πŸ”˜ B. It only works on SQL Server databases
πŸ”˜ C. It prevents SQL Injection
πŸ”˜ D. It requires administrator privileges

βœ… Answer: A
Explanation: Cloud SQL Injection exploits security misconfigurations in cloud-hosted databases.


193. What is “JWT SQL Injection”?

πŸ”˜ A. Injecting SQL queries into JSON Web Tokens (JWTs)
πŸ”˜ B. A way to encrypt SQL queries
πŸ”˜ C. A NoSQL attack method
πŸ”˜ D. A technique to speed up SQL execution

βœ… Answer: A
Explanation: JWT SQL Injection modifies JWT tokens to inject malicious SQL queries.


194. How do attackers use DBCC commands in SQL Injection?

πŸ”˜ A. To manipulate database integrity settings
πŸ”˜ B. To encrypt SQL queries
πŸ”˜ C. To delete SQL logs
πŸ”˜ D. To perform brute-force attacks

βœ… Answer: A
Explanation: DBCC commands allow database diagnostics, which attackers can abuse to extract sensitive data.


195. What is the role of “AI-Based SQL Injection Detection Systems”?

πŸ”˜ A. Detecting and blocking SQL Injection attempts using AI
πŸ”˜ B. Encrypting SQL queries
πŸ”˜ C. Preventing database modifications
πŸ”˜ D. Speeding up SQL queries

βœ… Answer: A
Explanation: AI-based security tools analyze SQL query patterns to detect and block SQL Injection attacks.


196. How does “Metadata SQL Injection” work?

πŸ”˜ A. Exploiting metadata tables to extract sensitive information
πŸ”˜ B. Encrypting metadata logs
πŸ”˜ C. Preventing SQL Injection
πŸ”˜ D. Modifying SQL query execution order

βœ… Answer: A
Explanation: Metadata SQL Injection allows attackers to query database system tables, extracting schema details.


197. What is “API SQL Injection”?

πŸ”˜ A. Injecting SQL payloads through web APIs
πŸ”˜ B. Encrypting API responses
πŸ”˜ C. Preventing SQL Injection
πŸ”˜ D. Bypassing authentication via SQL queries

βœ… Answer: A
Explanation: APIs that interact with databases are vulnerable to SQL Injection attacks through API endpoints.


198. Why are “Hybrid SQL Injection Attacks” more effective?

πŸ”˜ A. They combine multiple SQL Injection techniques for maximum exploitation
πŸ”˜ B. They are slower and harder to detect
πŸ”˜ C. They require special authentication tokens
πŸ”˜ D. They only work on cloud databases

βœ… Answer: A
Explanation: Hybrid SQL Injection mixes techniques like Time-Based, Boolean-Based, and Error-Based attacks.


199. How does “NoSQL Injection” differ from SQL Injection?

πŸ”˜ A. It targets NoSQL databases like MongoDB
πŸ”˜ B. It uses SQL queries in NoSQL databases
πŸ”˜ C. It encrypts NoSQL queries
πŸ”˜ D. It speeds up query execution

βœ… Answer: A
Explanation: NoSQL Injection exploits document-based databases (e.g., MongoDB) using JSON manipulation.


200. What is the risk of “Nested SQL Injection”?

πŸ”˜ A. It allows injecting SQL into subqueries and nested statements
πŸ”˜ B. It encrypts all SQL queries
πŸ”˜ C. It prevents database corruption
πŸ”˜ D. It speeds up SQL query execution

βœ… Answer: A
Explanation: Nested SQL Injection exploits subqueries, making detection harder.