当前位置:网站首页>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 !!!
边栏推荐
- average-population-of-each-continent
- Conversion between flat array and JSON tree
- Codeforces Round #717 (Div. 2)
- 7 jours d'apprentissage de la programmation simultanée go 7 jours de programmation simultanée go Language Atomic Atomic Atomic actual Operation contains ABA Problems
- The problem of minimum modification cost in two-dimensional array [conversion question + shortest path] (dijkstra+01bfs)
- 《7天學會Go並發編程》第7天 go語言並發編程Atomic原子實戰操作含ABA問題
- Remote invocation of microservices
- Codeforces Round #719 (Div. 3)
- [LeetCode]508. 出現次數最多的子樹元素和
- Which method is called for OSS upload
猜你喜欢
Solution to the error of VMware tool plug-in installed in Windows 8.1 system
《7天学会Go并发编程》第7天 go语言并发编程Atomic原子实战操作含ABA问题
YOLOv6:又快又准的目标检测框架开源啦
Open source technology exchange - Introduction to Chengying, a one-stop fully automated operation and maintenance manager
对话乔心昱:用户是魏牌的产品经理,零焦虑定义豪华
PCIe knowledge point -008: structure of PCIe switch
crontab定时任务常用命令
Dialogue with Qiao Xinyu: the user is the product manager of Wei brand, and zero anxiety defines luxury
Figure countdownlatch and cyclicbarrier based on AQS queue
Système de gestion - itclub (II)
随机推荐
7 jours d'apprentissage de la programmation simultanée go 7 jours de programmation simultanée go Language Atomic Atomic Atomic actual Operation contains ABA Problems
Use Fiddler to simulate weak network test (2g/3g)
[LeetCode]508. The most frequent subtree elements and
How many ways does selenium upload files? I don't believe you have me all!
\w和[A-Za-z0-9_],\d和[0-9]等价吗?
Solution to the error of VMware tool plug-in installed in Windows 8.1 system
OpenSSL programming I: basic concepts
Yolov6: the fast and accurate target detection framework is open source
记一次List对象遍历及float类型判断大小
Start the start php
Management system itclub (medium)
Codeforces Round #716 (Div. 2)
Analysis of stone merging
I think I should start writing my own blog.
Record a list object traversal and determine the size of the float type
Gbase 8A OLAP analysis function cume_ Example of dist
管理系統-ITclub(下)
爬虫笔记(1)- urllib
Common problems encountered by burp Suite
Go from introduction to actual combat - task cancellation (note)