# 悬挂标记 - HTML无脚本注入
☁️ HackTricks云 ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥
- 你在一家**网络安全公司**工作吗?想要在HackTricks中**宣传你的公司**吗?或者你想要**获取PEASS的最新版本或下载HackTricks的PDF**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
- 发现我们的独家[**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)
- **加入** [**💬**](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)**。**
- **通过向[hacktricks仓库](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud仓库](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
## 简介
当发现**HTML注入**时,可以使用此技术从用户那里提取信息。如果你**找不到任何方法来利用**[**XSS**](xss-cross-site-scripting/),但你可以**注入一些HTML标签**,这将非常有用。\
如果某些**秘密以明文保存**在HTML中,并且你想要从客户端**窃取**它,或者你想要误导某些脚本执行,这也是很有用的。
这里提到的几种技术可以通过意想不到的方式(html标签、CSS、http-meta标签、表单、base等)绕过一些[**内容安全策略**](content-security-policy-csp-bypass/),以泄露信息。
## 主要应用
### 窃取明文秘密
如果你注入`test
```
### 盗取表单
One interesting technique to steal user data is by exploiting dangling markup or HTML scriptless injection. This technique allows an attacker to inject malicious code into a website's HTML code without using any script tags.
The idea behind this technique is to find a vulnerable website that allows user-generated content to be displayed without proper sanitization. The attacker can then inject their own HTML code, including a form that looks identical to the original website's form.
When a user interacts with the injected form, their input is sent to the attacker's server instead of the legitimate website's server. This allows the attacker to steal sensitive information such as usernames, passwords, credit card details, or any other data entered into the form.
To perform this attack, the attacker needs to identify a vulnerable website and find a suitable location to inject their code. This can be done by analyzing the website's source code or using tools like Burp Suite to intercept and modify the website's responses.
Once the injection point is identified, the attacker can craft their malicious HTML code and inject it into the vulnerable website. The injected code should include a form that mimics the original website's form, ensuring that it looks legitimate and doesn't raise suspicion.
To make the attack more effective, the attacker can also use techniques like phishing to trick users into interacting with the injected form. This can be done by sending targeted emails or using social engineering techniques to lure users to the malicious website.
It is important for website developers to implement proper input validation and sanitization techniques to prevent this type of attack. Regular security audits and vulnerability assessments can also help identify and mitigate any potential vulnerabilities that could be exploited by attackers.
```markup
```
然后,将数据发送到路径的表单(如`