# Day 23

#### Task 29 — Hash cracking Day 23: You wanna know what happens to your hashes? <a href="#d70b" id="d70b"></a>

**1. Crack the hash value stored in `hash1.txt`. What was the password?**

1. Start the machine and Navigate to AOC2024
2. Here we can see the task files.
3. Type the below command to crack the hash value of `hash1.txt` using the John tool

```javascript
Copyjohn — format=raw-sha256 — rules=wordlist — wordlist=/usr/share/wordlists/rockyou.txt hash1.txt
Ans: fluffycat12
```

**2. What is the flag at the top of the `private.pdf` file?**

1. Type this command to get the hash value of the pdf `pdf2john.pl private.pdf > pdf.hash`
2. Now use the below command to crack the above stored hash. `john — rules=single — wordlist=wordlist.txt pdf.hash`
3. Let's Extract the contents of the pdf to a text file using the password — `pdftotext private.pdf -upw PASSWORD`
4. Finally, type this command to read the flag — `cat private.txt | grep THM`

```css
CopyAns: THM{do_not_GET_CAUGHT}
```


---

# 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://foothold.gitbook.io/blog/advent-of-cyber-2024/day-23.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.
