小白日記1:kali環境Wpscan滲透Wordpress


一、什么是Wpscan?什么是Wordpres?

    1.Wpscan

     WPScan是一款針對wordpress的安全掃描軟件;可以掃描出wordpress的版本,主題,插件,后台用戶以及爆破后台用戶密碼等。

    2.Wordpress

     WordPress是一種使用PHP語言和MySQL數據庫開發的博客平台,用戶可以在支持PHP和MySQL數據庫的服務器上架設屬於自己的網站。也可以把 WordPress當作一個內容管理系統(CMS)來使用。WordPress有許多第三方開發的免費模板,安裝方式簡單易用。如果要做一個自己的模板,則需要有一定的專業知識,至少要懂的標准通用標記語言下的一個應用HTML代碼、CSS、PHP等相關知識。

 

   建站流程
1. 注冊域名
2. 申請虛擬主機(國內主機:速度快,較貴,而空間較小;國外主機:便宜,速度慢,空間一般無限制)
3. 在虛擬主機上綁定自己的域名
4. 下載WordPress程序
5. 修改域名的DNS解析
6. 創建WordPress數據庫
7. 修改WordPress的安裝配置文件
8. 上傳WordPress程序至ixwebhosting主機域名空間(ftp上傳)
9. 訪問域名/wp-admin/install.php進行wordpress安裝。填寫博客信息及郵箱

 

二、Wpscan命令詳解

      利用-h命令,可查看Wpscan的常用選項,功能介紹,例子等;

