2023-08-03 19:12:22 +00:00
|
|
|
|
# Web漏洞方法论
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
<summary><strong>从零开始学习AWS黑客技术,成为英雄</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS红队专家)</strong></a><strong>!</strong></summary>
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
支持HackTricks的其他方式:
|
|
|
|
|
|
|
|
|
|
* 如果您想在**HackTricks中看到您的公司广告**或**下载HackTricks的PDF**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 获取[**官方PEASS & HackTricks商品**](https://peass.creator-spring.com)
|
|
|
|
|
* 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs系列**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* **加入** 💬 [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**telegram群组**](https://t.me/peass) 或在**Twitter** 🐦 上**关注**我 [**@carlospolopm**](https://twitter.com/carlospolopm)**。**
|
|
|
|
|
* **通过向** [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
在每次Web渗透测试中,都有**许多隐藏和明显的地方可能存在漏洞**。本文旨在作为清单,确认您已经在所有可能的地方搜索了漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 代理
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
{% hint style="info" %}
|
2024-01-01 19:59:31 +00:00
|
|
|
|
如今,**web应用程序**通常会使用某种**中间代理**,这些代理可能被用来利用漏洞。这些漏洞需要一个易受攻击的代理才能存在,但它们通常也需要后端的额外漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
{% endhint %}
|
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**滥用逐跳头部**](../abusing-hop-by-hop-headers.md)
|
|
|
|
|
* [ ] [**缓存投毒/缓存欺骗**](../cache-deception.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**HTTP请求走私**](../http-request-smuggling/)
|
|
|
|
|
* [ ] [**H2C走私**](../h2c-smuggling.md)
|
|
|
|
|
* [ ] [**服务器端包含/边缘端包含**](../server-side-inclusion-edge-side-inclusion-injection.md)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**揭露Cloudflare**](../../network-services-pentesting/pentesting-web/uncovering-cloudflare.md)
|
|
|
|
|
* [ ] [**XSLT服务器端注入**](../xslt-server-side-injection-extensible-stylesheet-language-transformations.md)
|
|
|
|
|
* [ ] [**代理/防火墙保护绕过**](../proxy-waf-protections-bypass.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## **用户输入**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
{% hint style="info" %}
|
2024-01-01 19:59:31 +00:00
|
|
|
|
大多数web应用程序将**允许用户输入一些稍后将被处理的数据。**\
|
2023-10-26 14:38:55 +00:00
|
|
|
|
根据服务器期望的数据结构,某些漏洞可能适用或不适用。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
{% endhint %}
|
|
|
|
|
|
2023-10-26 14:38:55 +00:00
|
|
|
|
### **反射值**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
如果输入的数据可能以某种方式在响应中反射,页面可能容易受到几个问题的影响。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**客户端模板注入**](../client-side-template-injection-csti.md)
|
|
|
|
|
* [ ] [**命令注入**](../command-injection.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
* [ ] [**CRLF**](../crlf-0d-0a.md)
|
2023-10-27 15:55:59 +00:00
|
|
|
|
* [ ] [**悬挂标记**](../dangling-markup-html-scriptless-injection/)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**文件包含/路径遍历**](../file-inclusion/)
|
|
|
|
|
* [ ] [**开放重定向**](../open-redirect.md)
|
|
|
|
|
* [ ] [**原型污染到XSS**](../deserialization/nodejs-proto-prototype-pollution/#client-side-prototype-pollution-to-xss)
|
|
|
|
|
* [ ] [**服务器端包含/边缘端包含**](../server-side-inclusion-edge-side-inclusion-injection.md)
|
|
|
|
|
* [ ] [**服务器端请求伪造**](../ssrf-server-side-request-forgery/)
|
|
|
|
|
* [ ] [**服务器端模板注入**](../ssti-server-side-template-injection/)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**反向标签劫持**](../reverse-tab-nabbing.md)
|
|
|
|
|
* [ ] [**XSLT服务器端注入**](../xslt-server-side-injection-extensible-stylesheet-language-transformations.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
* [ ] [**XSS**](../xss-cross-site-scripting/)
|
|
|
|
|
* [ ] [**XSSI**](../xssi-cross-site-script-inclusion.md)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**XS-搜索**](../xs-search.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
上述提到的一些漏洞需要特殊条件,其他只需要内容被反射。您可以在以下位置找到一些有趣的多语言测试来快速测试漏洞:
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
{% content-ref url="../pocs-and-polygloths-cheatsheet/" %}
|
|
|
|
|
[pocs-and-polygloths-cheatsheet](../pocs-and-polygloths-cheatsheet/)
|
|
|
|
|
{% endcontent-ref %}
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### **搜索功能**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
如果该功能可用于在后端搜索某种数据,也许您可以(滥用)它来搜索任意数据。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**文件包含/路径遍历**](../file-inclusion/)
|
|
|
|
|
* [ ] [**NoSQL注入**](../nosql-injection.md)
|
|
|
|
|
* [ ] [**LDAP注入**](../ldap-injection.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
* [ ] [**ReDoS**](../regular-expression-denial-of-service-redos.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**SQL注入**](../sql-injection/)
|
|
|
|
|
* [ ] [**XPATH注入**](../xpath-injection.md)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### **表单、WebSockets和PostMsgs**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
当websocket发布消息或表单允许用户执行操作时,可能会出现漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**跨站请求伪造**](../csrf-cross-site-request-forgery.md)
|
2023-09-26 11:32:23 +00:00
|
|
|
|
* [ ] [**跨站WebSocket劫持(CSWSH)**](../websocket-attacks.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**PostMessage漏洞**](../postmessage-vulnerabilities/)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
### **HTTP头部**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
根据web服务器给出的HTTP头部,可能存在一些漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-24 09:57:53 +00:00
|
|
|
|
* [ ] [**点击劫持**](../clickjacking.md)
|
|
|
|
|
* [ ] [**内容安全策略绕过**](../content-security-policy-csp-bypass/)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**Cookies黑客攻击**](../hacking-with-cookies/)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**CORS - 配置错误和绕过**](../cors-bypass.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### **绕过**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
在一些特定功能中,一些解决方法可能有助于绕过它们
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**2FA/OTP绕过**](../2fa-bypass.md)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**绕过支付过程**](../bypass-payment-process.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**验证码绕过**](../captcha-bypass.md)
|
|
|
|
|
* [ ] [**登录绕过**](../login-bypass/)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**竞态条件**](../race-condition.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**速率限制绕过**](../rate-limit-bypass.md)
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**重置忘记密码绕过**](../reset-password.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**注册漏洞**](../registration-vulnerabilities.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### **结构化对象/特定功能**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
一些功能将要求**数据以非常特定的格式结构化**(如序列化对象或XML)。因此,更容易识别应用程序是否可能存在漏洞,因为它需要处理那种类型的数据。\
|
|
|
|
|
一些**特定功能**也可能存在漏洞,如果使用了**特定格式的输入**(如电子邮件头注入)。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**反序列化**](../deserialization/)
|
|
|
|
|
* [ ] [**电子邮件头注入**](../email-injections.md)
|
|
|
|
|
* [ ] [**JWT漏洞**](../hacking-jwt-json-web-tokens.md)
|
|
|
|
|
* [ ] [**XML外部实体**](../xxe-xee-xml-external-entity.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### 文件
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
允许上传文件的功能可能存在几个问题。\
|
|
|
|
|
生成包含用户输入的文件的功能可能会执行意外的代码。\
|
|
|
|
|
打开用户上传的或自动生成的包含用户输入的文件的用户可能会受到影响。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**文件上传**](../file-upload/)
|
2023-10-27 15:55:59 +00:00
|
|
|
|
* [ ] [**公式注入**](../formula-csv-doc-latex-ghostscript-injection.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**PDF注入**](../xss-cross-site-scripting/pdf-injection.md)
|
|
|
|
|
* [ ] [**服务器端XSS**](../xss-cross-site-scripting/server-side-xss-dynamic-pdf.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### **外部身份管理**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* [ ] [**OAUTH到账户接管**](../oauth-to-account-takeover.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**SAML攻击**](../saml-attacks/)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
### **其他有帮助的漏洞**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
这些漏洞可能有助于利用其他漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-10-27 15:55:59 +00:00
|
|
|
|
* [ ] [**域名/子域名接管**](../domain-subdomain-takeover.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
* [ ] [**IDOR**](../idor.md)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**参数污染**](../parameter-pollution.md)
|
|
|
|
|
* [ ] [**Unicode规范化漏洞**](../unicode-injection/)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
<summary><strong>从零开始学习AWS黑客技术,成为英雄</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS红队专家)</strong></a><strong>!</strong></summary>
|
|
|
|
|
|
|
|
|
|
支持HackTricks的其他方式:
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2024-01-01 19:59:31 +00:00
|
|
|
|
* 如果您想在**HackTricks中看到您的公司广告**或**下载HackTricks的PDF**,请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 获取[**官方PEASS & HackTricks商品**](https://peass.creator-spring.com)
|
|
|
|
|
* 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs系列**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* **加入** 💬 [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**telegram群组**](https://t.me/peass) 或在**Twitter** 🐦 上**关注**我 [**@carlospolopm**](https://twitter.com/carlospolopm)**。**
|
|
|
|
|
* **通过向** [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
</details>
|