Hybrid
Hybrid
Platform: hackerlab | Category: Crypto | Type: Challenge | Difficulty: Medium | OS: Linux | Author: XESXOR | Date: 2026-04-06 | Status: Solved Techniques: zipcrypto_known_plaintext_attack, dictionary_password_cracking, hybrid_wordlist_attack, crc_based_password_verification, content_format_guessing
Summary
Task: Two password-protected ZIP archives using ZipCrypto Store encryption, each containing a part of the flag. Solution: Crack the second archive via dictionary attack (qwerty123), then use bkcrack known-plaintext attack on the first archive by guessing the content prefix from the second file's format.
Hybrid — Hackerlab
Description
На жёстком диске из коробки с барахолки вы нашли два зашифрованных архива. Вы открываете терминал и наливаете себе кофе. Похоже, ночь будет интересной.
English summary: On a hard drive from a flea market box, you found two encrypted archives. You open the terminal and pour yourself some coffee. Looks like tonight is going to be interesting.
Download: hybrid.zip containing:
first.zip— password-protected, containsfirst.txt(32 bytes, ZipCrypto Store)second.zip— password-protected, containssecond.txt(29 bytes, ZipCrypto Store)
Analysis
Initial reconnaissance
Extracting hybrid.zip reveals two nested password-protected ZIP archives. Examining them with 7z l -slt:
first.zip → first.txt (32 bytes, Method: ZipCrypto Store)
second.zip → second.txt (29 bytes, Method: ZipCrypto Store)
Key observations:
- ZipCrypto (traditional PKWARE encryption) — known to be weak, vulnerable to known-plaintext attacks
- Store method (no compression) — critical for bkcrack, since the plaintext is stored as-is inside the encrypted stream
- Small file sizes — 32 and 29 bytes respectively, suggesting short text content (likely flag parts)
Attack strategy
The task name "Hybrid" hints at needing multiple attack approaches:
- Dictionary/hybrid attack for one archive (common password)
- Known-plaintext attack (bkcrack) for the other (strong password, but predictable content)
Solution
Step 1: Crack second.zip — Dictionary attack
Tried a hybrid wordlist approach combining dictionary words with common number suffixes. Used Python's zipfile module for accurate CRC-based verification (important because fcrackzip with ZipCrypto produces many false positives due to the 1-byte check):
python read-only • copy allowed#!/usr/bin/env python3 import zipfile wordlist_path = "rockyou.txt" # or custom hybrid wordlist archive_path = "second.zip" zf = zipfile.ZipFile(archive_path) with open(wordlist_path, "r", encoding="latin-1") as f: for line in f: password = line.strip() try: zf.extractall(pwd=password.encode()) print(f"[+] Password found: {password}") break except (RuntimeError, zipfile.BadZipFile): continue
Result: Password is qwerty123
Extracted content of second.txt:
Second part: REDACTED}
(29 bytes including trailing newline)
Step 2: Crack first.zip — bkcrack known-plaintext attack
The password for first.zip was NOT in rockyou.txt (tested top 500k entries) and not found via hybrid dictionary attack. However, since both archives use ZipCrypto Store, they are vulnerable to bkcrack known-plaintext attack.
Guessing the plaintext
From second.txt's format ("Second part: ..."), we can infer that first.txt starts with "First part: " — that's 12 bytes, exactly the minimum required for bkcrack.
Create the known-plaintext file:
bash read-only • copy allowedprintf "First part: " > kp1.txt
Running bkcrack
bash read-only • copy allowedbkcrack -C first.zip -c first.txt -p kp1.txt
After approximately 15 minutes of computation, bkcrack recovered the internal ZipCrypto keys:
[+] Keys: d5a9be9a 8c4f9531 6d49916b
Step 3: Decrypt first.txt
Using the recovered keys to decrypt without needing the actual password:
bash read-only • copy allowedbkcrack -C first.zip -c first.txt -k d5a9be9a 8c4f9531 6d49916b -d first_decrypted.txt
Content of first_decrypted.txt:
First part: CODEBY{REDACTED
(32 bytes including trailing newline)
Step 4: Combine the flag
First part: CODEBY{REDACTED
Second part: REDACTED}
Full flag: CODEBY{REDACTED}
The flag in leetspeak reads: "ARE YOU SURE IT'S A STEGA?" — a humorous hint that despite appearances (encrypted archives, hidden content), this was a cryptography challenge, not steganography.