[ PROMPT_NODE_27704 ]
WordPress 渗透测试
[ SKILL_DOCUMENTATION ]
# WordPress 渗透测试
## 目的
对 WordPress 安装环境进行全面的安全评估,包括枚举用户、主题和插件,进行漏洞扫描、凭据攻击和利用技术。WordPress 驱动了约 35% 的网站,使其成为安全测试的关键目标。
## 前置条件
### 所需工具
- WPScan (Kali Linux 中预装)
- Metasploit Framework
- Burp Suite 或 OWASP ZAP
- 用于初步发现的 Nmap
- cURL 或 wget
### 所需知识
- WordPress 架构和结构
- Web 应用测试基础
- HTTP 协议理解
- 常见 Web 漏洞 (OWASP Top 10)
## 输出与交付物
1. **WordPress 枚举报告** - 版本、主题、插件、用户
2. **漏洞评估** - 已识别的 CVE 和错误配置
3. **凭据评估** - 弱密码发现
4. **利用证明** - Shell 访问文档
## 核心工作流
### 第一阶段:WordPress 发现
识别 WordPress 安装:
bash
# 检查 WordPress 指标
curl -s http://target.com | grep -i wordpress
curl -s http://target.com | grep -i "wp-content"
curl -s http://target.com | grep -i "wp-includes"
# 检查常见的 WordPress 路径
curl -I http://target.com/wp-login.php
curl -I http://target.com/wp-admin/
curl -I http://target.com/wp-content/
curl -I http://target.com/xmlrpc.php
# 检查 meta 生成器标签
curl -s http://target.com | grep "generator"
# Nmap WordPress 检测
nmap -p 80,443 --script http-wordpress-enum target.com
关键的 WordPress 文件和目录:
- `/wp-admin/` - 管理后台
- `/wp-login.php` - 登录页面
- `/wp-content/` - 主题、插件、上传内容
- `/wp-includes/` - 核心文件
- `/xmlrpc.php` - XML-RPC 接口
- `/wp-config.php` - 配置文件 (如果安全则不可访问)
- `/readme.html` - 版本信息
### 第二阶段:基础 WPScan 枚举
使用 WPScan 进行全面的 WordPress 扫描:
bash
# 基础扫描
wpscan --url http://target.com/wordpress/
# 使用 API 令牌 (获取漏洞数据)
wpscan --url http://target.com --api-token YOUR_API_TOKEN
# 激进检测模式
wpscan --url http://target.com --detection-mode aggressive
# 输出到文件
wpscan --url http://target.com -o results.txt
# JSON 输出
wpscan --url http://target.com -f json -o results.json
# 详细输出
wpscan --url http://target.com -v
### 第三阶段:WordPress 版本检测
识别 WordPress 版本: