-
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.txt
is being used asapp.secret_key
. - HTTP POST to
/maga
will return a page that displays user input. - The function
render_template_string
is 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.config
variable holds a key-value pair to app.secret_key. -
Submit
{{config}}
into thephone
text 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