πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      What is 'SQL injection' and which of the following is

      the most effective prevention technique?
      A A virus that corrupts SQL databases by replicating itself β€” prevented by antivirus software Correct Answer Incorrect Answer
      B An attack that inserts malicious SQL code into input fields β€” most effectively prevented by parameterized queries Correct Answer Incorrect Answer
      C A DDoS attack targeting SQL servers denying essential services β€” prevented by installing firewalls and antivirus Correct Answer Incorrect Answer
      D Unauthorized copying of SQL database files β€” prevented by file encryption Correct Answer Incorrect Answer
      E An attack exploiting unpatched SQL server software β€” prevented by regular updates only Correct Answer Incorrect Answer

      Solution

      SQL injection occurs when user input is directly concatenated into SQL queries without sanitization. Example: entering ' OR '1'='1 in a login field may bypass authentication. Parameterized queries separate SQL code from data β€” user input is treated as a literal string, never as executable SQL. Additional controls that can be used are stored procedures, input validation (whitelist), WAF (Web Application Firewall) and principle of least privilege on DB accounts.Β 

      Practice Next

      Relevant for Exams:

      ask-question