跳到正文
cccskills
免费在 GitHub 公开

competition-zip-archive

Analyze encrypted ZIP challenges in a CTF sandbox and use bkcrack to recover legacy ZipCrypto keys from known file contents. Create a decrypted archive, validate extraction, and preserve the commands and evidence needed to reproduce the result.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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 starting with password brute force. Use only after `$ctf-sandbox-orchestrator` has already established sandbox assumptions and routed here.

查看安装方法

适用场景

  • Identify the encryption used by a ZIP archive
  • Recover ZipCrypto keys from known file contents
  • Validate and extract a decrypted archive
  • Document reproducible evidence for a ZIP challenge

包含的文件(3)

  • SKILL.md5.7 KB
  • agents/openai.yaml413 B
  • references/zip-archive.md2.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

  1. Preserve the original archive, compute a hash, and work on a copy under the analysis project's work/<case>/ directory.
  2. Confirm the actual archive format and list entries before attempting a password attack.
  3. Determine whether the entry uses legacy ZipCrypto. bkcrack does not recover WinZip AES or other modern encryption.
  4. Build an exact known-plaintext candidate. The attack needs at least 12 known plaintext bytes, including at least 8 contiguous bytes.
  5. Recover the internal keys with bkcrack, then create an unencrypted copy and extract it.
  6. 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 -L output 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.zip validation output, extraction path, and final artifact hash

Read references/zip-archive.md for the decision table and evidence checklist.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Assess authorized APIs through a ten-stage workflow covering endpoint discovery, authentication, access permissions, input handling, and request limits. Collect reproducible evidence and turn findings into regression checks that can run in a development pipeline.

中文简介正在准备中。当前显示英语简介。

  • Review API authentication and access permissions
  • Assess GraphQL and WebSocket security
  • Check request limits and unintended data exposure
zhaoxuya520/reverse-skill4.3万2026年9月22日 更新

Inspect Android APKs from the command line to understand app logic, permissions, and components. Supports Java decompilation, low-level code edits, rebuilding and signing, plus Frida observation of running methods and routing to native code analysis.

中文简介正在准备中。当前显示英语简介。

  • Inspecting APK entry points, components, and permissions
  • Locating login, signing, and certificate checks
  • Editing smali code and rebuilding an APK
zhaoxuya520/reverse-skill4.3万2026年9月22日 更新

Plan and coordinate authorized penetration tests across multiple stages, from reconnaissance to access, privilege escalation, movement between systems, and impact assessment. Assign specialist skills, revise blocked paths, and maintain evidence and progress records for the final report.

中文简介正在准备中。当前显示英语简介。

  • Plan a penetration test across multiple stages
  • Assess how far a vulnerability could lead
  • Replan from existing credentials or system access
zhaoxuya520/reverse-skill4.3万2026年9月22日 更新

Transfer known function and variable names from an older binary to a newer version. Compare disassembly and pseudocode with an LLM, produce structured mappings, and apply names and comments in IDA.

中文简介正在准备中。当前显示英语简介。

  • Migrate known function names after a software update
  • Locate kernel functions when the new PDB is unavailable
  • Find updated function addresses and structure offsets
zhaoxuya520/reverse-skill4.3万2026年9月22日 更新

Inspect compiled programs in Binary Ninja using strings, function references, and intermediate representations—views of program logic at different levels. Trace data flow and report findings with addresses, supporting evidence, confidence, and reproduction steps.

中文简介正在准备中。当前显示英语简介。

  • Tracing function calls and data flow in Binary Ninja
  • Cross-checking findings from other disassemblers
  • Automating binary analysis with the Python API
zhaoxuya520/reverse-skill4.3万2026年9月22日 更新

Automate website navigation, form filling, content collection, and Windows desktop interactions. The skill selects browser or desktop tools for the task and guides screenshot capture and desktop network traffic observation when needed.

中文简介正在准备中。当前显示英语简介。

  • Automating website login and form entry
  • Collecting page content and screenshots
  • Operating Windows desktop applications
zhaoxuya520/reverse-skill4.3万2026年9月22日 更新

查看 zhaoxuya520 的全部技能

报告此技能的问题