hippie-cycling/CBFT

GitHub: hippie-cycling/CBFT

一款模块化的命令行经典密码分析与暴力破解工具包,专为 CTF 挑战和密码学学习设计。

Stars: 0 | Forks: 0

# 密码暴力破解工具包 (CBFT) 一个全面、模块化的命令行工具包,用于经典密码分析、密码破解和自动化暴力破解。专为 CTF(Capture The Flag)挑战、密码学爱好者和逻辑解谜者设计。 ![CBFT Interface Concept](https://img.shields.io/badge/Python-3.8+-blue.svg) ![License](https://img.shields.io/badge/License-MIT-green.svg) ## 🚀 功能 CBFT 分为四个主要类别,可通过交互式的复古终端启动器访问。 ### 代换密码 用于加密、解密和暴力破解经典替换密码的工具: * **Caesar Cipher** * **Vigenère Cipher** * **Playfair Cipher**(包含 Memetic Algorithm 优化) * **Affine Cipher** * **Hill Cipher** * **Autoclave Cipher** * **Gronsfeld Cipher** * **Gromark Cipher** * **Polybius Square** * **Bifid Cipher** * **XOR Cipher** * **Modular Add/Sub** ### 置换密码 用于在不改变字母表的情况下重新排列明文的密码工具: * **Columnar Transposition** * **Scytale Cipher** * **Rail Fence Cipher** ### 高级密码分析与启发式 CBFT 的核心优势在于其能够在不知道密钥的情况下破解密码的算法方法: * **Simulated Annealing (Substitution):** 使用热冷却和 N-gram 评分从头破解完全随机的 Simple Substitution 密码。 * **Hill Climbing (Transposition):** 纯粹通过优化 bigram 适应度来解开复杂的 columnar transposition。 * **Vigenère Auto-Solver:** 针对Vigenère密码的完全自动化频率分析和密钥推导。 * **Word Pattern Isomorphism:** 通过将单词形状(例如,`1-2-2-1-3-4`)与字典(例如,`ATTACK`)进行映射,瞬间解开保留空格的替换密码。 * **Automated Crib Dragging:** 在密文中“拖动”可疑的明文单词,以揭示底层的密钥片段。 * **Kasiski Examination:** 分析多表密码以找到重复的子字符串并推导密钥长度。 * **Friedman Test:** 使用 Index of Coincidence (IoC) 数学估算多表密钥长度。 * **Matrix Permutation Solver:** 生成并求解基于矩阵的排列。 ### 工具 * **Calculate IoC (Index of Coincidence):** 确定密码是单表密码还是多表密码。 * **Frequency Analysis:** 绘制字符与标准英文文本的偏差。 * **Text Formatter:** 清理和格式化密文。 * **Matrix Generator:** 转储密文字符串所有可能的 `n x m` 排列。 ## 🛠️ 安装 1. 将仓库克隆到您的本地机器: git clone [https://github.com/hippie-cycling/CBFT.git](https://github.com/hippie-cycling/CBFT.git)
标签:Python, StruQ, 密码分析, 密码学, 手动系统调用, 无后门, 逆向工具