2023-08-03 19:12:22 +00:00
|
|
|
|
# Web漏洞方法论
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 YouTube 🎥</strong></a></summary>
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-24 09:57:53 +00:00
|
|
|
|
* 你在一家**网络安全公司**工作吗?你想在HackTricks中看到你的**公司广告**吗?或者你想获得**PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
2023-08-24 09:57:53 +00:00
|
|
|
|
* **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram群组**](https://t.me/peass) 或 **关注**我在**Twitter**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**。**
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* **通过向**[**hacktricks repo**](https://github.com/carlospolop/hacktricks) **和**[**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享你的黑客技巧。**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2023-08-03 19:12:22 +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" %}
|
2023-08-03 19:12:22 +00:00
|
|
|
|
现在的**Web应用程序**通常会**使用**某种**中间代理**,这些代理可能会被(滥)用来利用漏洞。这些漏洞需要存在一个有漏洞的代理,但通常还需要后端的一些额外漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
{% endhint %}
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**滥用逐跳头**](../abusing-hop-by-hop-headers.md)
|
2023-08-24 09:57:53 +00:00
|
|
|
|
* [ ] [**缓存欺骗/缓存欺骗**](../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)
|
|
|
|
|
* [ ] [**揭示Cloudflare**](../../network-services-pentesting/pentesting-web/uncovering-cloudflare.md)
|
|
|
|
|
* [ ] [**XSLT服务器端注入**](../xslt-server-side-injection-extensible-stylesheet-languaje-transformations.md)
|
2023-10-26 14:38:55 +00:00
|
|
|
|
* [ ] [**代理/WAF保护绕过**](../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" %}
|
2023-10-27 15:55:59 +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
|
|
|
|
|
2023-10-26 14:38:55 +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/)
|
|
|
|
|
* [ ] [**反向Tab窃取**](../reverse-tab-nabbing.md)
|
|
|
|
|
* [ ] [**XSLT服务器端注入**](../xslt-server-side-injection-extensible-stylesheet-languaje-transformations.md)
|
2022-09-12 18:43:22 +00:00
|
|
|
|
* [ ] [**XSS**](../xss-cross-site-scripting/)
|
|
|
|
|
* [ ] [**XSSI**](../xssi-cross-site-script-inclusion.md)
|
|
|
|
|
* [ ] [**XS-Search**](../xs-search.md)
|
|
|
|
|
|
2023-10-27 15:55:59 +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
|
|
|
|
|
2023-08-03 19:12:22 +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)
|
|
|
|
|
### **表单、WebSockets和PostMsgs**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
当WebSocket发布消息或表单允许用户执行操作时,可能会出现漏洞。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**跨站请求伪造(CSRF)**](../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
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### **HTTP头**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +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/)
|
|
|
|
|
* [ ] [**Cookie黑客**](../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
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
在某些特定功能中,可能需要一些解决方法来绕过它们。
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**2FA/OTP绕过**](../2fa-bypass.md)
|
|
|
|
|
* [ ] [**绕过支付流程**](../bypass-payment-process.md)
|
|
|
|
|
* [ ] [**验证码绕过**](../captcha-bypass.md)
|
|
|
|
|
* [ ] [**登录绕过**](../login-bypass/)
|
|
|
|
|
* [ ] [**竞争条件**](../race-condition.md)
|
|
|
|
|
* [ ] [**速率限制绕过**](../rate-limit-bypass.md)
|
|
|
|
|
* [ ] [**重置忘记的密码绕过**](../reset-password.md)
|
|
|
|
|
* [ ] [**注册漏洞**](../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
|
|
|
|
|
2023-10-27 15:55:59 +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
|
|
|
|
|
2023-10-26 14:38:55 +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
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* [ ] [**OAUTH接管账户**](../oauth-to-account-takeover.md)
|
|
|
|
|
* [ ] [**SAML攻击**](../saml-attacks/)
|
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-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>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 YouTube 🎥</strong></a></summary>
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
2023-09-26 11:32:23 +00:00
|
|
|
|
* 您在**网络安全公司**工作吗?您想在HackTricks中看到您的**公司广告**吗?或者您想获得PEASS的**最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 发现我们的独家[NFT](https://opensea.io/collection/the-peass-family)收藏品[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
2023-08-24 09:57:53 +00:00
|
|
|
|
* **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**电报群组**](https://t.me/peass),或在**Twitter**上**关注**我[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**。**
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* **通过向**[**hacktricks repo**](https://github.com/carlospolop/hacktricks) **和**[**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享您的黑客技巧。**
|
2022-09-12 18:43:22 +00:00
|
|
|
|
|
|
|
|
|
</details>
|