[plain]  view plain  copy
 
 
  1. <span style="font-size:18px;"></span><strong><span style="font-size:18px;"><span style="rgb(192, 192, 192);">root@kali:~# wpscan -h  
  2. _______________________________________________________________  
  3.         __          _______   _____                    
  4.         \ \        / /  __ \ / ____|                   
  5.          \ \  /\  / /| |__) | (___   ___  __ _ _ __    
  6.           \ \/  \/ / |  ___/ \___ \ / __|/ _` | '_ \   
  7.            \  /\  /  | |     ____) | (__| (_| | | | |  
  8.             \/  \/   |_|    |_____/ \___|\__,_|_| |_|  
  9.   
  10.   
  11.         WordPress Security Scanner by the WPScan Team   
  12.                        Version 2.8  
  13.           Sponsored by Sucuri - https://sucuri.net  
  14.    @_WPScan_, @ethicalhack3r, @erwan_lr, pvdl, @_FireFart_  
  15. _______________________________________________________________</span><span style="rgb(255, 255, 255);">  
  16. </span></span></strong><span style="font-size:18px;rgb(255, 255, 255);">  
  17. </span>  
Help :
 17 
 18 Some values are settable in a config file, see the example.conf.json
 19 
 20 --update Update to the database to the latest version.                            #更新命令
 21 --url | -u <target url> The WordPress URL/domain to scan.                     #指定URL/域掃描
 22 --force | -f Forces WPScan to not check if the remote site is running WordPress.  #強制WPScan不檢查,如果遠程主機在運行WordPress
 23 --enumerate | -e [option(s)] Enumeration.                      #枚舉計算
 24 
 25 
 26 option :                                                                 #參數列表
 27 u usernames from id 1 to 10                                              #用戶名默認從id1到10
 28 u[10-20] usernames from id 10 to 20 (you must write [] chars)       #用戶名從di10到20([]中字符必須寫)
 29 p plugins                                                         #插件程序
 30 vp only vulnerable plugins                                        #僅漏洞插件程序
 31 
 32 ap all plugins (can take a long time)                           #所有插件程序(耗時比較長)
 33 tt timthumbs                                                   #timthumbs
 34 t themes                                                      #主題
 35 vt only vulnerable themes                                     #僅漏洞主題
 36 at all themes (can take a long time)                          #所有主題(耗時長)
 37 Multiple values are allowed : "-e tt,p" will enumerate timthumbs and plugins     #允許多值參數
 38 If no option is supplied, the default is "vt,tt,u,vp"             #無參數狀態下,默認
 39 
 40 --exclude-content-based "<regexp or string>"
 41 Used with the enumeration option, will exclude all occurrences based on the regexp or string supplied.
 42 You do not need to provide the regexp delimiters, but you must write the quotes (simple or double).
 43 --config-file | -c <config file> Use the specified config file, see the example.conf.json.           #配置文件
 44 --user-agent | -a <User-Agent> Use the specified User-Agent.                                  #指定用戶代理
 45 --cookie <String> String to read cookies from.                        #cookie 從字符串讀取
 46 --random-agent | -r Use a random User-Agent.                           #使用隨機代理
 47 --follow-redirection If the target url has a redirection, it will be followed without asking if you wanted to do so or not #如果目標網址重定向,它將被跟蹤,不詢問你是否想這樣做
 48 --batch Never ask for user input, use the default behaviour.
 49 --no-color Do not use colors in the output.
 50 --wp-content-dir <wp content dir> WPScan try to find the content directory (ie wp-content) by scanning the index page, however you can specified it.
 51 
 52 
 53 Subdirectories are allowed.                                       #子目錄允許的
 54 --wp-plugins-dir <wp plugins dir> Same thing than --wp-content-dir but for the plugins directory.
 55 If not supplied, WPScan will use wp-content-dir/plugins. Subdirectories are allowed
 56 --proxy <[protocol://]host:port> Supply a proxy. HTTP, SOCKS4 SOCKS4A and SOCKS5 are supported.
 57 If no protocol is given (format host:port), HTTP will be used.
 58 --proxy-auth <username:password> Supply the proxy login credentials.                        #提供代理登陸憑證
 59 --basic-auth <username:password> Set the HTTP Basic authentication.                   #設置HTTP基本認證
 60 --wordlist | -w <wordlist> Supply a wordlist for the password brute forcer.           #為暴力破解密碼指定字典
 61 --username | -U <username> Only brute force the supplied username.               #僅暴力破解用戶名
 62 --usernames <path-to-file> Only brute force the usernames from the file.           #僅從字典文件中暴力破解用戶名
 63 --threads | -t <number of threads> The number of threads to use when multi-threading requests.   #當多線程請求時指定線程數
 64 --cache-ttl <cache-ttl> Typhoeus cache TTL.
 65 --request-timeout <request-timeout> Request Timeout.                 #請求時間間隔
 66 --connect-timeout <connect-timeout> Connect Timeout.                  #連接時間間隔
 67 --max-threads <max-threads> Maximum Threads.                     #最大線程數
 68 --help | -h This help screen.
 69 --verbose | -v Verbose output.                   #詳細輸出
 70 --version Output the current version and exit
 71 
 72 
 73 Examples :                            #例子{wpscan --help    //省略ruby ./……   .rb}
 74 
 75 -Further help ...
 76 ruby ./wpscan.rb --help
 77 
 78 -Do 'non-intrusive' checks ...                       #做非入侵式檢查
 79 ruby ./wpscan.rb --url www.example.com
 80 
 81 -Do wordlist password brute force on enumerated users using 50 threads ...   #指定字典暴力破解枚舉用戶使用50個線程
 82 
 83 ruby ./wpscan.rb --url www.example.com --wordlist darkc0de.lst --threads 50
 84 
 85 -Do wordlist password brute force on the 'admin' username only ...   #僅對“管理員”做字典密碼暴力破解枚舉用戶使用50個線程。
 86 ruby ./wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin
 87 
 88 -Enumerate installed plugins ...                #枚舉已安裝的插件
 89 ruby ./wpscan.rb --url www.example.com --enumerate p
 90 
 91 -Enumerate installed themes ...                 #枚舉已安裝主題
 92 ruby ./wpscan.rb --url www.example.com --enumerate t
 93 
 94 -Enumerate users ...                                 #枚舉用戶名
 95 ruby ./wpscan.rb --url www.example.com --enumerate u
 96 
 97 -Enumerate installed timthumbs ...                #枚舉已安裝timthumbs
 98 ruby ./wpscan.rb --url www.example.com --enumerate tt
 99 
100 -Use a HTTP proxy ...                        #使用HTTP代理
101 ruby ./wpscan.rb --url www.example.com --proxy 127.0.0.1:8118
102 
103 -Use a SOCKS5 proxy ... (cURL >= v7.21.7 needed)      #使用SOCKS5代理
104 ruby ./wpscan.rb --url www.example.com --proxy socks5://127.0.0.1:9000
105 
106 -Use custom content directory ...                     #使用自定內容目錄
107 ruby ./wpscan.rb -u www.example.com --wp-content-dir custom-content
108 
109 -Use custom plugins directory ...                    #使用自定義插件目錄
110 ruby ./wpscan.rb -u www.example.com --wp-plugins-dir wp-content/custom-plugins
111 
112 -Update the DB ...                          #更新數據庫
113 ruby ./wpscan.rb --update
114 
115 -Debug output ...
116 ruby ./wpscan.rb --url www.example.com --debug-output 2>debug.log
117 
118 See README for further information.

三、列出用戶名列表【利用靶機檢驗】

wpscan -u 192.168.1.128 -e u vp     # -u指定URL,-e枚舉,u用戶名從ID1到10,vp僅漏洞插件程序

 

 

四、字典爆破用戶密碼

wpscan -u 192.168.1.128 -e u --wordlist /root/wordlist.txt    #--wordlist </路徑/文件名>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM