# 【juice-shop】★ Security Policy：安全政策披露

# 【juice-shop】★ Security Policy：安全政策披露

## 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. 本次挑战要求你扮演一名道德黑客。<br>
2. 毫无疑问，在对应用程序进行任何研究之前，您都希望阅读安全政策。<br>
3. 作为正派人士，你会在未经应用程序所有者同意的情况下贸然发起攻击吗？<br>
4. 您可能还想阅读现行的安全政策或漏洞悬赏计划。
</blockquote>

---

## 0x02 实战：复现漏洞

>……
>这个我没看解答真做不出来( ╯□╰ )


根据提示，需要查找网站的安全政策文件。类似于 `robots.txt` 的作用，`security.txt` 是一个标准化的文件，用于告诉白帽黑客如何向网站所有者报告漏洞。

按照 RFC 9116 标准，该文件应位于以下路径：

```
http://127.0.0.1:3000/.well-known/security.txt
```

访问该路径即可获得网站的安全政策信息，完成挑战。

---

## 0x03 知识扩展

### 📚 security.txt 与 robots.txt 的区别

| 文件名        | 目的                          | 受众           | 标准文档      |
| :---------- | :--------------------------- | :------------- | :----------- |
| `robots.txt` | 指导搜索引擎爬虫抓取策略       | 搜索引擎爬虫   | 事实标准      |
| `security.txt` | 指导白帽黑客漏洞报告流程      | 安全研究人员   | RFC 9116     |

### 🔍 关键认知

- `security.txt` 遵循 **RFC 9116** 标准（2022 年 4 月发布）
- 文件必须放在 `/.well-known/security.txt` 路径下
- 白帽黑客应在未经授权前，先查阅此文件了解报告流程
- 这体现了"负责任披露"的安全文化

---

## 0x04 参考资料

- 📖 [OWASP Juice Shop 官方解答](https://pwning.owasp-juice.shop/companion-guide/latest/appendix/solutions.html#_behave_like_any_white_hat_should_before_getting_into_the_action)
- 🔐 [Security.txt 官方网站](https://securitytxt.org/)
- 📋 [RFC 9116 - A File Format to Aid in Security Vulnerability Disclosure](https://www.rfc-editor.org/rfc/rfc9116)

