V&N2020-公开赛CHECKIN Leon 2024-11-13 (Updated: 2024-11-13) CTF Linux, RCE ==== 直接代码审计12345678910111213141516171819202122232425262728from flask import Flask, requestimport osapp = Flask(__name__)flag_file = open("flag.txt", "r")# flag = flag_file.read()# flag_file.close()# @app.route('/flag')# def flag():# return flag# ## want flag? naive!# # You will never find the thing you want:)@app.route('/shell')def shell(): os.system("rm -f flag.txt") exec_cmd = request.args.get('c') os.system(exec_cmd) return "1"@app.route('/')def source(): return open("app.py", "r").read()if __name__ == "__main__": app.run(host='0.0.0.0') walk through 任意代码执行? 但是flag.txt被删除了 我拿到shell 是不是能hui复原flag.txt呢? 由于buuoj不能读取外网拿到一个linux lab 获取到不到交互式shell