CS0-003 · Question #134
During the security assessment of a new application, a tester attempts to log in to the application but receives the following message incorrect password for given username. Which of the following can
The correct answer is C. Recognize that error messaging does not provide confirmation of the correct element of. The recommendation aims to prevent attackers from using error messages to enumerate valid usernames or determine if a username exists, which is achieved by providing generic error messages.
Question
During the security assessment of a new application, a tester attempts to log in to the application but receives the following message incorrect password for given username. Which of the following can the tester recommend to decrease the likelihood that a malicious attacker will receive helpful information?
Options
- ASet the web page to redirect to an application support page when a bad password is entered.
- BDisable error messaging for authentication
- CRecognize that error messaging does not provide confirmation of the correct element of
- DAvoid using password-based authentication for the application
How the community answered
(24 responses)- A4% (1)
- B8% (2)
- C83% (20)
- D4% (1)
Why each option
The recommendation aims to prevent attackers from using error messages to enumerate valid usernames or determine if a username exists, which is achieved by providing generic error messages.
Redirecting to a support page upon incorrect password entry still implies that the username was recognized, potentially aiding username enumeration.
Completely disabling error messaging for authentication would provide a poor user experience as legitimate users would not know why their login failed.
The error message "incorrect password for given username" tells an attacker that the username is valid, confirming its existence. A better practice is to use generic error messages, such as "Invalid username or password," which do not reveal which part of the authentication attempt was incorrect, thereby preventing username enumeration and providing less helpful information to an attacker.
While multi-factor authentication or other advanced methods are stronger, eliminating password-based authentication entirely might not be feasible or desirable for all applications, and the question specifically addresses improving the existing error messaging.
Concept tested: Secure authentication error handling
Source: https://learn.microsoft.com/en-us/azure/active-directory/authentication/concept-password-less-authentication-security
Topics
Community Discussion
No community discussion yet for this question.