> For the complete documentation index, see [llms.txt](https://thomasbui.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thomasbui.gitbook.io/blog/software-security/ctfs-write-ups/writeups-picoctf-collection/https-github.com-m14ghost-picoctf-2019-writeup/web-exploitation-1/logon.md).

# logon

Point: 100

## Category

Web Exploitation

## Question

The factory is hiding things from all of its users. Can you login as logon and find what they've been looking at? <https://2019shell1.picoctf.com/problem/12284/> [(link)](https://2019shell1.picoctf.com/problem/12284/) or <http://2019shell1.picoctf.com:12284>

## Hint

Hmm it doesn't seem to check anyone's password, except for 's?

## Solution

After login, We'll check source code but nothing to get.

We decided to check cookie of this website using [EditThisCookie](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?hl=en-US) extension on Google Chrome. We'll see a username: admin with value: False.

![EditThisCookie](https://github.com/m14ghost/PicoCTF-2019-Writeup/blob/master/Web%20Exploitation/Editthiscookie.png)

Try to change value to True then open source code again, we've got the flag

```bash
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Factory Login</title>


    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">

    <link href="https://getbootstrap.com/docs/3.3/examples/jumbotron-narrow/jumbotron-narrow.css" rel="stylesheet">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</head>

<body>

    <div class="container">
        <div class="header">
            <nav>
                <ul class="nav nav-pills pull-right">
                    <li role="presentation" class="active"><a href="/">Home</a>
                    </li>
                    <li role="presentation"><a href="/logout" class="btn btn-link pull-right">Sign Out</a>
                    </li>
                </ul>
            </nav>
            <h3 class="text-muted">Factory Login</h3>
        </div>

        <div class="jumbotron">
            <p class="lead"></p>
            <p style="text-align:center; font-size:30px;"><b>Flag</b>: <code>picoCTF{th3_c0nsp1r4cy_l1v3s_6f2c20e9}</code></p>
        </div>


        <footer class="footer">
            <p>&copy; PicoCTF 2019</p>
        </footer>

    </div>
</body>
</html>
```

## Flag

picoCTF{th3\_c0nsp1r4cy\_l1v3s\_6f2c20e9}


---

# 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://thomasbui.gitbook.io/blog/software-security/ctfs-write-ups/writeups-picoctf-collection/https-github.com-m14ghost-picoctf-2019-writeup/web-exploitation-1/logon.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.
