SY0-501 · Question #420
Upon entering an incorrect password, the logon screen displays a message informing the user that the password does not match the username provided and is not the required length of 12 characters…
The correct answer is B. Error handling. The application's detailed error message, revealing password length and username validity, provides too much information to potential attackers. This practice violates secure coding principles related to error handling.
Question
Upon entering an incorrect password, the logon screen displays a message informing the user that the password does not match the username provided and is not the required length of 12 characters. Which of the following secure coding techniques should a security analyst address with the application developers to follow security best practices?
Options
- AInput validation
- BError handling
- CObfuscation
- DData exposure
How the community answered
(40 responses)- A15% (6)
- B73% (29)
- C8% (3)
- D5% (2)
Why each option
The application's detailed error message, revealing password length and username validity, provides too much information to potential attackers. This practice violates secure coding principles related to error handling.
Input validation involves checking user input against defined criteria before processing it, but the problem described is how the *error message* publicly discloses details about the validation failure, not the act of validation itself.
Secure error handling mandates that error messages should be generic and avoid revealing specific details that could assist an attacker, such as password length requirements or whether a username is valid. The given error message provides granular feedback that an attacker could use to deduce account policies or system vulnerabilities, which is a critical secure error handling failure.
Obfuscation is the technique of making code or data difficult to understand or reverse-engineer, typically for intellectual property protection or to hinder malware analysis, and is unrelated to the content of user-facing error messages.
While the detailed error message *causes* data exposure, 'error handling' is the specific secure coding technique that dictates how errors should be reported to prevent such sensitive information disclosure.
Concept tested: Secure error handling practices
Source: https://cheatsheetseries.owasp.org/cheatsheets/Error_Handling_Cheat_Sheet.html
Topics
Community Discussion
No community discussion yet for this question.