
关于
评估 WordPress 安装中的常见漏洞和 WordPress 7.0 攻击面。
name: wordpress-penetration-testing description: "评估 WordPress 安装中的常见漏洞和 WordPress 7.0 攻击面。" risk: offensive source: community author: zebbern date_added: "2026-02-27"
仅限授权使用:此技能仅用于授权的安全评估、防御验证或受控教育环境。
WordPress 渗透测试
WordPress 7.0 安全注意事项
WordPress 7.0(2026年4月)引入了创建额外攻击面的新功能:
实时协作 (RTC)
- Yjs CRDT 同步提供者端点
wp_sync_storagepost meta- 协作会话劫持
- 数据同步拦截
AI 连接器 API
/wp-json/ai/v1/端点- 设置 > 连接器中的凭证存储
- 提示词注入漏洞
- AI 响应操纵
Abilities API
/wp-json/abilities/v1/清单暴露- 能力调用端点
- 权限边界绕过
- MCP 适配器集成点
DataViews
- 新管理界面端点
- 客户端验证绕过
- 过滤/排序参数注入
PHP 要求
- PHP 7.2/7.3 不再支持(升级攻击)
- 推荐 PHP 8.3+(新攻击向量)
目的
对 WordPress 安装进行全面安全评估,包括用户、主题和插件枚举、漏洞扫描、凭证攻击和利用技术。WordPress 驱动约 35% 的网站,使其成为安全测试的关键目标。
前置条件
必需工具
- WPScan(Kali Linux 中预装)
- Metasploit Framework
- Burp Suite 或 OWASP ZAP
- Nmap 用于初始发现
- cURL 或 wget
必需知识
- WordPress 架构和结构
- Web 应用测试基础
- HTTP 协议理解
- 常见 Web 漏洞(OWASP Top 10)
输出和交付物
- WordPress 枚举报告 - 版本、主题、插件、用户
- 漏洞评估 - 已识别的 CVE 和配置错误
- 凭证评估 - 弱密码发现
- 利用证明 - Shell 访问文档
核心工作流程
阶段 1:WordPress 发现
识别 WordPress 安装:
# Check for WordPress indicators
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"
# Check common WordPress paths
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
# Check meta generator tag
curl -s http://target.com | grep "generator"
# Nmap WordPress detection
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- 版本信息
阶段 2:基本 WPScan 枚举
使用 WPScan 进行全面 WordPress 扫描:
# Basic scan
wpscan --url http://target.com/wordpress/
# With API token (for vulnerability data)
wpscan --url http://target.com --api-token YOUR_API_TOKEN
# Aggressive detection mode
wpscan --url http://target.com --detection-mode aggressive
# Output to file
wpscan --url http://target.com -o results.txt
# JSON output
wpscan --url http://target.com -f json -o results.json
# Verbose output
wpscan --url http://target.com -v
阶段 3:WordPress 版本检测
识别 WordPress 版本:
# WPScan version detection
wpscan --url http://target.com
# Manual version checks
curl -s http://target.com/readme.html | grep -i version
curl -s http://target.com/feed/ | grep -i generator
curl -s http://target.com | grep "?ver="
# Check meta generator
curl -s http://target.com | grep 'name="generator"'
# Check RSS feeds
curl -s http://target.com/feed/
curl -s http://target.com/comments/feed/
版本来源:
- HTML 中的 Meta generator 标签
- readme.html 文件
- RSS/Atom feeds
- JavaScript/CSS 文件版本
阶段 4:主题枚举
识别已安装的主题:
# Enumerate all themes
wpscan --url http://target.com -e at
# Enumerate vulnerable themes only
wpscan --url http://target.com -e vt
# Theme enumeration with detection mode
wpscan --url http://target.com -e at --plugins-detection aggressive
# Manual theme detection
curl -s http://target.com | grep "wp-content/themes/"
curl -s http://target.com/wp-content/themes/
主题漏洞检查:
# Search for theme exploits
searchsploit wordpress theme <theme_name>
# Check theme version
curl -s http://target.com/wp-content/themes/<theme>/style.css | grep -i version
curl -s http://target.com/wp-content/themes/<theme>/readme.txt
阶段 5:插件枚举
识别已安装的插件并检查已知漏洞。
兼容工具
Claude CodeCursor
标签
安全
