What is Broken Authentication?

Broken authentication is a term for vulnerabilities in the authentication of systems that allows unauthorized access to user accounts and sensitive information. It occurs when the authentication process is flawed or improperly implemented, making it susceptible to exploitation by attackers.

Broken authentication can occur for various reasons, including weak passwords, insecure password storage, session management flaws/hijacking, credential stuffing, brute force attacks, security misconfigurations, etc.

The consequences of broken authentication can be severe, including unauthorized access to sensitive data, account takeovers, identity theft, financial fraud, and unauthorized modifications or data deletions.

In this article, we’ll walk through the security flaws associated with broken authentication and how you can detect and prevent them.

Poor Password Management

According to a recent DBIR report by Verizon, 61% of data breaches involved stolen or weak credentials. These breaches result from poor password management, leading to financial losses, reputational damage, identity theft, and unauthorized access to sensitive data.

Here’s a quick overview of the top attack vectors and methods related to poor password management. 

Phishing Attacks

Phishing attacks are deceptive attempts by malicious actors to trick individuals into revealing sensitive information, such as passwords, credit card details, or personal data, by impersonating legitimate entities through fraudulent emails, websites, or messages. These attacks exploit human vulnerability and lack of awareness (sometimes called social engineering).

diagram phishing attack

Insecure Storage of Passwords

Storing passwords in plain text or using weak encryption methods can expose them to attackers. If attackers gain access to the stored passwords, they can impersonate legitimate users.

Credential Stuffing

Attackers can exploit the practice of users reusing passwords across multiple accounts. Using automated tools, attackers try to log in to multiple accounts using leaked credentials from other breaches.

Password Spraying

Password spraying is a technique that attackers use to gain unauthorized access to user accounts or systems. It involves systematically attempting a small number of commonly used or easily guessable passwords against many user accounts.

Session Management Flaws

Flaws in how sessions are managed, such as session IDs that are not properly protected or are not invalidated after logout, can allow attackers to hijack active sessions and gain unauthorized access.

Understanding Session Management

Session management is a critical aspect of application security that handles and controls user sessions. A session represents the period when a user interacts with a web application, typically from authentication until logout or session expiration. Proper session management is crucial to prevent unauthorized access, protect sensitive data, and ensure a seamless user experience. 

Some key session management best practices include:

  • generating unique session identifiers upon login 
  • securely transmitting and storing session data
  • setting appropriate session timeouts to minimize the risk of session hijacking
  • implementing secure session termination mechanisms 
  • protecting against session fixation attacks 

These fundamentals help create robust session management practices that enhance security and protect user privacy.

Session Management Attacks

Here’s an overview of how attackers can exploit sessions.

Session Hijacking

Also known as session sniffing or session sidejacking, this attack involves intercepting and capturing a user’s session token or cookie to impersonate the user and gain unauthorized access. Attackers can exploit vulnerabilities in the network, such as insecure Wi-Fi connections or unencrypted communications, to eavesdrop on session data.

Session Fixation

In this attack, an attacker tricks a user into using a predefined session identifier that the attacker controls. By forcing the user to establish a session with a known identifier, the attacker can later exploit it to gain unauthorized access once the user authenticates.

API-Related Authentication Attacks

Broken API authentication protocols refer to vulnerabilities in the authentication mechanisms that APIs use to verify the identity of users or client applications. When attackers exploit these vulnerabilities, they can gain unauthorized access to sensitive data or perform malicious actions within the API. 

Here’s an overview of how attackers exploit broken authentication protocols in APIs.

API Key Exploitation

APIs often rely on API keys or access tokens for authentication. If these keys are weak or inadvertently exposed, attackers can misuse them to gain unauthorized access to API resources, manipulate data, or perform actions on behalf of legitimate users.

api key explanation

Injection Attacks

