john-the-ripper

使用 John the Ripper 对离线密码哈希进行破解。适用于识别未知哈希格式、从本地数据库或 ZIP 文件中恢复遗忘密码、应对 CTF 哈希挑战,或审计自己系统中哈希强度等场景。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "john-the-ripper":https://skillpi.com/zh/skills/deepskill-1c61781afce687b1003ce1f0b7b6fcd5ae52613176bd5c269e47da32b9831f60。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 John the Ripper 对离线密码哈希进行破解。适用于识别未知哈希格式、从本地数据库或 ZIP 文件中恢复遗忘密码、应对 CTF 哈希挑战,或审计自己系统中哈希强度等场景。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: john-the-ripper
description: >-
  Crack password hashes offline with John the Ripper. Use when a user asks
  to identify an unknown hash format, recover a forgotten password from a
  local database or ZIP file, run a CTF hash challenge, or audit the
  strength of hashes from a system they own.
license: Apache-2.0
compatibility: 'John the Ripper 1.9+, Jumbo community build recommended'
metadata:
  author: terminal-skills
  version: 1.0.0
  category: devops
  tags:
    - john-the-ripper
    - password-cracking
    - hash-cracking
    - ctf
    - penetration-testing

John the Ripper

Overview

John the Ripper (JtR) is the classic offline password cracker. It identifies hash formats, runs dictionary, incremental (brute-force), and rule-based attacks, and ships *2john helpers that convert common file formats (ZIP, PDF, SSH keys, KeePass, LUKS) into crackable hashes. The community "Jumbo" fork supports hundreds of formats. JtR is CPU-oriented — use hashcat for GPU work on fast hashes.

Instructions

Step 1: Identify the Hash Format

# Let JtR guess
echo '$6$saltsalt$...' > unknown.hash
john unknown.hash
# Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])

# Or use hashid
hashid '$2a$12$R9h...'
# Analyzing '$2a$12$R9h...'
# [+] Blowfish(OpenBSD)
# [+] bcrypt

# List all supported formats
john --list=formats | tr ',' '\n' | grep -i bcrypt

Step 2: Convert Files into Crackable Hashes

# Password-protected ZIP
zip2john secret.zip > secret.hash
john secret.hash

# Password-protected PDF
pdf2john.pl confidential.pdf > pdf.hash
john pdf.hash

# Encrypted SSH private key
ssh2john id_rsa > idrsa.hash
john idrsa.hash

# KeePass database
keepass2john db.kdbx > kp.hash
john kp.hash

# macOS keychain, Office docs, LUKS, 1Password — *2john helpers ship in Jumbo
ls /usr/share/john/*2john*

Step 3: Run Attacks

# Wordlist attack
john --wordlist=/usr/share/wordlists/rockyou.txt secret.hash

# Wordlist + rules (mangles words: "Summer" → "Summer!", "summer2026", "S0mmer")
john --wordlist=rockyou.txt --rules=Jumbo secret.hash

# Incremental (brute-force) — use only against fast hashes or short passwords
john --incremental=ASCII secret.hash

# Mask attack — you know the pattern
john --mask='?u?l?l?l?l?d?d?d?d' secret.hash
# ?u upper, ?l lower, ?d digit, ?s symbol, ?a all

# Limit duration; resume later
john --max-run-time=3600 secret.hash
john --restore

Step 4: Show and Export Results

# Display cracked results
john --show secret.hash
# secret.zip:hunter2:::::secret.zip

# Only count / only uncracked
john --show=left secret.hash

# Pot file (already-cracked cache) lives at ~/.john/john.pot
cat ~/.john/john.pot

# Export cracked passwords, one per line
john --show secret.hash | awk -F: 'NF>1 {print $2}'

Step 5: Tuning and Multi-Core

# All CPU cores (OpenMP builds)
john --fork=8 secret.hash

# Distribute across machines (node 1 of 4)
john --node=1/4 --fork=8 secret.hash

# Benchmark your hardware
john --test --format=bcrypt
john --test --format=sha512crypt

Examples

Example 1: Crack an /etc/shadow Entry (Own System)

# On the system you own
sudo cp /etc/shadow /tmp/shadow
sudo cp /etc/passwd /tmp/passwd
chmod 644 /tmp/shadow /tmp/passwd

# Combine into JtR input
unshadow /tmp/passwd /tmp/shadow > creds.txt
head -1 creds.txt
# root:$6$abc...:0:0:root:/root:/bin/bash

john --wordlist=/usr/share/wordlists/rockyou.txt --rules=Single creds.txt
john --show creds.txt
# root:hunter2:0:0:root:/root:/bin/bash

rm /tmp/shadow /tmp/passwd creds.txt

Example 2: CTF — Recover a ZIP Password

# Given challenge.zip from a CTF
zip2john challenge.zip > zip.hash
cat zip.hash
# challenge.zip:$zip2$*0*3*0*...*$/zip2$:::challenge.zip

# Try rockyou first
john --wordlist=/usr/share/wordlists/rockyou.txt zip.hash

# Add rules if the straight dictionary fails
john --wordlist=rockyou.txt --rules=KoreLogic zip.hash

# Show the result
john --show zip.hash
# challenge.zip:flag2026

# Unzip with the recovered password
unzip -P flag2026 challenge.zip

Guidelines

  • Only crack hashes you own or are authorized to crack. Possessing and cracking third-party hashes without permission is illegal in most jurisdictions.
  • Always identify the hash format first — picking the wrong one wastes hours or produces silent miscracks.
  • The "Jumbo" community build (john-jumbo) supports far more formats than upstream. Install via your distro or compile from source.
  • Order of attacks: wordlist → wordlist+rules → mask (if you know the pattern) → incremental. Don't start with brute-force.
  • Fast hashes (MD5, NTLM, SHA1) belong on hashcat with a GPU. JtR excels at slow hashes (bcrypt, sha512crypt, PBKDF2).
  • Use --fork=N on multi-core systems; default JtR only uses one thread.
  • Save partial work — JtR writes progress to ~/.john/john.rec every minute. john --restore resumes.
  • The john.pot file is your institutional memory. Back it up so you never crack the same hash twice.

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 John the Ripper 的完整离线密码破解工作流,涵盖哈希识别、文件转换、多种攻击模式和结果导出
  • 适用于 CTF 挑战、密码恢复、系统审计等高频安全场景,具有明确实用价值
触发精准88/100

亮点

  • 触发描述清晰覆盖识别未知哈希、恢复密码、CTF 挑战、审计哈希强度等核心场景,边界明确
结构规范92/100

亮点

  • 文档结构清晰,分步骤说明,包含多个端到端示例,frontmatter 完整规范
执行可靠78/100

待提升项

  • 缺少对关键操作的显式确认机制 原报告严重程度:轻微

    Skill 未在关键操作(如开始破解)前要求用户确认是否拥有哈希或获得授权

    改进建议:建议在 Step 3 运行攻击前添加确认提示,例如 '请确认您拥有此哈希或已获得授权'

亮点

  • 工具来源明确,参数使用正确,覆盖主要异常处理和多核调优
证据可验 (前四项均值)86/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 管理员或提升权限

    确认确有必要再提升权限;不要关闭防护、绕过证书验证或扩大整个系统的访问权限。

    主文档提及 · 第 129, 130 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。