Skip to content

Add lockout protection to low brute force login - #294

Open
r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/brute-force-low
Open

r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/brute-force-low

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • move the Low brute-force form to POST so credentials are no longer submitted in the query string
  • replace interpolated SQL with prepared statements and keep failure responses generic
  • track failed logins server-side, lock an account after five failures for 15 minutes, and reset the counter after a successful login

Verification

  • php -l passed for vulnerabilities/brute/index.php and vulnerabilities/brute/source/low.php
  • vulnerable baseline still accepts the correct password immediately after six failed attempts and is also bypassable with username=admin' -- -
  • patched runtime switches the Low form to POST, blocks the correct password after five failed attempts, keeps the active lockout window stable, allows login after the window expires, resets failed_login to 0, and rejects the SQLi bypass probe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant