- A+
该网站被丧心病狂的GFW封掉了,翻墙吧
以ubuntu安装为例
git clone https://github.com/wpscanteam/wpscan.git
cd wpscan/
gem install bundler && bundle install --without test
枚举站点信息:用户名、插件、样式等信息
以下是探测结果样本
[+]Started:TueOct2815:46:302014
[!]TheWordPress'http://
[+]XML-RPCInterfaceavailableunder:http://
[!]Uploaddirectoryhasdirectorylistingenabled:http://
[+]WordPressversion4.0identifiedfrommetagenerator
[+]WordPressthemeinuse:twentyfourteen-v1.2
[+]Name:twentyfourteen-v1.2
| Location:http://
| StyleURL:http://
| Referencedstyle.css:http://
| ThemeName:TwentyFourteen
| ThemeURI:http://wordpress.org/themes/twentyfourteen
| Description:In2014,ourdefaultthemeletsyoucreatearesponsivemagazinewebsitewithasleek,moderndes...
| Author:theWordPressteam
| AuthorURI:http://wordpress.org/
[+]Enumeratinginstalledplugins(onlyvulnerableones)...
Time:00:00:37<==============================================>(880/880)100.00%Time:00:00:37
[+]Nopluginsfound
[+]Enumeratinginstalledthemes(onlyvulnerableones)...
Time:00:00:16<==============================================>(308/308)100.00%Time:00:00:16
[+]Nothemesfound
[+]Enumeratingtimthumbfiles...
Time:00:01:48<============================================>(2539/2539)100.00%Time:00:01:48
[+]Notimthumbfilesfound
[+]Enumeratingusernames...
[+]Identifiedthefollowing1user/s:
+----+---------+---------+
|Id|Login |Name |
+----+---------+---------+
|1 |tanjiti|tanjiti|
+----+---------+---------+
[+]Finished:TueOct2815:49:342014
察看详细的探测信息
(注意:wpscan默认User-Agent为WPScanv2.5.1(http://wpscan.org),扫描器使用常识之一使用正常变化的ua,避免触发WAF之类的防御部署)
基本察看LOG,我们就可以知道wpscan是如何收集信息
例如检查响应头X-Pingback:http://www.tanjiti.com/xmlrpc.php头 (xmlrpc漏洞)
检查xmlrpc.php(xmlrpc漏洞)
检查robots.txt文件(敏感信息泄露)
检查readme.html文件(敏感信息泄露)
检查/wp-content/debug.log(敏感信息泄露)
检查配置文件(能够明文读取配置文件基本就是挂掉了),wp-config.php.swo,%23wp-config.php%23,wp-config.orig,wp-config.php_bak,wp-config.original,wp-config.php.orig,wp-config.php.old,.wp-config.php.swp,wp-config.php.save,wp-config.bak,wp-config.txt,wp-config.php~,wp-config.save,wp-config.old,wp-config.php.swp (敏感信息泄露)
识别指纹后,一般会去漏洞信息库中查找可以利用的漏洞,例如MSF
MatchingModules
================
Name DisclosureDate Rank Description
---- --------------- ---- -----------
auxiliary/admin/http/wp_custom_contact_forms 2014-08-07 normal WordPresscustom-contact-formsPluginSQLUpload
auxiliary/dos/http/wordpress_xmlrpc_dos 2014-08-06 normal WordPressXMLRPCDoS
以前段时间有名的
msfauxiliary(wordpress_xmlrpc_dos)>showoptions
Moduleoptions(auxiliary/dos/http/wordpress_xmlrpc_dos):
Name CurrentSetting Required Description
---- --------------- -------- -----------
Proxies no Useaproxychain
RHOST yes Thetargetaddress
RLIMIT 1000 yes Numberofrequeststosend
RPORT 80 yes Thetargetport
TARGETURI / yes Thebasepathtothewordpressapplication
VHOST no HTTPservervirtualhost
msfauxiliary(wordpress_xmlrpc_dos)>setRHOSTwww.tanjiti.com
RHOST=>xxx
msfauxiliary(wordpress_xmlrpc_dos)>setTARGETURI/
TARGETURI=>/wordpress/wordpress/
msfauxiliary(wordpress_xmlrpc_dos)>run
使用MSF发送攻击包
msfauxiliary(wordpress_pingback_access)>showoptions
Moduleoptions(auxiliary/scanner/http/wordpress_pingback_access):
Name CurrentSetting Required Description
---- --------------- -------- -----------
Proxies no Useaproxychain
RHOSTS yes ThetargetaddressrangeorCIDRidentifier
RPORT 80 yes Thetargetport
TARGETURI / yes Thepathtowordpressinstallation(e.g./wordpress/)
THREADS 1 yes Thenumberofconcurrentthreads
VHOST no HTTPservervirtualhost
msfauxiliary(wordpress_pingback_access)>setRHOSTSwww.tanjiti.com
RHOSTS=>xxx
msfauxiliary(wordpress_pingback_access)>setTARGETURI/
TARGETURI=>/wordpress/wordpress/
msfauxiliary(wordpress_pingback_access)>run
可以看到拦截日志如下
DPRESS"]
g:'blockwpscannerdefaultuseragent',id:0000004,phase:1"
再次运行wpscan,可以看到拦截日志如下
g"WEB_ATTACK/WORDPRESS"]
大伙可以针对性地添加规则,对个人网站而已,添加白规则较之黑规则会事半功倍,这里的示例规则仅仅是抛砖引玉。
Requirealldenied
</FilesMatch>
一般的方法是设置一个登陆口白名单,但现在越来越多的网站使用CDN服务,明显不再是个好的防护方案
安装LoginLockDown 插件,wordpress后台插件管理处搜索即可,设置也超级简单
设置实例:
如果在5分钟失败3次就会封锁IP60分钟
- 我的微信
- 这是我的微信扫一扫
- 我的微信公众号
- 我的微信公众号扫一扫