> For the complete documentation index, see [llms.txt](https://hyggehalcyon.gitbook.io/page/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyggehalcyon.gitbook.io/page/ctfs/2023/findit-ctf-quals/discovered.md).

# Discovered

## Problem

<details>

<summary>Description</summary>

Bob finds a pdf file. He is sure there is important content in it but the pdf file is locked. Can you help him? (Bracket the flag with FindITCTF{})

</details>

## Solution

We're given a PDF with password protected. Let's extract the hash and crack the password using John The Ripper

```bash
$ pdf2john secret.pdf > hash
$ cat hash
```

> secret.pdf:$pdf$4*4*128\*-1060*1*16*fce8559bd3fcc84ba72dbad5638fcc20*32*c71748896b9831a45b01a477b9970c9800000000000000000000000000000000*32\*167b0cd8e21bbd37be65e1df44df6a7043f29c342635c1754fa81bc7fc029f7b

Next, we need to cut out the secret.pdf bit so it would look like this

> $pdf$4*4*128\*-1060*1*16*fce8559bd3fcc84ba72dbad5638fcc20*32*c71748896b9831a45b01a477b9970c9800000000000000000000000000000000*32\*167b0cd8e21bbd37be65e1df44df6a7043f29c342635c1754fa81bc7fc029f7b

With that done, we can start to crack the hash using john, we'll use the standard rockyou wordlist

```bash
$ john --wordlist=/usr/share/wordlists/rockyou.txt hash
$ john --show hash
```

> ?:LimitedEdition
>
> 1 password hash cracked, 0 left

Now we have retrieved the password, we can take a look of what's inside of the pdf file

<figure><img src="/files/P7mZm3Hsh5YWP46hpw1J" alt="" width="548"><figcaption><p>pdf contents</p></figcaption></figure>

Looks like we're presented with a emote cipher. After an intensive look up and bunch of wrong tool on the internet, we eventually stumbled upon this tool [`https://codepen.io/NostraDavid/pen/JjGBmxd`](https://codepen.io/NostraDavid/pen/JjGBmxd). There we can supply the emotes and it'll do the job for us

{% hint style="info" %}
in case anyone wants to copy the emotes

😐👴🤔 \_ 👽😐 \_ 🤯🤑👴🤔\_🥶🔠😔🥵🤯🤖 \_ 👴😐🤥🥱 \_ 😐🤯🤯🤤 \_ 🤔👴 \_ 🍤🔠😐🤤 \_ 🤔🥵🤯\_😔👽🤔🤔🤯🤖😐
{% endhint %}

## Flag

> ***FindITCTF{not\_an\_emot\_cipher\_only\_need\_to\_find\_the\_pattern}***


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hyggehalcyon.gitbook.io/page/ctfs/2023/findit-ctf-quals/discovered.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
