On this page
Password Brute-Force via Password Change
Lab
Password brute-force via password change · Practitioner
Solution
Already tired of writing the report :)
In short, nothing complicated here.
There's a route POST /my-account/change-password.
It has no brute-force protection, and we can swap the username.
There's a nuance: if you set the new password and its confirmation the same, and the current password is wrong, the server responds with a redirect.
If the passwords don't match, then 200 is returned. And if they match — also 200, but the response length will differ.
We set up the attack in Intruder. We use the provided password dictionary.
Body:
username=carlos¤t-password={pwd}&new-password-1=123&new-password-2=321
pwd here gets substituted with a password from the dictionary.
We launch the attack and sort by response length.
Password — ginger.
Lab solved!
More in this category
Arbitrary Object Injection in PHP (PortSwigger Lab)
Recovering leaked source code and injecting a serialized CustomTemplate object whose __destruct deletes an arbitrary file.
Using Application Functionality to Exploit Insecure Deserialization (PortSwigger Lab)
Tampering with the `avatar_link` field in the session object to delete an arbitrary file via the account-delete feature.
Modifying Serialized Data Types (PortSwigger Lab)
Abusing PHP loose comparison by changing the `access_token` type to integer `0` to bypass authentication.