Inadequate input validation or improper handling of user-supplied data during authentication can lead to injection attacks, such as SQL injection or cross-site scripting (XSS). These attacks enable attackers to inject malicious code or crafted input, bypass authentication checks, and gain unauthorized access to sensitive data.

Token Manipulation

Insufficiently protected or predictable tokens used for authentication can be manipulated by attackers. By tampering with the token data, attackers can elevate their privileges, bypass authorization checks, and gain access to unauthorized resources.

Lack of Secure Communication

APIs that transmit authentication credentials or session tokens over insecure channels, such as plain HTTP instead of HTTPS, enable attackers to intercept and eavesdrop on sensitive data. This interception can lead to credential theft or session hijacking.

Security Misconfigurations

Misconfigurations in authentication mechanisms, such as allowing access to default or unnecessary accounts, can create vulnerabilities that attackers can exploit.

How to Prevent Broken Authentication Scenarios

Proper Password Management

Strong Password Policies

Establishing a strong password policy that outlines the requirements and guidelines for creating and managing passwords is crucial to strong password management. This policy includes creating parameters for password complexity, length, and expiration, ensuring consistency and adherence across the organization.

password meme

It is important to educate employees about the dangers of password reuse and emphasize the need for unique passwords for each account. This prevents the compromise of one account from affecting others.

Password Management Tools

Two-Factor Authentication (2FA) should be used whenever possible. Requiring an additional verification factor, such as a unique code sent to a mobile device, adds an extra layer of security to the authentication process.

Password manager tools can help facilitate secure password storage and management. Password managers generate strong passwords, store them in an encrypted format, and provide convenient access through a master password or biometric authentication.

Visibility and Policy Enforcement

​​Conduct Security Testing

Regularly perform security testing, including vulnerability assessments, penetration testing, and code reviews, to identify and address any authentication weaknesses or vulnerabilities.

Regular Security Audits 

Conduct regular security audits to identify weak passwords, detect password reuse, and ensure compliance with the organization’s password policy. This helps identify potential vulnerabilities and appropriate actions required to mitigate risks.

Incident Response

In case of a password breach or suspicious activity, have an incident response plan to promptly address the issue, reset compromised passwords, and mitigate any potential damage.

Employee Education and Awareness

Provide regular training sessions and awareness campaigns to educate employees about the importance of password security. This includes raising awareness about phishing attacks, social engineering techniques, and best practices for creating and managing passwords.

By implementing these preventive measures, you can significantly reduce the risk of broken authentication scenarios and enhance the overall security of your application’s authentication process. Remember, a layered approach to security that combines technical controls, user education, and proactive monitoring is key to mitigating authentication-related risks.

API Security Challenge: Visibility & Inventory

In recent years, migrations to the cloud, CI/CD, and the adoption of microservices architecture have accelerated the growth of APIs, many of which aren’t properly secured and managed.

Many organizations have difficulty getting basic visibility and an accurate inventory of their applications and APIs. Gartner predicts that by 2025, less than 50 percent of enterprise APIs will be managed.  

Bionic: Accurate API Inventory with Business Risk Scoring

Visibility is the foundation of a robust application and API security strategy.

Bionic Application Security Posture Management (ASPM) continuously and automatically discovers, maps, and inventories application services and APIs in real time.

When Bionic detects an issue (for example, a service that is internet-facing with an unauthenticated API), Bionic incorporates this finding into the service’s overall business risk score.

Finally, Bionic’s Business Risk Scoring gives you a clear indicator of the riskiest services in your applications, so you can fix the most impactful issues first.

Application Inventory of risk

Contact us to learn how we can help you identify application security misconfigurations and unauthenticated APIs.

Did you find this blog helpful or interesting?

Click the social media button of your choice to share the blog with you friends and colleagues.

See a Live Demo of the Bionic Platform

CrowdStrike Bionic

Have you heard the news?

Bionic to be acquired by CrowdStrike to provide the industry’s most comprehensive cloud security platform. Together, we are creating the industry-defining cloud security platform, fully integrated from code to runtime.