competition-zip-archive
Skill này làm gì
Công cụ này giúp mở các file ZIP có mật khẩu bằng một phương pháp cũ gọi là ZipCrypto. Nó có thể khôi phục mật khẩu nếu bạn có một phần nội dung gốc của file và một phần nội dung đã giải nén.
Khi nào nên dùng
- ✓Khi bạn có một file ZIP có mật khẩu và biết trước một phần nội dung của nó.
- ✓Để kiểm tra xem file ZIP có dùng phương pháp mã hóa ZipCrypto cũ không.
- ✓Khi muốn thử khôi phục mật khẩu của file ZIP nếu bạn có ví dụ về nội dung bên trong.
Liên kết skill
https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/competition-zip-archive/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi có một file zip có mật khẩu và một file văn bản tôi biết nằm bên trong. Bạn có thể giúp tôi mở file zip không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ so sánh file đã mã hóa với một file có nội dung đã biết để tìm ra khóa bí mật. Sau đó nó dùng khóa này để tạo một bản ZIP không mã hóa mới mà bạn có thể mở bình thường.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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.
…
Câu hỏi thường gặp
ZipCrypto là gì?
Đây là phương pháp mã hóa cũ và kém an toàn hơn cho file trong ZIP. Các công cụ mới có thể không phá được nó.
“Known-plaintext” là gì?
Đó là một đoạn dữ liệu bạn biết có trong file đã mã hóa, và bạn cũng có một bản không mã hóa của đoạn đó. Điều này giúp công cụ tìm ra mật khẩu.
Nếu file ZIP dùng kiểu mã hóa hiện đại hơn thì sao?
Công cụ này chỉ hoạt động với phương pháp ZipCrypto cũ. Nếu là kiểu mới hơn (như AES), bạn sẽ cần một công cụ khác.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 42k
- Vị trí xếp hạng
- #6457
- Giấy phép
- MIT
- Cập nhật
- 22/9/2026
Bình luận
- …
Thêm skill từ kho mã này
competition-ad-certificate-abuse
42kGiúp agent phân tích các cuộc tấn công nhắm vào hệ thống chứng chỉ số. Tìm hiểu cách chứng chỉ có thể bị lạm dụng để giành quyền truy cập.
competition-agent-cloud
42kGiúp agent phân tích các thách thức bảo mật trong hệ thống AI và đám mây. Tìm hiểu cách prompt, công cụ và đám mây có thể bị khai thác.
competition-android-hooking
42kGiúp agent điều tra các ứng dụng Android. Phân tích cách ứng dụng hoạt động bên trong và cách chúng có thể bị sửa đổi hoặc khai thác.
competition-browser-persistence
42kGiúp agent phân tích cách website lưu thông tin trên trình duyệt của bạn. Điều tra cookie và dữ liệu khác để hiểu cách phiên đăng nhập hoạt động.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.