Attacks Against Encrypted Files

Overview


Room URL: https://tryhackme.com/room/attacks-on-ecrypted-files-aoc2025-asdfghj123
Difficulty: Easy
Category: Password Cracking
Date Completed: 12/9/2025

Objectives


Table of Contents

Introduction
Walk Through
Lessons Learned
Resources


Introduction

In Wareville's ongoing battle against King Malhare's cyber operations, we've discovered that the true vulnerability lies not in modern encryption algorithms themselves, but in the passwords that protect them. Attackers rarely attempt to break encryption directly—it's computationally infeasible—instead focusing their efforts on password recovery through dictionary attacks and brute-force techniques. This challenge demonstrates how weak passwords create catastrophic security failures and how defenders must understand these attack methodologies to identify and prevent them. By analyzing encrypted files and recovering their passwords using industry-standard tools like pdfcrack and john, we gain critical insight into both offensive and defensive password security practices.

Password Recovery Tools

pdfcrack

john (John the Riiper)

Helper Utilities:

hashcat (Alternative)


Walk Through

  1. Start the target machine
  2. What is the flag inside the encrypted PDF?
    1. Can either use pdfcrack or pdf2john
    2. Used pdfcrack and the rockyou breach to crack the password
      1. pdfcrack -f flag.pdf -w /usr/share/wordlists/rockyou.txt
      2. password: naughtylist
    3. The only page of the document is the flag
    4. password1.png
  3. What is the flag inside the encrypted zip file?
    1. Can use fcrackzip or zip2john
    2. zip2john flag.zip > zip.txt
    3. john --wordlist=/usr/share/wordlists/rockyou.txt zip.txt
      1. winter4ever
    4. password2.png

Lessons Learned


Resources

TryHackMe
Hashcat
John the Ripper
PDF2John
Zip2John


Revision #1
Created 2025-12-09 17:14:37 UTC by David Rizzo
Updated 2025-12-09 17:16:02 UTC by David Rizzo