Kali Linux字典生成工具Cewl使用全指南
Hello,大家好!在這篇文章中,我們將教大家如何使用KaliLinux的字典生成工具-Cewl。這是一份工具使用全指南,希望能給大家帶來幫助!
Cewl介紹
Cewl是一款採用Ruby開發的應用程式,你可以給它的爬蟲指定URL地址和爬取深度,還可以添額外的外部連結,接下來Cewl會給你返回一個字典檔案,你可以把字典用到類似John the Ripper這樣的密碼破解工具中。除此之外,Cewl還提供了命令列工具。
工具源地址:【 ofollow,noindex" target="_blank">傳送門 】
在終端輸入“cewl -h”之後,工具會輸出所有可接受的選項引數,以及對應的選項描述:
SYNTAX:cewl <url> [options]
Genral Options
-h, –help: Show help.
-k, –keep: Keep the downloadedfile.
-d <x>,–depth<x>: Depth to spider to,default 2.
-m, –min_word_length: Minimumword length, default 3.
-o, –offsite: Let the spider visitother sites.
-w, –write: Write the output tothe file.
-u, –ua <agent>: User agent to send.
-n, –no-words: Don’t outputthe wordlist.
–with-numbers: Accept words with numbers in aswell as just letters
-a, –meta: include meta data.
–meta_file file: Output file forMeta data.
-e, –email: Include emailaddresses.
–email_file <file>: Output file for email addresses.
–meta-temp-dir <dir>: Thetemporary directory used by exiftool when parsing files, default /tmp.
-c, –count: Show the count foreach word found.
-v, –verbose: Verbose.
–debug: Extra debuginformation
Authentication
–auth_type: Digest or basic.
–auth_user: Authentication username.
–auth_pass: Authentication password.
Proxy Support
–proxy_host: Proxy host.
–proxy_port: Proxy port, default 8080.
–proxy_username: Username for proxy, if required.
–proxy_password: Password for proxy, if required.
預設方法
輸入下列命令之後,爬蟲會根據指定的URL和深度進行爬取,然後打印出可用於密碼破解的字典:
cewl http://www.ignitetechnologies.in/
儲存字典檔案
為了方便大家記錄,或者為將來的研究提供參考,Cewl可以將打印出的字典儲存為檔案。這裡可以使用-w引數來將密碼字典儲存為text檔案:
cewl http://www.ignitetechnologies.in/ -w dict.txt
我們可以使用下列命令檢視密碼字典是否儲存成功,我們的儲存路徑為/root /dict.txt:
cat dict.txt
生成特定長度的字典
如果你想生成指定長度的密碼字典,你可以使用-m選項來設定:
cewl http://www.ignitetechnologies.in/ -m 9
上述命令將生成長度至少為9位的密碼,你可以從下圖中看到,Cewl對目標網站進行了爬取,並打印出了長度至少為9位的密碼:
從網站中獲取Email
你可以使用-e選項來啟用Email引數,並配合-n選項來隱藏工具在爬取網站過程中生成的密碼字典:
cewl http://www.ignitetechnologies.in/ -n -e
此時,工具成功在網站中發現了一個Email地址:
計算網站字典中重複的單詞數量:
如果你想要計算目標網站中某個詞的重複出現次數,你可以使用-c選項來開啟引數計算功能:
cewl http://www.ignitetechnologies.in/ -c
大家可以看到,Cewl可以直接統計出目標網站中重複的單詞數量:
增加爬取深度
如果你想增加爬蟲的爬取深度以生成更大的字典檔案,你可以使用-d選項來指定爬取深度,預設的爬取深度為2:
cewl http://www.ignitetechnologies.in/ -d 3
提取除錯資訊
你可以使用–debug選項來開啟除錯模式,這樣就可以檢視網站爬取過程中出現的錯誤和元資料了:
cewl http://www.ignitetechnologies.in/ --debug
Verbose模式
為了擴充套件網站爬取結果,並獲取更加完整的資料報告,你可以使用-v選項來進入verbose模式。該模式下,Cewl會匯出目標網站的詳細資料:
cewl http://www.ignitetechnologies.in/ -v
生成包含數字和字元的字典
如果你想生成包含數字和字元的字典檔案,你可以在命令中使用–with-numbers選項:
cewl http://testphp.vulnweb.com/ --with-numbers
Cewl摘要/基礎認證
如果目標網站需要進行頁面登入認證的話,我們就要使用下列引數來繞過頁面認證的限制:
–auth_type:Digest or basic.
–auth_user:Authentication username.
–auth_pass:Authentication password.
cewl http://192.168.1.105/dvwa/login.php --auth_type Digest --auth_user admin--auth_pass password -v
或者
cewl http://192.168.1.105/dvwa/login.php --auth_type basic --auth_user admin--auth_pass password -v
從下圖中可以看到,接收到的http響應碼為200,併成功生成了字典:
代理URL
如果目標網站設定了代理伺服器的話,Cewl將無法使用預設命令來生成字典。此時你需要使用–proxy option選項來啟用代理URL功能:
cewl --proxy_host 192.168.1.103 --proxy_port 3128 -w dict.txt http://192.168.1.103/wordpress/
總結
這是一份Kali Linux CeWL工具使用全指南,希望能給大家帶來幫助!
*參考來源: hackingarticles ,FB小編Alpha_h4ck編譯,轉載請註明來自FreeBuf.COM