
Competition ZIP Archive
FreeSpecialized tool for encrypted ZIP archive challenges.
Free · Opens the source repo
What Competition ZIP Archive does
The Competition ZIP Archive skill is designed for use within the context of a CTF (Capture The Flag) sandbox environment, specifically as a downstream tool following the $ctf-sandbox-orchestrator. It provides a focused approach to tackling challenges involving encrypted ZIP and PKZIP archives, particularly those utilizing legacy ZipCrypto encryption. This skill is not a standalone tool; it requires the $ctf-sandbox-orchestrator to first establish the necessary sandbox conditions and project parameters before it can be effectively utilized.
This skill is particularly useful for users who need to solve encrypted ZIP challenges without resorting to brute force methods. Instead, it emphasizes the use of known-plaintext attacks, which can be significantly more efficient when the challenge provides predictable file formats or contents. The workflow involves preserving the original archive, analyzing its structure, and recovering encryption keys using the bkcrack utility. The commands and processes are detailed, ensuring that users can follow a systematic approach to decrypting archives while maintaining evidence and integrity of the original files.
The skill is intended for developers and security researchers who are engaged in CTF competitions or similar environments where ZIP archive challenges are common. Users should have a foundational understanding of cryptography and familiarity with command-line tools, as the skill relies on specific commands and outputs to guide the decryption process. It also requires careful handling of files and evidence to ensure that all steps are documented and reproducible.
Overall, the Competition ZIP Archive skill streamlines the process of dealing with encrypted ZIP files in a controlled environment, allowing users to focus on solving challenges rather than getting bogged down in the complexities of cryptographic methods.
When to use it
Use this skill when working on CTF challenges that involve encrypted ZIP archives and you have known plaintext available.
When not to use it
Avoid using this skill for modern encryption methods like WinZip AES or when there's no reliable known plaintext available.
What you can build with it
CTF Challenge Decryption
Use this skill to efficiently decrypt challenges involving encrypted ZIP files during Capture The Flag competitions.
Legacy Encryption Analysis
Apply this skill to analyze and recover keys from ZIP archives that utilize legacy ZipCrypto encryption.
Known-Plaintext Recovery
Utilize the known-plaintext approach to recover keys from ZIP archives when predictable file formats are available.
How to install Competition ZIP Archive
View source1. Install with the skills CLI
npx skills add zhaoxuya520/reverse-skill/competition-zip-archive --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by zhaoxuya520Competition ZIP Archive
Use this skill only as a downstream specialization after $ctf-sandbox-orchestrator is active and has established sandbox assumptions, evidence priorities, and the analysis project root. If that has not happened yet, return to $ctf-sandbox-orchestrator first.
Use this skill when the decisive path is an encrypted ZIP/PKZIP archive rather than an upload parser or a generic crypto blob. Prefer the legacy ZipCrypto known-plaintext path when the challenge gives a predictable file, format header, template, or other recoverable plaintext. Do not begin with blind password brute force.
Reply in Simplified Chinese unless the user explicitly requests English. Keep commands and tool output in their original form.
Quick Start
- Preserve the original archive, compute a hash, and work on a copy under the analysis project's
work/<case>/directory. - Confirm the actual archive format and list entries before attempting a password attack.
- Determine whether the entry uses legacy ZipCrypto.
bkcrackdoes not recover WinZip AES or other modern encryption. - Build an exact known-plaintext candidate. The attack needs at least 12 known plaintext bytes, including at least 8 contiguous bytes.
- Recover the internal keys with
bkcrack, then create an unencrypted copy and extract it. - Preserve the command, entry names, known-plaintext source, recovered keys, output hash, and final flag as evidence.
Tool Setup
Use the normal tool index and bootstrap path before guessing an executable location:
powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/refresh-tool-index.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/bootstrap-reverse.ps1 -Capability bkcrack
On Kali, use the equivalent capability command:
bash kali/scripts/bootstrap-reverse.sh bkcrack
The Windows capability is pinned to the v1.8.1 release and verifies the GitHub asset digest. If the tool is installed manually, refresh skills/tool-index.md afterward.
Workflow
1. Establish Archive Truth
Keep the original immutable and record:
sha256sum challenge.zip
file challenge.zip
bkcrack -L challenge.zip
On Windows, use Get-FileHash in place of sha256sum. bkcrack -L shows entry names, compression methods, and encryption status. Do not infer the encryption type from the .zip extension alone.
Check the entry that will provide the known plaintext. A useful candidate is a stored or otherwise predictable file such as a PNG, PDF, text template, or challenge-generated configuration. A local ZIP header (PK\x03\x04) is metadata for the archive entry, not plaintext inside the encrypted member, so it is not by itself a useful known-plaintext sample.
2. Recover Keys With Known Plaintext
When the ciphertext entry is flag.txt and a matching plaintext entry is available in known.zip:
bkcrack -C challenge.zip -c flag.txt -P known.zip -p flag.txt
For raw ciphertext and plaintext files:
bkcrack -c cipherfile -p plainfile
The plaintext must match the bytes represented in the encrypted entry. If the entry was deflated, an uncompressed copy of the file is not automatically the right input; use a matching ZIP fixture or the exact compressed bytes.
If the known bytes begin at an offset, add -o <offset>. If only 8-11 bytes are contiguous, combine them with other known bytes using sparse hints:
bkcrack -c cipherfile -p plainfile -x 25 4b4f -x 30 21
The successful run yields three internal ZipCrypto keys. Record them exactly as printed; they are not the original password.
3. Unlock And Validate
Use the recovered keys to make a new archive, leaving the source untouched:
bkcrack -C challenge.zip -k K0 K1 K2 -D unlocked.zip
7z t unlocked.zip
7z x unlocked.zip -ounpacked
Replace K0 K1 K2 with the hexadecimal values printed by bkcrack. Validate the output with the archive test command and a hash or exact flag comparison. If only one raw member is needed, -d can write its deciphered bytes; deflated raw data may need the inflate.py helper shipped with bkcrack.
4. Re-route When Preconditions Fail
- WinZip AES or another modern encryption mode: stop this path and identify the challenge-specific primitive.
- No reliable known plaintext: inspect filenames, metadata, compression choices, challenge source, and other entries before considering password recovery.
- Known plaintext shorter than the requirement: locate more contiguous bytes or use evidence-backed sparse offsets.
- The problem is an application upload/parser chain: hand off to
$competition-file-parser-chain. - The problem is a generic ciphertext or custom cipher after archive extraction: hand off to
$competition-crypto-mobile.
Evidence To Preserve
- Original and working-copy paths plus SHA-256 hashes
bkcrack -Loutput and the selected encrypted member- Exact plaintext fixture, compression method, offsets, and sparse byte hints
- Key recovery command and the three recovered internal keys
unlocked.zipvalidation output, extraction path, and final artifact hash
Read references/zip-archive.md for the decision table and evidence checklist.
Frequently asked questions about Competition ZIP Archive
Similar skills
Cloudflare Security Audit
Perform authorized security audits on codebases.
Authenticated Scan with OpenVAS
Perform deep vulnerability scans using OpenVAS with credentials.
Active Directory Penetration Test
Conduct focused AD penetration tests with ease.
Active Directory BloodHound Analysis
Visualize Active Directory attack paths and risks.
Orchestrating LLM Attacks with PyRIT
Automate multi-turn adversarial attacks against LLMs.
Operating Sliver C2
Deploy and manage Sliver C2 for red-team engagements.
