# Athackcon CTF 2021

## [Github](https://github.com/Diefunction/tcc-ctf)

A Github repository that contains all challenges.

## Environment setup on Ubuntu

### Requirments

* Install docker-engine
* Install docker-compose

Install Docker and docker-compose.

```bash
# Update apt package index
sudo apt update
# Allow apt to use repository over HTTPS
sudo apt install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# X86_64 / amd64
echo \
    "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Update apt package index
sudo apt update

# Install the latest version of docker engine and containerd.
sudo apt-get install docker-ce docker-ce-cli containerd.io

# Download docker-compose version 1.29
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# Apply executable permissions to the binary
sudo chmod +x /usr/local/bin/docker-compose

# Add user to docker group
sudo usermod -aG docker $(whoami)
```

Reboot the machine.

```
sudo reboot
```

Install git.

```bash
sudo apt install git
```

Clone the repository.

```bash
git clone https://github.com/Diefunction/tcc-ctf.git
```

After cloning the repository change the current directory to the repository directory.

```
cd tcc-ctf
```

Builds Docker images from Dockerfiles.

```
docker-compose build
```

Create and start containers

```
docker-compose up
```

## Challenges

| Name                                                                        | IPAddress      | Flag                  |
| --------------------------------------------------------------------------- | -------------- | --------------------- |
| [Trust](https://blog.diefunction.io/ctf/technology-control-company/trust)   | 127.0.0.1:8000 | /usr/src/app/flag.txt |
| [Config](https://blog.diefunction.io/ctf/technology-control-company/trust)  | 127.0.0.1:8001 | /flag/flag.txt        |
| [Extend](https://blog.diefunction.io/ctf/technology-control-company/extend) | 127.0.0.1:8002 | /usr/src/app/flag.txt |
| [Poison](https://blog.diefunction.io/ctf/technology-control-company/poison) | 127.0.0.1:8003 | /usr/src/app/flag.txt |


---

# 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://blog.diefunction.io/ctf/technology-control-company/athackcon-ctf-2021.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.
