Rating: 4.0
# \[Crypto\] - Result
#### Points = 100
## Prompt
I really want to know my test result, but unfortunately its additionally protected. I attached the email. Maybe you can help?
Author
rugo|RedRocket
#### Hints
\[None\]
## Provided Files
[files](../../files/cybersecurityrumble/result) - link to files
- result.tar.gz
- a tarball with an email inside.
## Write Up
- now the email says that the password for the pdf is a postal code.
- this means the password is five digits, we can brute force this.
#### brute forcing the pdf password
- first extract the hash using [pdf2john](https://github.com/truongkma/ctf-tools/blob/master/John/run/pdf2john.py)
![image info](../images/cybersecurityrumble/pdf_hash.png)
- your ouput from pdf2john should look like this, the highlighted part is what we're interested in.
- we can now crack this in hashcat using the following command.
- `hashcat -a 3 -m 10700 -o out.txt '<hash>' ?d?d?d?d?d`
- `-a 3` specifies attack mode #3, bruteforce
- `-m 10700` this is the hash type, optional because hashcat can autodetect hashes
- `-o out.txt` specifies the output file
- `?d?d?d?d?d` a mask of 5 `?d` chars which refers to digits 0-9
- now if we look at out.txt, we can see the cracked password
![image info](../images/cybersecurityrumble/hashcat_result.png)
- now we can use this password to unlock the pdf which contains the flag
## Flag
CSR{BigBigEntropy}