[GDOUCTF 2023]EZ WEB

[GDOUCTF 2023]EZ WEB wp

进入页面,点一下按钮,弹出弹窗:

[GDOUCTF 2023]EZ WEB_第1张图片

查看源码:

[GDOUCTF 2023]EZ WEB_第2张图片

源码中给出提示,有一个名为 src 的文件。

访问 src 文件:

访问后下载了一个 py 文件,其内容为:

import flask

app = flask.Flask(__name__)

@app.route('/', methods=['GET'])
def index():
  return flask.send_file('index.html')

@app.route('/src', methods=['GET'])
def source():
  return flask.send_file('app.py')

@app.route('/super-secret-route-nobody-will-guess', methods=['PUT'])
def flag():
  return open('flag').read()

使用了 flask 框架,设定了一些路由,其中有三个路径:

‘/’,‘/src’ 和 ‘/super-secret-route-nobody-will-guess’

第三个路径中提到了 flag 并且设置请求方式为 PUT 。

PUT 方式访问 /super-secret-route-nobody-will-guess 路径

抓包改包:

[GDOUCTF 2023]EZ WEB_第3张图片

拿到 flag 。

你可能感兴趣的:(ctf,web安全,网络安全)