Insecure Credential Recovery
Introduction
Welcome to the "A04: Insecure Design" course! In this lesson, we will explore the topic of insecure credential recovery mechanisms, specifically focusing on the use of security questions and answers. Credential recovery is a critical component of web applications, allowing users to regain access to their accounts. However, when implemented insecurely, it can become a significant vulnerability, effectively creating a "backdoor" into a user's account that bypasses the primary password authentication.
Let's dive into understanding these mechanisms and how they can be exploited. 🚀
Historical Context of Security Questions
Security questions are a form of Knowledge-Based Authentication (KBA), where a user must provide a pre-established piece of information ("something you know") to prove their identity. The underlying assumption is that these answers are private, static, and memorable. Common questions include "What's your mother's maiden name?", "What street did you grow up on?", or "What was your first pet's name?"
While this method seemed secure initially, it has several fundamental design flaws that have become more pronounced in the digital age. The primary security flaw is that the answers often have low entropy (meaning they are predictable) and are not truly secret. In the age of social media and public records, information like a mother's maiden name, hometown, or even a pet's name is often publicly discoverable. This makes them particularly vulnerable to targeted attacks.
Other outdated recovery methods share similar weaknesses:
- SMS-based recovery: Vulnerable to SIM swapping, where an attacker convinces a mobile carrier to transfer the victim's phone number to a SIM card they control.
- Simple PIN codes sent via email: If the user's email is already compromised, this offers no additional security.
- Birth date verification: This is public information and easily guessable.
- Last transaction amount (for banking): Can be phished or discovered through other means.
These methods fail because they rely on information that is either public, guessable, or can be intercepted, violating the core principle that authentication secrets must remain confidential.
Understanding Credential Recovery Mechanisms
Credential recovery mechanisms are processes designed to help users regain access to their accounts when they forget their passwords. The goal is to securely re-establish identity by balancing user convenience with robust security. The system must be able to reliably verify the user's identity through a secondary channel without introducing new weaknesses.
When implemented using security questions, the system compares a user-provided answer against a stored response. While this seems straightforward, it introduces several security risks because the answers are often predictable or publicly available information. Let's examine a vulnerable implementation that demonstrates these risks.
