Skip to content
Business logic Write-up Beginner

Broken Brute Force Protection Bypassing Ip Based Login Blocking

The login endpoint blocked an IP after three failed attempts, but any successful login from that IP reset the failure counter. An attacker could alternate failed guesses against a victim with successful logins to their own account, allowing unlimited password guesses from one IP.

Daksh Dhamija Follow

Published on cybersecuritywriteups.com

Explore how flawed brute-force protection can be bypassed through improper IP-blocking and counter-reset logic. This practical PortSwigger lab walkthrough covers the attack, root cause, security impact, and effective prevention techniques.

Daksh Dhamija, on cybersecuritywriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The brute-force protection reset the failed-attempt counter for an IP on any successful login from that IP, letting an attacker control the counter state.

Impact

An attacker could make significantly more password guesses than intended and circumvent temporary IP blocking, potentially compromising accounts with weak or reused passwords, though this does not automatically mean account takeover.

What the attacker needed

Valid credentials for an attacker-controlled account; victim username known; ability to send many login requests

The fix

Brute-force protection should track suspicious authentication activity independently of attacker-controlled actions and use multiple layers of defence rather than relying solely on IP-based blocking.

How it was found

  1. Log in with the provided account and capture the login request.
  2. Send several incorrect login attempts and observe the IP block after three failures.
  3. Test that a successful login to your own account resets the failed-attempt counter.
  4. Use Burp Intruder with a pitchfork attack alternating between your credentials and candidate passwords for the victim, with concurrency set to 1.
  5. Analyse the results for a response that differs from normal failed logins (a 302 response).
  6. Log in with the discovered credentials to access the victim's account page.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A brute-force attack is when someone tries many passwords automatically until one works. The site tried to stop this by blocking an IP address after three wrong tries, but it also reset the count whenever any correct login happened from that IP. So the attacker could log in to their own account between guesses to keep the counter low and keep trying passwords.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.