> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/web/authentication/password-brute-force-via-password-change.md).

# Password Brute Force via Password Change Functionality

Password Brute Force via Password Change Functionality notes for PortSwigger Web Security Academy labs, including exploitation workflow, payload testing, Burp Suite validation, and remediation context

### Password Brute-force via Password Change

This lab presents a vulnerability in the functionality of **password change**, allowing an attack by **brute force**. / The goal is to identify the password of **Carlos**, then to access its page \*\*

**Provided credentials:**

* User: `wiener`
* Password: `peter`

**Target user:**

* `carlos`

A section allows you to change the password after authentication. / When an incorrect **current password** is provided, the application returns a specific error message.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b28b2b93c3c2f8c2b40b13ba25a0e4fb6e224b05%2F%7BDC9BF2F7-E41F-4D00-ADF9-7111E3DBF354%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Example of a request sent by the application:

{% code overflow="wrap" %}

```bash
username=wiener&current-password=test&new-password-1=test1234&new-password-2=test123
```

{% endcode %}

If the `current-password` field is invalid, the displayed error indicates that the current password is incorrect.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e2878fffa7229fc9a42c61bc57ea36721199917c%2F%7B498293B7-D204-419C-A18B-8BC457FB303A%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

When replacing `wiener` with `carlos` in the query, **the error message remains the same**, as long as the password tested is not the right.configure a Burp Intruder attack

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b08fe73486c2f05bd5e404e7a9b5470e007bd9e3%2F%7BE3795651-6554-4698-B348-00BE94804022%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

However, for **the correct password**, the error message changes\:/ instead of the incorrect password, the application indicates that **identification information does not match**.

This difference in response allows us to **distinguish a valid password from an invalid**.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-fd1d049f8656f4a739ba6652b1c93cf983237e54%2F%7B527509D2-E1A4-41E7-A224-3A9100A5010C%7D.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/web/authentication/password-brute-force-via-password-change.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
