---
title: "John the Ripper"
weight: 20
description: "开源密码破解工具"
date: "2026-03-24T16:29:46+08:00"
lastmod: "2026-03-24T16:29:46+08:00"
---

## John the Ripper

John the Ripper 是一款开源密码破解工具，支持多种哈希算法和加密格式。

## 基础使用

### 自动检测哈希类型
```bash
john --format=raw-md5 hash.txt
```

### 指定格式破解
```bash
john --format=nt hash.txt
```

### 显示破解结果
```bash
john --show hash.txt
```

### 继续破解会话
```bash
john --restore
```

## 支持的哈希类型

- **Unix 密码** - DES、MD5、SHA256、SHA512
- **Windows** - LM、NTLM
- **数据库** - MySQL、Oracle、MSSQL
- **Web** - MD5、SHA1、bcrypt
- **加密文件** - ZIP、PDF、SSH

## 攻击模式

- **字典攻击** - 使用密码列表
- **暴力破解** - 穷举所有组合
- **增量模式** - 智能字符组合
- **外部模式** - 使用外部程序

## 功能特性

- **多平台支持** - Windows、Linux、macOS
- **自动检测** - 识别哈希类型
- **规则系统** - 密码变换规则
- **会话恢复** - 支持断点续破
- **社区支持** - 活跃的开源社区

## 常用格式

```bash
# Unix MD5
john --format=md5crypt hash.txt

# Windows NTLM
john --format=nt hash.txt

# WPA2
john --format=wpapsk hash.txt

# SSH 私钥
john --format=ssh hash.txt
```

## 参考资源

- [John the Ripper 官方](https://www.openwall.com/john/)
- [John the Ripper GitHub](https://github.com/openwall/john)