# Weird File

## Problem

> What could go wrong if we let Word documents run programs? (aka "in-the-clear"). Download file.

* [Document](https://github.com/HHousen/PicoCTF-2021/blob/master/Forensics/Weird%20File/weird.docm)

## Solution

1. Download the file and open it in Word or LibreOffice. In LibreOffice, go to Tools > Marcos > Edit Macros. Then, on the left, navigate to weird.docm > Project > Document Objects > ThisDocument. Here, you will see the Python program that prints the string `cGljb0NURnttNGNyMHNfcl9kNG5nM3IwdXN9`.
2. Putting the above string into [CyberChef](https://gchq.github.io/CyberChef) and using the magic block produces the flag.

### Flag

`picoCTF{m4cr0s_r_d4ng3r0us}`


---

# 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://picoctf2021.haydenhousen.com/forensics/weird-file.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.
