
ricerca-tesi — 已更新!
cve-2026-7228 的搜索资源
ricerca-tesi
针对 cve-2026-7228 的研究资源
工具
安装 virtual-box
virtual-box 安装:https://www.virtualbox.org/wiki/Downloads
安装 windows 11 iso
https://www.microsoft.com/it-it/software-download/windows11
安装 linux 发行版:lubuntu
Pizzafy 电子商务系统源代码网站
https://www.sourcecodester.com/php/18708/pizzafy-ecommerce-system.html
安装 xampp
- 安装 xampp
- mysql 和 apache:启动
- 使用 phpmyadmin( http://localhost/phpmyadmin )创建数据库 pizzafy,并从源代码中将文件 pizzafy.sql 导入到本地数据库。
安装 Burp Suite( 或 Postman )
测试
参考链接
cve 漏洞:https://nvd.nist.gov/vuln/detail/CVE-2026-7228
用于漏洞利用和解决方案的 github:https://github.com/fernando-mengali/vulndb-submissions.git
服务器中的网站
解压 pizzafy 项目,并将文件夹移动到 xampp 上 apache 的 htdocs 中
测试 URL
pizzafy 网站:http://localhost/pizzafy/Pizzafy/
管理员登录:http://localhost/pizzafy/Pizzafy/admin/login.php
凭据 → 用户名:[email protected] 密码:admin123
SQL 注入
具体为基于错误的 SQL 注入,在 XML 中返回错误
测试 URL
首先使用 GET 方法: http://localhost/Pizzafy/pizzafy/view_prod.php?id=
测试载荷
9%20AND%20extractvalue(rand(),%20concat(0x7e,version()))%20--
输出:

漏洞利用测试
编程语言:==python==
使用的库:request import request
exploit 文件:/script/test.py
执行漏洞利用文件
执行 test.py
输出:

john the ripper
安装 john the ripper 以从 哈希值 解密密码。对于 Kali 等操作系统,该工具已预装。
将密码保存到 txt 文件中:hash.txt
安装 rockyou.txt 文件:git clone https://gitlab.com/kalilinux/packages/wordlists.git
gunzip rockyou.txt.gz
加密密码类型:==bcrypt==
使用 wordlist 文件执行该工具:john --wordlist=rockyou.txt --format=bcrypt hash.txt
输出:

密码:admin123
环境准备
-
打开 virtual-box,并通过仅主机模式为 windows 11 虚拟机设置 IP 地址
- 前往 设置 -> 网络 -> 网卡 1 -> 设置为仅主机网卡,然后输入包含 IP 地址的名称
- 设置网卡 2 -> 设置为 NAT


-
启动 Windows 11 虚拟机,并检查 IP 地址是否设置正确
输入:ipconfig

-
启动 Apache 和 MySQL

攻击
- 启动 kali 虚拟机或任何其他 linux 发行版
- 创建 python 解释器环境
- 启动 exploit.py 文件,并在 URL 中指定被攻击机器的 IP 地址
python3 exploit.py
代码
易受攻击的代码
打开 pizzafy/Pizzafy,找到 view_prod.php 文件,并找到以下部分:

修复后的代码 1

修复后的代码 2
