CTF校队暑期练习2021.7.13
CTF题目 July. 13th 2021
web/cool
Aaron has a message for the cool kids. For support, DM BrownieInMotion.
Download: app.py
网页是一个登录页面,一个注册页面。注册页面可以注册账号,但登陆后会提示并不是名字为ginkoid的人。显然,这题是要得到ginkoid的密码。
下载下来一个.py文件:app.py
其中create_user和check_login两个函数中,都是直接格式化SQL语句,有可能注入。
对username进行了检查,不能有A-Za-z1-9以外的字符。但没有检查register时的password,所以在这里做文章。
在register的密码框里面输入'||substr((select password from users),1,1));--
,可以注册成功,并且密码是第一个人(ginkoid)的密码的第一个字符。可以暴力破解出第一个字符是什么。依此类推,直到破解完32位。运行下面的Python代码得到密码。
登录后自动下载一个.mp3文件,查看二进制,末尾是flag:flag-at-end-of-file.mp3
|
|
- Author: HuaHuaY
- Link: https://www.huahuaorz.com/post/CTF%E6%A0%A1%E9%98%9F%E7%BB%83%E4%B9%A0/CTF%E6%A0%A1%E9%98%9F%E6%9A%91%E6%9C%9F%E7%BB%83%E4%B9%A02021.7.13/
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.