nerdexam
EC-Council

312-50V9 · Question #104

A security administrator notices that the log file of the company's webserver contains suspicious entries: Based on source code analysis, the analyst concludes that the login.php script is…

The correct answer is B. SQL injection. Suspicious entries in the web server log targeting login.php indicate SQL injection, the most common vulnerability in authentication scripts that concatenate user input directly into SQL queries.

SQL Injection

Question

A security administrator notices that the log file of the company's webserver contains suspicious entries:

Based on source code analysis, the analyst concludes that the login.php script is vulnerable to

Exhibit

312-50V9 question #104 exhibit

Options

  • Acommand injection.
  • BSQL injection.
  • Cdirectory traversal.
  • DLDAP injection.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    79% (19)
  • C
    13% (3)
  • D
    4% (1)

Why each option

Suspicious entries in the web server log targeting login.php indicate SQL injection, the most common vulnerability in authentication scripts that concatenate user input directly into SQL queries.

Acommand injection.

Command injection requires the application to pass user input to an operating system shell function, which is unrelated to database authentication logic in login.php.

BSQL injection.Correct

SQL injection exploits the failure to sanitize user-supplied input before embedding it in SQL queries, allowing an attacker to manipulate query logic. Login scripts like login.php are a primary target because they typically query a database to validate credentials. Malicious input such as ' OR '1'='1 can bypass authentication or expose data from the MSSQL backend.

Cdirectory traversal.

Directory traversal exploits insufficient path validation to access files outside the web root using sequences like '../', not login form parameters.

DLDAP injection.

LDAP injection manipulates LDAP queries and would require the application to use an LDAP directory for authentication rather than a SQL database.

Concept tested: SQL injection in authentication scripts

Source: https://owasp.org/www-community/attacks/SQL_Injection

Topics

#SQL injection#web server logs#login forms#MSSQL

Community Discussion

No community discussion yet for this question.

Full 312-50V9 Practice