competition-zip-archive
Helps your agent solve challenges with encrypted ZIP files. It can identify old encryption methods and recover keys to extract the content.
What it does
This tool helps open password-protected ZIP archives using an old method called ZipCrypto. It can recover the password if you have a piece of the original file and a piece of the unzipped content.
When to use it
- ✓When you have a password-protected ZIP file and a known piece of its original content.
- ✓To check if a ZIP file uses the old ZipCrypto encryption method.
- ✓To try and recover a ZIP file's password when you have an example of what should be inside.
Example of what to ask your AI
“I have a password-protected zip file and a text file that I know is inside it. Can you help me open the zip?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool compares an encrypted file with a known plaintext file to find the secret key. It then uses this key to create a new, unencrypted version of the ZIP file that you can open normally.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add zhaoxuya520/reverse-skill --skill competition-zip-archiveOr download just the file:
curl -L https://raw.githubusercontent.com/zhaoxuya520/reverse-skill/main/CTF-Sandbox-Orchestrator/competition-zip-archive/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Competition 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.
…
FAQ
What is ZipCrypto?
It's an older, less secure method of encrypting files within ZIP archives. Newer tools might not be able to break it.
What is 'known-plaintext'?
It's a piece of data that you know is inside the encrypted file, and you also have an unencrypted copy of it. This helps the tool figure out the password.
What if the ZIP file uses a more modern encryption type?
This tool only works with the old ZipCrypto method. If it's a newer type (like AES), you'll need to use a different tool.
Details
Original description by the author
Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for ZIP and PKZIP archive challenges, legacy ZipCrypto identification, known-plaintext recovery with bkcrack, key-based decryption, and reproducible extraction. Use when the user asks to solve an encrypted ZIP challenge, inspect ZipCrypto metadata, recover keys from a known file prefix, or unlock an archive without starti
Popularity
- GitHub stars
- 42k
- Ranking position
- #4744
- License
- MIT
- Updated
- 9/22/2026
Comments
- …
More skills from this repository
competition-ad-certificate-abuse
Helps your agent analyze attacks on digital certificate systems. It investigates how certificates can be misused to gain access.
zhaoxuya520/reverse-skill
competition-agent-cloud
Helps your agent analyze security challenges in AI and cloud systems. It investigates how prompts, tools, and the cloud can be exploited.
zhaoxuya520/reverse-skill
competition-android-hooking
Helps your agent investigate Android applications. It analyzes how apps work internally and how they might be modified or exploited.
zhaoxuya520/reverse-skill
competition-browser-persistence
Helps your agent analyze how websites store information in your browser. It investigates cookies and other data to understand how sessions work.
zhaoxuya520/reverse-skill
Similar skills
cpp-testing
Makes your agent write and improve tests for C++ code. It helps set up testing tools and fix errors.
affaan-m/ECC
csharp-testing
Helps your agent create tests for C# and .NET code. It uses best practices to ensure tests are efficient and reliable.
affaan-m/ECC
django-tdd
Enables your agent to apply testing strategies for Django with pytest-django and TDD. It's useful for writing robust tests and ensuring code quality, especially for DRF APIs.
affaan-m/ECC