# Web Vulnerabilities Methodology

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](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) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

在每次Web渗透测试中，都存在**一些隐藏和明显的可能存在漏洞的地方**。本文旨在作为一个检查清单，确认您已经在所有可能的地方搜索漏洞。

## 代理

{% hint style="info" %}
如今，**Web应用程序**通常会**使用某种形式的中间代理**，这些代理可能会被（滥）用来利用漏洞。这些漏洞需要存在一个有漏洞的代理，但通常还需要后端存在一些额外的漏洞。
{% endhint %}

* [ ] [**滥用逐跳头**](https://hacktricks.xsx.tw/pentesting-web/abusing-hop-by-hop-headers)
* [ ] [**缓存投毒/缓存欺骗**](https://hacktricks.xsx.tw/pentesting-web/cache-deception)
* [ ] [**HTTP请求走私**](https://hacktricks.xsx.tw/pentesting-web/http-request-smuggling)
* [ ] [**H2C走私**](https://hacktricks.xsx.tw/pentesting-web/h2c-smuggling)
* [ ] [**服务器端包含/边缘端包含**](https://hacktricks.xsx.tw/pentesting-web/server-side-inclusion-edge-side-inclusion-injection)
* [ ] [**揭示Cloudflare**](https://hacktricks.xsx.tw/network-services-pentesting/pentesting-web/uncovering-cloudflare)
* [ ] [**XSLT服务器端注入**](https://hacktricks.xsx.tw/pentesting-web/xslt-server-side-injection-extensible-stylesheet-language-transformations)
* [ ] [**代理/WAF绕过保护**](https://hacktricks.xsx.tw/pentesting-web/proxy-waf-protections-bypass)

## **用户输入**

{% hint style="info" %}
大多数Web应用程序将允许用户输入一些稍后将被处理的数据。\
根据服务器期望的数据结构，某些漏洞可能适用，而另一些可能不适用。
{% endhint %}

### **反射值**

如果输入的数据在响应中以某种方式反映出来，页面可能容易受到多种问题的影响。

* [ ] [**客户端模板注入**](https://hacktricks.xsx.tw/pentesting-web/client-side-template-injection-csti)
* [ ] [**命令注入**](https://hacktricks.xsx.tw/pentesting-web/command-injection)
* [ ] [**CRLF**](https://hacktricks.xsx.tw/pentesting-web/crlf-0d-0a)
* [ ] [**悬空标记**](https://hacktricks.xsx.tw/pentesting-web/dangling-markup-html-scriptless-injection)
* [ ] [**文件包含/路径遍历**](https://hacktricks.xsx.tw/pentesting-web/file-inclusion)
* [ ] [**开放重定向**](https://hacktricks.xsx.tw/pentesting-web/open-redirect)
* [ ] [**原型污染到XSS**](https://hacktricks.xsx.tw/deserialization/nodejs-proto-prototype-pollution#client-side-prototype-pollution-to-xss)
* [ ] [**服务器端包含/边缘端包含**](https://hacktricks.xsx.tw/pentesting-web/server-side-inclusion-edge-side-inclusion-injection)
* [ ] [**服务器端请求伪造**](https://hacktricks.xsx.tw/pentesting-web/ssrf-server-side-request-forgery)
* [ ] [**服务器端模板注入**](https://hacktricks.xsx.tw/pentesting-web/ssti-server-side-template-injection)
* [ ] [**反向标签窃取**](https://hacktricks.xsx.tw/pentesting-web/reverse-tab-nabbing)
* [ ] [**XSLT服务器端注入**](https://hacktricks.xsx.tw/pentesting-web/xslt-server-side-injection-extensible-stylesheet-language-transformations)
* [ ] [**XSS**](https://hacktricks.xsx.tw/pentesting-web/xss-cross-site-scripting)
* [ ] [**XSSI**](https://hacktricks.xsx.tw/pentesting-web/xssi-cross-site-script-inclusion)
* [ ] [**XS-Search**](https://hacktricks.xsx.tw/pentesting-web/xs-search)

其中一些漏洞需要特殊条件，其他只需要内容被反映。您可以在以下链接中找到一些有趣的多语言代码，以快速测试漏洞：

{% content-ref url="pocs-and-polygloths-cheatsheet" %}
[pocs-and-polygloths-cheatsheet](https://hacktricks.xsx.tw/pentesting-web/pocs-and-polygloths-cheatsheet)
{% endcontent-ref %}

### **搜索功能**

如果功能可用于在后端搜索某种数据，也许您可以（滥）用它来搜索任意数据。

* [ ] [**文件包含/路径遍历**](https://hacktricks.xsx.tw/pentesting-web/file-inclusion)
* [ ] [**NoSQL注入**](https://hacktricks.xsx.tw/pentesting-web/nosql-injection)
* [ ] [**LDAP注入**](https://hacktricks.xsx.tw/pentesting-web/ldap-injection)
* [ ] [**ReDoS**](https://hacktricks.xsx.tw/pentesting-web/regular-expression-denial-of-service-redos)
* [ ] [**SQL注入**](https://hacktricks.xsx.tw/pentesting-web/sql-injection)
* [ ] [**XPATH注入**](https://hacktricks.xsx.tw/pentesting-web/xpath-injection)

### **表单、WebSockets和PostMsgs**

当WebSocket发布消息或表单允许用户执行操作时，可能会出现漏洞。

* [ ] [**跨站请求伪造**](https://hacktricks.xsx.tw/pentesting-web/csrf-cross-site-request-forgery)
* [ ] [**跨站WebSocket劫持（CSWSH）**](https://hacktricks.xsx.tw/pentesting-web/websocket-attacks)
* [ ] [**PostMessage漏洞**](https://hacktricks.xsx.tw/pentesting-web/postmessage-vulnerabilities)

### **HTTP头**

根据Web服务器提供的HTTP头，可能存在一些漏洞。

* [ ] [**点击劫持**](https://hacktricks.xsx.tw/pentesting-web/clickjacking)
* [ ] [**内容安全策略绕过**](https://hacktricks.xsx.tw/pentesting-web/content-security-policy-csp-bypass)
* [ ] [**Cookie黑客**](https://hacktricks.xsx.tw/pentesting-web/hacking-with-cookies)
* [ ] [**CORS - 配置错误和绕过**](https://hacktricks.xsx.tw/pentesting-web/cors-bypass)

### **绕过**

有一些特定功能，可能需要一些变通方法才能绕过它们。

* [ ] [**2FA/OTP绕过**](https://hacktricks.xsx.tw/pentesting-web/2fa-bypass)
* [ ] [**绕过支付流程**](https://hacktricks.xsx.tw/pentesting-web/bypass-payment-process)
* [ ] [**验证码绕过**](https://hacktricks.xsx.tw/pentesting-web/captcha-bypass)
* [ ] [**登录绕过**](https://hacktricks.xsx.tw/pentesting-web/login-bypass)
* [ ] [**竞争条件**](https://hacktricks.xsx.tw/pentesting-web/race-condition)
* [ ] [**速率限制绕过**](https://hacktricks.xsx.tw/pentesting-web/rate-limit-bypass)
* [ ] [**重置忘记密码绕过**](https://hacktricks.xsx.tw/pentesting-web/reset-password)
* [ ] [**注册漏洞**](https://hacktricks.xsx.tw/pentesting-web/registration-vulnerabilities)

### **结构化对象/特定功能**

某些功能将需要**数据以非常特定的格式结构化**（如语言序列化对象或XML）。因此，更容易确定应用程序是否可能存在漏洞，因为它需要处理这种类型的数据。\
如果使用**特定格式的输入**（如电子邮件头注入），某些**特定功能**也可能存在漏洞。

* [ ] [**反序列化**](https://hacktricks.xsx.tw/pentesting-web/deserialization)
* [ ] [**电子邮件头注入**](https://hacktricks.xsx.tw/pentesting-web/email-injections)
* [ ] [**JWT漏洞**](https://hacktricks.xsx.tw/pentesting-web/hacking-jwt-json-web-tokens)
* [ ] [**XML外部实体**](https://hacktricks.xsx.tw/pentesting-web/xxe-xee-xml-external-entity)

### 文件

允许上传文件的功能可能存在多个问题。\
生成包含用户输入的文件的功能可能执行意外代码。\
打开由用户上传或自动生成的包含用户输入的文件的用户可能会受到威胁。

* [ ] [**文件上传**](https://hacktricks.xsx.tw/pentesting-web/file-upload)
* [ ] [**公式注入**](https://hacktricks.xsx.tw/pentesting-web/formula-csv-doc-latex-ghostscript-injection)
* [ ] [**PDF注入**](https://hacktricks.xsx.tw/pentesting-web/xss-cross-site-scripting/pdf-injection)
* [ ] [**服务器端XSS**](https://hacktricks.xsx.tw/pentesting-web/xss-cross-site-scripting/server-side-xss-dynamic-pdf)

### **外部身份管理**

* [ ] [**OAUTH接管账户**](https://hacktricks.xsx.tw/pentesting-web/oauth-to-account-takeover)
* [ ] [**SAML攻击**](https://hacktricks.xsx.tw/pentesting-web/saml-attacks)

### **其他有用的漏洞**

这些漏洞可能有助于利用其他漏洞。

* [ ] [**域名/子域接管**](https://hacktricks.xsx.tw/pentesting-web/domain-subdomain-takeover)
* [ ] [**IDOR**](https://hacktricks.xsx.tw/pentesting-web/idor)
* [ ] [**参数污染**](https://hacktricks.xsx.tw/pentesting-web/parameter-pollution)
* [ ] [**Unicode规范化漏洞**](https://hacktricks.xsx.tw/pentesting-web/unicode-injection)

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](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) 或 [**电报群**](https://t.me/peass) 或在**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**上关注**我们。
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>
