# Empire1

## Problem

> Psst, Agent 513, now that you're an employee of Evil Empire Co., try to get their secrets off the company website. <https://2019shell1.picoctf.com/problem/27357/> (link) Can you first find the secret code they assigned to you? or <http://2019shell1.picoctf.com:27357>

* [Website](https://2019shell1.picoctf.com/problem/27357/)

## Solution

1. Create an account and sign in
2. Attempt to add a todo of `{{config}}` (since this is a flask application and that would leak important configuration details about the application)
3. Most likely the add todo is using an `INSERT` SQL statement so try concat: `string'||'concated?'||'`. It works!
4. Run `'||(select secret from user)||'` but only gets one secret
5. So use a group\_concat to get all secrets: `' || (select group_concat(secret) from user) || '`

### Flag

`picoCTF{wh00t_it_a_sql_inject9899be1a}`


---

# 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://picoctf2019.haydenhousen.com/web-exploitation/empire1.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.
