-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Jennings Zhang edited this page Sep 13, 2019
·
3 revisions
- Notice that flask is a dependency.
-
flag.txtis being used asapp.secret_key. - HTTP POST to
/magawill return a page that displays user input. - The function
render_template_stringis called. - Flask documentation
Flask leverages Jinja2 as template engine.
-
Jinja templates uses mustaces (aka handlebars or double braces) for substituting variables.
-
Flask exposes global variables to jinja2.
-
flask.configvariable holds a key-value pair to app.secret_key. -
Submit
{{config}}into thephonetext field on the form on/index.html. Flag is revealed in output.
If you google "python flask exploit," this is the first result: https://nvisium.com/resources/blog/2015/12/07/injecting-flask.html