competition-zip-archive
하는 일
이 도구는 ZipCrypto라는 오래된 방식으로 암호가 걸린 ZIP 압축 파일을 여는 데 도움을 줍니다. 원본 파일의 일부와 압축을 푼 내용의 일부가 있으면 암호를 복구할 수 있습니다.
사용하는 경우
- ✓암호가 걸린 ZIP 파일과 그 안에 든 파일의 일부 내용을 알고 있을 때.
- ✓ZIP 파일이 오래된 ZipCrypto 암호화 방식을 쓰는지 확인하고 싶을 때.
- ✓파일 안에 들어 있어야 할 내용의 예시가 있을 때 ZIP 파일의 암호를 복구하려는 경우.
스킬 링크
https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/competition-zip-archive/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“암호가 걸린 zip 파일이 있고, 그 안에 있는 것으로 알고 있는 텍스트 파일도 있습니다. 이 zip 파일을 열 수 있도록 도와주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 암호화된 파일과 내용을 알고 있는 원본 파일을 비교해 비밀 키를 찾아냅니다. 그다음 그 키로 암호가 없는 새 ZIP 파일을 만들어, 일반적으로 열 수 있게 해 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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.
…
자주 묻는 질문
ZipCrypto란 무엇인가요?
ZIP 압축 파일 안의 파일을 암호화하는 오래되고 덜 안전한 방식입니다. 최신 도구는 이를 깨지 못할 수도 있습니다.
'알려진 평문(known-plaintext)'이란 무엇인가요?
암호화된 파일 안에 들어 있다는 것을 알고 있는 데이터이며, 그 원본 사본도 가지고 있는 것입니다. 이 정보가 있으면 도구가 암호를 찾는 데 도움이 됩니다.
더 최신 암호화 방식을 쓰는 ZIP 파일이면 어떻게 하나요?
이 도구는 오래된 ZipCrypto 방식에서만 작동합니다. AES 같은 최신 방식이라면 다른 도구를 써야 합니다.
상세 정보
작성자의 원본 설명
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
인기도
- GitHub 스타
- 42k
- 순위
- #6457
- 라이선스
- MIT
- 업데이트
- 2026. 9. 22.
댓글
- …
이 저장소의 다른 스킬
competition-ad-certificate-abuse
42k에이전트가 디지털 인증서 시스템에 대한 공격을 분석하도록 돕습니다. 인증서가 접근 권한을 얻는 데 어떻게 악용될 수 있는지 조사합니다.
competition-agent-cloud
42k에이전트가 AI와 클라우드 시스템의 보안 과제를 분석하도록 돕습니다. 프롬프트, 도구, 클라우드가 어떻게 악용될 수 있는지 조사합니다.
competition-android-hooking
42k에이전트가 안드로이드 애플리케이션을 조사하도록 돕습니다. 앱이 내부적으로 어떻게 작동하는지, 어떻게 변경되거나 악용될 수 있는지 분석합니다.
competition-browser-persistence
42k에이전트가 웹사이트가 브라우저에 정보를 저장하는 방식을 분석하도록 돕습니다. 쿠키와 기타 데이터를 조사해 세션이 어떻게 작동하는지 이해합니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.