安装

  1. gem install wpscan

参数介绍

我们可以从WPVulnDB获取 API

  1. Usage: wpscan [options]
  2. --url URL 指定扫描的 URL 地址
  3. -h, --help 展示帮助信息
  4. --hh 展示完整帮助信息并退出
  5. --version 显示版本信息
  6. -v, --verbose 详细模式
  7. --[no-]banner 是否显示横幅
  8. Default: true
  9. -o, --output FILE 保存到文件
  10. -f, --format FORMAT 以提供的格式输出结果
  11. 支持选择: cli-no-colour, cli-no-color, json, cli
  12. --detection-mode MODE Default: mixed
  13. 支持选择: mixed, passive, aggressive
  14. --user-agent, --ua VALUE
  15. --random-user-agent, --rua 使用随机 user-agent
  16. --http-auth login:password
  17. -t, --max-threads VALUE 指定使用线程
  18. Default: 5
  19. --throttle MilliSeconds WEB 请求之间的毫秒数默认为1
  20. --request-timeout SECONDS 请求超时时间
  21. Default: 60
  22. --connect-timeout SECONDS 连接超时时间
  23. Default: 30
  24. --disable-tls-checks 禁用 SSL/TLS 证书验证,并降级到 TLS1.0+(后者需要 cURL 7.66
  25. --proxy protocol://IP:port 指定代理
  26. --proxy-auth login:password
  27. --cookie-string COOKIE 指定 Cookie, 格式: cookie1=value1[; cookie2=value2]
  28. --cookie-jar FILE-PATH 读写cookies的文件
  29. Default: /tmp/wpscan/cookie_jar.txt
  30. --force 不检查目标是否正在运行 WordPress 或返回 403
  31. --[no-]update 更新数据库
  32. --api-token TOKEN 指定 API
  33. --wp-content-dir DIR 指定包含的目录
  34. --wp-plugins-dir DIR 指定插件目录, such as "wp-content/plugins"
  35. -e, --enumerate [OPTS] 枚举过程
  36. Available Choices:
  37. vp 只枚举有漏洞的插件
  38. ap 枚举所有插件
  39. p 枚举插件
  40. vt 只枚举存在漏洞的主题
  41. at 枚举所有主题,时间较长 可以指定多个扫描选项,例:"-e tt,p" 如果没有指定选项,默认选项为:"vt,tt,u,vp"
  42. t 枚举主题信息
  43. tt 列举缩略图相关的文件
  44. cb 配置备份
  45. dbe 数据库导出
  46. u 枚举用户名,默认从1-10
  47. m Media IDs range. e.g m1-15
  48. Note: Permalink setting must be set to "Plain" for those to be detected
  49. Range separator to use: '-'
  50. Value if no argument supplied: 1-100
  51. Separator to use between the values: ','
  52. Default: All Plugins, Config Backups
  53. Value if no argument supplied: vp,vt,tt,cb,dbe,u,m
  54. Incompatible choices (only one of each group/s can be used):
  55. - vp, ap, p
  56. - vt, at, t
  57. --exclude-content-based REGEXP_OR_STRING 当使用枚举选项时,可以使用该参数做一些过滤,基于正则或者字符串,可以不写正则分隔符,但要用单引号或双引号包裹
  58. 标题和正文都被检查。 不需要正则表达式定界符。
  59. --plugins-detection MODE 使用提供的模式枚举插件。
  60. Default: passive
  61. Available choices: mixed, passive, aggressive
  62. --plugins-version-detection MODE 使用提供的模式检查插件的版本。
  63. Default: mixed
  64. Available choices: mixed, passive, aggressive
  65. --exclude-usernames REGEXP_OR_STRING 排除与正则表达式/字符串匹配的用户名(不区分大小写)。 不需要正则表达式定界符。
  66. -P, --passwords FILE-PATH 密码攻击期间使用的密码列表。
  67. If no --username/s option supplied, user enumeration will be run.
  68. -U, --usernames LIST 密码攻击期间使用的用户名列表。
  69. Examples: 'a1', 'a1,a2,a3', '/tmp/a.txt'
  70. --multicall-max-passwords MAX_PWD 通过 XMLRPC 多路调用请求发送的最大密码数
  71. Default: 500
  72. --password-attack ATTACK 强制使用提供的攻击而不是自动确定攻击。
  73. Available choices: wp-login, xmlrpc, xmlrpc-multicall
  74. --login-uri URI 登录页面的 URI,如果不同于 /wp-login.php
  75. --stealthy Alias for --random-user-agent --detection-mode passive --plugins-version-detection passive

使用

  1. WPSCAN 枚举
  1. wpscan --url http://blog.inlanefreight.com --enumerate --api-token Kffr4fdJzy9qVcTk<SNIP>
  1. WPscan-XMLRPC
  1. wpscan --password-attack xmlrpc -t 20 -U admin, david -P passwords.txt --url http://blog.inlanefreight.com