WPScan的安装和使用


之前曾用过WPScan进行扫描,但是自己搭建了WordPress的博客之后还没用它来扫过自己,可能也是怕自己的VPS撑不住吧,但是,为了安全起见,先自己对自己扫一次吧。

1.WPScan的安装

在使用开源工具方面,我偏向于去官方网站按照官方的说明进行安装,一方面是为了安全,另一方面可能就是一点点的轻微强迫症吧o(╯□╰)o

WPScan是托管在GitHub上的,在其首页上就有安装和使用的说明:

安装需要的条件:
  • Ruby >= 1.9.2 – Recommended: 2.1.2
  • Curl >= 7.21 – Recommended: latest – FYI the 7.29 has a segfault
  • RubyGems – Recommended: latest
  • Git

Windows is not supported.

在Debian/Ubuntu上进行安装:

Before Ubuntu 14.04(没有找到libopenssl-ruby的package无法安装,但也可以正常运行):

sudo apt-get install libcurl4-gnutls-dev libopenssl-ruby libxml2 libxml2-dev libxslt1-dev ruby-dev

From Ubuntu 14.04:

sudo apt-get install libcurl4-gnutls-dev libxml2 libxml2-dev libxslt1-dev ruby-dev
git clone https://github.com/wpscanteam/wpscan.git
cd wpscan
sudo gem install bundler && bundle install --without test

这里我是使用apt-get的方法安装的Ruby 1.9.3

$ sudo apt-get install ruby1.9.3

之后查看ruby版本

$ ruby --version

如果不对的话需要手动更改ruby的默认版本

$ sudo alternatives-update --config ruby
还有一种使用RVM的安装方式:
cd ~
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gem install bundler
git clone https://github.com/wpscanteam/wpscan.git
cd wpscan
bundle install --without test
2.WPScan的使用

WPScan的参数较多,也不一一说明,这里直接看例子吧:

Do ‘non-intrusive’ checks…

$ ruby wpscan.rb --url www.example.com

Do wordlist password brute force on enumerated users using 50 threads…(将线程开到50进行枚举用户的爆破,效果好坏和字典有直接关系,因为WordPress没有验证码机制,但你可以安装插件进行防护,我用的是修改代码的方式进行的一个简单防护`(*∩_∩*)′)

$ ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --threads 50

Do wordlist password brute force on the ‘admin’ username only…(对用户名为admin的进行密码爆破)

$ ruby wpscan.rb --url www.example.com --wordlist darkc0de.lst --username admin

Enumerate installed plugins…(枚举使用的插件信息)

$ ruby wpscan.rb --url www.example.com --enumerate p

Run all enumeration tools…(运行所有的枚举工具)

$ ruby wpscan.rb --url www.example.com --enumerate

Update WPScan…(WPScan更新)

$ ruby wpscan.rb --update

Debug output…(调试,输出内容更为详细)

$ ruby wpscan.rb --url www.example.com --debug-output 2>debug.log

一些其他选项/功能:

--follow-redirection  If the target url has a redirection, it will be followed without asking if you wanted to do so or not
$ ruby wpstools.rb --check-local-vulnerable-files /path/to/wordpress/

==

WordPress的一些安全相关资料
搜索关键字:
  • wordpress 用户名枚举
  • wordpress site:freebuf.com
  • site:wooyun.org wordpress 破解
参考链接:
, ,

《“WPScan的安装和使用”》 有 1 条评论

  1. TPscan-一键ThinkPHP漏洞检测工具
    https://mp.weixin.qq.com/s/_xkZk1ztTsh1y7jP6VViGQ
    https://github.com/Lucifer1993/TPscan
    `
    2.代码结构
    插件化思想,所有的检测插件都在plugins目录里,TPscan.py主文件负责集中调度。

    插件目录:
    ThinkPHP 用户模块checkcode SQL注入漏洞
    ThinkPHP 5.0.23远程代码执行
    ThinkPHP 5.0.23 Debug模式远程代码执行
    ThinkPHP 5.X PDO开启状态下SQL注入漏洞
    ThinkPHP 5.1.x 远程命令执行漏洞2
    ThinkPHP 5.0.10 远程代码执行漏洞
    ThinkPHP index.php show-id远程代码执行漏洞
    ThinkPHP 5.0.22/5.1.29 远程代码执行
    ThinkPHP 2.1~2.2|3.0~3.1 开启Lite模式代码执行漏洞
    ThinkPHP 5.1~5.2全版本远程代码执行漏洞
    ThinkPHP 多个SQL报错信息泄露
    ThinkPHP /home/pay控制器参数orderid SQL注入漏洞
    ThinkPHP 5.1.x 远程命令执行漏洞
    ThinkPHP view_recent/name X-Forwarded-For SQL注入漏洞
    `

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注