Server-side template injection (SSTI)

Template engines

Template engine
Lenguaje
Server / client side

Twig

PHP

Server side

Apache FreeMarker

Java (usualmente)

Server side

Jinja

Python

Server side

Pug / Jade

JavaScript

Server side (usualmente)

Handlebars

JavaScript

Server and client side

Mustache

Varios

Server and client side

Identificación general de SSTI

# payloads general
{1234*2}
{1234+1234}
%{1234*2}
%{1234+1234}
<%= 1234*2 %>
<%= 1234+1234 %>
${1234*2}
${1234+1234}
{{1234*2}}
{{1234+1234}}
#{1234*2}
#{1234+1234}
@{1234*2}
@{1234+1234}
@(1234*2)
@(1234+1234)

# identificación
2468
2,468
2.468
<2468>

# payloads error
${{<%[%'"}}%\.
<%= foobar %>

Arbol de decisión para la identificación del motor de plantilla

Arbol de decisión para la identificación del motor de plantilla

Twig

Identificación general.

Payloads generales.

Out-of-band (OOB)

Habilitación de servidor HTTP.

Identificación de SSTI out of bound (blind).

Ejecución de comandos.

Lectura de archivos.

Apache FreeMarker

Identificación general.

Jinja

Identificación general.

Pug / Jade

Identificación general.

Handlebars

Herramientas automatizadas

Tplmap

Instalación.

Utilización de herramienta.

Última actualización

¿Te fue útil?