wordpress利用サイトのセキュリティ診断書を作成するでは、
wpscan を紹介した。今回は、plecost3 をご紹介。

plecost3 を動かすにはpython3で必要なので、簡単にpython3のインストール手順からご紹介する。

python3をインストール

リポジトリを登録

1
rpm -Uvh https://www.softwarecollections.org/en/scls/rhscl/python33/epel-7-x86_64/download/rhscl-python33-epel-7-x86_64.noarch.rpm

python3 をインストール

1
yum -y install python33

scl(Software Collections)でpython3を利用するように設定。

1
scl enable python33 bash

pip をインストール

1
easy_install pip

plecost をインストール

1
python3 -m pip install plecost

チェックするプラグインリストを最新にする。

1
plecost --update-plugins

実行結果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ plecost --update-plugins

(省略)
To get rid of this warning, change this:

BeautifulSoup([your markup])

to this:

BeautifulSoup([your markup], "html.parser")

markup_type=markup_type))
[*] Downloading plugins (slow): [#########################################] 100.00%
[*] Oks!

脆弱性情報も最新にする。

1
plecost --update-cve

実行結果

1
2
3
4
5
6
7
8
9
10
11
12
$ plecost --update-cve

(省略)
[*] Updating CVE database...
Downloading NVD feed 2013:
Processing file: [#########################################] 100.00%
Downloading NVD feed 2014:
Processing file: [#########################################] 100.00%

Downloading NVD feed 2015:
Processing file: [#########################################] 100.00%

[*] Done!

以上で、plecostの利用準備は完了。

使い方

使い方は簡単 plecost コマンドに WordpressのURLを渡すだけ。

1
plecost http://example.com

使ってみよう

某サイトで試してみた。 バージョン3.5.1 とかなり古いバージョンを使っており、脆弱であることが確認できた。さらにCVE情報のリンクもあるので、どんな脆弱性があるのかも確認が可能となっている。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# plecost http://example.com

///////////////////////////////////////////////////////
// ..................................DMI...
// .............................:MMMM......
// .........................$MMMMM:........
// .........M.....,M,=NMMMMMMMMD...........
// ........MMN...MMMMMMMMMMMM,.............
// .......MMMMMMMMMMMMMMMMM~...............
// .......MMMMMMMMMMMMMMM..................
// ....?MMMMMMMMMMMMMMMN$I.................
// .?.MMMMMMMMMMMMMMMMMMMMMM...............
// .MMMMMMMMMMMMMMN........................
// 7MMMMMMMMMMMMMON$.......................
// ZMMMMMMMMMMMMMMMMMM.......libs.......
// .:MMMMMMMZ~7MMMMMMMMMO..................
// ....~+:.................................
//
// Plecost - Wordpress finger printer Tool - v1.0.0
//
// Developed by:
// Francisco Jesus Gomez aka ffranz | @ffranz - ffranz-[at]-iniqua.com
// Daniel Garcia aka cr0hn | @ggdaniel - cr0hn-[at]-cr0hn.com
//
// Info: http://iniqua.com/labs/
// Repo: https://github.com/iniqua/plecost
// Bug report: libs@iniqua.com or https://github.com/iniqua/plecost/issues/

[*] Testing target connection... ok!
[*] Looking for WordPress installation...
[#########################################] 100.00%
ok!
[*] Getting WordPress version... 3.5.1 (latest: 4.2.2)
|_CVE list:
|__CVE-2013-2205: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2205)

|__CVE-2013-2202: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2202)
|__CVE-2013-2203: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2203)
|__CVE-2013-2200: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2200)
|__CVE-2013-2201: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2201)
|__CVE-2013-2204: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2204)
|__CVE-2013-2199: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2199)
|__CVE-2013-2173: (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2173)


[*] Looking for plugins (wordlist: plugin_list_50.txt) ...
[*] Done!

CVEの情報は、以下のオプションで確認することも可能。

1
plecost -nb --cve CVE-2013-2204

実行結果

1
2
3
4
5
6
7
8
9
10
$ plecost -nb --cve CVE-2013-2204

// Plecost - Wordpress finger printer Tool - v1.0.0

[*] Detail for CVE 'CVE-2013-2204':

moxieplayer.as in Moxiecode moxieplayer, as used in the TinyMCE Media plugin in WordPress before 3.5.2 and other products, does not consider the presence of a # (pound sign) character during extraction of the QUERY_STRING, which allows remote attackers to pass arbitrary parameters to a Flash application, and conduct content-spoofing attacks, via a crafted string after a ? (question mark) character.


[*] Done!

脆弱性情報を持つプラグインリストは以下のコマンドで知ることが出来る。

1
plecost -nb --show-plugins

実行結果

1
2
3
4
5
6
7
8
9
10
11
12
13
$ plecost -nb --show-plugins

// Plecost - Wordpress finger printer Tool - v1.0.0

[*] Plugins with vulnerabilities known:

{ 0 } - ab_google_map_travel
{ 1 } - acobot_live_chat_%26_contact_form
{ 2 } - activehelper_livehelp_live_chat
{ 3 } - ad-manager
{ 4 } - alipay
{ 5 } - all-video-gallery
(省略)

プラグインの脆弱性情報は、先ほど実行したプラグインリストを-vpオプションに渡すことで確認することが出来る。

1
plecost -nb -vp infusionsoft_gravity_forms

実行結果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$ plecost -nb -vp infusionsoft_gravity_forms

// Plecost - Wordpress finger printer Tool - v1.0.0

[*] Associated CVEs for plugin 'infusionsoft_gravity_forms':

{ 0 } - CVE-2014-6446:

Affected versions:

<0> - 1.5.7.2
<1> - 1.5.7.1
<2> - 1.5.4.2
<3> - 1.5.9.5
<4> - 1.5.8.1
<5> - 1.5.10
<6> - 1.5.9.4
<7> - 1.5.9.1
<8> - 1.5.9.3
<9> - 1.5.9.2
<10> - 1.5.0
<11> - 1.5.1
<12> - 1.5.2
<13> - 1.5.3
<14> - 1.5.4
<15> - 1.5.5
<16> - 1.5.6
<17> - 1.5.7
<18> - 1.5.8
<19> - 1.5.9
<20> - 1.5.4.1


[*] Done!

以上が簡単な使い方になる。
是非、試してみてはどうだろうか?


参照URL