ZipCracker
Use this skill as a self-contained ZIP cracking package. Always prefer the bundled wrapper in scripts/openclaw_zipcracker.py over assuming the original repository still exists somewhere else.
Only use it for CTF, self-owned archives, or authorized security work. If the request sounds like unauthorized access to third-party data, refuse.
Quick Start
- 1. Collect the minimum inputs before running anything:
- - Target ZIP path.
- Whether the user already has a dictionary, a password pattern, a known plaintext file, a passwordless reference ZIP, or only a file signature guess.
- Whether the user wants the original ZIP password itself, or only wants extraction/recovery.
- Whether the archive is clearly ZIP-specific; do not force this skill onto
rar or 7z.
- 2. In ambiguous cases, inspect first:
CODEBLOCK0
Use the profile mode to surface pseudo-encryption, AES vs ZipCrypto mix, short-plaintext candidates, template KPA candidates, and recommended next commands.
- 3. Run the bundled wrapper:
CODEBLOCK1
- 4. Prefer the wrapper flags over ad-hoc environment variables:
- -
--auto-crc for short-plaintext CRC32 prompts. - INLINECODE4 to let the bundled engine follow up on template-KPA suggestions automatically.
- INLINECODE5 only when the user explicitly accepts a very large mask search.
- INLINECODE6 for huge wordlists.
- INLINECODE7 when the user only cares about extraction speed after a
bkcrack-based recovery. - INLINECODE9 only when the user explicitly wants interactive dependency installation attempts.
- 5. Keep the current working directory as the project directory that contains the target ZIP. The bundled engine resolves its own built-in dictionary relative to the skill, so custom relative paths for the target, plaintext, or dictionary still behave naturally.
Decision Tree
1. Start with the least-assumption path
When the user only says "crack this ZIP" or "analyze this archive", inspect first, then begin with the default flow:
CODEBLOCK2
Then:
CODEBLOCK3
This preserves the original ZipCracker mindset:
- - Try pseudo-encryption repair before brute force.
- Warn about AES and missing
pyzipper. - Use the built-in dictionary first.
- Fall back to the generated 1-6 digit numeric dictionary.
- Offer template-based KPA when the archive structure strongly suggests it.
Add --auto-crc only when short-plaintext recovery is likely relevant or when the user explicitly asks to try CRC32-style recovery.
2. Choose the main attack based on the best clue
- - If the user has a custom dictionary file or dictionary directory:
CODEBLOCK4
- - If the user knows the password shape, use a mask:
CODEBLOCK5
- - If the user has a full known plaintext file or a passwordless reference ZIP, use
-kpa:
CODEBLOCK6
- - If the known plaintext is partial, add offset and extra known bytes:
CODEBLOCK7
- - If the user only knows the file type or magic header, use a built-in template:
CODEBLOCK8
- - If the user wants pure
bkcrack recovery and does not want fallback methods:
CODEBLOCK9
3. Prefer the strongest clue instead of stacking random tactics
- - Full known plaintext beats mask guessing.
- Partial known plaintext plus
bkcrack usually beats blind dictionary work when at least some bytes are reliable. - A realistic custom wordlist beats the built-in defaults.
- A tight mask beats a giant generic wordlist.
- Template KPA is worth trying when the encrypted member looks like
png, zip, exe, or pcapng.
Solving Heuristics
Pseudo-encryption first
Do not jump directly into brute force when the request is vague. The bundled engine already attempts pseudo-encryption repair by clearing the encryption bit and validating extraction. Keep that behavior because many CTF ZIP tasks are fake-encrypted rather than truly protected.
Short plaintext CRC32 recovery
Use CRC32 recovery only for entries whose plaintext size is 1 to 6 bytes. This is not a generic password attack; it is a content recovery trick for tiny stored plaintexts. In OpenClaw, opt in with --auto-crc when the challenge obviously contains tiny files or the user asks to try CRC-based recovery.
KPA matching rules
When using -kpa, the engine reproduces the original matching strategy:
- - Prefer an encrypted member with the same full inner path.
- Otherwise prefer the same basename.
- If the plaintext ZIP contains exactly one usable file, use it automatically.
- If the encrypted ZIP contains exactly one encrypted regular file, use it automatically.
- If matching is ambiguous, supply
-c <inner-name> explicitly.
Partial KPA strength
Treat partial KPA as high-value only when the hints are meaningful. The original tool prints a warning when the known bytes are weak. In practice:
- - Aim for at least 12 known bytes total.
- Aim for at least 8 contiguous bytes.
- Add
-x byte fragments when you know fixed values like MZ, PE, or chunk markers.
Template KPA strategy
The bundled engine carries the original built-in templates:
- - INLINECODE25
- INLINECODE26
- INLINECODE27
- INLINECODE28
These are strongest when:
- - The encrypted member extension matches the template family.
- The file is
ZIP_STORED, or at least size-compatible with a known header pattern. - The user has no full plaintext but the file type is obvious.
If the user says "run the full default workflow", include --auto-template-kpa so OpenClaw does not stall at the follow-up prompt.
Dictionary and mask strategy
- - Start with the bundled defaults only when the user has no better clue.
- Use the user's dictionary immediately when they provide one.
- Use
--skip-dict-count for very large wordlists to avoid expensive upfront line counting. - Use
--auto-large-mask only after the user explicitly accepts the cost of a huge mask search. - Remember that the built-in default sequence is: bundled
password_list.txt then 1-6 digit numeric passwords.
AES and bkcrack caveats
- - WinZip AES is supported for dictionary and mask workflows when
pyzipper is available, but it is slower. - Fast in-memory known-plaintext validation only applies to legacy ZipCrypto, not WinZip AES.
- INLINECODE35 is the preferred path for full or partial KPA on ZipCrypto.
- Without
bkcrack, partial/template KPA should be explained as unavailable rather than pretending it was tried.
Execution Rules for OpenClaw
- - Default to
--profile before cracking when the user has not already provided a strong clue. - Use
scripts/openclaw_zipcracker.py as the command entrypoint. - Quote and show the exact command you ran in your response.
- Explain why the selected attack path matches the available clues.
- If a run fails, choose the next tactic based on evidence, not by blindly enumerating every flag.
- If dependencies are missing in a restricted environment, explain the blocker and the next best path. Do not imply AES KPA succeeded when it was skipped.
- If the user only wants the decrypted contents, prefer
--skip-orig-password-recovery after successful bkcrack extraction.
Command Patterns
CODEBLOCK10
CODEBLOCK11
- - Huge custom dictionary:
CODEBLOCK12
CODEBLOCK13
CODEBLOCK14
- - Partial known plaintext plus extra bytes:
CODEBLOCK15
CODEBLOCK16
References
- - Read
references/clawhub-final-submission.md when you need the final recommended Chinese and English storefront copy, tags, and default prompt for direct submission. - Read
references/clawhub-publishing-copy.md when you need polished listing copy, tags, and a prompt pack for ClawHub. - Read
references/clawhub-bilingual-copy.md when you need Chinese and English storefront copy with stronger marketing positioning. - Read
references/competitive-ctf-prompts.md when you want a sharper, more player-like default prompt or demo prompt. - Read
references/natural-language-command-examples.md when the user request is vague but contains clues that should map to a specific command. - Read
references/forward-test-report.md for the latest local pressure-test findings and wording adjustments. - Read
references/release-checklist.md before publishing or updating the skill on ClawHub. - Read
references/openclaw-workflow.md for the preflight-to-execution flow optimized for OpenClaw. - Read
references/attack-playbook.md for concrete user-intent-to-command mappings. - Read
references/ctf-techniques.md for the full reproduction of the tool's solving logic, clue prioritization, and troubleshooting heuristics.
ZipCracker
将此技能作为一个独立的ZIP破解包使用。始终优先使用scripts/openclaw_zipcracker.py中的捆绑封装脚本,而不是假设原始仓库仍存在于其他地方。
仅用于CTF竞赛、自有存档或授权安全工作。如果请求听起来像是未经授权访问第三方数据,请拒绝。
快速入门
- 1. 在运行任何操作前收集最少输入信息:
- - 目标ZIP路径。
- 用户是否已有字典、密码模式、已知明文文件、无密码参考ZIP,或仅有文件签名猜测。
- 用户是想要原始ZIP密码本身,还是仅想要提取/恢复。
- 存档是否明确为ZIP格式;不要将此技能强加于rar或7z格式。
- 2. 在模糊情况下,先进行检查:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --profile
使用分析模式来揭示伪加密、AES与ZipCrypto混合、短明文候选、模板KPA候选以及推荐的后续命令。
- 3. 运行捆绑封装脚本:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py ...
- 4. 优先使用封装脚本的标志而非临时环境变量:
- - --auto-crc用于短明文CRC32提示。
- --auto-template-kpa让捆绑引擎自动跟进模板KPA建议。
- --auto-large-mask仅在用户明确接受非常大的掩码搜索时使用。
- --skip-dict-count用于大型词表。
- --skip-orig-password-recovery当用户仅关心基于bkcrack恢复后的提取速度时使用。
- --allow-install-prompts仅在用户明确希望进行交互式依赖安装尝试时使用。
- 5. 保持当前工作目录为包含目标ZIP的项目目录。捆绑引擎会相对于技能目录解析其内置字典,因此目标、明文或字典的自定义相对路径仍能正常工作。
决策树
1. 从最少假设路径开始
当用户仅说破解这个ZIP或分析这个存档时,先进行检查,然后从默认流程开始:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --profile
然后:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --auto-template-kpa
这保留了原始ZipCracker的思维方式:
- - 在暴力破解前先尝试伪加密修复。
- 警告AES和缺少pyzipper。
- 首先使用内置字典。
- 回退到生成的1-6位数字字典。
- 当存档结构强烈暗示时,提供基于模板的KPA。
仅在短明文恢复可能相关或用户明确要求尝试CRC32式恢复时添加--auto-crc。
2. 根据最佳线索选择主要攻击方式
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py <字典或目录>
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py -m ?u?l?l?l?d?d
- - 如果用户有完整的已知明文文件或无密码参考ZIP,使用-kpa:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py -kpa <明文文件或zip>
- - 如果已知明文是部分的,添加偏移量和额外已知字节:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py -kpa <部分文件.bin> --kpa-offset 78 -x 0 4d5a
- - 如果用户只知道文件类型或魔数头部,使用内置模板:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --kpa-template png -c image.png
- - 如果用户想要纯bkcrack恢复且不想要回退方法:
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py -kpa <明文文件> --bkcrack
3. 优先使用最强线索而非堆叠随机策略
- - 完整已知明文优于掩码猜测。
- 当至少部分字节可靠时,部分已知明文加bkcrack通常优于盲目字典工作。
- 现实的自定义词表优于内置默认值。
- 紧凑的掩码优于巨大的通用词表。
- 当加密成员看起来像png、zip、exe或pcapng时,模板KPA值得尝试。
解决启发式方法
先检查伪加密
当请求模糊时,不要直接跳入暴力破解。捆绑引擎已通过清除加密位并验证提取来尝试伪加密修复。保持此行为,因为许多CTF ZIP任务是假加密而非真正受保护。
短明文CRC32恢复
仅对明文大小为1到6字节的条目使用CRC32恢复。这不是通用的密码攻击;它是针对微小存储明文的恢复技巧。在OpenClaw中,当挑战明显包含微小文件或用户要求尝试基于CRC的恢复时,使用--auto-crc选择加入。
KPA匹配规则
使用-kpa时,引擎重现原始匹配策略:
- - 优先选择具有相同完整内部路径的加密成员。
- 否则优先选择相同的基本文件名。
- 如果明文ZIP恰好包含一个可用文件,自动使用它。
- 如果加密ZIP恰好包含一个加密的常规文件,自动使用它。
- 如果匹配模糊,显式提供-c <内部名称>。
部分KPA强度
仅当提示有意义时,将部分KPA视为高价值。当已知字节较弱时,原始工具会打印警告。在实践中:
- - 目标至少12个已知字节总数。
- 目标至少8个连续字节。
- 当知道固定值如MZ、PE或块标记时,添加-x字节片段。
模板KPA策略
捆绑引擎携带原始内置模板:
这些在以下情况下最强:
- - 加密成员扩展名与模板系列匹配。
- 文件是ZIP_STORED,或至少大小与已知头部模式兼容。
- 用户没有完整明文但文件类型明显。
如果用户说运行完整的默认工作流,包括--auto-template-kpa,这样OpenClaw不会在后续提示处停滞。
字典和掩码策略
- - 仅当用户没有更好线索时,从捆绑默认值开始。
- 当用户提供字典时立即使用。
- 对于非常大的词表使用--skip-dict-count,避免昂贵的预先行计数。
- 仅在用户明确接受巨大掩码搜索的成本后使用--auto-large-mask。
- 记住内置默认序列是:捆绑的password_list.txt,然后是1-6位数字密码。
AES和bkcrack注意事项
- - 当pyzipper可用时,WinZip AES支持字典和掩码工作流,但速度较慢。
- 快速内存中已知明文验证仅适用于传统ZipCrypto,不适用于WinZip AES。
- bkcrack是ZipCrypto上完整或部分KPA的首选路径。
- 没有bkcrack时,应解释部分/模板KPA不可用,而非假装已尝试。
OpenClaw的执行规则
- - 当用户尚未提供强线索时,默认在破解前使用--profile。
- 使用scripts/openclaw_zipcracker.py作为命令入口点。
- 在回复中引用并显示您运行的确切命令。
- 解释为什么选择的攻击路径与可用线索匹配。
- 如果运行失败,基于证据选择下一个策略,而非盲目枚举每个标志。
- 如果在受限环境中缺少依赖项,解释障碍和下一个最佳路径。不要暗示AES KPA成功当它被跳过时。
- 如果用户只想要解密内容,在成功bkcrack提取后优先使用--skip-orig-password-recovery。
命令模式
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --profile
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --auto-template-kpa
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py --skip-dict-count <大型字典.txt>
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py -m ?l?l?l?l?d?d
bash
python3 <技能目录>/scripts/openclaw_zipcracker.py -kpa <明文.zip>