当前位置:网站首页>Infiltration learning - problems encountered during SQL injection - explanation of sort=left (version(), 1) - understanding of order by followed by string
Infiltration learning - problems encountered during SQL injection - explanation of sort=left (version(), 1) - understanding of order by followed by string
2022-06-27 22:28:00 【dfzy$_$】
Problem scenario :
This is mainly to explain some problems encountered in my shooting range , That is to say sqllibs Of Less46 Off use sort=left(version(),1) The reason why it can still be echoed normally , And right order by Followed by a string varchar Character types can also be interpreted normally .
Cause analysis :
Yes left This function is in order by After the explanation :
First , Here is the main explanation left(version(),1) Here means to take from the left version() First digit of value , in other words version()=5.7.26 Words , that left This will be equal to 5.
And here's the thing to note , The resulting value here , When placed in order by Then there is a string type ( namely varchar type ), That is to say, it is equivalent to order by “5” In this form . therefore , Whether it's mid left still right All that comes out is “ String of numeric content ”, Sorting it still uses character rules , Will not get the result we want .
Yes order by Understanding of the following string :
Suppose we take order by "5" To execute , that mysql Will literally mean “ By number 5 Sort ”, Instead of sorting by the fifth column in the table (order by 5 It means sorting by the fifth column ).
If you are sorting by character rules , This is not going to happen MySQL( Unless some versions are improved ) Generate the correct sort in , Except by chance . If nothing else is done ( Such as addition, deletion and modification ) Words , This will be sorted according to the sort table in the disk ( That is, the order in which data is read from the disk . This should be determined by the default read mode of the file system or disk ).
That is, no matter what you type in the string , Sorting is basically the default .
Input "5":
Input "less38"
Input 1
Input left(version(),1):
As can be seen from the above , No matter what string you enter , The sorting is the same , because order by Sorting by character set is invalid ,mysql At this point, the disk order table will be sorted by default .
Conclusion
That's what I understand , If there is any mistake, please point it out !!!
边栏推荐
- Conversation Qiao Xinyu: l'utilisateur est le gestionnaire de produits Wei Brand, zéro anxiété définit le luxe
- Gbase 8A OLAP analysis function cume_ Example of dist
- Read write separation master-slave replication of MySQL
- [LeetCode]572. A subtree of another tree
- CDH集群之YARN性能调优
- Summary of gbase 8A database user password security related parameters
- 软件测试自动化测试之——接口测试从入门到精通,每天学习一点点
- Macro task and micro task understanding
- [LeetCode]100. Same tree
- 单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~
猜你喜欢

It smells good. Since I used Charles, Fiddler has been completely uninstalled by me

AQS SOS AQS with me

单元测试界的高富帅,Pytest框架,手把手教学,以后测试报告就这么做~

YOLOv6:又快又准的目标检测框架开源啦

Interval DP of Changyou dynamic programming

管理系统-ITclub(中)

爬虫笔记(2)- 解析

不外泄的测试用例设计秘籍--模块测试

渗透学习-sql注入过程中遇到的问题-针对sort=left(version(),1)的解释-对order by后接字符串的理解

Figure countdownlatch and cyclicbarrier based on AQS queue
随机推荐
百万年薪独家专访,开发人员不修复bug怎么办?
gomock mockgen : unknown embedded interface
average-population-of-each-continent
Figure countdownlatch and cyclicbarrier based on AQS queue
真香,自从用了Charles,Fiddler已经被我彻底卸载了
Open source technology exchange - Introduction to Chengying, a one-stop fully automated operation and maintenance manager
CUDA error:out of memory caused by insufficient video memory of 6G graphics card
\W and [a-za-z0-9_], \Are D and [0-9] equivalent?
Système de gestion - itclub (II)
Use Fiddler to simulate weak network test (2g/3g)
A method of go accessing gbase 8A database
Acwing week 57 longest continuous subsequence - (binary or tree array)
Is it safe to open a stock account through the account opening link given by the CICC securities manager? I want to open an account
从学生到工程师的蜕变之路
Gbase 8A OLAP analysis function cume_ Example of dist
How to do function test well? Are you sure you don't want to know?
[leetcode] dynamic programming solution partition array i[red fox]
Go from introduction to actual combat - only any task is required to complete (notes)
关于davwa的SQL注入时报错:Illegal mix of collations for operation ‘UNION‘原因剖析与验证
How many ways does selenium upload files? I don't believe you have me all!