Unveiling Critical Weaknesses: A Rigorous Penetration Test of a W
The web application had multiple weaknesses: no brute-force protection on login, weak password policy, session cookies valid for 30 days with rotation only for the newest cookie, insufficient input validation on email and login ID fields, and SQL injection in several dashboards that allowed reading and modifying the database and writing files to the server. An attacker could gain unauthorised access, persist via old cookies, and compromise data integrity and potentially execute code.
Published on medium.com
In a recent penetration testing engagement, I was tasked with assessing the security of a web application designed to manage test metrics and user interactions. What began as a standard evaluation of a login portal quickly escalated into a revealing exploration of systemic vulnerabilities.
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
Likely the application lacked fundamental security controls: no rate limiting, weak password policy, improper session management, missing input validation, and use of raw SQL queries without parameterisation.
Impact
An attacker could gain unauthorised access via brute force or weak passwords, maintain persistent access through old session cookies, compromise data integrity and confidentiality via SQL injection, and potentially achieve remote code execution by writing files to the server.
What the attacker needed
Network access to the application; a valid user account (for some steps); ability to intercept HTTP traffic
The fix
The application should enforce rate limiting and account lockouts, strong password policies, short-lived single-use session tokens with proper invalidation, comprehensive input validation, and parameterised queries; the text does not state that fixes were applied.
How it was found
- Sent 461 incorrect login attempts in under 30 seconds without restriction.
- Used OSINT to obtain a user's email and tried passwords from rockyou.txt, finding '123456'.
- Logged in with the weak password and observed session cookies with 30-day validity.
- Replayed login requests to generate multiple session cookies, each still valid.
- Submitted an invalid string in the Email field, which was accepted.
- Set Login ID to '@' and password to six spaces, then logged in successfully.
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.
This report describes a test of a web application where the tester found many basic security mistakes. For example, the login page let someone try thousands of passwords quickly, and some parts of the site let the tester run database commands directly. These flaws could let an attacker break into accounts and change or steal data.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.