> 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/information-disclosure/authentication-bypass-via-information-disclosure.md).

# Authentication Bypass via Information Disclosure

Authentication Bypass via Information Disclosure notes for PortSwigger Web Security Academy labs, including exploitation workflow, payload testing, Burp Suite validation, and remediation context.

### Authentication Bypass via Information Disclosure

The application administration interface includes an authentication bypass mechanism. This is based on a custom HTTP header used by the front-end, but unknown a priori. / To solve the lab, you need to identify the name of this header, use it to bypass authentication, access the administration interface and delete user **carlos**.

**Initial access to the administration interface**

An attempt to access the admin page directly via the `/admin` route returns the following message:

> *Admin interface only available to local users*

This indicates that access is restricted to requests from the local host.

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f681f0c735bb08ffdf00297929a33f4133baff29%2Fimage%20(204).png?alt=media" alt=""><figcaption></figcaption></figure>

**Disclosure of information via TRACE method**

By sending an HTTP query with the `TRACE` method to `/admin`, the server returns more headers than needed.

```bash
TRACE /admin
```

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-41b0835ac4449ed868da1aadde12a3b2da9aca72%2Fimage%20(205).png?alt=media" alt=""><figcaption></figcaption></figure>

Among this information, a custom header is revealed:

```bash
X-Custom-Ip-Authorization
```

This header is used by the front-end to determine if the query comes from a local user.

**Contouring authentication**

Adding the following header to a query to `/admin`:

```bash
X-Custom-Ip-Authorization: 127.0.0.1
```

<figure><img src="https://131707722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1ac974f2d2da9b368b93cc49ae5523c7cd1fabec%2Fimage%20(206).png?alt=media" alt=""><figcaption></figcaption></figure>

the server considers the request local. / The administration interface then becomes accessible without additional authentication.

**Final Exploitation**

Once connected to the administration panel, it is possible to remove the target user by accessing the following URL:

```bash
/admin/delete?username=carlos
```


---

# 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/information-disclosure/authentication-bypass-via-information-disclosure.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.
