# 【juice-shop】★ Repetitive Registration：多余的重复密码


# 【juice-shop】★ Repetitive Registration：多余的重复密码

## 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. 可以通过<strong>巧妙操作 UI</strong>，或者<strong>完全绕过 UI</strong> 来解决。<br>
2. 注册表单里最明显的重复项，就是<strong>"重复密码"字段</strong>。<br>
3. 试试在"重复密码"字段里填入<strong>空值或不同的值</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>：绕过"重复密码"校验，完成注册。<br>
• <strong>工具</strong>：Burp Suite（代理拦截 + Repeater 重放器）。<br>
• <strong>思路</strong>：校验逻辑只在前端，后端根本不在乎这个字段存不存在。
</blockquote>


-----

## 0x02 实战：复现漏洞

**1. 抓包**

开启 Burp 监听，用 Burp 内置浏览器打开注册页面，填写信息后提交，抓到注册请求：

![注册界面及 Burp 抓到的请求](../../../../../../public/p/juice-shop-repetitive-registration多余的重复密码/assets/Pastedimage20260330164225.png)

**2. 发送到 Repeater，删掉 `passwordRepeat` 字段**

将请求发送到 Repeater，在请求体中找到 `passwordRepeat` 这一行，**直接删掉**，然后发送：

![Repeater 中删除 passwordRepeat 字段](../../../../../../public/p/juice-shop-repetitive-registration多余的重复密码/assets/Pastedimage20260330162405.png)

**3. 注册成功**

服务器返回 `201 Created`，注册成功——后端对这个字段的存在与否毫不在意：

![服务器返回 201，注册成功](../../../../../../public/p/juice-shop-repetitive-registration多余的重复密码/assets/Pastedimage20260330162738.png)

> **结论**："重复密码"的一致性校验完全由前端 JavaScript 完成，后端 API 从未验证两次密码是否匹配，甚至不要求该字段存在。这个字段对服务器来说是透明的——留着它，纯粹是做个样子。

-----

## 0x03 参考资料

- 📖 [Pwning OWASP Juice Shop Pt.14 - Repetitive Registration](https://curiositykillscolby.com/2020/11/10/pwning-owasps-juice-shop-pt-14-repetitive-registration/)
