使用fcrackzip來破解zip類型壓縮文件
fcrackzip是一款專門破解zip類型壓縮文件密碼的工具,工具破解速度還是可以的,能用字典和指定字符集破解,適用於Linux、Mac OS 系統。
如果你的電腦沒有安裝brew,需要執行下面命令行
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝fcrackzip
brew install fcrackzip
使用 fcrackzip -h來查看相關命令幫助
fcrackzip version 1.0, a fast/free zip password cracker
written by Marc Lehmann <pcg@goof.com> You can find more info on
http://www.goof.com/pcg/marc/
USAGE: fcrackzip
[-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
[-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
[-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
file... the zipfiles to crack
methods compiled in (* = default):
0: cpmask
1: zip1
*2: zip2, USE_MULT_TAB
c 指定字符集,字符集 格式是 -c 'aA1!:'
表示小寫字母 a-z
表示大寫字母 A-Z
表示數字 0-9
感嘆號表示特殊字符 !:$%&/()=?{}[]+*~#
表示包含冒號之后的字符(不能為二進制的空字符)例如 a1:$% 表示 字符集包含小寫字母、數字、$字符和%百分號
嘗試破解
有一個文件名叫doubi.zip,密碼為doubi的弱密碼
// 先要cd到文件所在文件夾位置
fcrackzip -b -c 'aA1!' -l 1-10 -u doubi.zip
PASSWORD FOUND!!!!: pw == doubi
// 參數
-b 表示使用暴力破解的方式
-c 'aA1!' 表示使用大小寫字母加數字和符號的混合破解方式
-l 1-10 表示需要破解的密碼長度1到10位
-u 表示只顯示破解出來的密碼,其他錯誤的密碼不顯示
可以使用字典破解
fcrackzip -D -p pwd.txt -u doubi.zip
PASSWORD FOUND!!!!: pw == doubi
// 參數
-D 表示要使用字典破解
-p 表示要使用哪個字典破解