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.
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
Options
- Acommand injection.
- BSQL injection.
- Cdirectory traversal.
- DLDAP injection.
How the community answered
(24 responses)- A4% (1)
- B79% (19)
- C13% (3)
- D4% (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.
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.
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.
Directory traversal exploits insufficient path validation to access files outside the web root using sequences like '../', not login form parameters.
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
Community Discussion
No community discussion yet for this question.
