1.前言:
之前讲了讲压缩文件的伪加密问题,但实际情况下更多的是找密码或者暴力破解,这里我就来讲一讲暴力破解密码的方法。在windows下是有很多破解软件的,如 Advance Archive,但是不是免费的。作为白嫖党的我在寻找中发现了 kali 自带的密码破解 ,接下来介绍一下下载和使用方法。
2.Fcrackzip(对于.zip压缩文件)
1.下载方法:
sudo apt-get install fcrackzip (注意需要先进入管理员root模式)
2.使用方法:
fcrackzip -h 可以查看使用方法(如下图)
[-b|--brute-force] use brute force algorithm(方法:暴力破解)
[-D|--dictionary] use a dictionary(方法:字典破解)
[-B|--benchmark] execute a small benchmark
[-c|--charset characterset] use characters from charset(规定密码类型,如-c ‘aA1!:’)
[-h|--help] show this message(查看帮助)
[--version] show the version of this program
[-V|--validate] sanity-check the algortihm
[-v|--verbose] be more verbose
[-p|--init-password string] use string as initial password/file(指定字典破解)
[-l|--length min-max] check password with length min to max(规定密码长度范围,如-l 1-5)
[-u|--use-unzip] use unzip to weed out wrong passwords(显示破解正确的密码)
[-m|--method num] use method number "num" (see below)
[-2|--modulo r/m] only calculcate 1/m of the password(加粗的是通常使用时会用到的)
部分解释:
-c 'aA1!:' :
a表示含有小写字母[a-z]
A表示含有大写字母[A-Z]
1表示含有数字[0-9]
!表示含有特殊字符[!:$%&/()=?{[]}+*~#]
: 表示包含冒号之后的字符(不能为二进制的空字符)
-l 1-5 :
1-5 表示密码从1位到5位进行爆破
-p 1.txt:
在字典破解时指定用1.txt字典破解
举例:
暴力破解:fcrackzip -b -c '1' -l 1-10 -u 1.zip
结果显示:PASSWORD FOUND!!!!: pw == 123456
字典破解:fcrackzip -D -p 1.txt -u 1.zip
结果显示:PASSWORD FOUND!!!!: pw == 123456
3.rarcrack(对于.rar和.7z压缩文件)
1.下载方法:
apt-get install rarcrack (注意需要先进入管理员root模式)
2.使用方法:
rarcrack --help 可以查看使用方法(如下图)
rarcrack encrypted_archive.ext [--threads NUM] [--type rar|zip|7z]
(rarcrack 文件名 --threads 线程数 --type rar|zip|7z)
--help: show this screen.(查看帮助)
--type: you can specify the archive program, this needed when
the program couldn't detect the proper file type
--threads: you can specify how many threads
will be run, maximum 12 (default: 2)Info: This program supports only RAR, ZIP and 7Z encrypted archives.
RarCrack! usually detects the archive type.(注意只能破解RAR,ZIP和7Z格式)
部分解释:
--type rar|zip|7z:
type后的格式与前面的文件名的后缀名要相等
举例:
暴力破解: rarcrack 1.7z --threads 20 --type 7z
结果显示:GOOD :password cracked:'123456'