# no pass needed

## Description

It's all about who you know and I know 'admin'.

<http://web.chal.csaw.io:5001>

## Solution

* The username is reflected back into the username field (its `value` attribute) after failed authentication
* By fuzzing username inputs, we can find that anything after a whitespace is removed.
* Furthermore, 'admin' is replaced **non-recursively**.

We can exploit an SQL injection in the username parameter. The payload is:

```
username=adadminmin';#&password=
```

This will translate to the query:

```
SELECT * FROM users WHERE username='admin';#
```

The flag is `flag{wh0_n3ed5_a_p4ssw0rd_anyw4y}`.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ctf.zeyu2001.com/2021/csaw-ctf-qualification-round-2021/no-pass-needed.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
