githubEdit

OAuth

Authentication

What is it?

Authentication is the process by which a system confirms the identity of a user or application. It's essentially all about who you are.

Targeting authentication mechanisms allow us to to impersonate users, admins, or systems and gain unauthorized access. Often, we look to attack logic issues and lack of brute-force protection.

Common targets in authentication attacks include:

  • Passwords or passphrases

  • Multi-Factor Authentication (MFA)

  • Session tokens

  • Cookies

  • Recovery questions and answers

For more details on specific authentication attack techniques, see the relevant child pages.

Attacking password-based authentication

What is it?

Password-based authentication generally allows to register an account and set a password, or sometimes an account will be assigned to them by an administrator. Password-based authentication tends to be suseptible to brute-force attacks, account lockouts and credential stuffing attacks.

A simple example

  • A vulnerable web application allows users to sign up and set a password.

  • After 10 failed login attempts, an account is locked.

  • If an attacker uses 9 common passwords against many user accounts, they will gain access to ones that chose weak or common passwords.

Broken authentication can often lead to:

  • Account takeover

  • Sensitive data exposure

Other learning resources:

Writeups:

Have a good writeup & want to share it here? Drop me a message on LinkedIn.

Checklist

Attacking MFA

What is it?

Multi-Factor Authentication (MFA) is a method of confirming a user's identity by using multiple pieces of evidence (factors), typically something they know (like a password), something they have (like a physical token or a mobile device), and something they are (like biometric data).

A simple example

A web application requests a password (first factor - something the user knows), then a one-time password sent to a mobile device (second factor - something the user has). An attacker could attempt to bypass MFA by stealing both the user's password and the OTP, or by exploiting vulnerabilities in the MFA implementation.

Common MFA bypass techniques can include:

  • Phishing attacks to collect both factors

  • Exploiting insecure backup/recovery methods

  • Man-in-the-middle attacks

  • Exploiting implementation weaknesses

Other learning resources:

Checklist

OAuth Attack

Change User Info

Steal Tokens

1. Open Web Server in Your Local Machine

2. Inject Your Local URL to the Redirect URL

Access to the URL below.

CSRF

1. Steal Code

2. Hijack redirect_url

3. Open Redirect

4. Proxy Page (postMessage)

Explanation

Bugs

OAuth resources

OAuth scheme

Code grant flow

OAuth Attack mindmap

Last updated