# 【juice-shop】★ Zero Stars：给出零星好评


# 【juice-shop】★ Zero Stars：给出零星好评

## 0x01 任务简报

<blockquote style="border-left: 5px solid #6f42c1; background-color: #f5f3ff; padding: 20px; margin: 1.5rem 0; color: #5521b5; line-height: 1.8; border-radius: 0 5px 5px 0;">
<div style="font-weight: bold; font-size: 1.1rem; margin-bottom: 10px; display: flex; align-items: center;">
<span style="margin-right: 8px;">💡</span> 核心线索 (Hints)
</div>


1. 在尝试绕过 API 之前，不妨先<strong>试试 UI 本身</strong>能不能直接操作。
   </blockquote>

<blockquote style="border-left: 5px solid #0366d6; background-color: #f1f8ff; padding: 20px; margin: 1.5rem 0; color: #0550ae; line-height: 1.8; border-radius: 0 5px 5px 0;">
<div style="font-weight: bold; font-size: 1.1rem; margin-bottom: 10px; display: flex; align-items: center;">
<span style="margin-right: 8px;">🎓</span> 实战动作 (Action)
</div>
• <strong>目标</strong>：提交一条评分为 0 星的反馈。<br>
• <strong>工具</strong>：Burp Suite（Repeater 重放器）。<br>
• <strong>思路</strong>：前端星级控件限制最低 1 星，但后端 API 不做范围校验。
</blockquote>


-----

## 0x02 实战：复现漏洞

**1. 打开客户反馈界面**

进入客户反馈页面，可以匿名提交——UI 上星级控件最低只能选 1 星：

![客户反馈界面，星级最低为 1](../../../../../../public/p/juice-shop-zero-stars给出零星好评/assets/Pastedimage20260330204332.png)

**2. 先正常提交一次，抓包**

随便填写内容，提交一次反馈，在 Burp 中观察请求。调用的是 `/api/Feedbacks/`，请求体结构很简单：

![Burp 抓到 POST /api/Feedbacks/ 请求](../../../../../../public/p/juice-shop-zero-stars给出零星好评/assets/Pastedimage20260330204452.png)

**3. 发送到 Repeater，篡改 `rating`**

将请求发到 Repeater，把 `rating` 的值从 `1` 改成 `0`，发送：

![Repeater 中将 rating 改为 0](../../../../../../public/p/juice-shop-zero-stars给出零星好评/assets/Pastedimage20260330204801.png)

**4. 0 星提交成功**

服务器返回 `201 Created`，0 星反馈成功写入——后端对 `rating` 的值没有做任何范围校验：

![服务器接受 rating: 0，挑战完成](../../../../../../public/p/juice-shop-zero-stars给出零星好评/assets/Pastedimage20260330204913.png)

> **结论**：星级范围限制（最低 1 星）只存在于前端控件，后端 API 对 `rating` 字段的值照单全收。只要绕过 UI 直接构造请求，任意数值都可以提交。

-----

## 0x03 参考资料

- 📖 [OWASP：客户端安全控制不可信赖](https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/11-Client-side_Testing/README)

